| | |
| | | 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"; |
| | |
| | | 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; |
| | |
| | | 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, |
| | |
| | | { |
| | | label: "第3分类", |
| | | fieldName: "Category3__c", |
| | | //initialWidth : 100, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | |
| | | { |
| | | label: "第4分类", |
| | | fieldName: "Category4__c", |
| | | //initialWidth : 100, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | |
| | | { |
| | | label: "第5分类", |
| | | fieldName: "Category5__c", |
| | | //initialWidth : 100, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | |
| | | { |
| | | label: "单位", |
| | | type: "customUnit", |
| | | //initialWidth : 100, |
| | | hideDefaultActions: true, |
| | | typeAttributes: { |
| | | unitValue: { fieldName: "unitValue" }, |
| | |
| | | { |
| | | label: "出货数量", |
| | | type: "customShipment", |
| | | //initialWidth : 150, |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "right" }, |
| | | typeAttributes: { |
| | | recordId: { fieldName: "recordId" }, |
| | | shipmentNumber: { fieldName: "shipmentNumber" }, |
| | |
| | | { |
| | | label: "出货单价(元)", |
| | | type: "customShipmentUnitPrice", |
| | | //initialWidth : 150, |
| | | hideDefaultActions: true, |
| | | initialWidth: 110, |
| | | typeAttributes: { |
| | | recordId: { fieldName: "recordId" }, |
| | | shippingUnitPrice: { fieldName: "shippingUnitPrice" }, |
| | |
| | | { |
| | | label: "出货金额(元)", |
| | | type: "customShipmentAmount", |
| | | //initialWidth : 120, |
| | | initialWidth: 110, |
| | | cellAttributes: { alignment: "right" }, |
| | | hideDefaultActions: true, |
| | | typeAttributes: { |
| | | shipmentAmount: { fieldName: "shipmentAmount" }, |
| | |
| | | { |
| | | 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, |
| | | }, |
| | | ]; |
| | |
| | | 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分类", |
| | |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | }, |
| | | { |
| | | label: "第4分类", |
| | |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | }, |
| | | { |
| | | label: "第5分类", |
| | |
| | | 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 = []; |
| | |
| | | @track isMutualTransferGoods = false; |
| | | @track Barcode = ""; |
| | | @track summonsForDirction = ''; |
| | | @track accountValue = ''; |
| | | |
| | | @track consumableorderdetails2RecordsColumns = [ |
| | | { |
| | |
| | | @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, |
| | | }, |
| | | { |
| | |
| | | fieldName: "Box_Piece__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 50 |
| | | }, |
| | | { |
| | | label: "消耗品名称", |
| | |
| | | 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, |
| | | }, |
| | | { |
| | |
| | | fieldName: "orderdetails2Name", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 240 |
| | | }, |
| | | { |
| | | label: "消耗品名称", |
| | |
| | | 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: "错误原因", |
| | |
| | | fieldName: "CreatedByName", |
| | | hideDefaultActions: true, |
| | | }, |
| | | { |
| | | label: '', |
| | | type: 'tableCellIcon', |
| | | typeAttributes: { |
| | | iconName: 'utility:delete', |
| | | recordId: { |
| | | fieldName: 'Id' |
| | | } |
| | | }, |
| | | initialWidth: 50, |
| | | hideDefaultActions: true |
| | | }, |
| | | ]; |
| | | filesUploaded = []; |
| | | fileContents; |
| | |
| | | defaultSortDirection = 'asc'; |
| | | sortDirection = 'asc'; |
| | | sortedBy; |
| | | @track pageSize = 5; |
| | | @track pageSize = 10; |
| | | error; |
| | | records; |
| | | currentPageToken = 0; |
| | |
| | | @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 }) |
| | |
| | | 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); |
| | | //查询附件 |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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)); |
| | |
| | | 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; |
| | |
| | | ) { |
| | | 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 ( |
| | |
| | | label: this.InvoiceProNotLabel, |
| | | fieldName: "InvoiceProNot_count__c", |
| | | type: "number", |
| | | initialWidth: 100, |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | |
| | | 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, |
| | |
| | | this.isDisabledForCustomerText = false; |
| | | this.secondaryDistributor = ""; |
| | | this.ForDealerText = ""; |
| | | this.accountValue = ""; |
| | | this.isDisabledForDealerText = true; |
| | | this.isDisabledSecondaryDistributor = true; |
| | | break; |
| | |
| | | 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; |
| | |
| | | this.OECId = ""; |
| | | this.isDisabledForCustomerText = true; |
| | | this.ForCustomerText = ""; |
| | | this.cocLwc["Order_ForCustomerText__c"] = ""; |
| | | this.isDisabledForDealerText = false; |
| | | this.isDisabledSecondaryDistributor = false; |
| | | this.isMutualTransferGoods = true; |
| | |
| | | label: "医院特价", |
| | | fieldName: "hospitalSpecialOffer", |
| | | type: 'boolean', |
| | | initialWidth: 70, |
| | | hideDefaultActions: true, |
| | | }; |
| | | this.columns.push(object1); |
| | |
| | | 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'); |
| | | }); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | this.OECId = ""; |
| | | this.isDisabledForCustomerText = true; |
| | | this.ForCustomerText = ""; |
| | | this.cocLwc["Order_ForCustomerText__c"] = ""; |
| | | this.isDisabledForDealerText = false; |
| | | this.isDisabledSecondaryDistributor = false; |
| | | this.isMutualTransferGoods = true; |
| | |
| | | this.isDisabledForCustomerText = false; |
| | | this.isDisabledForDealerText = false; |
| | | this.isDisabledSecondaryDistributor = false; |
| | | this.isMutualTransferGoods = false; |
| | | } |
| | | } |
| | | |
| | |
| | | break; |
| | | case "HospitalName": |
| | | this.HospitalName = value; |
| | | break; |
| | | case "outOutPattern": |
| | | this.outOutPattern = value; |
| | | break; |
| | | case "ForDealerText": |
| | | this.ForDealerText = value; |
| | |
| | | case "Barcode": |
| | | this.Barcode = value; |
| | | break; |
| | | case "Order_ForDealerText__c": |
| | | this.cocLwc["Order_ForDealerText__c"] = value; |
| | | break; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } 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)); |
| | |
| | | } |
| | | } 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)); |
| | |
| | | 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() { |
| | |
| | | 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 { |
| | |
| | | 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; |
| | |
| | | this.isEditShowSpinner = false; |
| | | } else { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showToast("Error", r.msg); |
| | | this.showMyToast('查询失败', r.msg, 'Error'); |
| | | } |
| | | }); |
| | | } |
| | |
| | | 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( |
| | |
| | | // } |
| | | // } |
| | | 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)); |
| | | } |
| | | |
| | |
| | | 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)); |
| | |
| | | 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'); |
| | | } |
| | | }); |
| | | } |
| | |
| | | console.log("event.detail = " + JSON.stringify(event.detail)); |
| | | apexSearch({ |
| | | searchTerm: event.detail.searchTerm, |
| | | }) |
| | | .then((results) => { |
| | | }).then((results) => { |
| | | lookupElement.setSearchResults(results); |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | console.log("error" + JSON.stringify(error)); |
| | | }); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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'); |
| | | }); |
| | | } |
| | | |
| | |
| | | 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'); |
| | | }); |
| | | } |
| | | |
| | |
| | | cocLwc: this.cocLwc, |
| | | ESetId: this.ESetid, |
| | | pageRecordsLwcLwc: cloneData, |
| | | }) |
| | | .then((r) => { |
| | | }).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.isSales = this.cocLwc["Summons_Order_type__c"] == "销售" ? true : false; |
| | | this.GoodsDeliveryInit(); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showToast("Error", r.msg); |
| | | this.showMyToast('错误', r.msg, 'Error'); |
| | | } |
| | | this.isShippingSales = true; |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showToast("Error", "跳转失败"); |
| | | this.showMyToast('失败', '跳转失败', 'Error'); |
| | | }); |
| | | } |
| | | |
| | |
| | | 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") { |
| | |
| | | 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; |
| | |
| | | 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'); |
| | | }); |
| | | } |
| | | |
| | |
| | | accountid: this.salesAccountid, |
| | | orderdetails: this.salesOrderdetails, |
| | | orderpieceorboxMap: this.salesOrderpieceorboxMap, |
| | | }) |
| | | .then((r) => { |
| | | }).then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "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; |
| | | 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; |
| | | } |
| | | console.log('this.salesData = ' + JSON.stringify(this.salesData)); |
| | | 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]["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; |
| | | 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.showToast("Error", r.msg); |
| | | this.showMyToast('获取失败', r.msg, 'Error'); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | console.log("error = " + JSON.stringify(error.message)); |
| | | this.showToast("Error", "初始化失败"); |
| | | }); |
| | | } |
| | | |
| | | 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; |
| | |
| | | } |
| | | 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)); |
| | |
| | | }); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showToast("Error", r.msg); |
| | | this.showMyToast('销售失败', r.msg, 'Error'); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | console.log("error = " + JSON.stringify(error.message)); |
| | | this.showToast("Error", "ProSale2失败"); |
| | | this.showMyToast('错误', '销售失败', 'Error'); |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | 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)); |
| | |
| | | }); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showToast("Error", r.msg); |
| | | this.showMyToast('出货失败', r.msg, 'Error'); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | console.log("error = " + JSON.stringify(error.message)); |
| | | this.showToast("Error", "初始化失败"); |
| | | this.showMyToast('错误', '出货失败', 'Error'); |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | } 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'); |
| | | }); |
| | | } |
| | | |
| | |
| | | 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'); |
| | | }); |
| | | } |
| | | |
| | |
| | | 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'); |
| | | }) |
| | | } |
| | | } |