|
@@ -130,7 +130,7 @@
|
|
|
<!-- 配送中 -->
|
|
|
<div class="order_item_header_r" v-if="item.buttonStatus === 3">
|
|
|
<el-tag v-if="tabNum === -1" class="header_r">配送中</el-tag>
|
|
|
- <span class="header_r" v-if="item.exceptTime">预计{{ item.exceptTime }}送达</span>
|
|
|
+ <!-- <span class="header_r" v-if="item.exceptTime">预计{{ item.exceptTime }}送达</span> -->
|
|
|
<el-button size="small" class="btn" @click.stop="orderPrinter(item.waimaiOrderId)" v-if="item.waimaiOrderId">补打发票</el-button>
|
|
|
</div>
|
|
|
<!-- 异常单 -->
|
|
@@ -455,6 +455,32 @@ export default {
|
|
|
this.reasonIndex = item.id;
|
|
|
this.chooseReason = item.name;
|
|
|
},
|
|
|
+ doCancelOrder() {
|
|
|
+ cancelOrder({
|
|
|
+ orderId: this.orderId,
|
|
|
+ cancelReason:
|
|
|
+ this.reasonIndex != 8 ? this.chooseReason : this.cancelReason,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: "取消订单成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.orderId = "";
|
|
|
+ this.cancelReason = "";
|
|
|
+ this.chooseReason = "";
|
|
|
+ this.reasonIndex = null;
|
|
|
+ bus.$emit("refreshData");
|
|
|
+ bus.$emit("refreshData2");
|
|
|
+ this.cancelStatus = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消订单
|
|
|
commitCancelReason() {
|
|
|
if (!this.reasonIndex) {
|
|
@@ -469,6 +495,13 @@ export default {
|
|
|
type: "error",
|
|
|
});
|
|
|
}
|
|
|
+ console.log(222222,this.buttonStatus);
|
|
|
+
|
|
|
+ if (this.buttonStatus === 1) {
|
|
|
+ console.log(111111);
|
|
|
+ this.doCancelOrder();
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.$confirm("取消订单可能会存在违约金, 是否继续?", "提示", {
|
|
|
confirmButtonText: "取消",
|
|
|
cancelButtonText: "确定",
|
|
@@ -479,30 +512,7 @@ export default {
|
|
|
this.cancelStatus = false;
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- cancelOrder({
|
|
|
- orderId: this.orderId,
|
|
|
- cancelReason:
|
|
|
- this.reasonIndex != 8 ? this.chooseReason : this.cancelReason,
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: "取消订单成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.orderId = "";
|
|
|
- this.cancelReason = "";
|
|
|
- this.chooseReason = "";
|
|
|
- this.reasonIndex = null;
|
|
|
- bus.$emit("refreshData");
|
|
|
- bus.$emit("refreshData2");
|
|
|
- this.cancelStatus = false;
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ this.doCancelOrder();
|
|
|
});
|
|
|
},
|
|
|
// 取消定时发单
|
|
@@ -818,8 +828,8 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
getRiderArriveTime({ orderId: this.orderId }).then((res) => {
|
|
|
- if(res.code === 200){
|
|
|
- this.riderArriveTime = res.data
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.riderArriveTime = res.data;
|
|
|
}
|
|
|
});
|
|
|
},
|