-
已获取
+
待审核
+
审核中
+
审核通过
+
审核未通过
+
订单已取消
@@ -57,7 +64,7 @@
type="textarea"
placeholder="请输入内容"
v-model="textarea"
- maxlength="200"
+ maxlength="500"
show-word-limit
:autosize="{ minRows: 6, maxRows: 10 }"
>
@@ -69,12 +76,12 @@
服务评价
查看评价
收起评价
@@ -82,8 +89,12 @@
-
查看详情
-
再次申请
+
查看详情
+
再次申请
@@ -91,7 +102,7 @@
服务评分:
评价详情:
- {{ cellItem.evaluationText }}
+ {{ message.content }}
@@ -123,18 +134,129 @@ export default {
colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
serviceRate: 0,
textarea: "",
- showMsgBox: false
+ showMsgBox: false,
+ helper: helper,
+ message: {}
}),
methods: {
addEvaluation() {
- console.log(this.serviceRate, this.textarea);
- this.visible = false;
+ if (this.cellItem.order_type == 1) {
+ let query = {
+ service_id: this.cellItem.service_id,
+ content: this.textarea,
+ score: this.serviceRate,
+ apply_id: this.cellItem.apply_id
+ };
+ this.$api.user.addServiceEvaluation(query).then(response => {
+ if (response.data.success == 1) {
+ this.$message({
+ message: "评价订单成功",
+ type: "success"
+ });
+ this.visible = false;
+ this.$emit("updateList");
+ } else {
+ this.$message({
+ message: "评价订单失败",
+ type: "error"
+ });
+ }
+ });
+ } else if (this.cellItem.order_type == 2) {
+ let query = {
+ app: this.cellItem.app_id,
+ content: this.textarea,
+ score: this.serviceRate,
+ apply_id: this.cellItem.apply_id
+ };
+ this.$api.user.addServiceEvaluation(query).then(response => {
+ if (response.data.success == 1) {
+ this.$message({
+ message: "评价订单成功",
+ type: "success"
+ });
+ this.visible = false;
+ this.$emit("updateList");
+ } else {
+ this.$message({
+ message: "评价订单失败",
+ type: "error"
+ });
+ }
+ });
+ }
},
viewDetail(val) {
- this.$router.push("/user/order_detail/" + val)
+ this.$router.push("/user/order_detail/" + val);
},
delOrder() {
-
+ this.$api.user.delOrder({ id: this.cellItem.order_id }).then(response => {
+ if (response.data.success == 1) {
+ this.$message({
+ message: "删除订单成功",
+ type: "success"
+ });
+ this.$emit("updateList");
+ } else {
+ this.$message({
+ message: "删除订单失败",
+ type: "error"
+ });
+ }
+ });
+ },
+ nextApply() {
+ let query = {};
+ if (this.cellItem.order_type == 1) {
+ query = {
+ service_id: parseFloat(this.cellItem.service_id),
+ spec_id: this.cellItem.svc_spec_id,
+ duration: this.cellItem.duration,
+ duration_unit: this.cellItem.duration_unit
+ };
+ } else if (this.cellItem.order_type == 2) {
+ query = {
+ app_id: parseFloat(this.cellItem.app_id),
+ spec_id: this.cellItem.spec_app,
+ duration: this.cellItem.duration,
+ duration_unit: this.cellItem.duration_unit
+ };
+ }
+ this.$router.push({
+ path: "/shop/shop_car_apply",
+ query: query
+ });
+ },
+ getMessage() {
+ if (this.cellItem.order_type == 1) {
+ this.$api.user
+ .getServiceEvaluation({ apply_id: this.cellItem.apply_id })
+ .then(response => {
+ if (response.data.success == 1) {
+ this.message = response.data.data;
+ this.showMsgBox = true;
+ } else {
+ this.$message({
+ message: "获取评价失败",
+ type: "error"
+ });
+ }
+ });
+ } else if (this.cellItem.order_type == 2) {
+ this.$api.user
+ .getAppEvaluation({ apply_id: this.cellItem.apply_id })
+ .then(response => {
+ if (response.data.success == 1) {
+ this.message = response.data.data;
+ this.showMsgBox = true;
+ } else {
+ this.$message({
+ message: "获取评价失败",
+ type: "error"
+ });
+ }
+ });
+ }
}
}
};
@@ -287,6 +409,7 @@ export default {
}
.cell_option_spec {
margin-top: 15px;
+ cursor: pointer;
}
.pop_rate {
padding: 0 0 0 50px;
diff --git a/src/components/order-list/order-list-com.vue b/src/components/order-list/order-list-com.vue
index 4bc1a477b4c966f94c86ee93ccbf988e6f35b53a..f26ff3f5bbc2a53636b7283e30fb9ae521436ee8 100644
--- a/src/components/order-list/order-list-com.vue
+++ b/src/components/order-list/order-list-com.vue
@@ -17,7 +17,7 @@
:class="item.state ? 'btn_actice':''"
round
@click="btnClick(index)"
- >{{ item.label }}
+ >{{ item.name }}