From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523

---
 force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js |   39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
index 4361ac7..ab13ad8 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
@@ -87,6 +87,7 @@
         {
             label: "娉ㄥ唽璇佹晥鏈�",
             wrapText: true,
+            initialWidth: 115,
             fieldName: "expiration_Date",
             hideDefaultActions: true,
         },
@@ -94,6 +95,7 @@
             label: "绗�3鍒嗙被",
             fieldName: "Category3__c",
             wrapText: true,
+            initialWidth: 115,
             hideDefaultActions: true,
             sortable: true,
         },
@@ -101,6 +103,7 @@
             label: "绗�4鍒嗙被",
             fieldName: "Category4__c",
             wrapText: true,
+            initialWidth: 115,
             hideDefaultActions: true,
             sortable: true,
         },
@@ -108,26 +111,29 @@
             label: "绗�5鍒嗙被",
             fieldName: "Category5__c",
             wrapText: true,
+            initialWidth: 115,
             hideDefaultActions: true,
             sortable: true,
         },
         {
             label: "鍗曚綅",
             type: "customUnit",
+            initialWidth: 100,
             hideDefaultActions: true,
             typeAttributes: {
                 unitValue: { fieldName: "unitValue" },
                 unitOptions: { fieldName: "unitOptions" },
-                recordId: { fieldName: "recordId" },
+                recordId: { fieldName: "Id" },
             },
         },
         {
             label: "鍑鸿揣鏁伴噺",
             type: "customShipment",
+            initialWidth: 100,
             hideDefaultActions: true,
             cellAttributes: { alignment: "right" },
             typeAttributes: {
-                recordId: { fieldName: "recordId" },
+                recordId: { fieldName: "Id" },
                 shipmentNumber: { fieldName: "shipmentNumber" },
             },
         },
@@ -135,16 +141,16 @@
             label: "鍑鸿揣鍗曚环(鍏�)",
             type: "customShipmentUnitPrice",
             hideDefaultActions: true,
-            initialWidth: 110,
+            initialWidth: 120,
             typeAttributes: {
-                recordId: { fieldName: "recordId" },
+                recordId: { fieldName: "Id" },
                 shippingUnitPrice: { fieldName: "shippingUnitPrice" },
             },
         },
         {
             label: "鍑鸿揣閲戦(鍏�)",
             type: "customShipmentAmount",
-            initialWidth: 110,
+            initialWidth: 120,
             cellAttributes: { alignment: "right" },
             hideDefaultActions: true,
             typeAttributes: {
@@ -156,7 +162,7 @@
             fieldName: "Boxnumber",
             cellAttributes: { alignment: "right" },
             wrapText: true,
-            initialWidth: 120,
+            initialWidth: 160,
             hideDefaultActions: true,
         },
         {
@@ -164,7 +170,7 @@
             fieldName: "Piecenumber",
             cellAttributes: { alignment: "right" },
             wrapText: true,
-            initialWidth: 120,
+            initialWidth: 160,
             hideDefaultActions: true,
         },
     ];
@@ -173,7 +179,7 @@
             label: "娑堣�楀搧鍚嶇О",
             fieldName: "Name__c",
             hideDefaultActions: true,
-            initialWidth: 340,
+            initialWidth: 320,
             wrapText: true,
             sortable: true,
         },
@@ -262,6 +268,7 @@
             fieldName: "Name",
             initialWidth: 400,
             hideDefaultActions: true,
+            wrapText: true,
         },
         {
             label: "鐪佷唤",
@@ -718,6 +725,8 @@
                 this.data = r.entity.pageRecords;
                 this.editData = r.entity.pageRecords;
                 console.log("this.data start = " + JSON.stringify(this.data));
+                this.hasHosPro = r.entity.hasHosPro;
+                console.log("this.hasHosPro = " + this.hasHosPro);
                 if (this.EditAble) {
                     for (var i in this.data) {
                         let unitOptions = [];
@@ -750,6 +759,7 @@
 
 
                         this.data[i]["Id"] = this.data[i].Prod.Id;
+
                         if (this.hasHosPro) {
                             if (this.data[i]["hospitalSpecialOffer"]) {
                                 this.data[i]["Id"] = this.data[i].Prod.Id + 'ishos';
@@ -772,6 +782,7 @@
                             this.selectedRows.push(this.data[i].Id);
                         }
                     }
+                    console.log('EditAble this.data = ' + JSON.stringify(this.data))
                 } else {
                     for (var i in this.editData) {
                         this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
@@ -813,7 +824,7 @@
                 this.Existarrive = r.entity.Existarrive;
 
                 console.log("this.EditAble = " + this.EditAble);
-                this.hasHosPro = r.entity.hasHosPro;
+                
                 //disable
 
                 if (Object.values(r.entity.coc).length > 0) {
@@ -930,7 +941,7 @@
                         label: this.InvoiceProNotLabel,
                         fieldName: "InvoiceProNot_count__c",
                         type: "number",
-                        initialWidth: 100,
+                        initialWidth: 120,
                         typeAttributes: {
                             minimumFractionDigits: 2,
                         },
@@ -1011,7 +1022,7 @@
                         label: "鍖婚櫌鐗逛环",
                         fieldName: "hospitalSpecialOffer",
                         type: 'boolean',
-                        initialWidth: 70,
+                        initialWidth: 100,
                         hideDefaultActions: true,
                     };
                     this.columns.push(object1);
@@ -1483,7 +1494,7 @@
         const unitDetail = event.detail;
         console.log("unitDetail = " + JSON.stringify(unitDetail));
         for (var i in this.data) {
-            if (this.data[i].recordId == unitDetail.data.recordId) {
+            if (this.data[i].Id == unitDetail.data.recordId) {
                 this.data[i].unitValue = unitDetail.data.unitValue;
                 this.data[i].orderdetails1["Box_Piece__c"] = unitDetail.data.unitValue;
             }
@@ -1497,7 +1508,7 @@
         console.log("numberDetail = " + JSON.stringify(numberDetail));
         let index = 0;
         for (var i in this.data) {
-            if (this.data[i].recordId == numberDetail.data.recordId) {
+            if (this.data[i].Id == numberDetail.data.recordId) {
                 index = i;
                 this.data[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
                 this.data[i].orderdetails1["Shipment_Count__c"] = Number(
@@ -1532,7 +1543,7 @@
         const priceDetail = event.detail;
         let index = 0;
         for (var i in this.data) {
-            if (this.data[i].recordId == priceDetail.data.recordId) {
+            if (this.data[i].Id == priceDetail.data.recordId) {
                 index = i;
                 this.data[i].shippingUnitPrice = Number(
                     priceDetail.data.shipmentunitprice

--
Gitblit v1.9.1