zs 2 年之前
父节点
当前提交
506e1448f3
共有 2 个文件被更改,包括 39 次插入22 次删除
  1. 36 20
      pagesMy/logistics/index.vue
  2. 3 2
      pagesMy/order/after.vue

+ 36 - 20
pagesMy/logistics/index.vue

@@ -79,27 +79,43 @@
 			},
 			async search() {
 				const that = this;
-				let res;
-				if (that.type == 'integral') {
-					res = await that.$api(`/zrOrder/sot/${that.info._id}`, `GET`, {}, `integral`);
-				} else if (that.type == 'afterSale') {
-					res = await that.$api(`/afterSale/getTransportInfo/${that.id}`, `GET`)
-				} else {
-					res = await that.$api(`/orderDetail/sot/${that.info._id}`, `GET`);
-				}
-				if (res.errcode == '0') {
-					that.$set(that, `is_check`, res.data.is_check);
-					let list = res.data.list.map((i) => ({
-						desc: i.time,
-						title: i.context
-					}))
-					that.$set(that, `list`, list);
-					that.$set(that, `no`, res.data.no);
+				if (that.type == 'afterSale') {
+					let arr = await that.$api(`/afterSale/getTransportInfo/${that.info.id}`, `GET`)
+					if (arr.errcode == '0') {
+						that.$set(that, `is_check`, arr.data.shop.is_check);
+						let list = arr.data.shop.list.map((i) => ({
+							desc: i.time,
+							title: i.context
+						}))
+						that.$set(that, `list`, list);
+						that.$set(that, `no`, arr.data.shop.no);
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						})
+					}
 				} else {
-					uni.showToast({
-						title: res.errmsg,
-						icon: 'none'
-					})
+					let res;
+					if (that.type == 'integral') {
+						res = await that.$api(`/zrOrder/sot/${that.info._id}`, `GET`, {}, `integral`);
+					} else {
+						res = await that.$api(`/orderDetail/sot/${that.info._id}`, `GET`);
+					}
+					if (res.errcode == '0') {
+						that.$set(that, `is_check`, res.data.is_check);
+						let list = res.data.list.map((i) => ({
+							desc: i.time,
+							title: i.context
+						}))
+						that.$set(that, `list`, list);
+						that.$set(that, `no`, res.data.no);
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						})
+					}
 				}
 			}
 		}

+ 3 - 2
pagesMy/order/after.vue

@@ -45,10 +45,11 @@
 										<button type="default" size="mini" @tap.stop="toView(item)">详细信息</button>
 										<button v-if="item.status=='0'" type="default" size="mini"
 											@tap.stop="toCancel(item)">取消售后</button>
-										<button v-if="item.type!='1'&&item.status=='2'||item.status=='3'"
+										<button
+											v-if="item.type!='1'&&item.status=='2'||item.status=='3'&&!item.transport"
 											type="default" size="mini" @tap.stop="toMaintain(item)">维护单号</button>
 										<button
-											v-if="item.type=='3'&&item.status=='-3'&&item.transport.shop_transport_no"
+											v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true"
 											type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
 									</view>
 								</view>