add:增加二次分配代码逻辑

This commit is contained in:
2024-06-25 19:06:07 +08:00
parent 2f396a9a71
commit bd153c9044
38 changed files with 1996 additions and 696 deletions

View File

@@ -45,7 +45,7 @@
<el-table-column show-overflow-tooltip prop="quanlity_in_box" label="箱内子卷数" align="center" />
<el-table-column show-overflow-tooltip prop="package_box_sn" label="木箱号" align="center" />
<el-table-column show-overflow-tooltip prop="container_name" label="子卷号" align="center" />
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="sap批次" align="center" />
<el-table-column show-overflow-tooltip prop="paper_tube_description" label="子卷规格" align="center" />
</el-table>
</el-card>
<div style="margin-bottom: 20px;" />
@@ -82,9 +82,10 @@
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="isButtonDisabled"
@click="divStruct()"
>
分配
分配木箱规格
</el-button>
</span>
</div>
@@ -103,10 +104,10 @@
<el-table-column type="selection" width="55" />
<el-table-column show-overflow-tooltip prop="box_group" label="木箱组" align="center" width="130" />
<el-table-column show-overflow-tooltip prop="container_name" label="子卷号" align="center" />
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="sap批次" align="center" />
<el-table-column show-overflow-tooltip prop="paper_tube_description" label="子卷规格" align="center" />
</el-table>
</el-card>
<MaterDiv ref="child" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />
<MaterDiv ref="child" :dialog-show.sync="structShow" :paper_tube_description="paper_tube_description" :sect-prop="sectProp" @tableChanged="tableChanged" />
</el-dialog>
</template>
@@ -150,6 +151,7 @@ export default {
},
data() {
return {
isButtonDisabled: false, // 木箱规格分配按钮
searchText: '',
// 存储搜索前的选中状态
previousSelection: [],
@@ -164,6 +166,7 @@ export default {
stor_id: '',
sect_id: '',
sectProp: null,
paper_tube_description: '',
bucketProp: {},
structShow: false,
bucketObj: null,
@@ -299,6 +302,7 @@ export default {
// 表格1的行点击事件
handleRowClick(scope) {
debugger
this.isButtonDisabled = !!(scope.status !== '99' || scope.box_group !== '0')
const table2 = this.$refs.dis_table
const table2Data = Array.from(this.openParam)
const groupValue = scope.box_group === '0' ? scope.container_name : scope.box_group
@@ -343,7 +347,9 @@ export default {
this.$emit('childEvent')
},
divStruct() {
debugger
if (this.currentSelection.length > 0 && this.$refs.dis_table.selection.length > 0) {
this.paper_tube_description = this.currentSelection[0].paper_tube_description
this.structShow = true
this.$refs.child.getMsg(false)
} else {

View File

@@ -16,7 +16,7 @@
clearable
style="width: 200px"
size="mini"
placeholder="输入木箱物料名称"
placeholder="输入关键词搜索"
prefix-icon="el-icon-search"
class="filter-item"
/> </el-col>
@@ -38,8 +38,13 @@
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="material_code" label="木箱规格" />
<el-table-column prop="box_no" label="木箱" />
<el-table-column prop="material_code" label="物料编码" />
<el-table-column prop="material_name" label="物料名称" />
<el-table-column prop="box_length" label="木箱长度" />
<el-table-column prop="box_width" label="木箱宽度" />
<el-table-column prop="box_high" label="木箱高度" />
<el-table-column prop="num" label="最大装卷数" />
</el-table>
<!--分页组件-->
<pagination />
@@ -47,6 +52,36 @@
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
<el-dialog
:visible.sync="dialogVisible1"
width="28%"
append-to-body
@close="dialogVisible1 = false"
>
<template v-slot:title>
<span class="warning-text1">提醒</span>
</template>
<br>
<br>
<span class="warning-text">
请仔细核对子卷与木箱规格是否匹配
<br>
<br>
<span class="red-text">木箱长度为{{ this.box_length }}</span>
<br>
<br>
<span class="red-text">子卷规格为{{ this.paper_tube_description }}</span>
<br>
<br>
点击确定后将立即生成木箱出库任务无法更改
</span>
<br>
<br>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible1 = false">取消</el-button>
<el-button type="primary" @click="confirmSubmit">确定</el-button>
</span>
</el-dialog>
</el-dialog>
</template>
@@ -63,10 +98,10 @@ export default {
return CRUD({
title: '木箱规格',
optShow: {},
url: 'api/Materialbase',
idField: 'material_id',
sort: 'material_id,desc',
query: { box: '木箱', search: 'MX', material_id: '' },
url: 'api/pdmBiSubpackagerelation/queryBoxSpec',
idField: 'box_id',
sort: 'material_name,desc',
query: { material_id: '' },
crudMethod: { ...crudMaterattr }
})
},
@@ -78,12 +113,18 @@ export default {
},
sectProp: {
type: Object
},
paperTubeDescription: {
type: String,
default: ''
}
},
data() {
return {
box_length: '',
classes: [],
dialogVisible: false,
dialogVisible1: false,
sect: {},
checkrow: {},
rows: [],
@@ -170,14 +211,39 @@ export default {
submit() {
debugger
this.rows = this.$refs.table.selection
this.box_length = this.rows[0].box_length
if (this.rows.length <= 0) {
this.$message('请先选择木箱信息')
return
}
this.dialogVisible1 = true
},
confirmSubmit() {
this.dialogVisible1 = false
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.checkrow)
}
}
}
</script>
<style scoped>
.warning-text {
color: black;
text-align: left;
font-size: 18px;
display: block;
}
.red-text {
color: red;
text-align: left;
font-size: 17px;
font-weight: bold;
}
.warning-text1 {
color: orange;
text-align: left;
font-size: 19px;
display: block;
font-weight: bold;
}
</style>