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

@@ -211,6 +211,7 @@
<el-table-column prop="material_name" label="物料名称" width="170px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="storagevehicle_code" label="载具号" width="150px" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
<el-table-column prop="pcsn" label="批次号" width="150px" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
<el-table-column show-overflow-tooltip prop="qty" label="物料总数" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" align="center" width="120px" :min-width="flexWidth('plan_qty',crud.data,'出库重量')">
<template scope="scope">
<el-input-number v-show="mstrow.bill_type === '1011'" v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 90px" />

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))