修改部分bug
							parent
							
								
									2ce90ba008
								
							
						
					
					
						commit
						ea60742d82
					
				|  | @ -1,31 +1,53 @@ | ||||||
| <template> | <template> | ||||||
|   <view class="content"> |   <view class="content"> | ||||||
|     <view class="u-tabs-box"> |     <view class="u-tabs-box"> | ||||||
|       <u-tabs bg-color="#fff" :list="list" :is-scroll="false" :current="current" @change="change" |       <u-tabs | ||||||
|         :active-color="$lightColor"></u-tabs> |         bg-color="#fff" | ||||||
|  |         :list="list" | ||||||
|  |         :is-scroll="false" | ||||||
|  |         :current="current" | ||||||
|  |         @change="change" | ||||||
|  |         :active-color="$lightColor" | ||||||
|  |       ></u-tabs> | ||||||
|     </view> |     </view> | ||||||
|     <div class="u-tabs-search"> |     <div class="u-tabs-search"> | ||||||
|       <u-search placeholder="请输入订单编号" @search="handleGetOrderList(current)" @clear="handleGetOrderList(current)" |       <u-search | ||||||
|         @custom="handleGetOrderList(current)" v-model="params.orderSn"></u-search> |         placeholder="请输入订单编号" | ||||||
|  |         @search="submitSearchOrderList(current)" | ||||||
|  |         @clear="submitSearchOrderList(current)" | ||||||
|  |         @custom="submitSearchOrderList(current)" | ||||||
|  |         v-model="orderSn" | ||||||
|  |       ></u-search> | ||||||
|     </div> |     </div> | ||||||
|     <scroll-view class="body-view" scroll-y @scrolltolower="renderDate"> |     <scroll-view class="body-view" scroll-y @scrolltolower="renderDate"> | ||||||
|       <view class="seller-view" v-for="(order, orderIndex) in orderList" :key="orderIndex"> |       <view | ||||||
|  |         class="seller-view" | ||||||
|  |         v-for="(order, orderIndex) in orderList" | ||||||
|  |         :key="orderIndex" | ||||||
|  |       > | ||||||
|         <!-- 店铺名称 --> |         <!-- 店铺名称 --> | ||||||
|         <view class="seller-info u-flex u-row-between" v-if="current == 0"> |         <view class="seller-info u-flex u-row-between" v-if="current == 0"> | ||||||
|           <view class="seller-name"> |           <view class="seller-name"> | ||||||
|             <view class="name">{{ order.storeName }}</view> |             <view class="name">{{ order.storeName }}</view> | ||||||
|           </view> |           </view> | ||||||
|           <view class="order-sn">订单编号:{{order.sn}}</view> |           <view class="order-sn">订单编号:{{ order.sn }}</view> | ||||||
|         </view> |         </view> | ||||||
|         <!-- 申请记录 选项卡 --> |         <!-- 申请记录 选项卡 --> | ||||||
|         <view class="seller-info u-flex u-row-between" v-if="current != 0"> |         <view class="seller-info u-flex u-row-between" v-if="current != 0"> | ||||||
|           <view class="order-sn">售后单号:{{ order.service_sn || order.sn }}</view> |           <view class="order-sn" | ||||||
|  |             >售后单号:{{ order.service_sn || order.sn }}</view | ||||||
|  |           > | ||||||
|           <view class="order-sn">{{ order.serviceType_text }}</view> |           <view class="order-sn">{{ order.serviceType_text }}</view> | ||||||
|         </view> |         </view> | ||||||
|         <view v-for="(sku, goodsIndex) in order.orderItems" :key="goodsIndex"> |         <view v-for="(sku, goodsIndex) in order.orderItems" :key="goodsIndex"> | ||||||
|           <view class="goods-item-view" @click="onDetail(order,sku)"> |           <view class="goods-item-view" @click="onDetail(order, sku)"> | ||||||
|             <view class="goods-img"> |             <view class="goods-img"> | ||||||
|               <u-image border-radius="6" width="100%" height="100%" :src="sku.image"></u-image> |               <u-image | ||||||
|  |                 border-radius="6" | ||||||
|  |                 width="100%" | ||||||
|  |                 height="100%" | ||||||
|  |                 :src="sku.image" | ||||||
|  |               ></u-image> | ||||||
|             </view> |             </view> | ||||||
|             <view class="goods-info"> |             <view class="goods-info"> | ||||||
|               <view class="goods-title u-line-2">{{ sku.name }}</view> |               <view class="goods-title u-line-2">{{ sku.name }}</view> | ||||||
|  | @ -41,77 +63,136 @@ | ||||||
|           <view class="btn-view u-flex u-row-between"> |           <view class="btn-view u-flex u-row-between"> | ||||||
|             <view class="description"> |             <view class="description"> | ||||||
|               <!-- 售后申请 --> |               <!-- 售后申请 --> | ||||||
|               <view v-if=" |               <view | ||||||
|                   current === 0 &&  order.groupAfterSaleStatus && |                 v-if=" | ||||||
|  |                   current === 0 && | ||||||
|  |                   order.groupAfterSaleStatus && | ||||||
|                   order.groupAfterSaleStatus.includes('ALREADY_APPLIED') |                   order.groupAfterSaleStatus.includes('ALREADY_APPLIED') | ||||||
|                 " class="cannot_apply"> |                 " | ||||||
|  |                 class="cannot_apply" | ||||||
|  |               > | ||||||
|                 <u-icon class="icon" name="info-circle-fill"></u-icon> |                 <u-icon class="icon" name="info-circle-fill"></u-icon> | ||||||
|                 该商品已申请售后服务 |                 该商品已申请售后服务 | ||||||
|               </view> |               </view> | ||||||
|               <view class="cannot_apply" |               <view | ||||||
|                 v-if="current === 0 && order.groupAfterSaleStatus && order.groupAfterSaleStatus.includes('EXPIRED')  " |                 class="cannot_apply" | ||||||
|                 @click="tipsShow = true"> |                 v-if=" | ||||||
|  |                   current === 0 && | ||||||
|  |                   order.groupAfterSaleStatus && | ||||||
|  |                   order.groupAfterSaleStatus.includes('EXPIRED') | ||||||
|  |                 " | ||||||
|  |                 @click="tipsShow = true" | ||||||
|  |               > | ||||||
|                 <u-icon class="icon" name="info-circle-fill"></u-icon> |                 <u-icon class="icon" name="info-circle-fill"></u-icon> | ||||||
|                 该商品无法申请售后 |                 该商品无法申请售后 | ||||||
|               </view> |               </view> | ||||||
| 
 | 
 | ||||||
