浏览代码

1.调整货物通关作业单、叫车进场按钮开关

nzf 3 年之前
父节点
当前提交
fa94fc9bf3

+ 45 - 10
src/views/Warehousing/cargoClearance/AddOrUpdate.vue

@@ -792,25 +792,27 @@
                 size="small"
                 type="info"
                 :disabled="browseStatus"
+                v-if="entryPrinting == 0"
                 prop="打印"
                 @click="printZyd"
                 >作业单
               </el-button>
               <el-button
                 size="small"
+                v-if="entryPrinting == 0"
                 :disabled="browseStatus"
                 @click="discharge"
                 >叫车进场</el-button
               >
               <el-button
                 size="small"
-                :disabled="dataListSelection.length <= 0 || browseStatus"
+                :disabled="dataListSelection.length <= 0 || browseStatus || deliveryConfirmation"
                 @click="creditClick"
                 >调拨确认
               </el-button>
               <el-button
                 size="small"
-                :disabled="dataWithdrawList.length <= 0 || browseStatus || form.fBillstatus > 3"
+                :disabled="dataWithdrawList.length <= 0 || browseStatus || form.fBillstatus > 3 || cancelDelivery"
                 @click.prevent="withdrawClick"
                 >撤回调拨
               </el-button>
@@ -3177,6 +3179,9 @@ export default {
       tfNetweightnum: 0,
       tfGrossweightnum: 0,
       showApproval: null,
+      entryPrinting: 1,
+      cancelDelivery: false, //
+      deliveryConfirmation: false, //
     };
   },
   created() {
@@ -3221,6 +3226,9 @@ export default {
         this.detailsHidden2 = true;
       }
     });
+    this.getConfigKey('entry.printing').then((response) => {
+      this.entryPrinting = response.msg
+    })
     listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
       this.warehouseOptions = response.rows;
     });
@@ -3788,8 +3796,10 @@ export default {
         if (!this.Printinglist[item].fId) {
           return this.$message.error("请存在未保存的数据");
         }
-        if (this.Printinglist[item].fBillstatus == 10) {
-          return this.$message.error("请存在未打印的作业单");
+        if (this.entryPrinting == 0) {
+          if (this.Printinglist[item].fBillstatus == 10) {
+            return this.$message.error("请存在未打印的作业单");
+          }
         }
         if (!this.Printinglist[item].fTruckno) {
           return this.$message.error("车号不能为空");
@@ -4445,13 +4455,38 @@ export default {
     },
     // 库存明细多选
     Selectinventory(selection) {
-      this.Printinglist = selection;
-      //允许确认入库list
-      this.dataListSelection = [];
-      this.dataListSelection = selection.filter((e) => e.fBillstatus == 30);
+      this.Printinglist = selection
       //允许撤销入库list
-      this.dataWithdrawList = [];
-      this.dataWithdrawList = selection.filter((e) => e.fBillstatus == 40);
+      this.dataWithdrawList = selection
+      //允许确认入库list
+      this.dataListSelection = selection
+      if (this.dataWithdrawList.length === 0) {
+        this.cancelDelivery = true
+      } else {
+        for (let item in this.dataWithdrawList) {
+          if (this.dataWithdrawList[item].fBillstatus === 40) {
+            this.cancelDelivery = false
+            this.deliveryConfirmation = true
+            for (let li in this.dataWithdrawList) {
+              if (this.entryPrinting != 0 ? this.dataWithdrawList[li].fBillstatus === 10 : this.dataWithdrawList[li].fBillstatus === 30) {
+                this.deliveryConfirmation = true
+                this.cancelDelivery = true
+                return
+              }
+            }
+          } else if (this.entryPrinting != 0 ? this.dataWithdrawList[item].fBillstatus === 10 : this.dataWithdrawList[item].fBillstatus === 30) {
+            this.deliveryConfirmation = false
+            this.cancelDelivery = true
+            for (let li in this.dataWithdrawList) {
+              if (this.dataWithdrawList[li].fBillstatus === 40) {
+                this.deliveryConfirmation = true
+                this.cancelDelivery = true
+                return
+              }
+            }
+          }
+        }
+      }
     },
     // 合计
     getSummaries(param) {

+ 0 - 7
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -5780,13 +5780,6 @@ export default {
           }
         }
       }
-      /* this.Printinglist = selection;
-      //允许确认入库list
-      this.dataListSelection = [];
-      this.dataListSelection = selection.filter((e) => e.fBillstatus == 30);
-      //允许撤销入库list
-      this.dataWithdrawList = [];
-      this.dataWithdrawList = selection.filter((e) => e.fBillstatus == 40); */
     },
     // 合计
     getSummaries(param) {