소스 검색

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

002390 1 년 전
부모
커밋
598e208321

+ 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 - 1
src/views/purchase/apply/add/column.js

@@ -289,7 +289,7 @@ export const TabColumns = [
         computed: (prop) => {
           const { tax, taxPrice } = prop;
           const newTax = Number(tax) / 100;
-          const price = (taxPrice / (1 + newTax)).toFixed(8);
+          const price = (taxPrice / (1 + newTax)).toFixed(6);
           return price === "NaN" ? null : price;
         },
         require: true,

+ 3 - 3
src/views/purchase/contract/add/column.js

@@ -382,7 +382,7 @@ export const TabColumns = [
         width: 200,
         computed: (prop) => {
           const { qty, taxPrice } = prop;
-          const taxMoney = (qty * taxPrice).toFixed(8);
+          const taxMoney = (qty * taxPrice).toFixed(6);
           return taxMoney === "NaN" ? null : taxMoney;
         },
       },
@@ -394,7 +394,7 @@ export const TabColumns = [
         computed: (prop) => {
           const { tax, taxPrice } = prop;
           const newTax = Number(tax) / 100;
-          const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
+          const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(6);
           return taxFreePrice === "NaN" ? null : taxFreePrice;
         },
       },
@@ -405,7 +405,7 @@ export const TabColumns = [
         width: 200,
         computed: (prop) => {
           const { qty, taxFreePrice } = prop;
-          const taxFreeMoney = (qty * taxFreePrice).toFixed(8);
+          const taxFreeMoney = (qty * taxFreePrice).toFixed(6);
           return taxFreeMoney === "NaN" ? null : taxFreeMoney;
         },
       },

+ 3 - 3
src/views/purchase/contract/see/column.js

@@ -394,7 +394,7 @@ export const TabColumns = [
         width: 200,
         computed: (prop) => {
           const { qty, taxPrice } = prop;
-          const taxMoney = (qty * taxPrice).toFixed(8);
+          const taxMoney = (qty * taxPrice).toFixed(6);
           return taxMoney === "NaN" ? null : taxMoney;
         },
       },
@@ -406,7 +406,7 @@ export const TabColumns = [
         computed: (prop) => {
           const { tax, taxPrice } = prop;
           const newTax = Number(tax) / 100;
-          const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
+          const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(6);
           return taxFreePrice === "NaN" ? null : taxFreePrice;
         },
       },
@@ -417,7 +417,7 @@ export const TabColumns = [
         width: 200,
         computed: (prop) => {
           const { qty, taxFreePrice } = prop;
-          const taxFreeMoney = (qty * taxFreePrice).toFixed(8);
+          const taxFreeMoney = (qty * taxFreePrice).toFixed(6);
           return taxFreeMoney === "NaN" ? null : taxFreeMoney;
         },
       },

+ 1 - 1
src/views/purchase/task/first-direct/column.js

@@ -26,7 +26,7 @@ export const TableColumns = [
     width: 200,
     computed: (prop) => {
       const { tax } = prop;
-      return tax.toFixed(8) + "%";
+      return tax.toFixed(6) + "%";
     },
   },
   { key: "taxFreePrice", title: "无税单价" },