Browse Source

修改等级校验

mxx 3 years ago
parent
commit
57dec9b888
1 changed files with 16 additions and 2 deletions
  1. 16 2
      src/views/houseSelfCollect/acquisitionManagementAdd.vue

+ 16 - 2
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -276,6 +276,7 @@
       switch (this.$route.query.type) {
         case "新增":
           this.submitName = "提交"
+          this.isCountShow = true
           this.baseInfoForm = {
             warehouseId: '',
             warehouseName: '',
@@ -514,6 +515,7 @@
       },
       // 添加粮价设置
       newSetPrice() {
+        this.isCountShow = false
         let _newObj = {
           index: 0,
           checkList: [],
@@ -760,6 +762,17 @@
         }
         return true
       },
+      getEditChecList(){
+            let _data = this.baseInfoForm.details
+            let _list = []
+          for(let k = 0;k<_data.length;k++){
+            let _list1 = []
+                 _list1 = _data[k].level.split(',')
+                 _list = _list.concat(_list1)
+          }
+         this.checkList = [...new Set(_list)];
+         console.log(this.checkList)
+      },
       // 提交
       submit() {
         this.makeTableList()
@@ -781,6 +794,7 @@
             }
             break;
           case "编辑":
+             this.getEditChecList()
             isValidate = this.validate()
             if (isValidate) {
               purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
@@ -790,6 +804,7 @@
               })
             }
             case "审核中":
+             this.getEditChecList()
             isValidate = this.validate()
             if (isValidate) {
               purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
@@ -958,8 +973,7 @@
         let _price = 0
         for (let i = 0; i < this.splitPriceList.length; i++) {
           let _list = this.splitPriceList[i].priceList
-          let basePrice = parseFloat(this.splitPriceList[i].basicUnitPrice) * parseFloat(this.baseInfoForm
-            .waterBase) * 0.01
+          let basePrice = parseFloat(this.splitPriceList[i].basicUnitPrice)
           for (let k = 0; k < _list.length; k++) {
             //基准左边
             if (_waterMin < parseFloat(this.baseInfoForm.waterBase)) {