mdf:入库兼容混料

This commit is contained in:
zhangzq
2025-07-24 09:45:58 +08:00
parent 3fc2608cb5
commit 1b35a8d432
9 changed files with 31 additions and 35 deletions

View File

@@ -93,7 +93,11 @@
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘编码" align="center" width="250px" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="批次号" align="center" width="150px" />
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="qty" label="可出重量" :formatter="crud.formatNum3" align="center" >
<template slot-scope="scope">
<el-input v-model="scope.row.qty" clearable style="width: 120px"></el-input>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -200,15 +204,15 @@ export default {
}
row.edit = !row.edit
if (row.edit) {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.qty)
} else {
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.qty)
// 如果待分配重量等于0则 明细重量 - 已分配重量
if (parseInt(this.queryrow.unassign_qty) === 0) {
this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.qty)
}
if (this.queryrow.unassign_qty > this.goal_unassign_qty) {
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))