|               <div v-if="current === 1 || current === 2"> |               <div v-if="current === 1 || current === 2"> | ||||||
|                 <!-- 申请中 --> |                 <!-- 申请中 --> | ||||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'RETURN_GOODS'"> |                 <view | ||||||
|                   退货处理-{{ order.serviceStatus | serviceStatusList  }}</view> |                   class="cannot_apply" | ||||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'"> |                   v-if="order.serviceType == 'RETURN_GOODS'" | ||||||
|                   补发商品-{{ order.serviceStatus | serviceStatusList  }}</view> |                 > | ||||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'RETURN_MONEY'"> |                   退货处理-{{ order.serviceStatus | serviceStatusList }}</view | ||||||
|                   退款-{{ order.serviceStatus | serviceStatusList  }}</view> |                 > | ||||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'EXCHANGE_GOODS'"> |                 <view | ||||||
|                   换货-{{ order.serviceStatus | serviceStatusList  }}</view> |                   class="cannot_apply" | ||||||
|  |                   v-if="order.serviceType == 'SUPPLY_AGAIN_GOODS'" | ||||||
|  |                 > | ||||||
|  |                   补发商品-{{ order.serviceStatus | serviceStatusList }}</view | ||||||
|  |                 > | ||||||
|  |                 <view | ||||||
|  |                   class="cannot_apply" | ||||||
|  |                   v-if="order.serviceType == 'RETURN_MONEY'" | ||||||
|  |                 > | ||||||
|  |                   退款-{{ order.serviceStatus | serviceStatusList }}</view | ||||||
|  |                 > | ||||||
|  |                 <view | ||||||
|  |                   class="cannot_apply" | ||||||
|  |                   v-if="order.serviceType == 'EXCHANGE_GOODS'" | ||||||
|  |                 > | ||||||
|  |                   换货-{{ order.serviceStatus | serviceStatusList }}</view | ||||||
|  |                 > | ||||||
|                 <view class="cannot_apply" v-if="order.serviceType == 'CANCEL'"> |                 <view class="cannot_apply" v-if="order.serviceType == 'CANCEL'"> | ||||||
|                   取消订单-{{ order.serviceStatus | serviceStatusList  }}</view> |                   取消订单-{{ order.serviceStatus | serviceStatusList }}</view | ||||||
|  |                 > | ||||||
|               </div> |               </div> | ||||||
| 
 | 
 | ||||||
