Commit cf264422 authored by 李驰骋's avatar 李驰骋

编排单展示调整

parent 8c8d376c
......@@ -103,7 +103,6 @@
<el-table v-loading="loading" :data="arrangeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="生产工单编号" align="center" prop="arrangeId"/>
<el-table-column label="编排单号" align="center" prop="arrangeCode"/>
<el-table-column label="序号" width="150" align="center" prop="arrangeSort">
<template slot-scope="scope">
......@@ -112,7 +111,6 @@
label="序号"></el-input-number>
</template>
</el-table-column>
<el-table-column label="生产工单号" align="center" prop="workorderId"/>
<el-table-column label="生产工单编号" align="center" prop="workorderCode"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -182,6 +180,10 @@ export default {
name: "ArrangeInfo",
components: {ChooseWorkorderForArrange},
props: {
groupCode: {
type: String,
default: null
},
arrangeCode: {
type: String,
default: null
......@@ -214,6 +216,7 @@ export default {
pageNum: 1,
pageSize: 10,
arrangeCode: null,
groupCode:null,
arrangeSort: null,
workorderId: null,
workorderCode: null
......@@ -234,15 +237,27 @@ export default {
// this.getList();
},
watch: {
groupCode: {
handler(newVal, oldVal) {
if (newVal) {
this.queryParams.groupCode = newVal;
this.queryParams.arrangeCode = null;
this.getList();
}
},
immediate: true
},
arrangeCode: {
handler(newVal, oldVal) {
if (newVal) {
this.queryParams.arrangeCode = newVal;
this.queryParams.groupCode = null;
this.getList();
}
},
immediate: true
}
},
},
methods: {
handleChangeSort(item) {
......
......@@ -796,11 +796,15 @@
<CombinationInfos :combinationCodes="combinationCodes"></CombinationInfos>
</el-dialog>
<el-dialog title="编排单明细" v-if="arrangeOpen" :visible.sync="arrangeOpen" width="1000px" append-to-body
@close="getList">
<ArrangeInfo :arrange-code="arrangeCode"></ArrangeInfo>
</el-dialog>
<el-dialog title="编排单明细" v-if="arrangeOpen2" :visible.sync="arrangeOpen2" width="1000px" append-to-body
@close="getList">
<ArrangeInfo :group-code="groupCode"></ArrangeInfo>
</el-dialog>
</div>
</template>
......@@ -854,7 +858,9 @@ export default {
combOpen: false,
combinationCodes: [],
arrangeOpen: false,
arrangeOpen2: false,
arrangeCode: [],
groupCode: "",
// 遮罩层
loading: true,
// 显示搜索条件
......@@ -962,12 +968,12 @@ export default {
},
async handleArrange() {
let params = []
this.selectedRows.forEach((item, index) => {
for(const item in this.selectedRows){
if (item.arrangeCode != '' && item.arrangeCode != null) {
this.$modal.msgWarning(`${item.workorderCode}生产单已绑定编排单,不能再绑定!`);
return
return false;
}
});
}
this.selectedRows.forEach((item, index) => {
params.push({
arrangeSort: index + 1,
......@@ -978,8 +984,8 @@ export default {
});
batchAddArrange(params).then(response => {
this.arrangeOpen = true;
this.arrangeCode = response;
this.arrangeOpen2 = true;
this.groupCode = response;
this.$modal.msgSuccess("新增编排单成功");
this.getList();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment