Browse Source

fix:入库新增混料修改

master_V2.0
zhouz 2 weeks ago
parent
commit
4b5dca3346
  1. 2
      nladmin-ui/src/views/wms/st/inbill/AddDialog.vue
  2. 32
      nladmin-ui/src/views/wms/st/inbill/DivDialog.vue

2
nladmin-ui/src/views/wms/st/inbill/AddDialog.vue

@ -313,7 +313,7 @@ export default {
rows.forEach((item) => {
let same_mater = true
this.form.tableData.forEach((row) => {
if (row.pcsn === item.pcsn && row.material_id === item.material_id) {
if (row.pcsn === item.pcsn && row.material_id === item.material_id && row.storagevehicle_code === item.storagevehicle_code) {
same_mater = false
}
})

32
nladmin-ui/src/views/wms/st/inbill/DivDialog.vue

@ -72,6 +72,20 @@
label="数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="assign_qty"
:formatter="crud.formatNum3"
label="分配数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="unassign_qty"
:formatter="crud.formatNum3"
label="未分配数量"
align="center"
/>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
@ -155,6 +169,8 @@
:data="form.tableMater"
style="width: 100%;"
max-height="300"
highlight-current-row
@row-click="clcikDisRow"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
@ -237,6 +253,7 @@ export default {
sect_val: null,
form: {
dtl_row: null,
dis_row: null,
storage_qty: '',
point_code: null,
checked: true,
@ -284,11 +301,15 @@ export default {
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
this.openParam = res
this.form.dtl_row = res[row.index]
this.form.dis_row = null
})
crudRawAssist.getDisDtl(row).then(res => {
this.form.tableMater = res
})
},
clcikDisRow(row, column, event) {
this.form.dis_row = row
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
@ -370,6 +391,10 @@ export default {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form.dis_row) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
//
if (this.form.checked) {
if (!this.sect_code) {
@ -386,6 +411,7 @@ export default {
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.divBtn = false
this.form.dis_row = null
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).finally(() => {
@ -404,9 +430,8 @@ export default {
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const flag = this.form.tableMater.some(mater => !mater.struct_code)
if (flag) {
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
if (!this.form.dis_row) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
//
@ -416,6 +441,7 @@ export default {
})
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.form.dis_row = null
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})

Loading…
Cancel
Save