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

编排单展示调整

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