소스 검색

加提示判断

qukaidi 4 일 전
부모
커밋
489af61d4b

+ 7 - 0
src/api/iosBasicData/ReceivingOrders/precontainers.js

@@ -112,4 +112,11 @@ export const actualOccupyNumUpdate = (row) => {
     method: 'post',
     method: 'post',
     data: row
     data: row
   })
   })
+}
+export const billVerificationPrompt = (row) => {
+  return request({
+    url: '/api/blade-los/bills/billVerificationPrompt',
+    method: 'get',
+    params:row
+  })
 }
 }

+ 42 - 26
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -55,7 +55,7 @@
           size="mini"
           size="mini"
           type="text"
           type="text"
           @click.stop="pick(row)"
           @click.stop="pick(row)"
-          :disabled="seeDisabled||!assemblyForm.hblno"
+          :disabled="seeDisabled || !assemblyForm.hblno"
         >
         >
           选择
           选择
         </el-button>
         </el-button>
@@ -64,7 +64,7 @@
           size="mini"
           size="mini"
           type="text"
           type="text"
           @click.stop="rowRevoke(row)"
           @click.stop="rowRevoke(row)"
-          :disabled="seeDisabled||!assemblyForm.hblno"
+          :disabled="seeDisabled || !assemblyForm.hblno"
         >
         >
           撤销
           撤销
         </el-button>
         </el-button>
@@ -169,7 +169,7 @@
               placeholder="请输入 箱量"
               placeholder="请输入 箱量"
               size="small"
               size="small"
               :controls="false"
               :controls="false"
-              :disabled="boxForm.containerNumberStatus == '录入'||seeDisabled"
+              :disabled="boxForm.containerNumberStatus == '录入' || seeDisabled"
             ></el-input-number>
             ></el-input-number>
           </template>
           </template>
           <template slot="polStationCnName">
           <template slot="polStationCnName">
@@ -264,7 +264,8 @@ import {
   selectedContainerNumber,
   selectedContainerNumber,
   revokeSelectedContainerNumber,
   revokeSelectedContainerNumber,
   sendVerificationPrompt,
   sendVerificationPrompt,
-  actualOccupyNumUpdate
+  actualOccupyNumUpdate,
+  billVerificationPrompt
 } from "@/api/iosBasicData/ReceivingOrders/precontainers";
 } from "@/api/iosBasicData/ReceivingOrders/precontainers";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
@@ -709,7 +710,8 @@ export default {
             overHidden: true
             overHidden: true
           }
           }
         ]
         ]
