|
@@ -69,8 +69,7 @@
|
|
|
<u-button v-if="goods.refundOrderId" size="mini" shape="circle" plain
|
|
<u-button v-if="goods.refundOrderId" size="mini" shape="circle" plain
|
|
|
@click="goToRefundDetail(goods.refundOrderId)"
|
|
@click="goToRefundDetail(goods.refundOrderId)"
|
|
|
custom-style="margin-left: 20rpx; height: 50rpx; line-height: 50rpx; color: #333; border-color: #ccc;">查看详情</u-button>
|
|
custom-style="margin-left: 20rpx; height: 50rpx; line-height: 50rpx; color: #333; border-color: #ccc;">查看详情</u-button>
|
|
|
- <u-button v-show="!goods.refundOrderId" size="mini" shape="circle" plain
|
|
|
|
|
- @click="applyRefund(goods)"
|
|
|
|
|
|
|
+ <u-button v-show="!goods.refundOrderId" size="mini" shape="circle" plain @click="applyRefund(goods)"
|
|
|
custom-style="margin-left: 20rpx; height: 50rpx; line-height: 50rpx; color: #333; border-color: #ccc;">申请售后</u-button>
|
|
custom-style="margin-left: 20rpx; height: 50rpx; line-height: 50rpx; color: #333; border-color: #ccc;">申请售后</u-button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -125,450 +124,460 @@
|
|
|
<!-- 催发货弹窗 -->
|
|
<!-- 催发货弹窗 -->
|
|
|
<urge-delivery-dialog ref="urgeDialog" @success="loadOrderDetail(orderInfo.orderId)"></urge-delivery-dialog>
|
|
<urge-delivery-dialog ref="urgeDialog" @success="loadOrderDetail(orderInfo.orderId)"></urge-delivery-dialog>
|
|
|
|
|
|
|
|
|
|
+ <!-- 极速退款弹窗 -->
|
|
|
|
|
+ <fast-refund-dialog ref="refundDialog" @refresh="loadOrderDetail(orderInfo.orderId)"></fast-refund-dialog>
|
|
|
|
|
+
|
|
|
<!-- 占位符,防止底部按钮遮挡内容 -->
|
|
<!-- 占位符,防止底部按钮遮挡内容 -->
|
|
|
<view style="height: 120rpx;"></view>
|
|
<view style="height: 120rpx;"></view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import OrderBottomBar from '../components/order-bottom-bar.vue';
|
|
|
|
|
- import CancelOrderPopup from '../components/cancel-order-popup.vue';
|
|
|
|
|
- import UrgeDeliveryDialog from '../components/urge-delivery-dialog.vue';
|
|
|
|
|
-
|
|
|
|
|
- export default {
|
|
|
|
|
- components: {
|
|
|
|
|
- OrderBottomBar,
|
|
|
|
|
- CancelOrderPopup,
|
|
|
|
|
- UrgeDeliveryDialog
|
|
|
|
|
- },
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- orderInfo: {
|
|
|
|
|
- status: '2',
|
|
|
|
|
- orderId: '',
|
|
|
|
|
- detailVoList: [],
|
|
|
|
|
- receiverName: '',
|
|
|
|
|
- receiverMobile: '',
|
|
|
|
|
- receiverAddress: '',
|
|
|
|
|
- expressMoney: 0,
|
|
|
|
|
- totalMoney: 0,
|
|
|
|
|
- discountMoney: 0,
|
|
|
|
|
- payMoney: 0,
|
|
|
|
|
- createTime: ''
|
|
|
|
|
- },
|
|
|
|
|
- isModifyingAddress: false
|
|
|
|
|
|
|
+import OrderBottomBar from '../components/order-bottom-bar.vue';
|
|
|
|
|
+import CancelOrderPopup from '../components/cancel-order-popup.vue';
|
|
|
|
|
+import UrgeDeliveryDialog from '../components/urge-delivery-dialog.vue';
|
|
|
|
|
+import FastRefundDialog from '../components/fast-refund-dialog.vue';
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ OrderBottomBar,
|
|
|
|
|
+ CancelOrderPopup,
|
|
|
|
|
+ UrgeDeliveryDialog,
|
|
|
|
|
+ FastRefundDialog
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ orderInfo: {
|
|
|
|
|
+ status: '2',
|
|
|
|
|
+ orderId: '',
|
|
|
|
|
+ detailVoList: [],
|
|
|
|
|
+ receiverName: '',
|
|
|
|
|
+ receiverMobile: '',
|
|
|
|
|
+ receiverAddress: '',
|
|
|
|
|
+ expressMoney: 0,
|
|
|
|
|
+ totalMoney: 0,
|
|
|
|
|
+ discountMoney: 0,
|
|
|
|
|
+ payMoney: 0,
|
|
|
|
|
+ createTime: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ isModifyingAddress: false
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ statusText() {
|
|
|
|
|
+ //订单状态:1-待付款 2-待发货 3-待收货 4-已完成 5-已取消 6-退款中 7-已退款
|
|
|
|
|
+ const map = {
|
|
|
|
|
+ '1': '等待买家付款',
|
|
|
|
|
+ '2': '等待卖家发货',
|
|
|
|
|
+ '3': '已发货',
|
|
|
|
|
+ '4': '交易完成',
|
|
|
|
|
+ '5': '已取消',
|
|
|
|
|
+ '6': '退款中',
|
|
|
|
|
+ '7': '交易关闭'
|
|
|
};
|
|
};
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- statusText() {
|
|
|
|
|
- //订单状态:1-待付款 2-待发货 3-待收货 4-已完成 5-已取消 6-退款中 7-已退款
|
|
|
|
|
- const map = {
|
|
|
|
|
- '1': '等待买家付款',
|
|
|
|
|
- '2': '等待卖家发货',
|
|
|
|
|
- '3': '已发货',
|
|
|
|
|
- '4': '交易完成',
|
|
|
|
|
- '5': '已取消',
|
|
|
|
|
- '6': '退款中',
|
|
|
|
|
- '7': '交易关闭'
|
|
|
|
|
- };
|
|
|
|
|
- return map[String(this.orderInfo.status)] || '未知状态';
|
|
|
|
|
|
|
+ return map[String(this.orderInfo.status)] || '未知状态';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad(options) {
|
|
|
|
|
+ if (options.orderId) {
|
|
|
|
|
+ this.loadOrderDetail(options.orderId);
|
|
|
|
|
+ }
|
|
|
|
|
+ // 监听地址选择
|
|
|
|
|
+ uni.$on('selectAddr', this.onAddressSelected);
|
|
|
|
|
+ },
|
|
|
|
|
+ onUnload() {
|
|
|
|
|
+ uni.$off('selectAddr', this.onAddressSelected);
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ onAddressSelected(addr) {
|
|
|
|
|
+ if (this.isModifyingAddress && addr && addr.id) {
|
|
|
|
|
+ this.$u.api.modifyOrderAddressAjax({
|
|
|
|
|
+ orderId: this.orderInfo.orderId,
|
|
|
|
|
+ addressId: addr.id
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ uni.showToast({ title: '修改成功', icon: 'success' });
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.isModifyingAddress = false;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onLoad(options) {
|
|
|
|
|
- if (options.orderId) {
|
|
|
|
|
- this.loadOrderDetail(options.orderId);
|
|
|
|
|
|
|
+ loadOrderDetail(orderId) {
|
|
|
|
|
+ uni.$u.http.get('/token/shop/order/getOrderDetail', {
|
|
|
|
|
+ orderId: orderId
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.orderInfo = res.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ copyOrderNo() {
|
|
|
|
|
+ uni.setClipboardData({
|
|
|
|
|
+ data: String(this.orderInfo.orderId),
|
|
|
|
|
+ success: () => {
|
|
|
|
|
+ uni.showToast({ title: '复制成功', icon: 'none' });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ viewLogistics() {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages-car/pages/logistics-detail?orderId=${this.orderInfo.orderId}`
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ goToRefundDetail(refundOrderId) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages-car/pages/refund-detail?refundOrderId=${refundOrderId}`
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ applyRefund(goods) {
|
|
|
|
|
+ if (this.orderInfo.status == '2') {
|
|
|
|
|
+ // 待发货状态,使用极速退款弹窗
|
|
|
|
|
+ this.$refs.refundDialog.open(this.orderInfo);
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- // 监听地址选择
|
|
|
|
|
- uni.$on('selectAddr', this.onAddressSelected);
|
|
|
|
|
|
|
+ // 跳转到申请售后页面,并传递 orderId 和对应的 detailOrderId
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages-car/pages/apply-refund?orderId=${this.orderInfo.orderId}&detailOrderId=${goods.detailOrderId}`
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- onUnload() {
|
|
|
|
|
- uni.$off('selectAddr', this.onAddressSelected);
|
|
|
|
|
|
|
+ handleAddressClick() {
|
|
|
|
|
+ if (this.orderInfo.showModifyAddress == 1) {
|
|
|
|
|
+ this.handleAction('address');
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- methods: {
|
|
|
|
|
- onAddressSelected(addr) {
|
|
|
|
|
- if (this.isModifyingAddress && addr && addr.id) {
|
|
|
|
|
- this.$u.api.modifyOrderAddressAjax({
|
|
|
|
|
- orderId: this.orderInfo.orderId,
|
|
|
|
|
- addressId: addr.id
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- uni.showToast({ title: '修改成功', icon: 'success' });
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ handleAction(type) {
|
|
|
|
|
+ if (type === 'complaint') {
|
|
|
|
|
+ uni.setStorageSync('tempComplaintOrder', this.orderInfo);
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages-car/pages/complaint?orderId=${this.orderInfo.orderId}`
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'cancel') {
|
|
|
|
|
+ this.$refs.cancelDialog.open(this.orderInfo.orderId);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'remind') {
|
|
|
|
|
+ this.$refs.urgeDialog.open(this.orderInfo);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'overtime') {
|
|
|
|
|
+ // 超时发货补偿
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '确认申请超时发货补偿?',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.$u.api.sendTimeoutCompensationAjax(this.orderInfo.orderId).then(res => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '申请成功',
|
|
|
|
|
+ icon: 'success'
|
|
|
|
|
+ });
|
|
|
|
|
+ // 刷新订单详情
|
|
|
|
|
+ this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- }).finally(() => {
|
|
|
|
|
- this.isModifyingAddress = false;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- loadOrderDetail(orderId) {
|
|
|
|
|
- uni.$u.http.get('/token/shop/order/getOrderDetail', {
|
|
|
|
|
- orderId: orderId
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- this.orderInfo = res.data;
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- copyOrderNo() {
|
|
|
|
|
- uni.setClipboardData({
|
|
|
|
|
- data: String(this.orderInfo.orderId),
|
|
|
|
|
- success: () => {
|
|
|
|
|
- uni.showToast({ title: '复制成功', icon: 'none' });
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'priceMatch') {
|
|
|
|
|
+ // 降价补差
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '确认申请降价补差?',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.$u.api.priceReductionCompensationAjax(this.orderInfo.orderId).then(res => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '申请成功',
|
|
|
|
|
+ icon: 'success'
|
|
|
|
|
+ });
|
|
|
|
|
+ // 刷新订单详情
|
|
|
|
|
+ this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- viewLogistics() {
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'address') {
|
|
|
|
|
+ this.isModifyingAddress = true;
|
|
|
|
|
+ // 兼容可能的字段差异
|
|
|
|
|
+ const addressId = this.orderInfo.addressId || this.orderInfo.receiverAddressId || '';
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: `/pages-car/pages/logistics-detail?orderId=${this.orderInfo.orderId}`
|
|
|
|
|
|
|
+ url: `/pages-mine/pages/address/list?isSelect=1&id=${addressId}`
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- goToRefundDetail(refundOrderId) {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages-car/pages/refund-detail?refundOrderId=${refundOrderId}`
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'logistics') {
|
|
|
|
|
+ this.viewLogistics();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'confirm') {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '是否确认收货?',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ uni.showLoading({ title: '处理中' });
|
|
|
|
|
+ this.$u.api.confirmReceiveAjax({ orderId: this.orderInfo.orderId }).then(res => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ uni.showToast({ title: '收货成功', icon: 'success' });
|
|
|
|
|
+ this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- applyRefund(goods) {
|
|
|
|
|
- // 跳转到申请售后页面,并传递 orderId 和对应的 detailOrderId
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'addToCart') {
|
|
|
|
|
+ uni.showLoading({ title: '加载中' });
|
|
|
|
|
+ this.$u.api.orderAddToCartAjax({
|
|
|
|
|
+ orderId: this.orderInfo.orderId
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '已加入购物车',
|
|
|
|
|
+ icon: 'success',
|
|
|
|
|
+ duration: 3000
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$updateCartBadge();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (type === 'pay') {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: `/pages-car/pages/apply-refund?orderId=${this.orderInfo.orderId}&detailOrderId=${goods.detailOrderId}`
|
|
|
|
|
|
|
+ url: `/pages-car/pages/cashier-desk?id=${this.orderInfo.orderId}`
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
- handleAddressClick() {
|
|
|
|
|
- if (this.orderInfo.showModifyAddress == 1) {
|
|
|
|
|
- this.handleAction('address');
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- handleAction(type) {
|
|
|
|
|
- if (type === 'complaint') {
|
|
|
|
|
- uni.setStorageSync('tempComplaintOrder', this.orderInfo);
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages-car/pages/complaint?orderId=${this.orderInfo.orderId}`
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'cancel') {
|
|
|
|
|
- this.$refs.cancelDialog.open(this.orderInfo.orderId);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'remind') {
|
|
|
|
|
- this.$refs.urgeDialog.open(this.orderInfo);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'overtime') {
|
|
|
|
|
- // 超时发货补偿
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '确认申请超时发货补偿?',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- this.$u.api.sendTimeoutCompensationAjax(this.orderInfo.orderId).then(res => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '申请成功',
|
|
|
|
|
- icon: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- // 刷新订单详情
|
|
|
|
|
- this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'priceMatch') {
|
|
|
|
|
- // 降价补差
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '确认申请降价补差?',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- this.$u.api.priceReductionCompensationAjax(this.orderInfo.orderId).then(res => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '申请成功',
|
|
|
|
|
- icon: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- // 刷新订单详情
|
|
|
|
|
- this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'address') {
|
|
|
|
|
- this.isModifyingAddress = true;
|
|
|
|
|
- // 兼容可能的字段差异
|
|
|
|
|
- const addressId = this.orderInfo.addressId || this.orderInfo.receiverAddressId || '';
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages-mine/pages/address/list?isSelect=1&id=${addressId}`
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'logistics') {
|
|
|
|
|
- this.viewLogistics();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'confirm') {
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '是否确认收货?',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- uni.showLoading({ title: '处理中' });
|
|
|
|
|
- this.$u.api.confirmReceiveAjax({ orderId: this.orderInfo.orderId }).then(res => {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- uni.showToast({ title: '收货成功', icon: 'success' });
|
|
|
|
|
- this.loadOrderDetail(this.orderInfo.orderId);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'addToCart') {
|
|
|
|
|
- uni.showLoading({ title: '加载中' });
|
|
|
|
|
- this.$u.api.orderAddToCartAjax({
|
|
|
|
|
- orderId: this.orderInfo.orderId
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '已加入购物车',
|
|
|
|
|
- icon: 'success',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- });
|
|
|
|
|
- this.$updateCartBadge();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (type === 'pay') {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages-car/pages/cashier-desk?id=${this.orderInfo.orderId}`
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
- .order-detail-page {
|
|
|
|
|
- min-height: 100vh;
|
|
|
|
|
- background-color: #F5F5F5;
|
|
|
|
|
- padding-bottom: 20rpx;
|
|
|
|
|
-
|
|
|
|
|
- .status-header {
|
|
|
|
|
- background-color: #d1f2d8; // Light green bg
|
|
|
|
|
- padding: 40rpx 30rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
-
|
|
|
|
|
- .status-text {
|
|
|
|
|
- font-size: 36rpx;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
|
|
+.order-detail-page {
|
|
|
|
|
+ min-height: 100vh;
|
|
|
|
|
+ background-color: #F5F5F5;
|
|
|
|
|
+ padding-bottom: 20rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .status-header {
|
|
|
|
|
+ background-color: #d1f2d8; // Light green bg
|
|
|
|
|
+ padding: 40rpx 30rpx;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+
|
|
|
|
|
+ .status-text {
|
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .status-desc {
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .status-desc-block {
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+
|
|
|
|
|
+ .status-tip {
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .status-desc {
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
- color: #666;
|
|
|
|
|
|
|
+ .status-desc-row {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .status-desc-block {
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
- color: #666;
|
|
|
|
|
|
|
+ .info-card {
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ margin: 20rpx;
|
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
|
+ padding: 30rpx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
|
|
|
- .status-tip {
|
|
|
|
|
|
|
+ &.address-card {
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+
|
|
|
|
|
+ .icon-box {
|
|
|
|
|
+ margin-right: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .address-content {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ margin-right: 20rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .user-info {
|
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
|
+ font-weight: 500;
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
|
|
+
|
|
|
|
|
+ .mobile {
|
|
|
|
|
+ margin-left: 20rpx;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .status-desc-row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ .address-detail {
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ line-height: 1.4;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .info-card {
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- margin: 20rpx;
|
|
|
|
|
- border-radius: 16rpx;
|
|
|
|
|
- padding: 30rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
-
|
|
|
|
|
- &.address-card {
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ &.logistics-card {
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
|
|
|
- .icon-box {
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .icon-box {
|
|
|
|
|
+ margin-right: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .address-content {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
|
|
+ .logistics-content {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ margin-right: 20rpx;
|
|
|
|
|
|
|
|
- .user-info {
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
|
|
+ .company-name {
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ color: #38C148;
|
|
|
|
|
+ margin-bottom: 6rpx;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .mobile {
|
|
|
|
|
- margin-left: 20rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .latest-trace {
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ margin-bottom: 6rpx;
|
|
|
|
|
+ display: -webkit-box;
|
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .address-detail {
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
- color: #666;
|
|
|
|
|
- line-height: 1.4;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .update-time {
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #999;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- &.logistics-card {
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ &.goods-card {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+
|
|
|
|
|
+ .goods-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin-bottom: 30rpx;
|
|
|
|
|
|
|
|
- .icon-box {
|
|
|
|
|
|
|
+ .goods-cover {
|
|
|
|
|
+ width: 120rpx;
|
|
|
|
|
+ height: 120rpx;
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
|
|
|
+ background-color: #eee;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .logistics-content {
|
|
|
|
|
|
|
+ .goods-info {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
|
|
|
|
|
- .company-name {
|
|
|
|
|
|
|
+ .goods-title {
|
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
|
- color: #38C148;
|
|
|
|
|
- margin-bottom: 6rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .latest-trace {
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
color: #333;
|
|
color: #333;
|
|
|
- margin-bottom: 6rpx;
|
|
|
|
|
- display: -webkit-box;
|
|
|
|
|
- -webkit-box-orient: vertical;
|
|
|
|
|
- -webkit-line-clamp: 2;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .update-time {
|
|
|
|
|
|
|
+ .goods-quality {
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
|
color: #999;
|
|
color: #999;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.goods-card {
|
|
|
|
|
- display: block;
|
|
|
|
|
-
|
|
|
|
|
- .goods-item {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- margin-bottom: 30rpx;
|
|
|
|
|
-
|
|
|
|
|
- .goods-cover {
|
|
|
|
|
- width: 120rpx;
|
|
|
|
|
- height: 120rpx;
|
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
|
- background-color: #eee;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- .goods-info {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+ .price-box {
|
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
|
|
- .goods-title {
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
|
|
+ .price {
|
|
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .goods-quality {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
|
|
+ .num {
|
|
|
color: #999;
|
|
color: #999;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- .price-box {
|
|
|
|
|
- margin-top: 10rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
-
|
|
|
|
|
- .price {
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .num {
|
|
|
|
|
- color: #999;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .goods-action {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .goods-action {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .price-detail {
|
|
|
|
|
- border-top: 1rpx solid #eee;
|
|
|
|
|
- padding-top: 20rpx;
|
|
|
|
|
|
|
+ .price-detail {
|
|
|
|
|
+ border-top: 1rpx solid #eee;
|
|
|
|
|
+ padding-top: 20rpx;
|
|
|
|
|
|
|
|
- .row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- font-size: 26rpx;
|
|
|
|
|
- color: #666;
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
|
|
+ .row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
|
|
|
|
- .goods-total {
|
|
|
|
|
- color: #38C148;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .goods-total {
|
|
|
|
|
+ color: #38C148;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .discount {
|
|
|
|
|
- color: #38C148;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .discount {
|
|
|
|
|
+ color: #38C148;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .real-pay-row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- font-size: 30rpx;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- margin-top: 20rpx;
|
|
|
|
|
|
|
+ .real-pay-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ margin-top: 20rpx;
|
|
|
|
|
|
|
|
- .real-price {
|
|
|
|
|
- color: #38C148;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .real-price {
|
|
|
|
|
+ color: #38C148;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- &.time-card {
|
|
|
|
|
- display: block;
|
|
|
|
|
|
|
+ &.time-card {
|
|
|
|
|
+ display: block;
|
|
|
|
|
|
|
|
- .row {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- color: #999;
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
|
|
+ .row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|