buli
2023-05-23 07390e2fcb4adf27c928335bf27ae7939c5a80ad
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