|
@@ -103,6 +103,9 @@
|
|
<ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
|
|
<ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
|
|
<ws-input @input="kkInput(dataList.deductionAmount)" v-model="dataList.deductionAmount"
|
|
<ws-input @input="kkInput(dataList.deductionAmount)" v-model="dataList.deductionAmount"
|
|
placeholder="请输入扣款金额" maxlength="120" size="small" />
|
|
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>
|
|
</ws-form-item>
|
|
|
|
|
|
<!-- 品级 -->
|
|
<!-- 品级 -->
|
|
@@ -618,6 +621,23 @@
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
methods: {
|
|
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) {
|
|
setVal(data) {
|
|
if (this.information == '毛重检斤') {
|
|
if (this.information == '毛重检斤') {
|
|
this.dataList.grossWeight = data
|
|
this.dataList.grossWeight = data
|