Commit f01de964 authored by 张俊's avatar 张俊

Merge branch 'dev' of https://cloud.wodcloud.com/git/apaas/apaas-v3-ui into dev

parents f87c1724 fd88d779
......@@ -192,6 +192,7 @@
<div v-else-if="cellItem.pay_status == -1">订单已取消</div>
<el-popover
v-if="
cellItem.order_type != 3 &&
cellItem.approval_second_level == 1 &&
cellItem.pay_status != -1 &&
cellItem.is_estimated == 0
......@@ -360,7 +361,7 @@ export default {
},
methods: {
addEvaluation() {
if (this.textarea == "" && this.serviceRate == null) {
if (this.textarea == "" || this.serviceRate == null) {
this.$message({
message: "请先完善评价内容",
type: "error",
......
......@@ -315,13 +315,8 @@ export default {
this.specificationApplicationPop = val;
},
submitPop() {
this.cellItems.service.spcs_info =
this.specificationPop.spcs_type == 1
? this.cellItems.service.request_spcs_info.spcs_type_1[val]
: this.specificationPop.spcs_type == 2
? this.cellItems.service.request_spcs_info.spcs_type_2[val]
: "";
this.updateShoppingCart();
this.cellItems.service.spcs_info = this.specificationPop;
this.visible = false;
this.updateShoppingCart();
},
setSpecificationPop() {
......
......@@ -165,6 +165,7 @@ export default {
this.listIn = response.data.data.invalid || [];
this.checkList = [];
this.checkListIn = [];
this.checkShopAll = false;
for (let index in this.list) {
this.checkList.push(false);
}
......
......@@ -80,6 +80,7 @@
<div class="btn_group">
<el-popover
v-if="
orderDetail.order_type != 3 &&
orderDetail.is_estimated == 0 &&
orderDetail.approval_second_level == 1 &&
orderDetail.pay_status != -1
......@@ -622,8 +623,58 @@ export default {
},
methods: {
addEvaluation() {
console.log(this.serviceRate, this.textarea);
if (this.textarea == "" || this.serviceRate == null) {
this.$message({
message: "请先完善评价内容",
type: "error",
});
} else {
if (this.orderDetail.order_type == 1) {
let query = {
service_id: this.orderDetail.service_id,
content: this.textarea,
score: this.serviceRate,
apply_id: this.orderDetail.apply_id,
};
this.$api.user.addServiceEvaluation(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "评价订单成功",
type: "success",
});
this.visible = false;
this.getOrderDetail();
} else {
this.$message({
message: "评价订单失败",
type: "error",
});
}
});
} else if (this.orderDetail.order_type == 2) {
let query = {
app: this.orderDetail.app_id,
content: this.textarea,
score: this.serviceRate,
apply_id: this.orderDetail.apply_id,
};
this.$api.user.addServiceEvaluation(query).then((response) => {
if (response.data.success == 1) {
this.$message({
message: "评价订单成功",
type: "success",
});
this.visible = false;
this.getOrderDetail();
} else {
this.$message({
message: "评价订单失败",
type: "error",
});
}
});
}
}
},
download() {},
getOrderDetail() {
......
......@@ -1004,6 +1004,7 @@ export default {
gz_fhsjgs: "JSON",
code_1_index: 0,
code_2_index: 0,
user_id: "",
};
},
computed: {},
......@@ -1328,6 +1329,7 @@ export default {
this.jkwds[0] = val[0].url;
},
getOrganization() {
if (this.$store.state.userInfo && this.$store.state.userInfo.user_id) {
let query = {
id: this.$store.state.userInfo.user_id,
};
......@@ -1339,6 +1341,27 @@ export default {
console.log(response.data.errMsg);
}
});
} else {
let self = this;
self.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) {
self.$store.commit("userInfofun", data.data);
let query = {
id: self.$store.state.userInfo.user_id,
};
self.$api.user.getUserDetail(query).then((request) => {
if (request.data.success == 1) {
self.form.origin = request.data.data.department;
self.oid = request.data.data.department_id;
} else {
console.log(response.data.errMsg);
}
});
} else {
console.log(data.errMsg);
}
});
}
},
registeMap() {
this.$refs.form.validate((valid) => {
......
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