|
@@ -13,7 +13,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<order-track v-show="showTrack" :riderArriveTime="riderArriveTime" :buttonStatus="buttonStatus" :trackOrder="trackOrder" v-if="!orderDetailStutus && needTrack"></order-track>
|
|
|
- <order-detail v-show="showDetail" :buttonStatus="buttonStatus" :orderDetail="orderDetail" v-else></order-detail>
|
|
|
+ <order-detail v-show="showDetail" :buttonStatus="buttonStatus" @getDetailOrder="getDetailOrder" :orderDetail="orderDetail" v-else></order-detail>
|
|
|
<!-- 订单跟踪、订单详情底部按钮 -->
|
|
|
<div class="bottom-btns" v-show="showDetail || showTrack">
|
|
|
<!-- 新订单 -->
|
|
@@ -56,25 +56,26 @@
|
|
|
<!-- 配送中 -->
|
|
|
<div class="btns" v-if="buttonStatus === 3">
|
|
|
<el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots btn">补打小票</el-button>
|
|
|
- <el-button size='small' @click.native="againOrder(list[curIdx])" class="btn_bots btn">再来一单</el-button>
|
|
|
+ <!-- <el-button size='small' @click.native="againOrder(list[curIdx])" class="btn_bots btn">再来一单</el-button> -->
|
|
|
</div>
|
|
|
<!-- 异常单 -->
|
|
|
<div class="btns" v-if="buttonStatus === -2">
|
|
|
<el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId,list[curIdx].id)" v-if="list[curIdx].waimaiOrderId" class="btn_bots">补打小票</el-button>
|
|
|
<el-button size="small" @click.native="orderBack(list[curIdx].id)" class="btn_bots btn">撤回订单</el-button>
|
|
|
+ <el-button size="small" @click.native="againSend(list[curIdx])" class="btn_bots btn">再次配送</el-button>
|
|
|
</div>
|
|
|
<!-- 已取消 -->
|
|
|
<div class="btns" v-if="buttonStatus === -1">
|
|
|
<el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId&&list[curIdx].cancelType===4" class="btn_bots">补打小票</el-button>
|
|
|
- <el-button size='small' @click.native="orderPrinter(list[curIdx].waimaiOrderId,list[curIdx].id)" class="btn_bots btn">再来一单</el-button>
|
|
|
+ <el-button size='small' @click.native="againSend(list[curIdx])" class="btn_bots btn">再次配送</el-button>
|
|
|
</div>
|
|
|
<!-- 已完成 -->
|
|
|
<div class="btns" v-if="buttonStatus === 97">
|
|
|
- <el-button size='small' @click.native="againOrder(list[curIdx])" class="btn_bots btn">再来一单</el-button>
|
|
|
+ <el-button size='small' @click.native="againSend(list[curIdx])" class="btn_bots btn">再次配送</el-button>
|
|
|
</div>
|
|
|
<!-- 其他平台已完成 -->
|
|
|
<div class="btns" v-if="buttonStatus === 98">
|
|
|
- <el-button size='small' @click.native="againOrder(list[curIdx])" class="btn_bots btn">再来一单</el-button>
|
|
|
+ <el-button size='small' @click.native="againSend(list[curIdx])" class="btn_bots btn">再次配送</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -153,17 +154,17 @@
|
|
|
showCancelType(item.cancelType)
|
|
|
}}</el-tag>
|
|
|
<!-- <el-button v-if="item.cancelType===4&&item.waimaiOrderId" size='small' class="btn" @click.stop="orderPrinter(item.waimaiOrderId,item.id)">补打小票</el-button> -->
|
|
|
- <el-button size="small" class="btn" @click.stop="againOrder(item)">再来一单</el-button>
|
|
|
+ <el-button size="small" class="btn" @click.stop="againSend(item)">再次配送</el-button>
|
|
|
</div>
|
|
|
<!-- 猎豹平台已完成 -->
|
|
|
<div class="order_item_header_r" v-if="item.buttonStatus === 97">
|
|
|
<el-tag v-if="[-1,7].includes(tabNum)" class="header_r">已完成</el-tag>
|
|
|
- <el-button size="small" class="btn" @click.stop="againOrder(item)">再来一单</el-button>
|
|
|
+ <el-button size="small" class="btn" @click.stop="againSend(item)">再次配送</el-button>
|
|
|
</div>
|
|
|
<!-- 其他平台已完成 -->
|
|
|
<div class="order_item_header_r" v-if="item.buttonStatus === 98">
|
|
|
<el-tag v-if="[-1,7].includes(tabNum)" class="header_r">其他平台已完成</el-tag>
|
|
|
- <el-button size="small" class="btn" @click.stop="againOrder(item)">再来一单</el-button>
|
|
|
+ <el-button size="small" class="btn" @click.stop="againSend(item)">再次配送</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="order_item_cont" :class="curIdx === i ? 'active_order_item_cont' : ''">
|
|
@@ -360,6 +361,7 @@ export default {
|
|
|
exceptTime: "",
|
|
|
delayTime: "", // 预约延迟时间
|
|
|
riderArriveTime: {}, //骑手预计取货送达时间
|
|
|
+ showParentOrderSn: false,
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -394,15 +396,6 @@ export default {
|
|
|
immediate: true,
|
|
|
},
|
|
|
},
|
|
|
- created() {
|
|
|
- console.log("orderlist created");
|
|
|
- bus.$on("refreshOrderDetail", () => {
|
|
|
- this.getDetailOrder();
|
|
|
- });
|
|
|
- },
|
|
|
- beforeDestroyed() {
|
|
|
- bus.$off("refreshOrderDetail");
|
|
|
- },
|
|
|
computed: {
|
|
|
...mapState(["userInfo"]),
|
|
|
},
|
|
@@ -438,8 +431,7 @@ export default {
|
|
|
}
|
|
|
return { background: bgColor };
|
|
|
},
|
|
|
- // 再来一单
|
|
|
- againOrder(order) {
|
|
|
+ againSend(order) {
|
|
|
if ([97, 98].includes(order.buttonStatus)) {
|
|
|
this.$confirm("当前订单已完成,确认要再次发起配送吗?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -447,21 +439,13 @@ export default {
|
|
|
center: true,
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.$router.push({
|
|
|
- name: "manualCreate",
|
|
|
- params: {
|
|
|
- orderId: order.id,
|
|
|
- },
|
|
|
- });
|
|
|
+ this.showParentOrderSn = true;
|
|
|
+ this.getValuation(order);
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
} else {
|
|
|
- this.$router.push({
|
|
|
- name: "manualCreate",
|
|
|
- params: {
|
|
|
- orderId: order.id,
|
|
|
- },
|
|
|
- });
|
|
|
+ this.showParentOrderSn = true;
|
|
|
+ this.getValuation(order);
|
|
|
}
|
|
|
},
|
|
|
paySuccess() {
|
|
@@ -774,6 +758,16 @@ export default {
|
|
|
},
|
|
|
// 计价
|
|
|
getValuation(order) {
|
|
|
+ if (
|
|
|
+ order.waimaiOrderId &&
|
|
|
+ !order.addDelivery &&
|
|
|
+ order.buttonStatus !== -2
|
|
|
+ ) {
|
|
|
+ order.waimaiOrderId = null;
|
|
|
+ order.id = null;
|
|
|
+ order.waimaiId = null;
|
|
|
+ order.weight = 1;
|
|
|
+ }
|
|
|
let requestData = {
|
|
|
productId: order.productId,
|
|
|
transport: 0,
|
|
@@ -815,6 +809,10 @@ export default {
|
|
|
takeRemark: order.takeRemark || "",
|
|
|
orderId: order.id,
|
|
|
};
|
|
|
+ if (order.parentOrderSn && this.showParentOrderSn) {
|
|
|
+ requestData["parentOrderSn"] = order.parentOrderSn;
|
|
|
+ }
|
|
|
+ this.showParentOrderSn = false;
|
|
|
this.isLoading = true;
|
|
|
sendValuation(requestData).then((res) => {
|
|
|
console.log(res, "发起配送计算");
|