add:增加退料组盘按钮

This commit is contained in:
2025-12-23 13:51:31 +08:00
parent 131b130f8f
commit 4ef8ad026a
5 changed files with 86 additions and 1 deletions

View File

@@ -56,4 +56,12 @@ export function confirm(data) {
})
}
export default { add, edit, del, getDtl, getWeigh, saveWeigh, confirm }
export function confirmGroup(data) {
return request({
url: 'api/bomCallMaterialDtl/confirmGroup',
method: 'post',
data
})
}
export default { add, edit, del, getDtl, getWeigh, saveWeigh, confirm, confirmGroup }

View File

@@ -100,6 +100,17 @@
>
退料确认
</el-button>
<el-button
slot="right"
class="filter-item"
type="primary"
icon="el-icon-check"
size="mini"
:disabled="crud.selections.length !== 1"
@click="confirmGroup"
>
退料组盘确认
</el-button>
<el-button
slot="right"
class="filter-item"
@@ -235,6 +246,21 @@ export default {
this.crud.toQuery()
})
},
confirmGroup() {
// 校验称重信息不能为0或者空
const data = this.$refs.table.selection[0]
if (data.weigh_qty === 0) {
this.crud.notify('称重重量不能为0', CRUD.NOTIFICATION_TYPE.ERROR)
return
}
if (data.bom_status === '2') {
this.crud.notify('当前明细已确认!', CRUD.NOTIFICATION_TYPE.ERROR)
}
crudCallMaterialDtl.confirmGroup(data).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
},
empConfirm() {
const data = this.$refs.table.selection[0]
if (data.bom_status === '2') {