فهرست منبع

修改仓库 入库 自动计算扣款

achao 3 سال پیش
والد
کامیت
3cc32115b7
2فایلهای تغییر یافته به همراه22 افزوده شده و 2 حذف شده
  1. 2 2
      src/views/warehouse/warehouseManagementGross.vue
  2. 20 0
      src/views/warehouse/warehouseManagementNoWeightIn.vue

+ 2 - 2
src/views/warehouse/warehouseManagementGross.vue

@@ -601,13 +601,13 @@
       // }
     },
     methods: {
-      // 千丰自动计算扣
+      // 千丰自动计算扣
       automaticCalculation() {
         let _price = 0
         if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
           let _water = this.deptBudgetList.warehouseInOutDetail.waterContent
           if (Number(_water) > 14.9) {
-            _price = ((Number(_water) - 14.9) * 0.005).toFixed(3)
+            _price = ((Number(_water) - 14.9) * 0.05).toFixed(3)
           }
           this.deptBudgetList.deductionAmount = _price
           this.kkInput(_price)

+ 20 - 0
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -103,6 +103,9 @@
               <ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
                 <ws-input @input="kkInput(dataList.deductionAmount)" v-model="dataList.deductionAmount"
                   placeholder="请输入扣款金额" maxlength="120" size="small" />
+              <el-button v-if="dataList.warehouseName=='克东千丰库'" class="bg-bottom" type="primary" size="small"
+                @click="automaticCalculation"> 自动计算
+              </el-button>
               </ws-form-item>
 
               <!-- 品级 -->
@@ -618,6 +621,23 @@
       // }
     },
     methods: {
+      // 千丰自动计算扣款
+      automaticCalculation() {
+        let _price = 0
+        if (this.dataList.warehouseInOutDetail.waterContent) {
+          let _water = this.dataList.warehouseInOutDetail.waterContent
+          if (Number(_water) > 14.9) {
+            _price = ((Number(_water) - 14.9) * 0.05).toFixed(3)
+          }
+          this.dataList.deductionAmount = _price
+          this.kkInput(_price)
+        } else {
+          this.$message({
+            message: '自动计算扣款,请先输入水分!',
+            type: 'warning',
+          })
+        }
+      },
       setVal(data) {
         if (this.information == '毛重检斤') {
           this.dataList.grossWeight = data