From 58d0dfa2790115d63c936b1aadcb02a887b73ec2 Mon Sep 17 00:00:00 2001 From: baoge <751575283@qq.com> Date: Fri, 17 May 2024 10:28:18 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E4=BC=98=E5=8C=96=E5=AD=90=E5=8D=B7?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E7=95=8C=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PdmBiSubpackagerelationServiceImpl.java | 1 + .../src/views/wms/pdm/sub/DivDialog.vue | 40 ++++++++++--------- .../src/views/wms/pdm/sub/index.vue | 21 ++++++++-- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java index b78ea8f8d..d010a4c39 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java @@ -199,6 +199,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl { return this.$refs.dis_table.selection.includes(i) }) + this.multipleSelection = this.multipleSelection.filter(i => { + return this.$refs.dis_table.selection.includes(i) + }) this.currentSelection = [...this.$refs.dis_table.selection] }, handleSelectionChange(selection) { @@ -256,17 +260,16 @@ export default { this.clearSearch1() }, table2RowStyle({ row }) { - // if(this.cancelSelection.includes(row)) - // { - // return {background: 'white'}; // 修改颜色 - // } if (this.currentSelection.includes(row)) { - return { background: 'orange' } // 修改颜色 + if (row.box_group !== '0') { + return { background: 'orange' } // 修改颜色 + } } if (this.multipleSelection.includes(row)) { - return { background: 'orange' } // 修改颜色 + if (row.box_group !== '0') { + return { background: 'orange' } // 修改颜色 + } } - return {} }, getMultipleSelection(multipleSelection) { return multipleSelection.reduce((acc, item) => { @@ -295,10 +298,11 @@ export default { }, // 表格1的行点击事件 handleRowClick(scope) { + debugger const table2 = this.$refs.dis_table const table2Data = Array.from(this.openParam) - const groupValue = scope.box_group === 0 ? scope.container_name : scope.box_group - const selectedRows = table2Data.filter(row => row.box_group === groupValue && row.box_group !== null && row.box_group !== 0) + const groupValue = scope.box_group === '0' ? scope.container_name : scope.box_group + const selectedRows = table2Data.filter(row => (row.container_name == groupValue) || (row.box_group === groupValue && row.box_group !== null && row.box_group !== '0')) table2.clearSelection() selectedRows.forEach(row => table2.toggleRowSelection(row)) }, @@ -325,19 +329,17 @@ export default { tableRowClassName({ row, rowIndex }) { row.index = rowIndex }, - tableChanged(row) { + async tableChanged(row) { debugger this.form.tableMater = this.currentSelection this.form.checked = row.material_code this.form.sale_order_name = this.sale_order_name - crudPackagerelation.updateEntityList(this.form).then(res => { - crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name }).then(res => { - this.openParam = res.content - this.clearSelection() - }) - this.form.tableMater = [] - this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) - }) + await crudPackagerelation.updateEntityList(this.form) + const res = crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name }) + this.openParam = res.content + this.clearSelection() + this.form.tableMater = [] + this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.$emit('childEvent') }, divStruct() { diff --git a/lms/nladmin-ui/src/views/wms/pdm/sub/index.vue b/lms/nladmin-ui/src/views/wms/pdm/sub/index.vue index c807ab953..bd5e38549 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/sub/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/sub/index.vue @@ -66,7 +66,7 @@ :disabled="dis_flag" icon="el-icon-position" size="mini" - @click="divOpen" + @click="divOpen1" > 分配 @@ -124,7 +124,13 @@ - + @@ -217,7 +223,14 @@ export default { this.query.status = tab.name === 'first' ? '99' : '0' this.crud.toQuery() }, - divOpen() { + async divOpen() { + debugger + this.sale_order_name = this.currentRow.sale_order_name + const res = await crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.currentRow.sale_order_name }) + this.openParam = res.content + // this.divShow = true + }, + divOpen1() { debugger this.sale_order_name = this.currentRow.sale_order_name crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.currentRow.sale_order_name }).then(res => { @@ -282,9 +295,11 @@ export default { .custom-tabs { margin-bottom: 0px; /* 调整垂直间距,根据需要调整数值 */ } + .custom-table { margin-top: 0px; /* 调整垂直间距,根据需要调整数值 */ } + .tableAuto.el-table .cell { white-space: nowrap; }