From 71b93327e8f3fb3bffffc7c033c1f782e7b6ab32 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 22 五月 2023 17:37:16 +0800
Subject: [PATCH] test
---
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js | 583 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 359 insertions(+), 224 deletions(-)
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
index d638229..4361ac7 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
@@ -1,4 +1,4 @@
-import { LightningElement, wire, api, track } from "lwc";
+import { LightningElement, wire, api, track } from "lwc"; save
import init from "@salesforce/apex/LexSummonsCreatController.init";
import { ShowToastEvent } from "lightning/platformShowToastEvent";
import searchConsumableorderdetails from "@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails";
@@ -19,7 +19,11 @@
import { getObjectInfo } from "lightning/uiObjectInfoApi";
import hospitalInit from "@salesforce/apex/lexSearchAgencyHospitalController.init";
import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact";
+import deleteAtt from '@salesforce/apex/LexConsumableController.deleteAtt';
import { NavigationMixin } from "lightning/navigation";
+//table css
+import { loadStyle } from "lightning/platformResourceLoader";
+import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
export default class LexSummonsCreat extends NavigationMixin(LightningElement) {
@track isShowSpinner = true;
@@ -55,33 +59,33 @@
fieldName: "Name__c",
hideDefaultActions: true,
wrapText: true,
- initialWidth: 150,
+ initialWidth: 175,
sortable: true
},
{
label: "瑙勬牸",
fieldName: "packinglist",
- //initialWidth : 50,
+ cellAttributes: { alignment: "right" },
wrapText: true,
+ initialWidth: 50,
hideDefaultActions: true,
},
{
label: "CFDA鐘舵��",
fieldName: "SFDA_Status__c",
- //initialWidth : 100,
+ initialWidth: 105,
wrapText: true,
hideDefaultActions: true,
},
{
label: "娉ㄥ唽璇佺紪鐮佸彿",
fieldName: "approbation_No",
- //initialWidth : 150,
wrapText: true,
+ initialWidth: 115,
hideDefaultActions: true,
},
{
label: "娉ㄥ唽璇佹晥鏈�",
- //initialWidth : 100,
wrapText: true,
fieldName: "expiration_Date",
hideDefaultActions: true,
@@ -89,7 +93,6 @@
{
label: "绗�3鍒嗙被",
fieldName: "Category3__c",
- //initialWidth : 100,
wrapText: true,
hideDefaultActions: true,
sortable: true,
@@ -97,7 +100,6 @@
{
label: "绗�4鍒嗙被",
fieldName: "Category4__c",
- //initialWidth : 100,
wrapText: true,
hideDefaultActions: true,
sortable: true,
@@ -105,7 +107,6 @@
{
label: "绗�5鍒嗙被",
fieldName: "Category5__c",
- //initialWidth : 100,
wrapText: true,
hideDefaultActions: true,
sortable: true,
@@ -113,7 +114,6 @@
{
label: "鍗曚綅",
type: "customUnit",
- //initialWidth : 100,
hideDefaultActions: true,
typeAttributes: {
unitValue: { fieldName: "unitValue" },
@@ -124,8 +124,8 @@
{
label: "鍑鸿揣鏁伴噺",
type: "customShipment",
- //initialWidth : 150,
hideDefaultActions: true,
+ cellAttributes: { alignment: "right" },
typeAttributes: {
recordId: { fieldName: "recordId" },
shipmentNumber: { fieldName: "shipmentNumber" },
@@ -134,8 +134,8 @@
{
label: "鍑鸿揣鍗曚环(鍏�)",
type: "customShipmentUnitPrice",
- //initialWidth : 150,
hideDefaultActions: true,
+ initialWidth: 110,
typeAttributes: {
recordId: { fieldName: "recordId" },
shippingUnitPrice: { fieldName: "shippingUnitPrice" },
@@ -144,7 +144,8 @@
{
label: "鍑鸿揣閲戦(鍏�)",
type: "customShipmentAmount",
- //initialWidth : 120,
+ initialWidth: 110,
+ cellAttributes: { alignment: "right" },
hideDefaultActions: true,
typeAttributes: {
shipmentAmount: { fieldName: "shipmentAmount" },
@@ -153,15 +154,17 @@
{
label: "鏈夋晥鏈熷唴搴撳瓨(鐩�)",
fieldName: "Boxnumber",
- //initialWidth : 120,
+ cellAttributes: { alignment: "right" },
wrapText: true,
+ initialWidth: 120,
hideDefaultActions: true,
},
{
label: "鏈夋晥鏈熷唴搴撳瓨(涓�)",
fieldName: "Piecenumber",
- //initialWidth : 120,
+ cellAttributes: { alignment: "right" },
wrapText: true,
+ initialWidth: 120,
hideDefaultActions: true,
},
];
@@ -170,33 +173,35 @@
label: "娑堣�楀搧鍚嶇О",
fieldName: "Name__c",
hideDefaultActions: true,
- initialWidth: 250,
+ initialWidth: 340,
wrapText: true,
sortable: true,
},
{
label: "瑙勬牸",
fieldName: "packinglist",
- initialWidth: 50,
+ initialWidth: 80,
+ cellAttributes: { alignment: "right" },
hideDefaultActions: true,
+ wrapText: true,
},
{
label: "CFDA鐘舵��",
fieldName: "SFDA_Status__c",
- initialWidth: 100,
hideDefaultActions: true,
+ wrapText: true,
},
{
label: "娉ㄥ唽璇佺紪鐮佸彿",
fieldName: "approbation_No",
- initialWidth: 150,
hideDefaultActions: true,
+ wrapText: true,
},
{
label: "娉ㄥ唽璇佹晥鏈�",
- initialWidth: 100,
fieldName: "expiration_Date",
hideDefaultActions: true,
+ wrapText: true,
},
{
label: "绗�3鍒嗙被",
@@ -204,6 +209,7 @@
initialWidth: 100,
hideDefaultActions: true,
sortable: true,
+ wrapText: true,
},
{
label: "绗�4鍒嗙被",
@@ -211,6 +217,7 @@
initialWidth: 100,
hideDefaultActions: true,
sortable: true,
+ wrapText: true,
},
{
label: "绗�5鍒嗙被",
@@ -218,28 +225,32 @@
initialWidth: 100,
hideDefaultActions: true,
sortable: true,
+ wrapText: true,
},
{
label: "鍗曚綅",
fieldName: "Box_Piece__c",
- initialWidth: 100,
+ initialWidth: 50,
hideDefaultActions: true,
+ wrapText: true,
},
{
label: "鍑鸿揣鏁伴噺",
fieldName: "Shipment_Count__c",
- initialWidth: 150,
+ cellAttributes: { alignment: "right" },
hideDefaultActions: true,
+ initialWidth: 100,
+ wrapText: true,
},
{
label: "鍑鸿揣鍗曚环(鍏�)",
- fieldName: "Shipment_amount__c",
+ fieldName: "shippingUnitPrice",
type: "number",
typeAttributes: {
minimumFractionDigits: 2,
},
- initialWidth: 150,
hideDefaultActions: true,
+ wrapText: true,
},
];
@track editData = [];
@@ -281,6 +292,7 @@
@track isMutualTransferGoods = false;
@track Barcode = "";
@track summonsForDirction = '';
+ @track accountValue = '';
@track consumableorderdetails2RecordsColumns = [
{
@@ -310,8 +322,13 @@
@track salesColumns = [
{
label: "娑堣�楀搧璁㈠崟",
- fieldName: "Consumable_order_minor__c",
+ fieldName: "ConsumableorderminorUrl",
hideDefaultActions: true,
+ type: "url",
+ typeAttributes: {
+ label: { fieldName: "Consumable_order_minor__c" },
+ target: "_blank",
+ },
wrapText: true,
},
{
@@ -331,6 +348,7 @@
fieldName: "Box_Piece__c",
hideDefaultActions: true,
wrapText: true,
+ initialWidth: 50
},
{
label: "娑堣�楀搧鍚嶇О",
@@ -349,28 +367,34 @@
fieldName: "Bar_Code__c",
hideDefaultActions: true,
wrapText: true,
- initialWidth: 500
+ initialWidth: 400
},
{
label: "浣跨敤鏈熼檺",
fieldName: "Sterilization_limit__c",
hideDefaultActions: true,
wrapText: true,
+ initialWidth: 120
},
{
label: "鍑鸿揣鏁伴噺",
- fieldName: "outboundCount",
+ fieldName: 'outboundCount',
hideDefaultActions: true,
- wrapText: true,
- },
+ cellAttributes: { alignment: "right" },
+ }
];
@track salesData = [];
@track salesErrorColumns = [
{
label: "娑堣�楀搧璁㈠崟",
- fieldName: "Consumable_order_minor__c",
+ fieldName: "ConsumableorderminorUrl",
hideDefaultActions: true,
+ type: "url",
+ typeAttributes: {
+ label: { fieldName: "Consumable_order_minor__c" },
+ target: "_blank",
+ },
wrapText: true,
},
{
@@ -378,6 +402,7 @@
fieldName: "orderdetails2Name",
hideDefaultActions: true,
wrapText: true,
+ initialWidth: 240
},
{
label: "娑堣�楀搧鍚嶇О",
@@ -390,17 +415,20 @@
fieldName: "Box_Piece__c",
hideDefaultActions: true,
wrapText: true,
+ initialWidth: 50
},
{
label: "BarCode",
fieldName: "Bar_Code__c",
hideDefaultActions: true,
+ initialWidth: 400
},
{
label: "浣跨敤鏈熼檺",
fieldName: "Sterilization_limit__c",
hideDefaultActions: true,
wrapText: true,
+ initialWidth: 120
},
{
label: "閿欒鍘熷洜",
@@ -526,6 +554,18 @@
fieldName: "CreatedByName",
hideDefaultActions: true,
},
+ {
+ label: '',
+ type: 'tableCellIcon',
+ typeAttributes: {
+ iconName: 'utility:delete',
+ recordId: {
+ fieldName: 'Id'
+ }
+ },
+ initialWidth: 50,
+ hideDefaultActions: true
+ },
];
filesUploaded = [];
fileContents;
@@ -539,7 +579,7 @@
defaultSortDirection = 'asc';
sortDirection = 'asc';
sortedBy;
- @track pageSize = 5;
+ @track pageSize = 10;
error;
records;
currentPageToken = 0;
@@ -549,11 +589,25 @@
@track pageNumber = 1;
@track paginationVisibility = false;
@track totalPages = 1;
- pageSizeOptions = [5, 10, 25, 50, 75, 100];
+ pageSizeOptions = [10, 25, 50, 100];
@track recordStart = 0;
@track recordEnd = 0;
//end
@track SearchDone = '';
+
+ stylesLoaded = false;
+ renderedCallback() {
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log("Custom styles loaded");
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error("Error loading custom styles");
+ });
+ }
+ }
//InvoiceProNotLabel RrturnProLabel InvoicedLabel
@wire(getObjectInfo, { objectApiName: OPPORTUNITY_OBJECT })
@@ -624,28 +678,14 @@
this.accountName = r.entity.accountName;
this.userWorkLocation = r.entity.userWorkLocation;
this.EditAble = r.entity.EditAble;
- this.consumableorderdetails2Records =
- r.entity.consumableorderdetails2Records;
+ this.consumableorderdetails2Records = r.entity.consumableorderdetails2Records;
for (var i in this.consumableorderdetails2Records) {
- this.consumableorderdetails2Records[i]["ProdName"] =
- this.consumableorderdetails2Records[i].Prod.Name;
- this.consumableorderdetails2Records[i][
- "orderdetails2SerialLotNo__c"
- ] =
- this.consumableorderdetails2Records[i].orderdetails2.SerialLotNo__c;
- this.consumableorderdetails2Records[i][
- "orderdetails2TracingCode__c"
- ] =
- this.consumableorderdetails2Records[i].orderdetails2.TracingCode__c;
- this.consumableorderdetails2Records[i][
- "orderdetails2Sterilization_limit__c"
- ] =
- this.consumableorderdetails2Records[
- i
- ].orderdetails2.Sterilization_limit__c;
+ this.consumableorderdetails2Records[i]["ProdName"] = this.consumableorderdetails2Records[i].Prod.Name;
+ this.consumableorderdetails2Records[i]["orderdetails2SerialLotNo__c"] = this.consumableorderdetails2Records[i].orderdetails2.SerialLotNo__c;
+ this.consumableorderdetails2Records[i]["orderdetails2TracingCode__c"] = this.consumableorderdetails2Records[i].orderdetails2.TracingCode__c;
+ this.consumableorderdetails2Records[i]["orderdetails2Sterilization_limit__c"] = this.consumableorderdetails2Records[i].orderdetails2.Sterilization_limit__c;
}
- this.isShowOutboundProductDetails =
- r.entity.consumableorderdetails2Count > 0 ? true : false;
+ this.isShowOutboundProductDetails = r.entity.consumableorderdetails2Count > 0 ? true : false;
console.log("this.agencyProType = " + this.agencyProType);
console.log("this.EditAble = " + this.EditAble);
//鏌ヨ闄勪欢
@@ -691,15 +731,14 @@
this.data[i]["unitValue"] = this.data[i]["unitValue"] == null ? unitOptions[0].value : this.data[i]["unitValue"];
if (this.EditAble) {
this.data[i].orderdetails1["Box_Piece__c"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
+ this.data[i]["unitValue"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
+ console.log('this.data[i].orderdetails1["Box_Piece__c"] = ' + this.data[i].orderdetails1["Box_Piece__c"]);
this.data[i].orderdetails1["Shipment_Count__c"] = this.data[i].orderdetails1["Shipment_Count__c"] == null ? 0 : this.data[i].orderdetails1["Shipment_Count__c"];
this.data[i].orderdetails1["Delivery_List_RMB__c"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : this.data[i].orderdetails1["Delivery_List_RMB__c"];
} else {
- this.data[i]["InvoiceProNot_count__c"] =
- this.data[i].orderdetails1.InvoiceProNot_count__c;
- this.data[i]["RrturnPro_count__c"] =
- this.data[i].orderdetails1.RrturnPro_count__c;
- this.data[i]["Invoiced_Procount__c"] =
- this.data[i].orderdetails1.Invoiced_Procount__c;
+ this.data[i]["InvoiceProNot_count__c"] = this.data[i].orderdetails1.InvoiceProNot_count__c;
+ this.data[i]["RrturnPro_count__c"] = this.data[i].orderdetails1.RrturnPro_count__c;
+ this.data[i]["Invoiced_Procount__c"] = this.data[i].orderdetails1.Invoiced_Procount__c;
}
// this.data[i]["shipmentNumber"] = 0;
// this.data[i]["shippingUnitPrice"] = 0.0;
@@ -708,8 +747,17 @@
this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"];
this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"];
- this.data[i]["recordId"] = this.data[i].Prod.Id;
+
+
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';
+ } else {
+ this.data[i]["Id"] = this.data[i].Prod.Id + 'nothos';
+ }
+ }
+ this.data[i]["recordId"] = this.data[i].Prod.Id;
this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
@@ -742,9 +790,11 @@
this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c;
this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c;
this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c;
- this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+ //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+ this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c;
this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c;
}
+ console.log('end this.editData = ' + JSON.stringify(this.editData));
}
console.log("this.data = " + JSON.stringify(this.data));
@@ -770,6 +820,9 @@
this.cocLwc = r.entity.coc;
console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
var coc = r.entity.coc;
+ this.accountValue = coc.Order_ForDealerText__c;
+ this.ForDealerText = coc.Order_ForDealerText__c;
+ console.log('this.accountValue = ' + this.accountValue);
this.cocId = coc.Id;
console.log('cocId = ' + this.cocId);
coc.SummonsStatus = coc.SummonsStatus_c__c;
@@ -800,10 +853,7 @@
) {
this.isPraseToPDFDisabled = false;
}
- if (
- coc.Billed_Status__c != "杩樻病寮�绁�" ||
- coc.SummonsStatus_c__c == "宸插畬鎴�"
- ) {
+ if ((coc.Billed_Status__c != "杩樻病寮�绁�" || coc.SummonsStatus_c__c == "宸插畬鎴�") && this.agencyProType != 'ET') {
this.isOpenReportDisabled = false;
}
if (
@@ -880,6 +930,7 @@
label: this.InvoiceProNotLabel,
fieldName: "InvoiceProNot_count__c",
type: "number",
+ initialWidth: 100,
typeAttributes: {
minimumFractionDigits: 2,
},
@@ -888,11 +939,14 @@
let object2 = {
label: this.RrturnProLabel,
fieldName: "RrturnPro_count__c",
+ initialWidth: 100,
+ cellAttributes: { alignment: "right" },
hideDefaultActions: true,
};
let object3 = {
label: this.InvoicedLabel,
fieldName: "Invoiced_Procount__c",
+ initialWidth: 100,
type: "number",
typeAttributes: {
minimumFractionDigits: 2,
@@ -914,6 +968,7 @@
this.isDisabledForCustomerText = false;
this.secondaryDistributor = "";
this.ForDealerText = "";
+ this.accountValue = "";
this.isDisabledForDealerText = true;
this.isDisabledSecondaryDistributor = true;
break;
@@ -922,12 +977,14 @@
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
break;
case "閿�鍞粰浜岀骇缁忛攢鍟�":
this.isDisabledHospitalName = false;
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
break;
case "浜掔浉璋冭揣":
this.isDisabledHospitalName = true;
@@ -935,6 +992,7 @@
this.OECId = "";
this.isDisabledForCustomerText = true;
this.ForCustomerText = "";
+ this.cocLwc["Order_ForCustomerText__c"] = "";
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
this.isMutualTransferGoods = true;
@@ -953,6 +1011,7 @@
label: "鍖婚櫌鐗逛环",
fieldName: "hospitalSpecialOffer",
type: 'boolean',
+ initialWidth: 70,
hideDefaultActions: true,
};
this.columns.push(object1);
@@ -984,10 +1043,11 @@
console.log("ESetid = " + this.ESetid);
} else {
console.log("r = " + JSON.stringify(r));
- this.showToast("Error", r.msg);
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
}).catch((error) => {
console.log("error = " + JSON.stringify(error));
+ this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
});
}
@@ -1011,12 +1071,14 @@
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
break;
case "閿�鍞粰浜岀骇缁忛攢鍟�":
this.isDisabledHospitalName = false;
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
break;
case "浜掔浉璋冭揣":
this.isDisabledHospitalName = true;
@@ -1024,6 +1086,7 @@
this.OECId = "";
this.isDisabledForCustomerText = true;
this.ForCustomerText = "";
+ this.cocLwc["Order_ForCustomerText__c"] = "";
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
this.isMutualTransferGoods = true;
@@ -1033,6 +1096,7 @@
this.isDisabledForCustomerText = false;
this.isDisabledForDealerText = false;
this.isDisabledSecondaryDistributor = false;
+ this.isMutualTransferGoods = false;
}
}
@@ -1049,6 +1113,9 @@
break;
case "HospitalName":
this.HospitalName = value;
+ break;
+ case "outOutPattern":
+ this.outOutPattern = value;
break;
case "ForDealerText":
this.ForDealerText = value;
@@ -1095,6 +1162,9 @@
case "Barcode":
this.Barcode = value;
break;
+ case "Order_ForDealerText__c":
+ this.cocLwc["Order_ForDealerText__c"] = value;
+ break;
}
}
@@ -1125,7 +1195,7 @@
}
} else {
console.log("r = " + JSON.stringify(r));
- this.showToast("Error", r.msg);
+ this.showMyToast('4/5鍒嗙被鏌ヨ澶辫触', r.msg, 'Error');
}
}).catch((error) => {
console.log("error" + JSON.stringify(error));
@@ -1160,7 +1230,7 @@
}
} else {
console.log("r = " + JSON.stringify(r));
- this.showToast("Error", r.msg);
+ this.showMyToast('Error', r.msg, 'Error');
}
}).catch((error) => {
console.log("error" + JSON.stringify(error));
@@ -1172,16 +1242,24 @@
console.log('this.invoiceId = ' + this.invoiceId);
}
- showToast(type, msg) {
+ showMyToast(title, message, variant) {
this.isShowSpinner = false;
this.showLoadingSpinner = false;
this.isEditShowSpinner = false;
- const event = new ShowToastEvent({
- title: type,
- variant: type,
- message: msg,
- });
- this.dispatchEvent(event);
+ console.log('show custom message');
+ var iconName = '';
+ var content = '';
+ if (variant.toLowerCase() == 'success') {
+ iconName = 'utility:check';
+ } else {
+ iconName = 'utility:error';
+ }
+ if (message != '') {
+ content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
+ } else {
+ content = '<h2><strong>' + title + '<strong/></h2>';
+ }
+ this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
}
searchProductJs() {
@@ -1262,6 +1340,7 @@
tempData[i]["unitValue"] = tempData[i]["unitValue"] == null ? unitOptions[0].value : tempData[i]["unitValue"];
if (this.EditAble) {
tempData[i].orderdetails1["Box_Piece__c"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
+ tempData[i]["unitValue"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
tempData[i].orderdetails1["Shipment_Count__c"] = tempData[i].orderdetails1["Shipment_Count__c"] == null ? 0 : tempData[i].orderdetails1["Shipment_Count__c"];
tempData[i].orderdetails1["Delivery_List_RMB__c"] = tempData[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : tempData[i].orderdetails1["Delivery_List_RMB__c"];
} else {
@@ -1275,13 +1354,14 @@
tempData[i]["shipmentNumber"] = tempData[i].orderdetails1["Shipment_Count__c"];
tempData[i]["shippingUnitPrice"] = tempData[i].orderdetails1["Delivery_List_RMB__c"];
- tempData[i]["recordId"] = tempData[i].Prod.Id;
+
console.log('tempData[i]["hospitalSpecialOffer"] = ' + tempData[i]["hospitalSpecialOffer"])
if (tempData[i]["hospitalSpecialOffer"]) {
tempData[i]["Id"] = tempData[i].Prod.Id + 'ishos';
} else {
tempData[i]["Id"] = tempData[i].Prod.Id + 'nothos';
}
+ tempData[i]["recordId"] = tempData[i]["Id"];
tempData[i]["Name__c"] = tempData[i].Prod.Name__c;
tempData[i]["SFDA_Status__c"] = tempData[i].Prod.SFDA_Status__c;
tempData[i]["Category3__c"] = tempData[i].Prod.Category3__c;
@@ -1311,7 +1391,7 @@
this.isEditShowSpinner = false;
} else {
console.log("r = " + JSON.stringify(r));
- this.showToast("Error", r.msg);
+ this.showMyToast('鏌ヨ澶辫触', r.msg, 'Error');
}
});
}
@@ -1423,6 +1503,21 @@
this.data[i].orderdetails1["Shipment_Count__c"] = Number(
numberDetail.data.shipmentnumber
);
+ console.log('this.data[i].orderdetails1["Shipment_Count__c"] = ' + this.data[i].orderdetails1["Shipment_Count__c"]);
+ console.log('this.selectedRows.indexOf(this.data[i].Id) = ' + this.selectedRows.indexOf(this.data[i].Id));
+ if (this.data[i].orderdetails1["Shipment_Count__c"] != '') {
+ if (this.selectedRows.indexOf(this.data[i].Id) == -1) {
+ this.selectedRows.push(this.data[i].Id);
+ }
+ this.data[i].check = true;
+ } else {
+ if (this.selectedRows.indexOf(this.data[i].Id) != -1) {
+ this.selectedRows.splice(this.selectedRows.indexOf(this.data[i].Id), 1);
+ }
+ this.data[i].check = false;
+ }
+ this.selectedRows = [...this.selectedRows];
+ console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows));
}
}
this.ComputePrice(
@@ -1476,8 +1571,8 @@
// }
// }
this.data = [...this.data];
- this.selectedRows = [...this.selectedRows]
- console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
+ // this.selectedRows = [...this.selectedRows]
+ // console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
console.log("this.data = " + JSON.stringify(this.data));
}
@@ -1626,16 +1721,17 @@
console.log("r = " + JSON.stringify(r));
debugger
if (r.status == "Success") {
- let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
- this[NavigationMixin.Navigate]({
- type: "standard__webPage",
- attributes: {
- url: url,
- },
- });
+ // let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
+ // this[NavigationMixin.Navigate]({
+ // type: "standard__webPage",
+ // attributes: {
+ // url: url,
+ // },
+ // });
+ window.location.href = "/s/lexsummonscreat?ESetid=" + r.entity.ESetId;
} else {
console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
}
}).catch((error) => {
console.log("error = " + JSON.stringify(error));
@@ -1656,7 +1752,7 @@
window.open("/customer/summonsPDF?ESetid=" + r.entity.ESetId);
} else {
console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ this.showMyToast('鎵撳嵃澶辫触', r.msg, 'Error');
}
});
}
@@ -1702,13 +1798,11 @@
console.log("event.detail = " + JSON.stringify(event.detail));
apexSearch({
searchTerm: event.detail.searchTerm,
- })
- .then((results) => {
- lookupElement.setSearchResults(results);
- })
- .catch((error) => {
- console.log("error" + JSON.stringify(error));
- });
+ }).then((results) => {
+ lookupElement.setSearchResults(results);
+ }).catch((error) => {
+ console.log("error" + JSON.stringify(error));
+ });
}
handleSelectionChange(event) {
@@ -1732,7 +1826,7 @@
if (this.filesUploaded.length > 0) {
this.file = this.filesUploaded[0];
if (this.file.size > this.MAX_FILE_SIZE) {
- this.showToast("Error", "鏂囦欢杩囧ぇ");
+ this.showMyToast('淇濆瓨澶辫触', '鏂囦欢杩囧ぇ', 'Error');
return;
}
this.showPopSpinner = true;
@@ -1758,19 +1852,17 @@
recordId: this.ESetid,
fileName: this.fileName,
base64Data: encodeURIComponent(this.fileContents),
- })
- .then((r) => {
+ }).then((r) => {
this.showPopSpinner = false;
r = JSON.parse(JSON.stringify(r));
console.log("r = " + JSON.stringify(r));
this.closePop();
- this.showToast("Success", "涓婁紶鎴愬姛");
+ this.showMyToast('鎴愬姛', '涓婁紶鎴愬姛', 'Success');
this.getFiles();
- })
- .catch((error) => {
+ }).catch((error) => {
this.showPopSpinner = false;
console.log("error = " + error.message);
- this.showToast("Error", "涓婁紶澶辫触");
+ this.showMyToast('澶辫触', '涓婁紶澶辫触', 'Error');
});
}
@@ -1779,21 +1871,24 @@
this.showLoadingSpinner = true;
getFiles({
recordId: this.ESetid,
- })
- .then((r) => {
+ }).then((r) => {
r = JSON.parse(JSON.stringify(r));
console.log("r = " + JSON.stringify(r));
this.fileData = r.entity.cvList;
+ console.log("this.fileData = " + JSON.stringify(this.fileData));
for (var i in this.fileData) {
- this.fileData[i]["CreatedByName"] = this.fileData[i].CreatedBy.Name;
+ this.fileData[i]["Id"] = this.fileData[i].Id;
+ this.fileData[i]["recordId"] = this.fileData[i].Id;
this.fileData[i]["url"] = "/" + this.fileData[i].Id;
+ this.fileData[i]["Title"] = this.fileData[i].Title;
+ this.fileData[i]["attUrl"] = '/' + this.fileData[i].Id;
+ this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].ContentDocumentId + '?operationContext=S1';
}
console.log("this.fileData = " + this.fileData);
this.showLoadingSpinner = false;
- })
- .catch((error) => {
+ }).catch((error) => {
console.log("error = " + error.message);
- this.showToast("Error", "鑾峰彇闄勪欢澶辫触");
+ this.showMyToast('澶辫触', '鑾峰彇闄勪欢澶辫触', 'Error');
});
}
@@ -1832,35 +1927,31 @@
cocLwc: this.cocLwc,
ESetId: this.ESetid,
pageRecordsLwcLwc: cloneData,
- })
- .then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- console.log(
- "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"]
- );
- this.isSales =
- this.cocLwc["Summons_Order_type__c"] == "閿�鍞�" ? true : false;
- this.GoodsDeliveryInit();
- } else {
- console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
- }
- this.isShippingSales = true;
- })
- .catch((error) => {
- console.log("error = " + error.message);
- this.showToast("Error", "璺宠浆澶辫触");
- });
+ }).then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log("r = " + JSON.stringify(r));
+ if (r.status == "Success") {
+ console.log(
+ "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"]
+ );
+ this.isSales = this.cocLwc["Summons_Order_type__c"] == "閿�鍞�" ? true : false;
+ this.GoodsDeliveryInit();
+ } else {
+ console.log("r.msg = " + r.msg);
+ this.showMyToast('閿欒', r.msg, 'Error');
+ }
+ this.isShippingSales = true;
+ }).catch((error) => {
+ console.log("error = " + error.message);
+ this.showMyToast('澶辫触', '璺宠浆澶辫触', 'Error');
+ });
}
GoodsDeliveryInit() {
console.log("GoodsDeliveryInit");
GoodsDeliveryInit({
ESetId: this.ESetid,
- })
- .then((r) => {
+ }).then((r) => {
r = JSON.parse(JSON.stringify(r));
console.log("r = " + JSON.stringify(r));
if (r.status == "Success") {
@@ -1869,6 +1960,7 @@
this.salesUserWorkLocation = r.entity.userWorkLocation;
this.salesAccountid = r.entity.accountid;
this.salesOrderdetails = r.entity.orderdetails;
+ console.log('this.salesOrderdetails = ' + JSON.stringify(this.salesOrderdetails))
this.salesData = r.entity.consumableorderdetailsRecords;
this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
this.salesOrderpieceorboxMap = r.entity.orderpieceorboxMap;
@@ -1877,12 +1969,11 @@
this.isShowSpinner = false;
} else {
console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
}
- })
- .catch((error) => {
+ }).catch((error) => {
console.log("error = " + error.message);
- this.showToast("Error", "鍒濆鍖栧け璐�");
+ this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
});
}
@@ -1897,61 +1988,84 @@
accountid: this.salesAccountid,
orderdetails: this.salesOrderdetails,
orderpieceorboxMap: this.salesOrderpieceorboxMap,
- })
- .then((r) => {
- r = JSON.parse(JSON.stringify(r));
- console.log("r = " + JSON.stringify(r));
- if (r.status == "Success") {
- console.log("SearchPro success");
- this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
- this.salesData = r.entity.consumableorderdetailsRecords;
- for (var i in this.salesErrorData) {
- this.salesErrorData[i]["Consumable_order_minor__c"] =
- this.salesErrorData[i].orderdetails2.Consumable_order_minor__c;
- this.salesErrorData[i]["orderdetails2Name"] =
- this.salesErrorData[i].orderdetails2.Name;
- this.salesErrorData[i]["ProdName"] =
- this.salesErrorData[i].Prod.Name;
- this.salesErrorData[i]["Box_Piece__c"] =
- this.salesErrorData[i].orderdetails2.Box_Piece__c;
- this.salesErrorData[i]["Bar_Code__c"] =
- this.salesErrorData[i].orderdetails2.Bar_Code__c;
- this.salesErrorData[i]["Sterilization_limit__c"] =
- this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
- }
- for (var i in this.salesData) {
- this.salesData[i]["Consumable_order_minor__c"] =
- this.salesData[i].orderdetails2.Consumable_order_minor__c;
- this.salesData[i]["orderdetails2Name"] =
- this.salesData[i].orderdetails2.Name;
- this.salesData[i]["orderdetails2NameUrl"] =
- "/" + this.salesData[i].orderdetails2.Id;
- this.salesData[i]["Box_Piece__c"] =
- this.salesData[i].orderdetails2.Box_Piece__c;
- this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
- this.salesData[i]["Deliver_date__c"] =
- this.salesData[i].orderdetails2.Deliver_date__c;
- this.salesData[i]["Bar_Code__c"] =
- this.salesData[i].orderdetails2.Bar_Code__c;
- this.salesData[i]["Sterilization_limit__c"] =
- this.salesData[i].orderdetails2.Sterilization_limit__c;
- }
- this.isShowSpinner = false;
- } else {
- console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ }).then((r) => {
+ r = JSON.parse(JSON.stringify(r));
+ console.log("r = " + JSON.stringify(r));
+ if (r.status == "Success") {
+ console.log("SearchPro success");
+ this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
+ this.salesData = r.entity.consumableorderdetailsRecords;
+ for (var i in this.salesErrorData) {
+ this.salesErrorData[i]["Id"] = this.salesErrorData[i].orderdetails2.Id;
+ this.salesErrorData[i]["Consumable_order_minor__c"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesErrorData[i].orderdetails2.Consumable_order_minor__r.Name : '';
+ this.salesErrorData[i]["ConsumableorderminorUrl"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesErrorData[i].orderdetails2.Consumable_order_minor__c : '';
+ this.salesErrorData[i]["orderdetails2Name"] = this.salesErrorData[i].orderdetails2.Name;
+ this.salesErrorData[i]["ProdName"] = this.salesErrorData[i].Prod.Name;
+ this.salesErrorData[i]["Box_Piece__c"] = this.salesErrorData[i].orderdetails2.Box_Piece__c;
+ this.salesErrorData[i]["Bar_Code__c"] = this.salesErrorData[i].orderdetails2.Bar_Code__c;
+ this.salesErrorData[i]["Sterilization_limit__c"] = this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
}
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showToast("Error", "鍒濆鍖栧け璐�");
- });
+ console.log('this.salesData = ' + JSON.stringify(this.salesData));
+ for (var i in this.salesData) {
+ this.salesData[i]["Id"] = this.salesData[i].orderdetails2.Id;
+ this.salesData[i]["Consumable_order_minor__c"] = this.salesData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesData[i].orderdetails2.Consumable_order_minor__r.Name : '';
+ this.salesData[i]["ConsumableorderminorUrl"] = this.salesData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesData[i].orderdetails2.Consumable_order_minor__c : '';
+ this.salesData[i]["orderdetails2Name"] = this.salesData[i].orderdetails2.Name;
+ this.salesData[i]["orderdetails2NameUrl"] = "/" + this.salesData[i].orderdetails2.Id;
+ this.salesData[i]["Box_Piece__c"] = this.salesData[i].orderdetails2.Box_Piece__c;
+ this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
+ this.salesData[i]["Deliver_date__c"] = this.salesData[i].orderdetails2.Deliver_date__c;
+ this.salesData[i]["Bar_Code__c"] = this.salesData[i].orderdetails2.Bar_Code__c;
+ this.salesData[i]["Sterilization_limit__c"] = this.salesData[i].orderdetails2.Sterilization_limit__c;
+ if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
+ console.log('this.salesData[i] = ' + JSON.stringify(this.salesData[i]))
+ this.salesData[i]["outboundCount"] = this.salesData[i].outboundCount;
+ } else {
+ for (var j in this.salesOrderdetails) {
+ console.log('this.salesOrderdetails[j].Consumable_product__c = ' + this.salesOrderdetails[j].Consumable_product__c);
+ console.log('this.salesData[i].orderdetails2.Consumable_product__c = ' + this.salesData[i].orderdetails2.Consumable_product__c);
+ if (this.salesOrderdetails[j].Consumable_product__c == this.salesData[i].orderdetails2.Consumable_product__c) {
+ this.salesData[i]["outboundCount"] = this.salesOrderdetails[j].Shipment_Count__c;
+ }
+ }
+ }
+
+ //salescolomus
+ // console.log('this.salesData[i]["Box_Piece__c"] = ' + this.salesData[i]["Box_Piece__c"])
+ // if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
+ // this.salesData[i]["isDisable"] = true;
+ // this.salesData[i]["count"] = this.salesData[i].outboundCount;
+ // }
+ // if (this.salesData[i]["Box_Piece__c"] == '涓�') {
+ // this.salesData[i]["isDisable"] = false;
+ // }
+ }
+ this.salesColumns = [...this.salesColumns];
+ this.isShowSpinner = false;
+ } else {
+ console.log("r.msg = " + r.msg);
+ this.showMyToast('鑾峰彇澶辫触', r.msg, 'Error');
+ }
+ }).catch((error) => {
+ console.log("error = " + JSON.stringify(error.message));
+ });
+ }
+
+ handleOutboundCount(event) {
+ let outboundDetail = event.detail;
+ for (var i in this.salesData) {
+ if (this.salesData[i].Id == outboundDetail.data.recordId) {
+ this.salesData[i]['outboundCount'] = outboundDetail.data.count
+ }
+ }
+ console.log('this.salesData = ' + JSON.stringify(this.salesData))
}
SaveP() {
let cloneSalesData = this.salesData;
for (var i in cloneSalesData) {
delete cloneSalesData[i].Consumable_order_minor__c;
+ delete cloneSalesData[i].ConsumableorderminorUrl;
delete cloneSalesData[i].orderdetails2Name;
delete cloneSalesData[i].orderdetails2NameUrl;
delete cloneSalesData[i].Box_Piece__c;
@@ -1963,15 +2077,15 @@
}
this.isShowSpinner = true;
ProSale({
- ESetId: this.ESetid,
+ ESetIdLwc: this.ESetid,
cocLwc: this.salesCoc,
barcodeLwc: this.Barcode,
- accountName: this.salesAccountName,
- userWorkLocation: this.salesUserWorkLocation,
+ accountNameLwc: this.salesAccountName,
+ userWorkLocationLwc: this.salesUserWorkLocation,
consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
- orderdetails: this.salesOrderdetails,
- orderpriceMap: this.salesOrderpriceMap,
- orderagencypriceMap: this.salesOrderagencypriceMap,
+ orderdetailsLwc: this.salesOrderdetails,
+ orderpriceMapLwc: this.salesOrderpriceMap,
+ orderagencypriceMapLwc: this.salesOrderagencypriceMap,
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
console.log("r = " + JSON.stringify(r));
@@ -1986,13 +2100,12 @@
});
} else {
console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ this.showMyToast('閿�鍞け璐�', r.msg, 'Error');
}
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showToast("Error", "ProSale2澶辫触");
- });
+ }).catch((error) => {
+ console.log("error = " + JSON.stringify(error.message));
+ this.showMyToast('閿欒', '閿�鍞け璐�', 'Error');
+ });
}
SaveE() {
@@ -2010,15 +2123,15 @@
}
this.isShowSpinner = true;
ProdElivery({
- ESetId: this.ESetid,
+ ESetIdLwc: this.ESetid,
cocLwc: this.salesCoc,
barcodeLwc: this.Barcode,
- accountName: this.salesAccountName,
- userWorkLocation: this.salesUserWorkLocation,
+ accountNameLwc: this.salesAccountName,
+ userWorkLocationLwc: this.salesUserWorkLocation,
consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
- orderdetails: this.salesOrderdetails,
- orderpriceMap: this.salesOrderpriceMap,
- orderagencypriceMap: this.salesOrderagencypriceMap,
+ orderdetailsLwc: this.salesOrderdetails,
+ orderpriceMapLwc: this.salesOrderpriceMap,
+ orderagencypriceMapLwc: this.salesOrderagencypriceMap,
}).then((r) => {
r = JSON.parse(JSON.stringify(r));
console.log("r = " + JSON.stringify(r));
@@ -2033,13 +2146,12 @@
});
} else {
console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ this.showMyToast('鍑鸿揣澶辫触', r.msg, 'Error');
}
- })
- .catch((error) => {
- console.log("error = " + JSON.stringify(error.message));
- this.showToast("Error", "鍒濆鍖栧け璐�");
- });
+ }).catch((error) => {
+ console.log("error = " + JSON.stringify(error.message));
+ this.showMyToast('閿欒', '鍑鸿揣澶辫触', 'Error');
+ });
}
//鍙戠エ
@@ -2077,11 +2189,11 @@
});
} else {
console.log("r.msg = " + r.msg);
- this.showToast("Error", r.msg);
+ this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
}
}).catch((error) => {
console.log("error = " + error.message);
- this.showToast("Error", "璺宠浆澶辫触");
+ this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
});
}
@@ -2168,11 +2280,11 @@
sortBy(field, reverse, primer) {
const key = primer
? function (x) {
- return primer(x[field]);
- }
+ return primer(x[field]);
+ }
: function (x) {
- return x[field];
- };
+ return x[field];
+ };
return function (a, b) {
a = key(a);
@@ -2182,33 +2294,33 @@
}
onHandleSort(event) {
-
+
//灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
- if(this.EditAble){
+ if (this.EditAble) {
const { fieldName: sortedBy, sortDirection } = event.detail;
const cloneData = [...this.data];
cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
let index = 0;
let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
let selectedRowsIds = [];
- for(var i in selectedRows){
+ for (var i in selectedRows) {
selectedRowsIds.push(selectedRows[i].Id);
}
console.log('selectedRowsIds = ' + JSON.stringify(selectedRowsIds));
- for(var i = 0;i < cloneData.length ; i++){
- if(selectedRowsIds.indexOf(cloneData[i].Id) != -1){
- if(i != 0){
+ for (var i = 0; i < cloneData.length; i++) {
+ if (selectedRowsIds.indexOf(cloneData[i].Id) != -1) {
+ if (i != 0) {
let temp = cloneData[index];
cloneData[index] = cloneData[i];
cloneData[i] = temp;
- }
+ }
index++;
}
}
this.data = cloneData;
this.sortDirection = sortDirection;
this.sortedBy = sortedBy;
- }else{
+ } else {
const { fieldName: sortedBy, sortDirection } = event.detail;
const cloneData = [...this.editData];
cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
@@ -2272,7 +2384,7 @@
this.searchEditProductJs();
}
- searchEditProductJs(){
+ searchEditProductJs() {
this.isEditShowSpinner = true;
this.showTable = false;
init({
@@ -2312,17 +2424,18 @@
this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c;
this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c;
this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c;
- this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+ //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+ this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c;
this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c;
}
this.showTable = true;
this.isEditShowSpinner = false;
} else {
console.log("r = " + JSON.stringify(r));
- this.showToast("Error", r.msg);
+ this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
}
}).catch((error) => {
- console.log("error = " + JSON.stringify(error));
+ this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
});
}
@@ -2333,4 +2446,26 @@
get nextButtonDisabled() {
return this.nextPageToken === undefined;
}
+
+ //鍒犻櫎闄勪欢
+ deleteAtt(event) {
+ this.showLoadingSpinner = true;
+ //var recordId = event.detail.data.recordId;
+ var recordId = event.target.getAttribute("data-fileid");
+ console.log('attid:' + recordId);
+ deleteAtt(
+ {
+ contentVersionId: recordId
+ }
+ ).then(result => {
+ if (result.result == 'Success') {
+ this.showMyToast('鎴愬姛', '鍒犻櫎鎴愬姛', 'Success');
+ this.getFiles();
+ } else {
+ this.showMyToast('鍒犻櫎澶辫触', result.errorMsg, 'Error');
+ }
+ }).catch(error => {
+ this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
+ })
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1