opt:优化子卷包装界面样式
This commit is contained in:
@@ -199,6 +199,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
String boxType = whereJson.getString("checked");
|
||||
updateWrapper.set("box_type", boxType);
|
||||
updateWrapper.set("box_group", maxBoxGroup);
|
||||
// updateWrapper.set("status", "0");
|
||||
updateWrapper.in("workorder_id", entityList);
|
||||
pdmBiSubpackagerelationMapper.update(null, updateWrapper);
|
||||
//下发空木箱出库任务
|
||||
|
||||
@@ -155,6 +155,8 @@ export default {
|
||||
previousSelection: [],
|
||||
// 存储搜索后的选中状态
|
||||
currentSelection: [],
|
||||
// 上面表格选中的
|
||||
upSelection: [],
|
||||
// 取消选中
|
||||
cancelSelection: [],
|
||||
multipleSelection: [],
|
||||
@@ -200,7 +202,9 @@ export default {
|
||||
methods: {
|
||||
handleSearch() {
|
||||
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]
|
||||
},
|
||||
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() {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="divOpen"
|
||||
@click="divOpen1"
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
@@ -124,7 +124,13 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user