From 4b5dca33467710e35cae0be9365650014b667bda Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Wed, 23 Jul 2025 19:44:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=A5=E5=BA=93=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=B7=B7=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/wms/st/inbill/AddDialog.vue | 2 +- .../src/views/wms/st/inbill/DivDialog.vue | 32 +++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/nladmin-ui/src/views/wms/st/inbill/AddDialog.vue b/nladmin-ui/src/views/wms/st/inbill/AddDialog.vue index 4d3efd7..d155483 100644 --- a/nladmin-ui/src/views/wms/st/inbill/AddDialog.vue +++ b/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 } }) diff --git a/nladmin-ui/src/views/wms/st/inbill/DivDialog.vue b/nladmin-ui/src/views/wms/st/inbill/DivDialog.vue index 321df58..7c48185 100644 --- a/nladmin-ui/src/views/wms/st/inbill/DivDialog.vue +++ b/nladmin-ui/src/views/wms/st/inbill/DivDialog.vue @@ -72,6 +72,20 @@ 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) }) })