add:增加退料组盘按钮
This commit is contained in:
@@ -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 }
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user