This commit is contained in:
zds
2022-09-23 10:19:48 +08:00
parent 8030f9310d
commit a360253b6e

View File

@@ -299,7 +299,7 @@
<el-table-column prop="seq_no" label="配粉顺序号" align="center" width="85px" />
<el-table-column prop="formula_qty" label="重量(KG)" :formatter="crud.formatNum3" width="150" align="center">
<template scope="scope">
<el-input-number v-model="scope.row.formula_qty" :disabled="scope.row.edit" :precision="3" :controls="false" :min="0" :max="is_rf_xl(scope.row)" style="width: 120px" />
<el-input-number v-model="scope.row.formula_qty" :disabled="scope.row.edit" :precision="3" :controls="false" :min="0" :max="99999999" style="width: 120px" />
</template>
</el-table-column>
<el-table-column prop="fact_qty" label="实际重量(KG)" :formatter="crud.formatNum3" align="center" />
@@ -889,14 +889,6 @@ export default {
this.tableDtl.push(value)
}
},
is_rf_xl(row){
let maxNum = 9999999999.0
if(row.is_rf_xl === '1'){
return parseFloat(row.sum_ivt_qty).toFixed(3)
}else{
return parseFloat(maxNum).toFixed(3)
}
},
submit() {
if (this.tableDtl.length === 0) {
this.crud.notify('明细不能为空!')
@@ -908,6 +900,14 @@ export default {
return false
}
}
for (let i = 0; i < this.tableDtl.length; i++) {
if (this.tableDtl[i].status === '10') {
if (parseFloat(this.tableDtl[i].sum_ivt_qty) < parseFloat(this.tableDtl[i].formula_qty)) {
this.crud.notify('配粉重量不允许大于可用库存重量,明细序号为' + (i + 1) + '请检查!')
return false
}
}
}
this.form.tableDtl = this.tableDtl
formula.submit(this.form).then(res => {
this.crud.notify('操作成功!')