Parcourir la source

内贸客户确认增加字段

lichao il y a 3 ans
Parent
commit
a8a96a2593

+ 16 - 8
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -150,10 +150,18 @@
           "trigger": "blur"
         }
       ]
-    },{
+    },
+    {
+      "label": "采购金额",
+      "prop": "purchaseTotalAmount",
+      "index": 9,
+      "width":100,
+      "overHidden": true
+    },
+    {
       "label": "出库数量",
       "prop": "actualQuantity",
-      "index": 9,
+      "index": 10,
       "width":100,
       "cell": false,
       "slot": true,
@@ -168,7 +176,7 @@
     },{
       "label": "出库金额",
       "prop": "deliveryAmount",
-      "index": 10,
+      "index": 11,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -182,7 +190,7 @@
     },{
       "label": "库存数量",
       "prop": "inventoryNumber",
-      "index": 11,
+      "index": 12,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -196,7 +204,7 @@
     },{
       "label": "库存金额",
       "prop": "inventoryAmount",
-      "index": 12,
+      "index": 13,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -210,7 +218,7 @@
     },{
       "label": "到货数量",
       "prop": "arrivalQuantity",
-      "index": 13,
+      "index": 14,
       "width":100,
       "cell": false,
       "slot": true,
@@ -226,7 +234,7 @@
     {
       "label": "积分倍数",
       "prop": "integralMultiples",
-      "index": 14,
+      "index": 15,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -241,7 +249,7 @@
     {
       "label": "赠送积分",
       "prop": "integral",
-      "index": 15,
+      "index": 16,
       "width":100,
       "cell": false,
       "overHidden": true,

+ 15 - 5
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -1005,7 +1005,8 @@ export default {
         this.$set(item, "actualQuantity", (Number(item.orderQuantity) - Number(item.actualQuantity)))
         this.$set(item, "arrivalQuantity", item.actualQuantity)
         this.$set(item, "deliveryAmount", item.amount)
-        this.$set(item, "deliveryAmount", item.amount)
+        this.$set(item, "purchaseTotalAmount", (Number(item.purchaseAmount) * Number(item.actualQuantity)))
+        item.purchaseTotalAmount = item.purchaseTotalAmount.toFixed(2)
         this.$set(item, "inventoryNumber", item.storageQuantity)
         this.form.deliveryAmount += Number(item.deliveryAmount)
         this.form.totalQuantity += Number(item.actualQuantity)
@@ -1632,10 +1633,10 @@ export default {
           this.saveLoading = true
           this.form.billType = 'FH'
           // 如果有id解锁,没有跳过
-          this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
+          // !this.detailData.seeDisabled && this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            this.detailData.seeDisabled = true;
+            // this.$set(this.detailData, 'seeDisabled', true);
             if (isBack) {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
@@ -1681,12 +1682,12 @@ export default {
         }).then(() => {
           this.editCustomer(true)
         }).catch(() => {
-          this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
+          !this.detailData.seeDisabled && this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
           this.$emit("goBack");
           this.leaveDetailsKey(this.$route.name)
         })
       } else {
-        this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
+        !this.detailData.seeDisabled && this.form.id && this.unLock({moduleName: 'fh',tableName: 'business_delivery', billId: this.form.id})
         this.$emit("goBack");
         this.leaveDetailsKey(this.$route.name)
       }
@@ -1853,6 +1854,8 @@ export default {
         this.$set(item, 'srcOrderNo', this.form.srcOrderNo)
         this.$set(item, 'arrivalQuantity', item.actualQuantity)
         this.$set(item, "srcId", item.id)
+        this.$set(item, "purchaseTotalAmount", (Number(item.purchaseAmount) * Number(item.actualQuantity)))
+        item.purchaseTotalAmount = item.purchaseTotalAmount.toFixed(2)
         if (this.goodsActives == "goods") {
           this.$set(item, 'goodType', 0)
         } else {
@@ -1897,6 +1900,7 @@ export default {
       }
     },
     async resetColumn() {
+      this.customerContact = customerContact
       const inSave = await this.delColumnData(
         this.getColumnName(21),
         customerContact
@@ -2004,7 +2008,13 @@ export default {
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
           this.onLock(data).then(response => {
+            this.saveActives = ''
             this.queryData(this.form.id)
+            this.inDetailsKey(this.$route.name, {
+              moduleName: 'fh',
+              tableName: 'business_delivery',
+              billId: this.form.id,
+            })
             this.detailData.seeDisabled = false;
           })
         }

+ 0 - 5
src/views/businessManagement/deliveryNotice/index.vue

@@ -255,11 +255,6 @@ export default {
         billId: row.id,
         no: localStorage.getItem('browserID')
       }
-      this.inDetailsKey(this.$route.name, {
-        moduleName: 'fh',
-        tableName: 'business_delivery',
-        billId: row.id,
-      })
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
           this.onLock(data).then(response => {