+
+
-
+
{{ val.goodsSku.goodsName }}
x{{ val.num }}
@@ -147,7 +122,7 @@
¥
{{
- $options.filters.goodsFormatPrice(val.purchasePrice)[0]
+ $options.filters.goodsFormatPrice(val.purchasePrice)[0]
}}
.{{ $options.filters.goodsFormatPrice(val.purchasePrice)[1] }}
@@ -155,111 +130,65 @@
发票信息
-
- {{ receiptList.receiptTitle }} -
- {{ receiptList.receiptContent }}
+
+ {{ receiptList.receiptTitle }} -
+ {{ receiptList.receiptContent }}
不开发票
- 配送
+ 配送
-
+
{{
- shippingMethod.find((e) => {
- return e.value == shippingText;
- }).label
+ shippingMethod.find((e) => {
+ return e.value == shippingText;
+ }).label
}}
- 备注信息
+ 备注信息
-
+
-
-
+
+
商品合计
- ¥{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}
+ ¥{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}
-
- 运费
-
- 包邮
- ¥{{
+
+ 运费
+
+ 包邮
+ ¥{{
orderMessage.priceDetailDTO.freightPrice | unitPrice
- }}
+ }}
优惠券
-
- -¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}
+
+ -¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}
@@ -270,15 +199,10 @@
优惠金额
-
+
- -¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}
+ -¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}
+
0.00
@@ -286,11 +210,9 @@
活动优惠
- -¥{{
+ -¥{{
orderMessage.priceDetailDTO.discountPrice | unitPrice
- }}
+ }}
0.00
@@ -299,12 +221,7 @@
-
+
@@ -315,18 +232,14 @@
¥
{{
- $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
+ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
}}
- .{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
+ .{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
- {{
+ {{
orderMessage.priceDetailDTO.payPoint | unitPrice
- }}积分
+ }}积分
@@ -361,11 +274,16 @@ export default {
invoiceFlag: false, //开票开关
shippingText: "LOGISTICS",
shippingFlag: false,
- shippingMethod: [
+ shippingMethod: [],
+ shippingWay: [
{
value: "LOGISTICS",
label: "物流",
},
+ {
+ value: "SELF_PICK_UP",
+ label: "自提",
+ },
],
isAssemble: false, //是否拼团
couponNums: "", //结算页面优惠券数量
@@ -376,6 +294,7 @@ export default {
couponList: "",
// 已选地址
address: "",
+ shopAddress: "",
// 发票信息
receiptList: "",
// 店铺信息
@@ -438,11 +357,12 @@ export default {
}
},
- onShow() {
+ async onShow() {
uni.showLoading({
mask: true,
});
- this.getOrderList();
+ await this.getOrderList();
+ await this.getDistribution();
uni.hideLoading();
if (this.routerVal.way == "PINTUAN") {
this.isAssemble = true;
@@ -452,7 +372,7 @@ export default {
this.pintuanWay();
}
},
- mounted() {},
+ mounted() { },
methods: {
//发票回调 选择发票之后刷新购物车
@@ -481,13 +401,18 @@ export default {
// 点击跳转地址
clickToAddress() {
this.navigateTo(
- `/pages/mine/address/address?from=cart&way=${
- this.routerVal.way
+ `/pages/mine/address/address?from=cart&way=${this.routerVal.way
}&parentOrder=${encodeURIComponent(
JSON.stringify(this.routerVal.parentOrder)
)}`
);
},
+ clickToStoreAddress() {
+ this.navigateTo(
+ `/pages/mine/address/storeAddress?from=cart&way=${this.routerVal.way
+ }&storeId=${this.remarkVal[0].storeId}`
+ );
+ },
// 判断团长以及团员信息
pintuanWay() {
@@ -561,14 +486,26 @@ export default {
createTradeFun() {
// 防抖
this.$u.throttle(() => {
- if (!this.address.id) {
- uni.showToast({
- title: "请选择地址",
- duration: 2000,
- icon: "none",
- });
- return false;
+ if (this.shippingText === 'SELF_PICK_UP') {
+ if (!this.storeAddress.id) {
+ uni.showToast({
+ title: "请选择提货点",
+ duration: 2000,
+ icon: "none",
+ });
+ return false;
+ }
+ } else if (this.shippingText === 'LOGISTICS') {
+ if (!this.address.id) {
+ uni.showToast({
+ title: "请选择地址",
+ duration: 2000,
+ icon: "none",
+ });
+ return false;
+ }
}
+
// 创建订单
let client;
// #ifdef H5
@@ -653,9 +590,40 @@ export default {
}
});
},
+ // 获取配送列表
+ async getDistribution() {
+ let shopRes = await API_Trade.shippingMethodList({ way: this.routerVal.way });
+ let shopList;
+ if (shopRes.data.success) {
+ shopList = shopRes.data.result;
+ let way = [];
+ console.log(shopList)
+ this.shippingWay.forEach((item) => {
+ shopList.forEach((child) => {
+ if (item.value == child) {
+ way.push(item);
+ }
+ });
+ });
+ this.shippingMethod = way;
+ }
+ },
+
+ // 选择配送
+ async confirmDistribution(val) {
+ let res = await API_Trade.setShipMethod({
+ shippingMethod: val[0].value,
+ way: this.routerVal.way,
+ });
+
+ this.shippingText = val[0].value;
+ if (res.data.success) {
+ this.getOrderList();
+ }
+ },
// 获取结算参数
- getOrderList() {
+ async getOrderList() {
this.notSupportFreight = [];
// 获取结算参数
API_Trade.getCheckoutParams(this.routerVal.way).then((res) => {
@@ -694,7 +662,9 @@ export default {
res.data.result.memberAddress.consigneeAddressPath =
res.data.result.memberAddress.consigneeAddressPath.split(",");
}
-
+ if (res.data.result.storeAddress) {
+ this.storeAddress = res.data.result.storeAddress
+ }
if (
res.data.result.notSupportFreight &&
res.data.result.notSupportFreight.length != 0
@@ -725,22 +695,26 @@ page {
.main-color {
font-weight: bold;
}
+
.uinput {
/deep/ input {
text-align: right;
}
}
+
.promotionNotice {
font-size: 24rpx;
margin: 20rpx 0;
color: $aider-light-color;
}
+
.nums {
flex: 2;
color: $light-color;
text-align: center;
}
+
.wait {
font-size: 22rpx;
font-family: PingFang SC, PingFang SC-Regular;
@@ -756,6 +730,7 @@ page {
width: 143rpx;
border-bottom: 2px dotted #999;
}
+
.tabbar-left {
margin-left: 32rpx;
}
@@ -808,6 +783,7 @@ page {
align-items: center;
justify-content: center;
}
+
.tr {
text-align: right;
}
@@ -830,6 +806,7 @@ page {
.box2 {
margin-top: 20rpx;
}
+
.notSupportFreight {
position: fixed;
@@ -845,10 +822,11 @@ page {
width: 100%;
transition: 0.35s;
- > .tips {
+ >.tips {
margin: 0 32rpx;
}
}
+
/deep/ .u-notice-bar-wrap {
width: 100% !important;
}
@@ -926,7 +904,8 @@ page {
color: $main-color;
font-size: 26rpx;
font-weight: bold;
- > span {
+
+ >span {
font-size: 36rpx;
}
}
@@ -936,7 +915,8 @@ page {
color: $main-color;
font-size: 28rpx;
font-weight: bold;
- > .goods-price {
+
+ >.goods-price {
font-size: 38rpx;
padding: 0 2rpx;
}
@@ -977,6 +957,7 @@ page {
text-align: left;
overflow: hidden;
}
+
.default {
background: $main-color;
font-size: 24rpx;
@@ -985,6 +966,7 @@ page {
color: #fff;
margin-right: 20rpx;
}
+
.address-box {
border-radius: 40rpx;
border-top-left-radius: 0 !important;
@@ -999,9 +981,11 @@ page {
font-weight: normal;
letter-spacing: 1rpx;
}
+
.user-box {
padding: 32rpx;
}
+
.user-address-detail {
color: #333;
font-size: 38rpx;
@@ -1009,13 +993,16 @@ page {
margin: 20rpx 0;
letter-spacing: 1rpx;
}
+
.mobile {
margin-left: 20rpx;
}
+
.price {
font-size: 50rpx !important;
margin: 0 2rpx;
}
+
.goods-detail {
display: flex;
flex-direction: column;
@@ -1023,12 +1010,14 @@ page {
justify-content: center;
flex: 8;
margin-left: 20rpx !important;
- > p {
+
+ >p {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
+
.goods-item {
margin: 20rpx 0;
}
diff --git a/pages/order/orderDetail.vue b/pages/order/orderDetail.vue
index 4014a7e..84c7ece 100644
--- a/pages/order/orderDetail.vue
+++ b/pages/order/orderDetail.vue
@@ -12,25 +12,25 @@
- {{logiList.traces[logiList.traces.length-1].AcceptStation}}
+ {{ logiList.traces[logiList.traces.length - 1].AcceptStation }}
- {{logiList.traces[logiList.traces.length-1].AcceptTime}}
+ {{ logiList.traces[logiList.traces.length - 1].AcceptTime }}
-
- 券码: {{order.verificationCode}}
+
+ 券码: {{ order.verificationCode }}
- {{'暂无物流信息'}}
+ {{ '暂无物流信息' }}
-
+
@@ -42,6 +42,21 @@
+
+
+
+
+
+
+ 自提点地址:{{ order.storeAddressPath }}
+
+
+ 联系方式:{{ order.storeAddressMobile }}
+
+
+
+
+
@@ -49,7 +64,8 @@
{{ order.storeName }}
- {{ orderStatusList[order.orderStatus].title }}
+ {{ orderStatusList[order.orderStatus].title
+ }}
@@ -70,7 +86,8 @@
x{{ sku.num }}
-
+
@@ -105,15 +122,18 @@
+ v-if="orderDetail.allowOperationVO && orderDetail.allowOperationVO.cancel == true || order.orderStatus == 'DELIVERED' || order.orderStatus != 'UNPAID' && order.orderPromotionType == 'PINTUAN'">
服务
- 取消订单
+ 取消订单
查看物流
- 查看拼团信息
+ 查看拼团信息
@@ -129,18 +149,18 @@
下单时间:
{{
- order.createTime
+ order.createTime
}}
支付状态:
{{
- order.payStatus == "UNPAID"
- ? "未付款"
- : order.payStatus == "PAID"
- ? "已付款"
- : ""
+ order.payStatus == "UNPAID"
+ ? "未付款"
+ : order.payStatus == "PAID"
+ ? "已付款"
+ : ""
}}
@@ -175,13 +195,16 @@
- 立即付款
+ 立即付款
- 确认收货
+ 确认收货
- 评价商品
+ 评价商品
@@ -193,7 +216,8 @@
- {{ item.reason }}
+ {{ item.reason }}
@@ -204,10 +228,12 @@
-
+
-
+
@@ -255,6 +281,10 @@ export default {
title: "已完成",
value: "订单已完成,祝您生活愉快",
},
+ STAY_PICKED_UP: {
+ title: "待自提",
+ value: "商品正在等待提取",
+ },
TAKE: {
title: "待核验",
},
@@ -272,7 +302,6 @@ export default {
},
onLoad(options) {
this.loadData(options.sn);
- this.loadLogistics(options.sn);
this.sn = options.sn;
},
methods: {
@@ -304,7 +333,7 @@ export default {
this.orderGoodsList[0].goodsId,
});
},
- loadData(sn) {
+ async loadData(sn) {
uni.showLoading({
title: "加载中",
});
@@ -313,9 +342,12 @@ export default {
this.order = order.order;
this.orderGoodsList = order.orderItems;
this.orderDetail = res.data.result;
-
+ if (this.order.deliveryMethod === 'LOGISTICS') {
+ this.loadLogistics()
+ }
uni.hideLoading();
});
+
},
onReceipt(val) {
uni.navigateTo({
@@ -383,8 +415,8 @@ export default {
toPay(val) {
val.sn
? uni.navigateTo({
- url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
- })
+ url: "/pages/cart/payment/payOrder?order_sn=" + val.sn,
+ })
: false;
}, //删除订单
deleteOrder(index) {
@@ -491,9 +523,11 @@ export default {