feat: 解包下料

This commit is contained in:
2025-07-24 15:56:18 +08:00
parent 2b1b731ee5
commit e58c2ab587
25 changed files with 652 additions and 77 deletions

View File

@@ -133,7 +133,7 @@
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_code" label="批次号" />
<el-table-column show-overflow-tooltip width="150" prop="pcsn" label="批次号" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="170" prop="qty" label="数量" />
<el-table-column show-overflow-tooltip width="170" prop="qty_unit_name" label="计量单位名称" />

View File

@@ -93,7 +93,7 @@
<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" />
<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 +200,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))