Browse Source

根据业务参数判断是否盘点融资库存

liyuan 1 month ago
parent
commit
f7bdb5c92b
1 changed files with 28 additions and 1 deletions
  1. 28 1
      src/views/tirePartsMall/salesManagement/Inventory/detailsPage.vue

+ 28 - 1
src/views/tirePartsMall/salesManagement/Inventory/detailsPage.vue

@@ -591,7 +591,7 @@ export default {
                     //     // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
                     //     // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
                     //     dicUrl: "/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1"
                     //     dicUrl: "/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1"
                     //     // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
                     //     // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
-                    // }, 
+                    // },
                     {
                     {
                         label: '商品名称',
                         label: '商品名称',
                         prop: 'goodsName',
                         prop: 'goodsName',
@@ -760,6 +760,7 @@ export default {
                     }
                     }
                 ]
                 ]
             },
             },
+            financingInventory: false
         }
         }
     },
     },
     components: { reportDialog, check, checkSchedule },
     components: { reportDialog, check, checkSchedule },
@@ -800,6 +801,12 @@ export default {
             this.refresh(this.detailData.id)
             this.refresh(this.detailData.id)
         }
         }
         this.key++
         this.key++
+        isProcurement({ "param": "if.financing.inventory" }).then(res => {
+            console.info('res---------', res)
+            if (res.data.data == 1) {
+                this.financingInventory = true
+            }
+        })
     },
     },
     watch: {
     watch: {
 
 
@@ -964,6 +971,15 @@ export default {
                 this.$message.error('请先保存')
                 this.$message.error('请先保存')
                 return
                 return
             }
             }
+            if (this.financingInventory) {
+                // 不允许盘点融资货  sendNumFinancing
+                let financing = this.form.orderItemsList.find(item => item.inventoryFinancing > 0)
+                console.info('financing----', financing)
+                if (financing) {
+                    this.$message.error('当前不允许盘点融资货货物');
+                    return false
+                }
+            }
             this.$confirm("提交结果之后不可修改? 确认是否继续", {
             this.$confirm("提交结果之后不可修改? 确认是否继续", {
                 confirmButtonText: "确定",
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 cancelButtonText: "取消",
@@ -995,6 +1011,16 @@ export default {
                     //         return
                     //         return
                     //     }
                     //     }
                     // }
                     // }
+                    console.info('this.financingInventory----', this.financingInventory)
+                    if (this.financingInventory) {
+                        // 不允许盘点融资货  sendNumFinancing
+                        let financing = this.form.orderItemsList.find(item => item.inventoryFinancing > 0)
+                        console.info('financing----', financing)
+                        if (financing) {
+                            this.$message.error('当前不允许盘点融资货货物');
+                            return false
+                        }
+                    }
                     console.log(this.form, 857)
                     console.log(this.form, 857)
                     // return
                     // return
                     const loading = this.$loading({
                     const loading = this.$loading({
@@ -1003,6 +1029,7 @@ export default {
                         spinner: 'el-icon-loading',
                         spinner: 'el-icon-loading',
                         background: 'rgba(255,255,255,0.7)'
                         background: 'rgba(255,255,255,0.7)'
                     });
                     });
+
                     submitInventory({
                     submitInventory({
                         bsType: "PD",
                         bsType: "PD",
                         ...this.form
                         ...this.form