|               <!-- 申请记录 --> |               <!-- 申请记录 --> | ||||||
|             </view> |             </view> | ||||||
|             <!-- 售后申请 --> |             <!-- 售后申请 --> | ||||||
|               <div v-if="current === 0 && sku.afterSaleStatus && (sku.afterSaleStatus.includes('NOT_APPLIED') || sku.afterSaleStatus.includes('PART_AFTER_SALE')) "  @click="applyService(sku.sn, order, sku)" class="sale"> |             <div | ||||||
|                 <view class=" default-btn border" > |               v-if=" | ||||||
|                   申请售后 |                 current === 0 && | ||||||
|                 </view> |                 sku.afterSaleStatus && | ||||||
|  |                 (sku.afterSaleStatus.includes('NOT_APPLIED') || | ||||||
|  |                   sku.afterSaleStatus.includes('PART_AFTER_SALE')) | ||||||
|  |               " | ||||||
|  |               @click="applyService(sku.sn, order, sku)" | ||||||
|  |               class="sale" | ||||||
|  |             > | ||||||
|  |               <view class="default-btn border"> 申请售后 </view> | ||||||
|             </div> |             </div> | ||||||
|             <view class="after-line"> |             <view class="after-line"> | ||||||
| 
 |  | ||||||
|               <!-- 申请中 --> |               <!-- 申请中 --> | ||||||
|               <view class="default-btn border" v-if=" |               <view | ||||||
|  |                 class="default-btn border" | ||||||
|  |                 v-if=" | ||||||
|                   current === 2 && |                   current === 2 && | ||||||
|                   order.serviceStatus && |                   order.serviceStatus && | ||||||
|                   order.serviceStatus == 'PASS' && |                   order.serviceStatus == 'PASS' && | ||||||
|                   order.serviceType != 'RETURN_MONEY' |                   order.serviceType != 'RETURN_MONEY' | ||||||
|                 " @click="onExpress(order, sku)"> |                 " | ||||||
|  |                 @click="onExpress(order, sku)" | ||||||
|  |               > | ||||||
|                 提交物流 |                 提交物流 | ||||||
|               </view> |               </view> | ||||||
|               <view @click="close(order,sku)" v-if="current === 1" class="default-btn close"> |               <view | ||||||
|  |                 @click="close(order, sku)" | ||||||
|  |                 v-if="current === 1" | ||||||
|  |                 class="default-btn close" | ||||||
|  |               > | ||||||
|                 取消售后 |                 取消售后 | ||||||
|               </view> |               </view> | ||||||
|               <view @click="afterDetails(order, sku)" v-if="current === 1 || current === 2" class="default-btn border"> |               <view | ||||||
|  |                 @click="afterDetails(order, sku)" | ||||||
|  |                 v-if="current === 1 || current === 2" | ||||||
|  |                 class="default-btn border" | ||||||
|  |               > | ||||||
|                 售后详情 |                 售后详情 | ||||||
|               </view> |               </view> | ||||||
|             </view> |             </view> | ||||||
|           </view> |           </view> | ||||||
|         </view> |         </view> | ||||||
|         <view v-if=" |         <view | ||||||
|             current === 0 && order.groupAfterSaleStatus && |           v-if=" | ||||||
|  |             current === 0 && | ||||||
|  |             order.groupAfterSaleStatus && | ||||||
|             order.groupAfterSaleStatus != 'ALREADY_APPLIED' && |             order.groupAfterSaleStatus != 'ALREADY_APPLIED' && | ||||||
|             order.orderItems.length >= 1 |             order.orderItems.length >= 1 | ||||||
|           " class="btn-view u-flex u-row-between"> |           " | ||||||
|  |           class="btn-view u-flex u-row-between" | ||||||
|  |         > | ||||||
|           <!-- 多个商品显示订单总价格 --> |           <!-- 多个商品显示订单总价格 --> | ||||||
|           <view class="cannot_apply"> |           <view class="cannot_apply"> | ||||||
|             订单总金额:<span class="countMoney">¥{{ order.flowPrice | unitPrice }}</span> |             订单总金额:<span class="countMoney" | ||||||
|  |               >¥{{ order.flowPrice | unitPrice }}</span | ||||||
|  |             > | ||||||
|           </view> |           </view> | ||||||
|         </view> |         </view> | ||||||
|       </view> |       </view> | ||||||
|       <u-loadmore bg-color="#f8f8f8" :status="status" /> |       <u-loadmore bg-color="#f8f8f8" :status="status" /> | ||||||
|     </scroll-view> |     </scroll-view> | ||||||
|     <u-modal show-cancel-button @confirm="closeService" v-model="cancelShow" content="确认取消售后"></u-modal> |     <u-modal | ||||||
|     <u-modal v-model="tipsShow" content="当订单未确认收货|已过售后服务有效期|已申请售后服务时,不能申请售后"></u-modal> |       show-cancel-button | ||||||
|  |       @confirm="closeService" | ||||||
|  |       v-model="cancelShow" | ||||||
|  |       content="确认取消售后" | ||||||
|  |     ></u-modal> | ||||||
|  |     <u-modal | ||||||
|  |       v-model="tipsShow" | ||||||
|  |       content="当订单未确认收货|已过售后服务有效期|已申请售后服务时,不能申请售后" | ||||||
|  |     ></u-modal> | ||||||
|   </view> |   </view> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | @ -157,21 +238,27 @@ export default { | ||||||
|         pageSize: 10, |         pageSize: 10, | ||||||
|       }, |       }, | ||||||
|       status: "loadmore", |       status: "loadmore", | ||||||
|  |       orderSn: "", // 搜索订单sn | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   onLoad(options) { |   onLoad(options) { | ||||||
|     this.orderList = []; |     this.orderList = []; | ||||||
|     this.params.pageNumber = 1; |     this.params.pageNumber = 1; | ||||||
|     if (options.orderSn) this.params.orderSn = options.orderSn; |     if (options.orderSn) this.params.orderSn = options.orderSn; | ||||||
|     this.getOrderList(this.current); |     this.searchOrderList(this.current); | ||||||
|   }, |   }, | ||||||
|   onPullDownRefresh() { |   onPullDownRefresh() { | ||||||
|     this.change(this.current); |     this.change(this.current); | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     handleGetOrderList(current) { |     /** | ||||||
|  |      * 点击搜索执行搜索 | ||||||
|  |      */ | ||||||
|  |     submitSearchOrderList(current) { | ||||||
|  |       this.params.pageNumber = 1; | ||||||
|  |       this.logParams.pageNumber = 1; | ||||||
|       this.orderList = []; |       this.orderList = []; | ||||||
|       this.getOrderList(current); |       this.searchOrderList(current); | ||||||
|     }, |     }, | ||||||
|     /** |     /** | ||||||
|      * 切换tab页时,初始化数据 |      * 切换tab页时,初始化数据 | ||||||
|  | @ -184,8 +271,18 @@ export default { | ||||||
|       }; |       }; | ||||||
|       this.orderList = []; |       this.orderList = []; | ||||||
|       //如果是2 则读取售后申请记录列表 |       //如果是2 则读取售后申请记录列表 | ||||||
|  |       this.searchOrderList(index); | ||||||
|  |       uni.stopPullDownRefresh(); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 搜索初始化 | ||||||
|  |      * 根据当前tab传值的索引进行更改 | ||||||
|  |      */ | ||||||
|  |     searchOrderList(index) { | ||||||
|       if (index == 0) { |       if (index == 0) { | ||||||
|         this.getOrderList(index); |         this.orderSn ? (this.params.orderSn = this.orderSn) : ""; | ||||||
|  |         this.getOrderList(); | ||||||
|       } else { |       } else { | ||||||
|         this.logParams = { |         this.logParams = { | ||||||
|           pageNumber: 1, |           pageNumber: 1, | ||||||
|  | @ -196,16 +293,16 @@ export default { | ||||||
|         if (index === 1) { |         if (index === 1) { | ||||||
|           this.logParams.serviceStatus = "APPLY"; |           this.logParams.serviceStatus = "APPLY"; | ||||||
|         } |         } | ||||||
|  |         this.orderSn ? (this.logParams.orderSn = this.orderSn) : ""; | ||||||
|         this.orderList = []; |         this.orderList = []; | ||||||
|         this.getAfterSaleLogList(); |         this.getAfterSaleLogList(); | ||||||
|       } |       } | ||||||
|       uni.stopPullDownRefresh(); |  | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 获取订单列表 |      * 获取订单列表 | ||||||
|      */ |      */ | ||||||
|     getOrderList(index) { |     getOrderList() { | ||||||
|       uni.showLoading({ |       uni.showLoading({ | ||||||
|         title: "加载中", |         title: "加载中", | ||||||
|         mask: true, |         mask: true, | ||||||
|  | @ -245,7 +342,7 @@ export default { | ||||||
|         }); |         }); | ||||||
|       } |       } | ||||||
|       this.orderList = []; |       this.orderList = []; | ||||||
|       this.getOrderList(this.current); |       this.searchOrderList(this.current); | ||||||
| 
 | 
 | ||||||
|       uni.hideLoading(); |       uni.hideLoading(); | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  | @ -7,6 +7,9 @@ import api from "@/config/api.js"; | ||||||
| 
 | 
 | ||||||
| import uuid from "@/utils/uuid.modified.js"; | import uuid from "@/utils/uuid.modified.js"; | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | let isNavigateTo = false | ||||||
|  | 
 | ||||||
| function cleanStorage() { | function cleanStorage() { | ||||||
|   uni.showToast({ |   uni.showToast({ | ||||||
|     title: "你的登录状态已过期,请重新登录", |     title: "你的登录状态已过期,请重新登录", | ||||||
|  | @ -25,23 +28,20 @@ function cleanStorage() { | ||||||
|   storage.setUserInfo({}); |   storage.setUserInfo({}); | ||||||
| 
 | 
 | ||||||
| 	 | 	 | ||||||
| 
 |   if(!isNavigateTo){ | ||||||
|  | 	  isNavigateTo= true | ||||||
| 	  // 防抖处理跳转
 | 	  // 防抖处理跳转
 | ||||||
| 	  // #ifdef MP-WEIXIN
 | 	  // #ifdef MP-WEIXIN
 | ||||||
| 
 |  | ||||||
| 	  uni.navigateTo({ | 	  uni.navigateTo({ | ||||||
| 		url: "/pages/passport/wechatMPLogin", | 		url: "/pages/passport/wechatMPLogin", | ||||||
| 	  }); | 	  }); | ||||||
| 
 |  | ||||||
| 	  // #endif
 | 	  // #endif
 | ||||||
| 
 |  | ||||||
| 	  // #ifndef MP-WEIXIN
 | 	  // #ifndef MP-WEIXIN
 | ||||||
| 
 |  | ||||||
| 	  uni.navigateTo({ | 	  uni.navigateTo({ | ||||||
| 		url: "/pages/passport/login", | 		url: "/pages/passport/login", | ||||||
| 	  }); | 	  }); | ||||||
| 
 |  | ||||||
|   //  #endif
 |   //  #endif
 | ||||||
|  |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| let http = new Request(); | let http = new Request(); | ||||||
|  | @ -105,6 +105,7 @@ let requests = []; | ||||||
| // 必须使用异步函数,注意
 | // 必须使用异步函数,注意
 | ||||||
| http.interceptors.response.use( | http.interceptors.response.use( | ||||||
|   async (response) => { |   async (response) => { | ||||||
|  | 	isNavigateTo = false | ||||||
|     /* 请求之后拦截器。可以使用async await 做异步操作  */ |     /* 请求之后拦截器。可以使用async await 做异步操作  */ | ||||||
|     // token存在并且token过期
 |     // token存在并且token过期
 | ||||||
|     if (isRefreshing && response.statusCode === 403) { |     if (isRefreshing && response.statusCode === 403) { | ||||||
|  |  | ||||||
|  | @ -92,11 +92,11 @@ export default { | ||||||
|   removeRefreshToken() { |   removeRefreshToken() { | ||||||
|     uni.removeStorageSync(REFRESH_TOKEN); |     uni.removeStorageSync(REFRESH_TOKEN); | ||||||
|   }, |   }, | ||||||
|   // 写入刷新token
 | 
 | ||||||
|   setAfterSaleData(val) { |   setAfterSaleData(val) { | ||||||
|     uni.setStorageSync(AFTERSALE_DATA, val); |     uni.setStorageSync(AFTERSALE_DATA, val); | ||||||
|   }, |   }, | ||||||
|   // 获取刷新token
 | 
 | ||||||
|   getAfterSaleData() { |   getAfterSaleData() { | ||||||
|     return uni.getStorageSync(AFTERSALE_DATA); |     return uni.getStorageSync(AFTERSALE_DATA); | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue