opt:优化子卷包装界面样式

This commit is contained in:
2024-05-17 10:28:18 +08:00
parent 0880386c3d
commit 58d0dfa279
3 changed files with 40 additions and 22 deletions

View File

@@ -199,6 +199,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
String boxType = whereJson.getString("checked"); String boxType = whereJson.getString("checked");
updateWrapper.set("box_type", boxType); updateWrapper.set("box_type", boxType);
updateWrapper.set("box_group", maxBoxGroup); updateWrapper.set("box_group", maxBoxGroup);
// updateWrapper.set("status", "0");
updateWrapper.in("workorder_id", entityList); updateWrapper.in("workorder_id", entityList);
pdmBiSubpackagerelationMapper.update(null, updateWrapper); pdmBiSubpackagerelationMapper.update(null, updateWrapper);
//下发空木箱出库任务 //下发空木箱出库任务

View File

@@ -155,6 +155,8 @@ export default {
previousSelection: [], previousSelection: [],
// 存储搜索后的选中状态 // 存储搜索后的选中状态
currentSelection: [], currentSelection: [],
// 上面表格选中的
upSelection: [],
// 取消选中 // 取消选中
cancelSelection: [], cancelSelection: [],
multipleSelection: [], multipleSelection: [],
@@ -200,7 +202,9 @@ export default {
methods: { methods: {
handleSearch() { handleSearch() {
debugger debugger
this.multipleSelection = this.multipleSelection.filter(i => { 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] this.currentSelection = [...this.$refs.dis_table.selection]
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
@@ -256,17 +260,16 @@ export default {
this.clearSearch1() this.clearSearch1()
}, },
table2RowStyle({ row }) { table2RowStyle({ row }) {
// if(this.cancelSelection.includes(row))
// {
// return {background: 'white'}; // 修改颜色
// }
if (this.currentSelection.includes(row)) { if (this.currentSelection.includes(row)) {
return { background: 'orange' } // 修改颜色 if (row.box_group !== '0') {
return { background: 'orange' } // 修改颜色
}
} }
if (this.multipleSelection.includes(row)) { if (this.multipleSelection.includes(row)) {
return { background: 'orange' } // 修改颜色 if (row.box_group !== '0') {
return { background: 'orange' } // 修改颜色
}
} }
return {}
}, },
getMultipleSelection(multipleSelection) { getMultipleSelection(multipleSelection) {
return multipleSelection.reduce((acc, item) => { return multipleSelection.reduce((acc, item) => {
@@ -295,10 +298,11 @@ export default {
}, },
// 表格1的行点击事件 // 表格1的行点击事件
handleRowClick(scope) { handleRowClick(scope) {
debugger
const table2 = this.$refs.dis_table const table2 = this.$refs.dis_table
const table2Data = Array.from(this.openParam) const table2Data = Array.from(this.openParam)
const groupValue = scope.box_group === 0 ? scope.container_name : scope.box_group 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 selectedRows = table2Data.filter(row => (row.container_name == groupValue) || (row.box_group === groupValue && row.box_group !== null && row.box_group !== '0'))
table2.clearSelection() table2.clearSelection()
selectedRows.forEach(row => table2.toggleRowSelection(row)) selectedRows.forEach(row => table2.toggleRowSelection(row))
}, },
@@ -325,19 +329,17 @@ export default {
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
row.index = rowIndex row.index = rowIndex
}, },
tableChanged(row) { async tableChanged(row) {
debugger debugger
this.form.tableMater = this.currentSelection this.form.tableMater = this.currentSelection
this.form.checked = row.material_code this.form.checked = row.material_code
this.form.sale_order_name = this.sale_order_name this.form.sale_order_name = this.sale_order_name
crudPackagerelation.updateEntityList(this.form).then(res => { await crudPackagerelation.updateEntityList(this.form)
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name }).then(res => { const res = crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name })
this.openParam = res.content this.openParam = res.content
this.clearSelection() this.clearSelection()
}) this.form.tableMater = []
this.form.tableMater = [] this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
this.$emit('childEvent') this.$emit('childEvent')
}, },
divStruct() { divStruct() {

View File

@@ -66,7 +66,7 @@
:disabled="dis_flag" :disabled="dis_flag"
icon="el-icon-position" icon="el-icon-position"
size="mini" size="mini"
@click="divOpen" @click="divOpen1"
> >
分配 分配
</el-button> </el-button>
@@ -124,7 +124,13 @@
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination />
</div> </div>
<DivDialog :dialog-show.sync="divShow" :open-param="openParam" :sale_order_name="this.sale_order_name" @childEvent="handleChildEvent" @AddChanged="querytable" /> <DivDialog
:dialog-show.sync="divShow"
:open-param="openParam"
:sale_order_name="this.sale_order_name"
@childEvent="handleChildEvent"
@AddChanged="querytable"
/>
</div> </div>
</template> </template>
@@ -217,7 +223,14 @@ export default {
this.query.status = tab.name === 'first' ? '99' : '0' this.query.status = tab.name === 'first' ? '99' : '0'
this.crud.toQuery() 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 debugger
this.sale_order_name = this.currentRow.sale_order_name this.sale_order_name = this.currentRow.sale_order_name
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.currentRow.sale_order_name }).then(res => { crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.currentRow.sale_order_name }).then(res => {
@@ -282,9 +295,11 @@ export default {
.custom-tabs { .custom-tabs {
margin-bottom: 0px; /* 调整垂直间距,根据需要调整数值 */ margin-bottom: 0px; /* 调整垂直间距,根据需要调整数值 */
} }
.custom-table { .custom-table {
margin-top: 0px; /* 调整垂直间距,根据需要调整数值 */ margin-top: 0px; /* 调整垂直间距,根据需要调整数值 */
} }
.tableAuto.el-table .cell { .tableAuto.el-table .cell {
white-space: nowrap; white-space: nowrap;
} }