Commit cc68263f authored by 仇晓婷's avatar 仇晓婷

订单报价流程判断

parent e86694d7
......@@ -2,13 +2,14 @@
<div class="photosensitive">
<Modal
v-model="modalShow"
title="订单报价"
title="订单报价5"
width="90%"
:mask-closable="false"
@on-cancel="cancel"
fullscreen
footer-hide
>
{{status}}
<Form :model="formItem" :label-width="80">
<Row type="flex" justify="space-between">
<Col span="8">
......@@ -122,6 +123,7 @@ export default {
zPhotosensitive: {
result: []
},
status: 0,
row: {},
index: "",
newList: [],
......@@ -130,7 +132,8 @@ export default {
contactUser: "",
contactTel: "",
quotationType: "AlSi10Mg",
remark: ""
remark: "",
status: ""
},
values1: "",
values2: "",
......@@ -265,7 +268,17 @@ export default {
]
};
},
mounted() {},
mounted() {
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
watch: {
gmData: {
......@@ -335,6 +348,13 @@ export default {
quotationBox() {
//订单报价
// console.log(this.newList)
if (this.status == 0) {
this.formItem.status = 1;
alert(this.formItem.status);
} else {
this.formItem.status = 3;
alert(this.formItem.status);
}
let item = [];
let quotationMain = {};
let data = {
......@@ -348,21 +368,26 @@ export default {
.then(res => {
if (res.success) {
this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then(res => {
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
if (this.status == 1) {
this.modalShow = false;
this.$emit("update");
} else {
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then(res => {
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
}
}
})
.catch(error => {
......@@ -476,8 +501,8 @@ export default {
}
});
},
cancel() {
this.$emit('update')
cancel() {
this.$emit("update");
}
}
};
......
......@@ -85,6 +85,7 @@ export default {
zPhotosensitive: {
result: []
},
status: 0,
row: {},
index: "",
newList: [],
......@@ -93,7 +94,8 @@ export default {
contactUser: "",
contactTel: "",
quotationType: "光敏树脂",
remark: ""
remark: "",
status: ""
},
values1: "",
values2: "",
......@@ -190,7 +192,17 @@ export default {
// deep: true
// }
// },
mounted() {},
mounted() {
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
computed: {
Order3D() {
//计算3D打印费=重量(g)*单价(元/g)
......@@ -215,6 +227,13 @@ export default {
},
quotationBox() {
//订单报价
if (this.status == 0) {
this.formItem.status = 1;
alert(this.formItem.status);
} else {
this.formItem.status = 3;
alert(this.formItem.status);
}
let item = [];
let quotationMain = {};
let data = {
......@@ -227,22 +246,27 @@ export default {
.then(res => {
if (res.success) {
this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then(res => {
console.log(res);
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
if (this.status == 1) {
this.modalShow = false;
this.$emit("update");
} else {
this.$refs.photosensitive.modalShow = true;
let id = res.result.id;
this.$http.quotation
.orderList({
id: id
})
.then(res => {
console.log(res);
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
}
}
})
.catch(error => {
......
......@@ -2,7 +2,7 @@
<div class="quotation-box">
<Modal
v-model="modalShow"
title="订单报价"
title="订单报价1"
width="90%"
:mask-closable="false"
@on-cancel="cancel"
......
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