ccjgmwz 3 سال پیش
والد
کامیت
e6aff86936

+ 2 - 2
.env.production

@@ -4,8 +4,8 @@
 
 NODE_ENV = 'production'
 # base api
-VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
-#VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
+#VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
+VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
 
 # 微服务相关接口配置
 ## 任务消息

+ 111 - 94
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -79,7 +79,7 @@
           <div class="count">
             <div class="left">
               <div>水分(%)</div>
-              <div>降幅(元/0.5%)</div>
+              <div>降幅(元/0.1%)</div>
             </div>
             <div class="right">
               <div class="line"></div>
@@ -174,38 +174,38 @@
         price: 0,
         left: [],
         right: [],
-        selectVal: "",
+        selectVal: '',
         goodnameList: [],
         tableData: [],
-        submitName: "提交",
+        submitName: '提交',
         isCountShow: true,
         priceList: [{
           index: 0,
           checkList: [],
-          basicUnitPrice: "",
+          basicUnitPrice: '',
           detailList: [{
               type: 1,
-              name: "干粮",
-              water: "",
+              name: '干粮',
+              water: '',
               isWrite: false
             },
             {
               type: 4,
-              jfprice: ""
+              jfprice: ''
             },
             {
               type: 2,
-              name: "基准",
+              name: '基准',
               water: '',
               isWrite: false
             },
             {
               type: 4,
-              jfprice: ""
+              jfprice: ''
             },
             {
               type: 3,
-              name: "上限",
+              name: '上限',
               water: '',
               isWrite: false
             },
@@ -272,7 +272,6 @@
             this.goodnameList = response
             this.selectVal = response[0].constValue
           } else {
-            this.goodnameList = _list
             this.goodnameList = _list
             if (_list.length != 0) {
               this.selectVal = _list[0].constValue
@@ -280,9 +279,10 @@
           }
         })
       this.isCountShow = true
+     
       switch (this.$route.query.type) {
-        case "新增":
-          this.submitName = "提交"
+        case '新增':
+          this.submitName = '提交'
           this.isCountShow = true
           this.checkList=[]
           this.baseInfoForm = {
@@ -317,49 +317,49 @@
           this.priceList = [{
             index: 0,
             checkList: [],
-            basicUnitPrice: "",
+            basicUnitPrice: '',
             detailList: [{
                 type: 1,
-                name: "干粮",
-                water: "",
+                name: '干粮',
+                water: '',
                 isWrite: false
               },
               {
                 type: 4,
-                jfprice: ""
+                jfprice: ''
               },
               {
                 type: 2,
-                name: "基准",
+                name: '基准',
                 water: '',
                 isWrite: false
               },
               {
                 type: 4,
-                jfprice: ""
+                jfprice: ''
               },
               {
                 type: 3,
-                name: "上限",
+                name: '上限',
                 water: '',
                 isWrite: false
               },
             ],
           }]
           break;
-        case "编辑":
+        case '编辑':
           this.isEdit = true;
-          this.submitName = "提交"
+          this.submitName = '提交'
           this.getData()
           break;
-        case "审核中":
+        case '审核中':
           // this.isEdit = false;
-          this.submitName = "通过"
+          this.submitName = '通过'
           this.getData()
           break;
-        case "查看":
+        case '查看':
           this.isEdit = false;
-          this.submitName = "计算"
+          this.submitName = '计算'
           this.getData()
           break;
         default:
@@ -379,6 +379,16 @@
           //构造查看priceList数据
           this.priceList = []
           this.makeLookPriceList()
+          if(this.$route.query.type == '编辑'){
+               let _data = this.priceList
+              for (let i = 0; i < _data.length; i++) {
+                if (i == 0) this.checkList1 = _data[i].checkList
+                if (i == 1) this.checkList2 = _data[i].checkList
+                if (i == 2) this.checkList3 = _data[i].checkList
+                if (i == 3) this.checkList4 = _data[i].checkList
+              }
+               this.checkList = [...new Set([...this.checkList1, ...this.checkList2, ...this.checkList3, ...this.checkList4])]
+          }
         })
       },
       goodsChange(e) {
@@ -443,14 +453,14 @@
         } else {
           item.index++
           item.detailList.splice(index + 1, 0, {
-            name: "分界",
+            name: '分界',
             water: '',
             type: 5,
             index: 1,
             isWrite: true
           });
           item.detailList.splice(index + 1, 0, {
-            jfprice: "",
+            jfprice: '',
             type: 4
           });
           this.makeSpliceIndex(item, item1, index)
@@ -496,12 +506,12 @@
           s1 = arg1.toString(),
           s2 = arg2.toString();
         try {
-          m += s1.split(".")[1].length
+          m += s1.split('.')[1].length
         } catch (e) {}
         try {
-          m += s2.split(".")[1].length
+          m += s2.split('.')[1].length
         } catch (e) {}
-        return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
+        return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
       },
       //保留两位小数
       keepTwoDecimal(num) {
@@ -528,27 +538,27 @@
           checkList: [],
           detailList: [{
               type: 1,
-              name: "干粮",
+              name: '干粮',
               water: this.baseInfoForm.waterMin,
               isWrite: false
             },
             {
               type: 4,
-              jfprice: ""
+              jfprice: ''
             },
             {
               type: 2,
-              name: "基准",
+              name: '基准',
               water: this.baseInfoForm.waterBase,
               isWrite: false
             },
             {
               type: 4,
-              jfprice: ""
+              jfprice: ''
             },
             {
               type: 3,
-              name: "上限",
+              name: '上限',
               water: this.baseInfoForm.waterMax,
               isWrite: false
             },
@@ -636,28 +646,28 @@
       //打印
       print() {
         localStorage.setItem('pricePrintList', JSON.stringify(this.baseInfoForm.detailPrints));
-        window.open("../../../static/print.html?name=" + this.baseInfoForm.goodsName)
+        window.open('../../../static/print.html?name=' + this.baseInfoForm.goodsName)
       },
       validate() {
         let that = this
 
         function _baseWaterValidate(min, max, saveNum, point, type, inputVal) {
           let _val1 = inputVal
-          let _pointVal1 = _val1.toString().split(".")[1]
+          let _pointVal1 = _val1.toString().split('.')[1]
           if (_pointVal1 == undefined) _pointVal1 = 0
-          if (typeof(_pointVal1) == "string") _pointVal1 = _pointVal1.length
+          if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
           let _tobeVal1 = _val1 % point
-          if (type == "waterBase") {
+          if (type == 'waterBase') {
             if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum && _tobeVal1 == 0) {
               return false
             }
           }
-          if (type == "deductWeight") {
+          if (type == 'deductWeight') {
             if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
               return false
             }
           }
-          if (type == "saleLimit") {
+          if (type == 'saleLimit') {
             if (_val1 <= max && _val1 >= min) {
               // Number.isInteger(that.baseInfoForm.saleLimit)
               return false
@@ -665,9 +675,9 @@
           }
           return true
         }
-        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this
+        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
             .baseInfoForm.waterBase))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterBase))) {
+          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
             that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.5整除!');
           } else {
             this.$message.error('基准水分不能为空!');
@@ -693,12 +703,12 @@
           return false
         }
 
