Commit bfb1ee38 authored by renjintao's avatar renjintao

changeStatu

parent 3a421ecf
...@@ -60,9 +60,9 @@ ...@@ -60,9 +60,9 @@
footer-hide footer-hide
width="1000" width="1000"
class="tempModal" class="tempModal"
@on-cancel="testCancel" @on-cancel="tempCancel"
> >
<Temp :data="listTemp"></Temp> <Temp :data="listTemp" @changeStatu="changeStatu" ref="tempRef"></Temp>
</Modal> </Modal>
<Modal v-model="addModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="addModal" title="工序参数设置" footer-hide width="1000">
<Add <Add
...@@ -365,19 +365,7 @@ export default { ...@@ -365,19 +365,7 @@ export default {
} }
}); });
}, },
//选择排序模板
tempValueChange(val) {
let params = {
id: val
};
Api.usesorttemplate(params).then(r => {
if (r.success) {
this.$Message.success("设置成功");
this.list = [];
this.loadList();
}
});
},
addOk() { addOk() {
this.list = []; this.list = [];
this.loadList(); this.loadList();
...@@ -596,19 +584,19 @@ export default { ...@@ -596,19 +584,19 @@ export default {
} }
this.addModal = true; this.addModal = true;
}, },
//自定义排序模板相关start------
//打开自定义排序模板窗口 //打开自定义排序模板窗口
openaddModalTemp() { openaddModalTemp() {
this.addModalTemp = true; this.addModalTemp = true;
}, },
testCancel() { tempCancel() {
alert(this.tempStatu);
if (this.tempStatu != 0) { if (this.tempStatu != 0) {
let params = { let params = {
id: this.tempStatu id: this.tempStatu
}; };
Api.removesorttemplate(params).then(r => { Api.removesorttemplate(params).then(r => {
if (r.success) { if (r.success) {
this.$refs.tempRef.cancel()
} else { } else {
this.$Message.error("删除失败"); this.$Message.error("删除失败");
} }
...@@ -617,7 +605,21 @@ export default { ...@@ -617,7 +605,21 @@ export default {
}, },
changeStatu(val) { changeStatu(val) {
this.tempStatu = val; this.tempStatu = val;
} },
//选择排序模板
tempValueChange(val) {
let params = {
id: val
};
Api.usesorttemplate(params).then(r => {
if (r.success) {
this.$Message.success("设置成功");
this.list = [];
this.loadList();
}
});
},
//自定义排序模板相关end------
} }
}; };
</script> </script>
......
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