-      }
+      },
+      verificationCost: false
     };
     };
   },
   },
   computed: {
   computed: {
@@ -733,12 +735,11 @@ export default {
   async created() {
   async created() {
     this.option = await this.getColumnData(this.getColumnName(487), this.optionBack);
     this.option = await this.getColumnData(this.getColumnName(487), this.optionBack);
     this.containerOption = await this.getColumnData(this.getColumnName(488), this.containerOptionBack);
     this.containerOption = await this.getColumnData(this.getColumnName(488), this.containerOptionBack);
-    // isProcurement({ param: "is.occupyNum" }).then(res => {
-    //   if (res.data.data == 1) {
-    //     this.containerOption.menu = true;
-    //     this.isOccupyNum = true;
-    //   }
-    // });
+    isProcurement({ param: "verification.cost " }).then(res => {
+      if (res.data.data == 1) {
+        this.verificationCost = true;
+      }
+    });
   },
   },
   methods: {
   methods: {
     sendEdi() {
     sendEdi() {
@@ -779,8 +780,8 @@ export default {
             let occupyNumSum = 0;
             let occupyNumSum = 0;
             for (let item of this.containerNumberItemList) {
             for (let item of this.containerNumberItemList) {
               occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
               occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
-              item.mblno=this.assemblyForm.mblno;
-              item.hblno=this.assemblyForm.hblno;
+              item.mblno = this.assemblyForm.mblno;
+              item.hblno = this.assemblyForm.hblno;
             }
             }
             if (occupyNumSum != this.boxForm.quantity) {
             if (occupyNumSum != this.boxForm.quantity) {
               return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
               return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
@@ -802,8 +803,8 @@ export default {
                 return this.$message.error(`放箱号:${item.containerNumber}占用数量不能低于已出场数量:${item.outNum}`);
                 return this.$message.error(`放箱号:${item.containerNumber}占用数量不能低于已出场数量:${item.outNum}`);
               }
               }
               occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
               occupyNumSum += Number(item.occupyNum ? item.occupyNum : 0);
-              item.mblno=this.assemblyForm.mblno;
-              item.hblno=this.assemblyForm.hblno;
+              item.mblno = this.assemblyForm.mblno;
+              item.hblno = this.assemblyForm.hblno;
             }
             }
             if (occupyNumSum != this.boxForm.quantity) {
             if (occupyNumSum != this.boxForm.quantity) {
               return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
               return this.$message.error(`明细数据所有占用箱量的和必须等于箱量:${this.boxForm.quantity}!`);
@@ -843,7 +844,7 @@ export default {
         return this.$message.error("请选择卸货港");
         return this.$message.error("请选择卸货港");
       }
       }
       this.boxForm = row;
       this.boxForm = row;
-      this.boxForm.polStationId = this.assemblyForm.cyId?this.assemblyForm.cyId:null;
+      this.boxForm.polStationId = this.assemblyForm.cyId ? this.assemblyForm.cyId : null;
       this.boxForm.polStationCnName = this.assemblyForm.cyCnName;
       this.boxForm.polStationCnName = this.assemblyForm.cyCnName;
       let obj = {
       let obj = {
         boxType: row.cntrTypeCode,
         boxType: row.cntrTypeCode,
@@ -854,16 +855,31 @@ export default {
         etd: this.assemblyForm.etd + " 00:00:00",
         etd: this.assemblyForm.etd + " 00:00:00",
         polStationId: this.boxForm.polStationId
         polStationId: this.boxForm.polStationId
       };
       };
-      getItemListHY(obj).then(res => {
-        if (res.data.data) {
-          res.data.data.forEach(item => {
-            item.pid = this.assemblyForm.id;
+      if (this.verificationCost) {
+        billVerificationPrompt({ ids: this.assemblyForm.id }).then(res => {
+          getItemListHY(obj).then(res => {
+            if (res.data.data) {
+              res.data.data.forEach(item => {
+                item.pid = this.assemblyForm.id;
+              });
+              this.editStatus = true;
+              this.containerNumberItemList = res.data.data;
+            }
           });
           });
-          this.editStatus = true;
-          this.containerNumberItemList = res.data.data;
-        }
-      });
-      this.dialogVisible = true;
+          this.dialogVisible = true;
+        });
+      } else {
+        getItemListHY(obj).then(res => {
+          if (res.data.data) {
+            res.data.data.forEach(item => {
+              item.pid = this.assemblyForm.id;
+            });
+            this.editStatus = true;
+            this.containerNumberItemList = res.data.data;
+          }
+        });
+        this.dialogVisible = true;
+      }
     },
     },
     getNoPick(type) {
     getNoPick(type) {
       this.containerNumberItemList = this.containerNumberItemList.filter(item => item.id || item.occupyNum > 0);
       this.containerNumberItemList = this.containerNumberItemList.filter(item => item.id || item.occupyNum > 0);
@@ -920,7 +936,7 @@ export default {
       this.editStatus = true;
       this.editStatus = true;
       this.dialogVisible = true;
       this.dialogVisible = true;
       this.boxForm = row;
       this.boxForm = row;
-      this.boxForm.polStationId = this.assemblyForm.cyId?this.assemblyForm.cyId:null;
+      this.boxForm.polStationId = this.assemblyForm.cyId ? this.assemblyForm.cyId : null;
       this.boxForm.polStationCnName = this.assemblyForm.cyCnName;
       this.boxForm.polStationCnName = this.assemblyForm.cyCnName;
       this.oldBoxForm = this.deepClone(row);
       this.oldBoxForm = this.deepClone(row);
       this.containerNumberItemList = this.deepClone(
       this.containerNumberItemList = this.deepClone(