-        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this
+        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
             .baseInfoForm.waterMin))) {
           if (this.baseInfoForm.waterMin == '') {
             this.$message.error('干粮水分不能为空!')
           }
-          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterMin))) {
+          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
             that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.5整除!')
           }
           return false
@@ -714,18 +724,18 @@
           return false
         }
 
-        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this
+        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
             .baseInfoForm.waterMax))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterMax))) {
+          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
             that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.5整除!');
           } else {
             this.$message.error('水分上限不能为空!');
           }
           return false
         }
-        if (this.baseInfoForm.saleLimit == '' || _baseWaterValidate(100, 100000, '', '', "saleLimit", parseFloat(this
+        if (this.baseInfoForm.saleLimit == '' || _baseWaterValidate(100, 100000, '', '', 'saleLimit', parseFloat(this
             .baseInfoForm.saleLimit))) {
-          if (_baseWaterValidate(100, 100000, '', '', "saleLimit", parseFloat(this.baseInfoForm.saleLimit))) {
+          if (_baseWaterValidate(100, 100000, '', '', 'saleLimit', parseFloat(this.baseInfoForm.saleLimit))) {
             that.$message.error('销售上限输入错误!');
           } else {
             this.$message.error('销售上限不能为空!');
@@ -738,7 +748,7 @@
         }
         for (let i = 0; i < this.priceList.length; i++) {
           let _item = this.priceList[i]
-          if (_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 2, '', "deductWeight", parseFloat(_item
+          if (_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 2, '', 'deductWeight', parseFloat(_item
               .basicUnitPrice))) {
             if (_item.basicUnitPrice == '') {
               this.$message.error('基准单价不能为空!');
@@ -754,9 +764,9 @@
           for (let j = 0; j < _item.detailList.length; j++) {
             let _item1 = _item.detailList[j]
             if (_item1.type == 4) {
-              if (_item1.jfprice == "" || _baseWaterValidate(0, 100, 3, '', 'deductWeight', parseFloat(_item1
+              if (_item1.jfprice == '' || _baseWaterValidate(0, 100, 3, '', 'deductWeight', parseFloat(_item1
                   .jfprice))) {
-                if (_item1.jfprice == "") {
+                if (_item1.jfprice == '') {
                   this.$message.error('降幅价格不能为空!');
                 } else {
                   that.$message.error('降幅输入错误!');
@@ -764,8 +774,8 @@
                 return false
               }
             } else {
-              if (_item1.water == "" || _baseWaterValidate(0, 100, 1, 0.5, "waterBase", parseFloat(_item1.water))) {
-                if (_item1.water == "") {
+              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.5, 'waterBase', parseFloat(_item1.water))) {
+                if (_item1.water == '') {
                   this.$message.error('分界水分不能为空!')
                 } else {
                   that.$message.error('分界值输入错误!');
@@ -790,6 +800,7 @@
       },
       // 提交
       submit() {
+        this.isCountShow = false
         let isValidate = false
          isValidate = this.validate()
                 if (isValidate) {
@@ -798,10 +809,10 @@
         this.makePriceDataList()
         this.baseInfoForm.goodsName = this.selectVal
         switch (this.$route.query.type) {
-          case "查看":
+          case '查看':
             this.isCountShow = false;
             break;
-          case "新增":
+          case '新增':
             isValidate = this.validate()
             if (isValidate) {
               purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
@@ -810,7 +821,7 @@
               })
             }
             break;
-          case "编辑":
+          case '编辑':
             this.getEditCheckList()
             isValidate = this.validate()
             if (isValidate) {
@@ -819,7 +830,7 @@
               })
             }
             break;
-          case "审核中":
+          case '审核中':
             // this.makePriceDataList()
             this.getEditCheckList()
             isValidate = this.validate()
@@ -876,17 +887,20 @@
         let _obj = {}
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
         let _waterMax = parseFloat(this.baseInfoForm.waterBase)
-        let _count = (_waterMax - _waterMin) / 0.5
+        let _count = (_waterMax - _waterMin) / 0.1 
         for (let i = 0; i < _count; i++) {
-          if (i == 0) {
-            _waterMax -= 0.1
-          } else {
-            _waterMax -= 0.5
-          }
-          let priceList = this.calculatePrice(_waterMax)
+          // if (i == 0) {
+          //   _waterMax -= 0.1
+          // } 
+          // else {
+          //   _waterMax -= 0.5
+          // }
+          _waterMax -= 0.1
+          let priceList = this.calculatePrice(this.keepOneDecimal(_waterMax ))
+          
           _obj = {
-            waterMin: this.keepOneDecimal(_waterMax - 0.4),
-            waterMax: this.keepOneDecimal(_waterMax),
+            waterMin: this.keepOneDecimal(_waterMax ),
+            waterMax: this.keepOneDecimal(_waterMax + 0.09),
             price1: this.keepTwoDecimal(priceList[0]),
             price2: this.keepTwoDecimal(priceList[1]),
             price3: this.keepTwoDecimal(priceList[2]),
@@ -897,24 +911,28 @@
         _obj = {}
         _waterMin = parseFloat(this.baseInfoForm.waterBase)
         _waterMax = parseFloat(this.baseInfoForm.waterMax)
-        _count = (_waterMax - _waterMin) / 0.5
+        _count = (_waterMax - _waterMin) / 0.1
         for (let i = 0; i < _count; i++) {
-          if (i == 0) {
-            _waterMin += 0.4
-          } else {
-            _waterMin += 0.5
+          // if (i == 0) {
+          //   _waterMin += 0.4
+          // } else {
+          //   _waterMin += 0.5
+          // }
+          if (i != 0) {
+            _waterMin += 0.1
           }
-          let priceList = this.calculatePriceRight(_waterMin)
+          
+          let priceList = this.calculatePriceRight(this.keepOneDecimal(_waterMin ))
           _obj = {
-            waterMin: this.keepOneDecimal(_waterMin - 0.4),
-            waterMax: this.keepOneDecimal(_waterMin),
+            waterMin: this.keepOneDecimal(_waterMin ),
+            waterMax: this.keepOneDecimal(_waterMin + 0.09),
             price1: this.keepTwoDecimal(priceList[0]),
             price2: this.keepTwoDecimal(priceList[1]),
             price3: this.keepTwoDecimal(priceList[2]),
             priceOther: this.keepTwoDecimal(priceList[3]),
           }
           _list.push(_obj)
-          console.log("_list", _list)
+          console.log('_list', _list)
 
         }
         this.baseInfoForm.detailPrints = _list
@@ -953,12 +971,12 @@
           for (let j = index(); j > 0; j--) {
               if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
                 if (_priceList[i].detailList[j].type != 1) {
-                  let baseprice = ""
+                  let baseprice = ''
                   if (j == index()) {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice)
                   } else {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice + (parseFloat(_priceList[i].detailList[j + 2]
-                      .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.5 * parseFloat(_priceList[i]
+                      .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.1 * parseFloat(_priceList[i]
                       .detailList[j + 1].jfprice))
                   }
                   _leftObj.priceList.push({
@@ -970,7 +988,7 @@
                     jfprice: parseFloat(_priceList[i].detailList[j - 1].jfprice),
                     baseprice: baseprice,
                     price: (parseFloat(_priceList[i].detailList[j].water) - parseFloat(_priceList[i].detailList[j -
-                      2].water)) / 0.5 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
+                      2].water)) / 0.1 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
                   })
                 }
               }
@@ -1002,16 +1020,16 @@
             //   }
             // }
             this.left.push(_leftObj)
-            console.log("this.left", this.left)
+            console.log('this.left', this.left)
                   for (let k = index(); k <= _priceList[i].detailList.length; k++) {
               if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
                 if (_priceList[i].detailList[k].type != 3) {
-                  let baseprice = ""
+                  let baseprice = ''
                   if (k == index()) {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice)
                   } else {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice - (parseFloat(_priceList[i].detailList[k]
-                      .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.5 * parseFloat(_priceList[i]
+                      .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.1 * parseFloat(_priceList[i]
                       .detailList[k - 1].jfprice))
                   }
                   _rightObj.priceList.push({
@@ -1023,7 +1041,7 @@
                     jfprice: parseFloat(_priceList[i].detailList[k + 1].jfprice),
                     baseprice: baseprice,
                     price: (parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
-                      k].water)) / 0.5 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
+                      k].water)) / 0.1 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
                   })
                 }
               }
@@ -1056,7 +1074,7 @@
             //   }
             // }
             this.right.push(_rightObj)
-            console.log("this.right", this.right)
+            console.log('this.right', this.right)
           }
         }
       },
@@ -1067,10 +1085,10 @@
         let _listResult = []
         for (let i = 0; i < this.right.length; i++) {
           let _list = this.right[i].priceList
-          let tmp = ""
+          let tmp = ''
           for (let k = 0; k < _list.length; k++) {
             if (_waterMax < _list[k].priceEnd && _waterMax >= _list[k].priceStart) {
-              tmp = parseFloat(_list[k].baseprice - _list[k].jfprice * (((_waterMax - 0.4) - _list[k].priceStart) * 2))
+              tmp = parseFloat(_list[k].baseprice - _list[k].jfprice * (((_waterMax) - _list[k].priceStart) / 0.1))
             }
           }
           _listResult.push(tmp)
@@ -1082,11 +1100,10 @@
         let _listResult = []
         for (let i = 0; i < this.left.length; i++) {
           let _list = this.left[i].priceList
-          let tmp = ""
+          let tmp = ''
           for (let k = 0; k < _list.length; k++) {
             if (_waterMax >= _list[k].priceEnd && _waterMax < _list[k].priceStart) {
-              tmp = parseFloat(_list[k].baseprice + _list[k].jfprice * ((_list[k].priceStart - (_waterMax + 0.1)) * 2 +
-                1))
+              tmp = parseFloat(_list[k].baseprice + _list[k].jfprice * ((_list[k].priceStart - (_waterMax )) / 0.1 + 1))
             }
           }
           _listResult.push(tmp)
@@ -1111,7 +1128,7 @@
             if (_detailList[k] == this.baseInfoForm.waterMin) {
               _obj = {
                 type: 1,
-                name: "干粮",
+                name: '干粮',
                 water: _detailList[k],
                 isWrite: false
               }
@@ -1119,20 +1136,20 @@
             } else if (_detailList[k] == this.baseInfoForm.waterMax) {
               _obj = {
                 type: 3,
-                name: "上限",
+                name: '上限',
                 water: _detailList[k],
                 isWrite: false
               }
             } else if (_detailList[k] == this.baseInfoForm.waterBase) {
               _obj = {
                 type: 2,
-                name: "基准",
+                name: '基准',
                 water: _detailList[k],
                 isWrite: false
               }
             } else {
               _obj = {
-                name: "分界",
+                name: '分界',
                 water: _detailList[k],
                 type: 5,
                 index: k,

+ 4 - 2
src/views/houseSelfCollect/component/paymentPrint.vue

@@ -66,7 +66,8 @@
       </tr>
       <tr class="row">
         <td class="col col-bgc"  v-if="printData.type == '潮粮'">净重单价</td>
-         <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+        <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+        <td class="col col-bgc">扣单价</td>
         <td class="col col-bgc">粮款</td>
         <td class="col col-bgc">称重补助</td>
         <td class="col col-bgc">运费补助</td>
@@ -80,6 +81,7 @@
       <tr class="row">
         <td class="col " v-if="printData.type == '潮粮'">{{printData.tidalGrainPrice}}</td>
         <td class="col " v-if="printData.type == '干粮'">{{printData.qualityInspectionManagement.dryGrainPrice}}</td>
+        <td class="col ">{{ printData.qualityInspectionManagement.unitDeduction}}</td>
         <td class="col ">{{ printData.grainMoney}}</td>
         <td class="col ">{{ printData.weighingSubsidy}}</td>
         <td class="col ">{{ printData.freightSubsidy}}</td>
@@ -147,7 +149,7 @@
       printData: {
         type: Object
       },
-      billingDate:"",
+      billingDate:'',
     },
     data() {
       return {

+ 17 - 16
src/views/houseSelfCollect/paymentManagement.vue

@@ -70,6 +70,7 @@
       <el-table-column class="table_td" prop="goodsName" label="货名"></el-table-column>
       <el-table-column class="table_td" width="80" prop="type" label="类型"></el-table-column>
       <el-table-column class="table_td" prop="tidalGrainPrice" width="140" label="净重单价(元/公斤)"></el-table-column>
+      <el-table-column class="table_td" prop="unitDeduction" width="130" label="扣单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="solidGrainPrice" width="140" label="纯重单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="netWeight" width="120" label="净重(公斤)"></el-table-column>
       <el-table-column class="table_td" prop="pureWeight" width="120" label="纯重(公斤)"></el-table-column>
@@ -267,7 +268,7 @@ export default {
         return
       }else{
         this.showPayImgs = true
-        this.payImg = row.paymentScreenshot.split("$")
+        this.payImg = row.paymentScreenshot.split('$')
       }
     },
     getWarehouse() {
@@ -320,21 +321,21 @@ export default {
           this.deptBudgetTotal = response.total
         })
         this.isShowAdopt = true
-     getpayment({
-         currentPage: 1,
-        pageSize: 99999,
-        warehouseName: this.warehouseName,
-        managementType : 1 
-      })
-        .toPromise()
-        .then((response) => {
-          for(let i = 0 ; i < response.length ; i++){
-            if(response[i].taskId){
-              this.isShowAdopt = true
-              return
-            }
-          }
-        })
+    //  getpayment({
+    //      currentPage: 1,
+    //     pageSize: 99999,
+    //     warehouseName: this.warehouseName,
+    //     managementType : 1 
+    //   })
+    //     .toPromise()
+    //     .then((response) => {
+    //       for(let i = 0 ; i < response.length ; i++){
+    //         if(response[i].taskId){
+    //           this.isShowAdopt = true
+    //           return
+    //         }
+    //       }
+    //     })
     },
     del(row) {
       this.$confirm(

+ 17 - 10
src/views/houseSelfCollect/settlement.vue

@@ -200,6 +200,9 @@
             <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂(公斤)" span="1" prop="waterContent">
               <ws-input v-model="paymentList.weighingManagement.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
             </ws-form-item>
+            <ws-form-item  label="扣单价(元/公斤)" span="1" prop="unitDeduction">
+              <ws-input v-model="paymentList.unitDeduction" placeholder="请输入扣单价" maxlength="100" size="small" :disabled="disabled"/>
+            </ws-form-item>
             <ws-form-item v-if='paymentList.type=="潮粮"'
               label="纯重单价(元/公斤)"
               span="1"
@@ -222,7 +225,7 @@
           <div class="titles">结算金额(元)</div>
           <ws-info-table>
             <ws-form-item v-if='paymentList.type=="潮粮"'
-              label="粮款 = 净重 x 净重单价 ="
+              label="粮款 = 净重 x (净重单价 - 扣单价) ="
               span="1"
               prop="waterContent"
               class="formItem"
@@ -230,7 +233,7 @@
               <ws-input @input='grainMoney' v-model="paymentList.grainMoney" placeholder="请输入粮款" maxlength="100" size="small" disabled/>
             </ws-form-item>
             <ws-form-item v-if='paymentList.type=="干粮"' 
-              label="粮款 = 净重 x  干粮单价 ="
+              label="粮款 = 净重 x  (干粮单价 - 扣单价)  ="
               span="1"
               prop="waterContent"
               class="formItem"
@@ -411,8 +414,8 @@
 <script>
 import {getpaymentexamine,postpaymentedit,settlementEdit} from '@/model/houseSelfCollect/index'
 import paymentPrint from './component/paymentPrint.vue'
-import html2canvas from "html2canvas"
-import axios from "axios"
+import html2canvas from 'html2canvas'
+import axios from 'axios'
 export default {
   components: {
     paymentPrint
@@ -426,14 +429,15 @@ export default {
          buckleWeightRatio:0,
          grainMoney:0,
          waterMin:0,
-       }
+       },
+       unitDeduction:0
      },
       disabled:false,
       types:'',
       isShowPrint:false,
       information:'结算',
       printData:{},
-      imgUrl:"",
+      imgUrl:'',
     }
   },
   activated() {
@@ -487,6 +491,9 @@ export default {
     getList(){
       getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
           this.paymentList = response
+          if(!this.paymentList.unitDeduction){
+            this.paymentList.unitDeduction = 0
+          } 
           this.paymentList.buckleWeightRatio = this.paymentList.qualityInspectionManagement.buckleWeightRatio
           this.paymentList.tidalGrainPrice = this.paymentList.tidalGrainPrice.toFixed(2)
           this.paymentList.qualityInspectionManagement.waterMin=this.$route.query.waterMin
@@ -500,14 +507,14 @@ export default {
             this.paymentList.dryGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base
           }
           if(this.paymentList.type =='潮粮'){
-            this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.tidalGrainPrice*this.paymentList.weighingManagement.netWeight
+            this.paymentList.grainMoney=(this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction)*this.paymentList.weighingManagement.netWeight
             this.paymentList.calculationPayable=Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy)-Number(this.paymentList.weighingDeduction)-this.paymentList.freightDeduction-Number(this.paymentList.unloadDeduction)-Number(this.paymentList.otherDeduction)-Number(this.paymentList.qualityDeduction)
             this.paymentList.calculationPayable =  this.paymentList.calculationPayable.toFixed(2)
       
               this.paymentList.actualPayment = this.paymentList.calculationPayable
               this.actualPayment( this.paymentList.actualPayment)
           }else{
-            this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.dryGrainPrice*this.paymentList.weighingManagement.netWeight
+            this.paymentList.grainMoney=(this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction)*this.paymentList.weighingManagement.netWeight
              this.paymentList.calculationPayable=Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy)-Number(this.paymentList.weighingDeduction)-this.paymentList.freightDeduction-Number(this.paymentList.unloadDeduction)-Number(this.paymentList.otherDeduction)-Number(this.paymentList.qualityDeduction)
               this.paymentList.calculationPayable =  this.paymentList.calculationPayable.toFixed(2)
                 this.paymentList.actualPayment = this.paymentList.calculationPayable
@@ -620,7 +627,7 @@ export default {
           return chineseStr;
         },
     print() {
-      if(this.paymentList.type == "潮粮"){
+      if(this.paymentList.type == '潮粮'){
         if (!this.paymentList.buckleWeightRatio) {
           this.$message({
             message: '扣重比不能为空',
@@ -810,7 +817,7 @@ export default {
   width: 70% !important;
 }
 /deep/.ws-info-table .formItem .el-form-item__label{
-  width: 220px;
+  width: 260px;
 }
 /deep/.el-table .el-table__header .cell,
 .el-table .el-table__body .cell {