From af7b716a60d889acea95560abba0e46eee008b8f Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期三, 05 七月 2023 13:54:50 +0800
Subject: [PATCH] backup0705

---
 force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js |   57 ++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 42 insertions(+), 15 deletions(-)

diff --git a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
index 47d4801..50cb5f6 100644
--- a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
+++ b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
@@ -109,7 +109,7 @@
       fieldName: "productPackingListManual",
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 120,
+      initialWidth: 55,
       cellAttributes: { alignment: "right" }
     },
     {
@@ -124,20 +124,20 @@
       fieldName: "reportProductApprobation",
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 180
+      initialWidth: 190
     },
     {
       label: "娉ㄥ唽璇佹晥鏈�",
       fieldName: "ReportProductExpirationDate",
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 100
+      initialWidth: 110
     },
     {
       label: "BarCode",
       fieldName: "barCode",
       hideDefaultActions: true,
-      wrap: true,
+      wrapText: true,
       initialWidth: 400
     }
   ];
@@ -148,9 +148,13 @@
       label: "鍑哄簱鍗�",
       fieldName: "orderUrl",
       type: "url",
-      typeAttributes: { label: { fieldName: "orderNo" }, target: "_blank" },
+      typeAttributes: {
+        label: { fieldName: "orderNo" },
+        target: "_blank"
+      },
       hideDefaultActions: true,
-      wrapText: true
+      wrapText: true,
+      initialWidth: 180
     });
     // cols.push({label:'鍑哄簱鍗�' , fieldName:'orderNo', hideDefaultActions: true});
     cols.push({
@@ -193,7 +197,7 @@
       label: "BarCode",
       fieldName: "barCode",
       hideDefaultActions: true,
-      wrap: true,
+      wrapText: true,
       initialWidth: 230
     });
     cols.push({
@@ -232,7 +236,7 @@
       },
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 100
+      initialWidth: 150
     });
     // cols.push({label:'杩斿搧鍘熷洜' , fieldName:'returnReason', hideDefaultActions: true});
     return cols;
@@ -251,7 +255,7 @@
       fieldName: "barCodeNo",
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 400
+      initialWidth: 500
     });
     cols.push({
       label: "浣跨敤鏈熼檺",
@@ -440,11 +444,14 @@
             result.consumableorderdetailsRecords;
           var consumableorderdetailsRecordsview = [];
           for (var i in this.consumableorderdetailsRecords) {
+            this.consumableorderdetailsRecords[i]["dataType"] =
+              "DataileRecords";
             consumableorderdetailsRecordsview.push(
               this.consumableorderdetailsRecords[i]
             );
           }
           for (var i in this.consumableInventory) {
+            this.consumableInventory[i]["dataType"] = "Inventory";
             consumableorderdetailsRecordsview.push(this.consumableInventory[i]);
           }
           this.consumableorderdetailsRecordsview =
@@ -455,6 +462,16 @@
                 this.consumableorderdetailsRecordsview[i].Prod.Id;
               this.consumableorderdetailsRecordsview[i]["prodName"] =
                 this.consumableorderdetailsRecordsview[i].Prod.Name__c;
+            }
+            if (
+              this.consumableorderdetailsRecordsview[i]["dataType"] ==
+              "Inventory"
+            ) {
+              this.consumableorderdetailsRecordsview[i]["barCode"] =
+                this.consumableorderdetailsRecordsview[i].barCodeNo;
+            } else if (this.consumableorderdetailsRecordsview[i].esd != null) {
+              this.consumableorderdetailsRecordsview[i]["barCode"] =
+                this.consumableorderdetailsRecordsview[i].esd.Bar_Code__c;
             }
             if (this.consumableorderdetailsRecordsview[i].esd != null) {
               this.consumableorderdetailsRecordsview[i][
@@ -471,8 +488,6 @@
                 this.consumableorderdetailsRecordsview[
                   i
                 ].esd.Report_Product_Approbation__c;
-              this.consumableorderdetailsRecordsview[i]["barCode"] =
-                this.consumableorderdetailsRecordsview[i].esd.Bar_Code__c;
             }
           }
           console.log("len1:" + this.consumableorderdetailsRecords.length);
@@ -484,9 +499,11 @@
           this.showGoodsofReturnList = result.showGoodsofReturnList;
           var showGoodsofReturnListView = [];
           for (var i in this.showGoodsofReturnList) {
+            this.showGoodsofReturnList[i]["dataType"] = "GoodsoOfReturn";
             showGoodsofReturnListView.push(this.showGoodsofReturnList[i]);
           }
           for (var i in this.consumableInventory) {
+            this.consumableInventory[i]["dataType"] = "Inventory";
             showGoodsofReturnListView.push(this.consumableInventory[i]);
           }
           this.showGoodsofReturnListView = showGoodsofReturnListView;
@@ -494,6 +511,13 @@
             if (this.showGoodsofReturnListView[i].Prod != null) {
               this.showGoodsofReturnListView[i]["prodName"] =
                 this.showGoodsofReturnListView[i].Prod.Name__c;
+            }
+            if (this.showGoodsofReturnListView[i]["dataType"] == "Inventory") {
+              this.showGoodsofReturnListView[i]["barCode"] =
+                this.showGoodsofReturnListView[i].barCodeNo;
+            } else if (this.showGoodsofReturnListView[i].esd != null) {
+              this.showGoodsofReturnListView[i]["barCode"] =
+                this.showGoodsofReturnListView[i].esd.Bar_Code__c;
             }
             if (this.showGoodsofReturnListView[i].esd != null) {
               if (
@@ -541,8 +565,6 @@
                 this.showGoodsofReturnListView[i].esd.HospItal_Name__c;
               this.showGoodsofReturnListView[i]["orderDealer"] =
                 this.showGoodsofReturnListView[i].esd.Order_Dealer_Info__c;
-              this.showGoodsofReturnListView[i]["barCode"] =
-                this.showGoodsofReturnListView[i].esd.Bar_Code__c;
               this.showGoodsofReturnListView[i]["sterilizationLimit"] =
                 this.showGoodsofReturnListView[i].esd.Sterilization_limit__c;
               this.showGoodsofReturnListView[i]["boxPiece"] =
@@ -618,7 +640,9 @@
               JSON.stringify(this.consumableorderdetailsRecordserror)
           );
           this.showSpinner = false;
-          this.showMyToast("鑾峰彇鎴愬姛", "", "success");
+          if (this.errorMsgs.length < 1) {
+            this.showMyToast("鑾峰彇鎴愬姛", "", "success");
+          }
         } else {
           this.showSpinner = false;
           this.warningMsgs = result.warningMsgList;
@@ -724,10 +748,13 @@
           };
           this[NavigationMixin.Navigate](config);
         } else {
+          console.log("error1:" + result.errorMsg);
           this.showSpinner = false;
           this.warningMsgs = result.warningMsgList;
           this.errorMsgs = result.errorMsgList;
-          console.log("error1:" + result.errorMsg);
+          if (result.errorMsg.includes("鏃犳硶淇濆瓨姝よ褰�")) {
+            result.errorMsg = "鏃犳硶淇濆瓨璁板綍";
+          }
           this.showMyToast("鐧诲綍杩斿搧澶辫触", result.errorMsg, "error");
         }
       })

--
Gitblit v1.9.1