zs 2 năm trước cách đây
mục cha
commit
01164926d2
1 tập tin đã thay đổi với 25 bổ sung0 xóa
  1. 25 0
      pagesMy/order/after.vue

+ 25 - 0
pagesMy/order/after.vue

@@ -51,6 +51,9 @@
 										<button
 										<button
 											v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true"
 											v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true"
 											type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
 											type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
+										<button
+											v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true&&!item.transport.customer_receive"
+											type="default" size="mini" @tap.stop="toConfirm(item)">确认收货</button>
 									</view>
 									</view>
 								</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
 								<view class="is_bottom" v-if="is_bottom">
@@ -256,6 +259,28 @@
 					url: `/pagesMy/order/detail?id=${item._id}`
 					url: `/pagesMy/order/detail?id=${item._id}`
 				})
 				})
 			},
 			},
+			// 确认收货
+			async toConfirm(item) {
+				const that = this;
+				item.transport.customer_receive = true;
+				const arr = await that.$api(`/afterSale/${item.id}`, 'POST', {
+					transport: item.transport
+				});
+				if (arr.errcode == '0') {
+					uni.showToast({
+						title: `确认收货成功`,
+						icon: 'success',
+					});
+					uni.navigateBack({
+						detail: 1
+					})
+				} else {
+					uni.showToast({
+						title: arr.errmsg,
+						icon: 'none',
+					})
+				}
+			},
 			// 查看物流
 			// 查看物流
 			toLogi(e) {
 			toLogi(e) {
 				uni.navigateTo({
 				uni.navigateTo({