Browse Source

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 2 years ago
parent
commit
ceb4f6a66c

+ 16 - 8
src/views/material/basicFile/details.vue

@@ -1349,25 +1349,33 @@
       },
       // 除基本信息之后的修改
       handleOtherEdit(type) {
+        debugger
         console.log('除基本信息之后的修改', type);
-        this.otherDeatils.show = true;
-        this.otherDeatils.isEdit = true;
-        let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
-        this.otherDeatils.title = activeTab.label;
         if ('table' === type) {
           if (this.mainMsg.checkedList.length == 1) {
+            this.otherDeatils.show = true;
+            this.otherDeatils.isEdit = true;
+            let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
+            this.otherDeatils.title = activeTab.label;
             this.otherDeatils.queryKey = this.mainMsg.checkedList[0].id;
             console.log(this.otherDeatils, 'this.otherDeatils');
+            // 查询其他标签页列表详情
+            this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
           } else {
             this.$message({
               message: '修改请选择单个数据!',
               type: 'warning'
             });
           }
-        }
-        if (this.otherDeatils.queryKey) {
-          // 查询其他标签页列表详情
-          this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
+        } else if ('form' === type) {
+          if (this.otherDeatils.queryKey) {
+            this.otherDeatils.show = true;
+            this.otherDeatils.isEdit = true;
+            let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
+            this.otherDeatils.title = activeTab.label;
+            // 查询其他标签页列表详情
+            this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
+          }
         }
       },
       // 其他标签详情弹窗-刷新

+ 20 - 6
src/views/purchase/DemandSummary/index.vue

@@ -700,17 +700,31 @@ export default {
       }
     },
     // 行关闭
+    closeitem() {
+      let param = this.ids.join()
+      shutDownSummary(param).then(res => {
+        if (res.code === 200) {
+          this.$modal.msgSuccess("操作成功");
+          this.getList(this.queryParams)
+        }
+      })
+    },
     closeLine() {
       if (this.ids.length == 0) {
         this.$modal.msgWarning("请选中至少一条数据");
       } else {
-        let param = this.ids.join()
-        shutDownSummary(param).then(res => {
-          if (res.code === 200) {
-            this.$modal.msgSuccess("操作成功");
-            this.getList(this.queryParams)
-          }
+        console.log('选中数组', this.allSelection)
+        let item = this.allSelection.some(item => {
+          return item.demandNum >= 2
         })
+        if (item) {
+          this.$modal.confirm('选中项有多个需求单位,是否确定关闭?').then(function () {
+          }).then(() => {
+            this.closeitem()
+          }).catch(() => {})
+        } else {
+          this.closeitem()
+        }
       }
     },
     // 搜索区参照选择

+ 3 - 0
src/views/purchase/PurchaseDemandList/add.vue

@@ -767,6 +767,9 @@ export default {
           if (item.demandId) {
             delete item.demandId
           }
+          if (item.allotCode) {
+            delete item.allotCode
+          }
         })
       }
     },

+ 1 - 2
src/views/purchase/purchase-order/add/column.js

@@ -650,8 +650,7 @@ export const TabColumns = [
       { //materialRate  materialRateName
         key: "tax", 
         title: "税率",
-        inputType: "InputNumber",
-        controlsPosition: "right",
+        inputType: "Input",
         disabled:true,
         width: 180,
       },