...
|
...
|
@@ -34,7 +34,12 @@ export default { |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(["deleteOrder", "cancelTradeConfirmInfo", "cancelTrade"]),
|
|
|
...mapActions([
|
|
|
"deleteOrder",
|
|
|
"cancelTradeConfirmInfo",
|
|
|
"cancelTrade",
|
|
|
"confirmReceipt"
|
|
|
]),
|
|
|
async onAction(action) {
|
|
|
const { owner = ownType.SELL } = this.$route.params;
|
|
|
const {
|
...
|
...
|
@@ -44,7 +49,7 @@ export default { |
|
|
priceInfo = {}
|
|
|
} = this.order;
|
|
|
|
|
|
const { productId, storageId } = this.order.goodsInfo;
|
|
|
const { productId, storageId, skup } = this.order.goodsInfo;
|
|
|
|
|
|
switch (action.name) {
|
|
|
// 删除订单
|
...
|
...
|
@@ -65,39 +70,55 @@ export default { |
|
|
// 再次购买
|
|
|
case orderActionsMap.BUY_AGAIN.name:
|
|
|
this.$router.push({
|
|
|
path: `/xianyu/product/${productId}.html`
|
|
|
name: "ProductDetail",
|
|
|
params: { productId }
|
|
|
});
|
|
|
break;
|
|
|
// 查看详情
|
|
|
case orderActionsMap.SHOW_DETAIL.name:
|
|
|
const name =
|
|
|
owner === ownType.SELL ? "sellOrderDetail" : "buyOrderDetail";
|
|
|
this.$router.push({
|
|
|
path: `/xianyu/${owner}/order/detail/${orderCode}`
|
|
|
name,
|
|
|
params: { owner, orderCode }
|
|
|
});
|
|
|
break;
|
|
|
// 再次出售
|
|
|
case orderActionsMap.SOLD_AGAIN.name:
|
|
|
this.$router.push({
|
|
|
path: "/xianyu/order/sellconfirm.html",
|
|
|
name: "OrderSellConfirm",
|
|
|
query: { productId, storageId }
|
|
|
});
|
|
|
break;
|
|
|
// 查看物流
|
|
|
case orderActionsMap.SHOW_EXPRESS.name:
|
|
|
this.$router.push({
|
|
|
path: `/xianyu/${owner}/order/logistics/${orderCode}`
|
|
|
name: "orderLogisticsInfo",
|
|
|
params: { owner, orderCode }
|
|
|
});
|
|
|
break;
|
|
|
// 调价
|
|
|
// 非入住商家
|
|
|
case orderActionsMap.NOT_ENTRY_CHANGE_PRICE.name:
|
|
|
this.$router.push({
|
|
|
path: `/xianyu/order/priceChangeNoEntry/${orderCode}.html`
|
|
|
name: "PriceChangeNoEntry",
|
|
|
params: { orderCode }
|
|
|
});
|
|
|
break;
|
|
|
|
|
|
// 入住商家
|
|
|
case orderActionsMap.STORAGE_MANAGE:
|
|
|
case orderActionsMap.STORAGE_MANAGE.name:
|
|
|
this.$router.push({
|
|
|
name: "PriceChangeEntry",
|
|
|
params: { orderId: productId }
|
|
|
});
|
|
|
break;
|
|
|
|
|
|
// 我要发货
|
|
|
case orderActionsMap.DELIVER_GOODS.name:
|
|
|
this.$router.push({
|
|
|
path: `/xianyu/order/priceChangeEntry/${productId}.html`
|
|
|
name: "order.deliver",
|
|
|
params: { skup, code: orderCode }
|
|
|
});
|
|
|
break;
|
|
|
|
...
|
...
|
@@ -150,7 +171,7 @@ export default { |
|
|
desc: "保证金"
|
|
|
}).show();
|
|
|
break;
|
|
|
|
|
|
// 订单列表和订单详情字段不一致
|
|
|
case orderActionsMap.NOW_BUY.name:
|
|
|
this.$createOrderPayType({
|
|
|
orderCode,
|
...
|
...
|
@@ -159,6 +180,21 @@ export default { |
|
|
}).show();
|
|
|
break;
|
|
|
|
|
|
case orderActionsMap.CONFIRM_DELIVERY.name:
|
|
|
this.$createDialog({
|
|
|
type: "confirm",
|
|
|
onConfirm: async () => {
|
|
|
const isOk = await this.confirmReceipt({
|
|
|
orderCode,
|
|
|
owner
|
|
|
});
|
|
|
|
|
|
// const txt = isOk ? "收货成功" : "收货失败";
|
|
|
// this.$createToast({ txt, type: "txt" }).show();
|
|
|
}
|
|
|
});
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
return;
|
|
|
}
|
...
|
...
|
|