linwenxin 6 ay önce
ebeveyn
işleme
0360cf2f72

+ 4 - 6
src/packageWorkorder/pages/mixins/orderBtnsShow.js

@@ -38,22 +38,20 @@ export default {
           'DZBSPGP',
           'DFZXPD',
           'DFZXSPGP',
-          'XSBH',
-          'TJXSBH',
-          'ZBBH',
-          'FZXBH',
           'FL'
         ].includes(orderStatus)
       ) {
         // 待商户派工
         return 'DSHPG'
-      } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
+      } else if (['DWDPG', 'DWDPD'].includes(orderStatus)) {
         // 待网点派工
         return 'DWDPG'
       } else if (['DJD'].includes(orderStatus)) {
         // 待接单
         return 'DJD'
-      } else if (['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP'].includes(orderStatus)) {
+      } else if (
+        ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'].includes(orderStatus)
+      ) {
         // 服务中
         return 'FWZ'
       } else if (['YCD'].includes(orderStatus)) {

+ 6 - 6
src/packageWorkorder/pages/orderDetail.vue

@@ -810,22 +810,22 @@ export default {
           'DZBSPGP',
           'DFZXPD',
           'DFZXSPGP',
-          'XSBH',
-          'TJXSBH',
-          'ZBBH',
-          'FZXBH',
           'FL'
         ].includes(this?.detail?.orderStatus)
       ) {
         // 待商户派工
         return 'DSHPG'
-      } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(this?.detail?.orderStatus)) {
+      } else if (['DWDPG', 'DWDPD'].includes(this?.detail?.orderStatus)) {
         // 待网点派工
         return 'DWDPG'
       } else if (['DJD'].includes(this?.detail?.orderStatus)) {
         // 待接单
         return 'DJD'
-      } else if (['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP'].includes(this?.detail?.orderStatus)) {
+      } else if (
+        ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'].includes(
+          this?.detail?.orderStatus
+        )
+      ) {
         // 服务中
         return 'FWZ'
       } else if (['YCD'].includes(this?.detail?.orderStatus)) {

+ 4 - 6
src/packageWorkorder/pages/orderList.vue

@@ -358,22 +358,20 @@ export default {
           'DZBSPGP',
           'DFZXPD',
           'DFZXSPGP',
-          'XSBH',
-          'TJXSBH',
-          'ZBBH',
-          'FZXBH',
           'FL'
         ].includes(orderStatus)
       ) {
         // 待商户派工
         return 'DSHPG'
-      } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
+      } else if (['DWDPG', 'DWDPD'].includes(orderStatus)) {
         // 待网点派工
         return 'DWDPG'
       } else if (['DJD'].includes(orderStatus)) {
         // 待接单
         return 'DJD'
-      } else if (['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP'].includes(orderStatus)) {
+      } else if (
+        ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'].includes(orderStatus)
+      ) {
         // 服务中
         return 'FWZ'
       } else if (['YCD'].includes(orderStatus)) {

+ 5 - 7
src/packageWorkorder/pages/search.vue

@@ -239,22 +239,20 @@ export default {
           'DZBSPGP',
           'DFZXPD',
           'DFZXSPGP',
-          'XSBH',
-          'TJXSBH',
-          'ZBBH',
-          'FZXBH',
           'FL'
         ].includes(orderStatus)
       ) {
         // 待商户派工
         return 'DSHPG'
-      } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
+      } else if (['DWDPG', 'DWDPD'].includes(orderStatus)) {
         // 待网点派工
         return 'DWDPG'
-      } else if (['DJD', 'DSM', 'YZP'].includes(orderStatus)) {
+      } else if (['DJD'].includes(orderStatus)) {
         // 待接单
         return 'DJD'
-      } else if (['FWZ', 'GCSZT', 'BFWG'].includes(orderStatus)) {
+      } else if (
+        ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'].includes(orderStatus)
+      ) {
         // 服务中
         return 'FWZ'
       } else if (['YCD'].includes(orderStatus)) {

+ 210 - 206
src/packageWorkorder/pages/userWorkorderDetail.vue

@@ -1,5 +1,4 @@
 <template>
-  <!-- #ifdef H5 -->
   <view>
     <Loading :type="3" :loadStatus="loadStatus" />
 
@@ -146,231 +145,236 @@
       </view>
     </zj-page-layout>
   </view>
-  <!-- #endif -->
-
-  <!-- #ifndef H5 -->
-  <web-view
-    :src="webViewHref(`/packageWorkorder/pages/userWorkorderDetail`, pam, crossPagePam)"
-    @message="crossPage.$listener"
-  ></web-view>
-  <!-- #endif -->
 </template>
 
 <script>
- // #ifdef H5
-import Logistics from '@/components/logistics2/common-logistics.vue';
+import Logistics from '@/components/logistics2/common-logistics.vue'
 
 export default {
-	components: {
-		Logistics
-	},
+  components: {
+    Logistics
+  },
 
-	data() {
-		return {
-			imageUrl: this.$imageUrl,
-			id: null, // 工单号
-			detail: null, // 详情数据
-       orderDetail: null, // 订单详情
-       payList: [],
-			loadStatus: 1,
-			refresherTriggered: false,
-			orderState: 0,
-			logisticsData: [],
-			locationData: null,
-		}
-	},
+  data() {
+    return {
+      imageUrl: this.$imageUrl,
+      id: null, // 工单号
+      detail: null, // 详情数据
+      orderDetail: null, // 订单详情
+      payList: [],
+      loadStatus: 1,
+      refresherTriggered: false,
+      orderState: 0,
+      logisticsData: [],
+      locationData: null
+    }
+  },
 
-	onLoad({id}) {
-		this.id = id;
-		this.refreshData();
+  onLoad({ id }) {
+    this.id = id
+    this.refreshData()
 
-     this.crossPage.$on('refreshUserWorkorderDetail', data => {
-       this.refreshData();
-     })
-	},
+    this.crossPage.$on('refreshUserWorkorderDetail', data => {
+      this.refreshData()
+    })
+  },
 
-   onUnload() {
-     this.crossPage.$off('refreshUserWorkorderDetail');
-   },
+  onUnload() {
+    this.crossPage.$off('refreshUserWorkorderDetail')
+  },
 
-	methods: {
-     orderStatus_v(orderStatus){
-       if (["DYY"].includes(orderStatus)) {
-         // 待预约
-         return "DYY"
-       } else if (["DQD"].includes(orderStatus)) {
-         // 待抢单
-         return "DQD"
-       } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(orderStatus)) {
-         // 待商户派工
-         return "DSHPG"
-       } else if (["DWDPG", "DWDPD", "WDBH"].includes(orderStatus)) {
-         // 待网点派工
-         return "DWDPG"
-       } else if (["DJD", "DSM", "YZP"].includes(orderStatus)) {
-         // 待接单
-         return "DJD"
-       } else if (["FWZ", "GCSZT", "BFWG"].includes(orderStatus)) {
-         // 服务中
-         return "FWZ"
-       } else if (["YCD"].includes(orderStatus)) {
-         // 异常单
-         return "YCD"
-       } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(orderStatus)) {
-         // 已完工待结算
-         return "YWG"
-       } else if (["YJS", "LRCD"].includes(orderStatus)) {
-         // 已结算
-         return "YJS"
-       } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(orderStatus)) {
-         // 已取消
-         return "YQX"
-       }
-       return ""
-     },
-		// 获取详情
-		async getDetail() {
-			return new Promise((resolve, reject) => {
-				this.$api.post('/pg/order/base/detail', {
-		      orderBaseId: this.id,
-		    }).then((res) => {
-           const data = res.data;
-		      this.detail = data;
+  methods: {
+    orderStatus_v(orderStatus) {
+      if (['DYY'].includes(orderStatus)) {
+        // 待预约
+        return 'DYY'
+      } else if (['DQD'].includes(orderStatus)) {
+        // 待抢单
+        return 'DQD'
+      } else if (
+        [
+          'DSHPG',
+          'CJ',
+          'YPD',
+          'DXSPD',
+          'DZBPG',
+          'DWDSPGP',
+          'DXSSPGP',
+          'DTJXSSPGP',
+          'DZBSPGP',
+          'DFZXPD',
+          'DFZXSPGP',
+          'FL'
+        ].includes(orderStatus)
+      ) {
+        // 待商户派工
+        return 'DSHPG'
+      } else if (['DWDPG', 'DWDPD'].includes(orderStatus)) {
+        // 待网点派工
+        return 'DWDPG'
+      } else if (['DJD'].includes(orderStatus)) {
+        // 待接单
+        return 'DJD'
+      } else if (
+        ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'].includes(orderStatus)
+      ) {
+        // 服务中
+        return 'FWZ'
+      } else if (['YCD'].includes(orderStatus)) {
+        // 异常单
+        return 'YCD'
+      } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus)) {
+        // 已完工待结算
+        return 'YWG'
+      } else if (['YJS', 'LRCD'].includes(orderStatus)) {
+        // 已结算
+        return 'YJS'
+      } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(orderStatus)) {
+        // 已取消
+        return 'YQX'
+      }
+      return ''
+    },
+    // 获取详情
+    async getDetail() {
+      return new Promise((resolve, reject) => {
+        this.$api
+          .post('/pg/order/base/detail', {
+            orderBaseId: this.id
+          })
+          .then(res => {
+            const data = res.data
+            this.detail = data
 
-           let list = [{
-             title: '已下单',
-             time: data.createTime,
-             content: '您的服务订单已提交成功'
-           }];
-           if(data.workerId) {
-             list.unshift({
-               title: '已接单',
-               time: data.workerReceTime,
-               content: `您的服务订单已成功接收,由【${data.websitName}】的工程师为您服务`
-             })
-             list.unshift({
-               title: '已派单',
-               time: data.dispatchTime,
-               content: `您的服务工程师为【${data.workerName}】员工号:${data.workerId},联系电话:${data.workerMobile}`
-             })
-           }
-           if(data.appointmentTime) {
-             list.unshift({
-               title: '已预约',
-               time: data.lastOperatorAppointmentTime,
-               content: `预约时间:${data.appointmentTime.slice(0, 10)}`
-             })
-           }
-           if(this.orderStatus_v(data.orderStatus)  == 'YWG' || this.orderStatus_v(data.orderStatus) == 'YJS') {
-             list.unshift({
-               title: '服务完成',
-               time: data.overTime,
-               content: '您本次服务已完成,感谢您的信任和监督'
-             })
-           }
-           if(data.appraiseStatus != 'N') {
-             const MAP = {
-               A: '好评',
-               B: '中评',
-               C: '差评',
-             }
-             list.unshift({
-               title: '已评价',
-               time: data.appraiseTime,
-               content: `评价结果:${MAP[data.appraiseStatus]}`
-             })
-           }
-           if(this.orderStatus_v(data.orderStatus) == 'YQX') {
-             list.unshift({
-               title: '取消工单',
-               time: data.lastOperatorTime,
-               content: '您本次服务已取消'
-             })
-           }
-           this.logisticsData = list;
+            let list = [
+              {
+                title: '已下单',
+                time: data.createTime,
+                content: '您的服务订单已提交成功'
+              }
+            ]
+            if (data.workerId) {
+              list.unshift({
+                title: '已接单',
+                time: data.workerReceTime,
+                content: `您的服务订单已成功接收,由【${data.websitName}】的工程师为您服务`
+              })
+              list.unshift({
+                title: '已派单',
+                time: data.dispatchTime,
+                content: `您的服务工程师为【${data.workerName}】员工号:${data.workerId},联系电话:${data.workerMobile}`
+              })
+            }
+            if (data.appointmentTime) {
+              list.unshift({
+                title: '已预约',
+                time: data.lastOperatorAppointmentTime,
+                content: `预约时间:${data.appointmentTime.slice(0, 10)}`
+              })
+            }
+            if (this.orderStatus_v(data.orderStatus) == 'YWG' || this.orderStatus_v(data.orderStatus) == 'YJS') {
+              list.unshift({
+                title: '服务完成',
+                time: data.overTime,
+                content: '您本次服务已完成,感谢您的信任和监督'
+              })
+            }
+            if (data.appraiseStatus != 'N') {
+              const MAP = {
+                A: '好评',
+                B: '中评',
+                C: '差评'
+              }
+              list.unshift({
+                title: '已评价',
+                time: data.appraiseTime,
+                content: `评价结果:${MAP[data.appraiseStatus]}`
+              })
+            }
+            if (this.orderStatus_v(data.orderStatus) == 'YQX') {
+              list.unshift({
+                title: '取消工单',
+                time: data.lastOperatorTime,
+                content: '您本次服务已取消'
+              })
+            }
+            this.logisticsData = list
 
-		      resolve(1);
-		    }).catch((res) => {
-		      reject(0);
-		    });
-			});
-		},
+            resolve(1)
+          })
+          .catch(res => {
+            reject(0)
+          })
+      })
+    },
 
-     async getOrderDetail() {
-       return new Promise((resolve, reject) => {
-         this.$api.get('/order/detail', {
-           orderId: this.detail.saleOrderId
-         }).then(res => {
-           this.orderDetail = res.data;
-         }).finally(res => {
-           resolve(1);
-         })
-     	})
-     },
+    async getOrderDetail() {
+      return new Promise((resolve, reject) => {
+        this.$api
+          .get('/order/detail', {
+            orderId: this.detail.saleOrderId
+          })
+          .then(res => {
+            this.orderDetail = res.data
+          })
+          .finally(res => {
+            resolve(1)
+          })
+      })
+    },
 
-     // 获取支付信息
-     async getPayList() {
-     	return new Promise((resolve, reject) => {
-     		this.$api.post('/changeOrder/getOrderList', {
-     			workerOrderId: this.id,
-         }).then(async (res) => {
-           this.payList = res.data;
-           resolve(1);
-         }).catch((res) => {
-           reject(0);
-         });
-     	});
-     },
+    // 获取支付信息
+    async getPayList() {
+      return new Promise((resolve, reject) => {
+        this.$api
+          .post('/changeOrder/getOrderList', {
+            workerOrderId: this.id
+          })
+          .then(async res => {
+            this.payList = res.data
+            resolve(1)
+          })
+          .catch(res => {
+            reject(0)
+          })
+      })
+    },
 
-     async refreshData() {
-     	try {
-     		await this.getDetail();
-         await this.getPayList();
-         if(this.detail.saleOrderId) {
-           await this.getOrderDetail();
-         }
-     		this.refresherTriggered = false;
-     		this.loadStatus = 0;
-     	} catch (e) {
-     		this.loadStatus = 2;
-     	}
-     },
+    async refreshData() {
+      try {
+        await this.getDetail()
+        await this.getPayList()
+        if (this.detail.saleOrderId) {
+          await this.getOrderDetail()
+        }
+        this.refresherTriggered = false
+        this.loadStatus = 0
+      } catch (e) {
+        this.loadStatus = 2
+      }
+    },
 
-		// 触发下拉刷新
-		async refresherrefresh(e) {
-			this.refresherTriggered = true;
-			await this.refreshData();
-		},
+    // 触发下拉刷新
+    async refresherrefresh(e) {
+      this.refresherTriggered = true
+      await this.refreshData()
+    },
 
-		toLocation() {
+    toLocation() {
       this.$navToPage({
-        url:`/pages/mine/workOrder/map?location=${JSON.stringify(this.locationData)}`
-      });
-		},
-
-		// 预览图片
-		prevImg(urls, current) {
-			uni.previewImage({
-				current,
-				urls
-			})
-		},
+        url: `/pages/mine/workOrder/map?location=${JSON.stringify(this.locationData)}`
+      })
+    },
 
-	}
+    // 预览图片
+    prevImg(urls, current) {
+      uni.previewImage({
+        current,
+        urls
+      })
+    }
+  }
 }
- // #endif
- // #ifndef H5
- export default {
-   data() {
-     return {
-       pam: {},
-     }
-   },
-   onLoad(pam) {
-     this.pam = pam;
-   }
- }
- // #endif
 </script>
 
 <style lang="scss" scoped>

+ 210 - 183
src/packageWorkorder/pages/userWorkorderList.vue

@@ -3,61 +3,62 @@
     :isScroll="true"
     :refresherTriggered="refresherTriggered"
     @refresherrefresh="refresherrefresh"
-    @scrolltolower="scrolltolower">
+    @scrolltolower="scrolltolower"
+  >
     <template slot="header">
       <view class="tab-container">
-      	<u-tabs
-      		:scrollable="false"
-      		:list="tabList"
-      		:current="curTab"
-      		@click="changeTab"
-      		lineColor="#3D8FFD"
-      		:activeStyle="{
-      			color: '#3D8FFD'
-      		}"
-      		:inactiveStyle="{
-      			color: '#666666'
-      		}"
-      		itemStyle="height: 88rpx;">
-      	</u-tabs>
+        <u-tabs
+          :scrollable="false"
+          :list="tabList"
+          :current="curTab"
+          @click="changeTab"
+          lineColor="#3D8FFD"
+          :activeStyle="{
+            color: '#3D8FFD'
+          }"
+          :inactiveStyle="{
+            color: '#666666'
+          }"
+          itemStyle="height: 88rpx;"
+        >
+        </u-tabs>
       </view>
     </template>
 
     <view class="list-container">
       <view class="item" v-for="(item, index) in dataList" :key="index" @tap="toDetail(item)">
-
         <view class="top">
           <view class="orderid">
             <view class="row" v-if="item.saleOrderId">
-              <view class="ellipsis">订单号<text>{{item.saleOrderId}}</text></view>
+              <view class="ellipsis"
+                >订单号<text>{{ item.saleOrderId }}</text></view
+              >
               <view class="copy" @tap.stop="$copy(item.saleOrderId)">复制</view>
             </view>
             <view class="row">
-              <view class="ellipsis">工单号<text>{{item.id}}</text></view>
+              <view class="ellipsis"
+                >工单号<text>{{ item.id }}</text></view
+              >
               <view class="copy" @tap.stop="$copy(item.id)">复制</view>
             </view>
           </view>
-          <view class="right">{{getStatus(item)}}</view>
+          <view class="right">{{ getStatus(item) }}</view>
         </view>
 
-        <view
-          class="goods"
-          :class="'goods'+idx"
-          v-for="(it, idx) in item.pgOrderProducts"
-          :key="idx">
+        <view class="goods" :class="'goods' + idx" v-for="(it, idx) in item.pgOrderProducts" :key="idx">
           <image :src="it.imgUrl" mode="aspectFill"></image>
           <view class="main">
-            <view class="name ellipsis-2">{{it.smallName}}</view>
+            <view class="name ellipsis-2">{{ it.smallName }}</view>
             <!-- <view class="des">{{it.small_name}}</view> -->
             <view class="tags">
-              <view class="tag1" v-if="it.brandName">{{it.brandName}}</view>
-              <view class="tag2">{{it.mainName}}</view>
+              <view class="tag1" v-if="it.brandName">{{ it.brandName }}</view>
+              <view class="tag2">{{ it.mainName }}</view>
             </view>
           </view>
         </view>
         <view class="info" v-if="item.appointmentTime">
           <view class="label">预约时间</view>
-          <view class="value">{{item.appointmentTime.slice(0, 10)}}</view>
+          <view class="value">{{ item.appointmentTime.slice(0, 10) }}</view>
         </view>
 
         <!-- 按钮:待预约 -->
@@ -69,13 +70,19 @@
           <div class="button red" @tap.stop="toBook(item.id, 2)">改约</div>
         </view>
         <!-- 按钮:待评价 -->
-        <view class="btn-group" v-else-if="orderStatus_v(item.orderStatus) === 'YWG' || orderStatus_v(item.orderStatus) === 'YJS'">
+        <view
+          class="btn-group"
+          v-else-if="orderStatus_v(item.orderStatus) === 'YWG' || orderStatus_v(item.orderStatus) === 'YJS'"
+        >
           <!-- <div class="button gray" v-if="item.pay_confirm_path" @tap.stop="$navPage(`/pages/mine/workOrder/receipt?imgurl=${item.pay_confirm_path}`)">查看收据</div> -->
           <div class="button white" @tap.stop="toAppraise(item.id)" v-if="item.appraiseStatus == 'N'">评价</div>
           <div class="button gray">查看详情</div>
         </view>
         <!-- 按钮:已完成 -->
-        <view class="btn-group" v-else-if="orderStatus_v(item.orderStatus) === 'YWG' || orderStatus_v(item.orderStatus) === 'YJS'">
+        <view
+          class="btn-group"
+          v-else-if="orderStatus_v(item.orderStatus) === 'YWG' || orderStatus_v(item.orderStatus) === 'YJS'"
+        >
           <!-- <div class="button gray" v-if="item.pay_confirm_path" @tap.stop="$navPage(`/pages/mine/workOrder/receipt?imgurl=${item.pay_confirm_path}`)">查看收据</div> -->
           <div class="button white" @tap.stop="toAppraise(item.id)" v-if="item.appraiseStatus == 'N'">评价</div>
           <div class="button gray">查看详情</div>
@@ -84,196 +91,217 @@
       </view>
     </view>
 
-    <Loading
-    	:type="2"
-    	:loadStatus="loadStatus"
-    	:dataList="dataList"
-    />
+    <Loading :type="2" :loadStatus="loadStatus" :dataList="dataList" />
   </zj-page-layout>
 </template>
 
 <script>
-  export default {
-    data() {
-      return {
-        refresherTriggered: false,
-        dataList: [], // 订单列表
-        pageNum: 1,
-        loadStatus: 0,
-        tabList: [
-        	{key: '', name: '全部'},
-        	{key: 1, name: '待预约'},
-        	{key: 2, name: '服务中'},
-        	{key: 3, name: '待评价'},
-        	{key: 4, name: '已完成'},
-        ],
-        tabCurrent: '',
+export default {
+  data() {
+    return {
+      refresherTriggered: false,
+      dataList: [], // 订单列表
+      pageNum: 1,
+      loadStatus: 0,
+      tabList: [
+        { key: '', name: '全部' },
+        { key: 1, name: '待预约' },
+        { key: 2, name: '服务中' },
+        { key: 3, name: '待评价' },
+        { key: 4, name: '已完成' }
+      ],
+      tabCurrent: '',
 
-        pgIncreOrderId: '' ,//延保订单id
-        isWb: false,
-      }
-    },
-
-    computed:{
-    	curTab() {
-    		return this.tabList.map(item => item.key).indexOf(this.tabCurrent) || 0;
-    	}
-    },
+      pgIncreOrderId: '', //延保订单id
+      isWb: false
+    }
+  },
 
-    onLoad({tab, pgIncreOrderId, isWb}) {
-      this.tabCurrent = tab ? Number(tab) : '';
-      this.isWb = isWb == 1 ? true : false;
-      if(pgIncreOrderId){
-        this.pgIncreOrderId = pgIncreOrderId
-      }
-      this.refreshList();
+  computed: {
+    curTab() {
+      return this.tabList.map(item => item.key).indexOf(this.tabCurrent) || 0
+    }
+  },
 
-      this.crossPage.$on('refreshUserWorkorderList', data => {
-        this.refreshList();
-      })
-    },
+  onLoad({ tab, pgIncreOrderId, isWb }) {
+    this.tabCurrent = tab ? Number(tab) : ''
+    this.isWb = isWb == 1 ? true : false
+    if (pgIncreOrderId) {
+      this.pgIncreOrderId = pgIncreOrderId
+    }
+    this.refreshList()
 
-    onUnload() {
-      this.crossPage.$off('refreshUserWorkorderList');
-    },
+    this.crossPage.$on('refreshUserWorkorderList', data => {
+      this.refreshList()
+    })
+  },
 
-    methods: {
+  onUnload() {
+    this.crossPage.$off('refreshUserWorkorderList')
+  },
 
-      orderStatus_v(orderStatus){
-        if (["DYY"].includes(orderStatus)) {
-          // 待预约
-          return "DYY"
-        } else if (["DQD"].includes(orderStatus)) {
-          // 待抢单
-          return "DQD"
-        } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(orderStatus)) {
-          // 待商户派工
-          return "DSHPG"
-        } else if (["DWDPG", "DWDPD", "WDBH"].includes(orderStatus)) {
-          // 待网点派工
-          return "DWDPG"
-        } else if (["DJD", "DSM", "YZP"].includes(orderStatus)) {
-          // 待接单
-          return "DJD"
-        } else if (["FWZ", "GCSZT", "BFWG"].includes(orderStatus)) {
-          // 服务中
-          return "FWZ"
-        } else if (["YCD"].includes(orderStatus)) {
-          // 异常单
-          return "YCD"
-        } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(orderStatus)) {
-          // 已完工待结算
-          return "YWG"
-        } else if (["YJS", "LRCD"].includes(orderStatus)) {
-          // 已结算
-          return "YJS"
-        } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(orderStatus)) {
-          // 已取消
-          return "YQX"
-        }
-        return ""
-      },
+  methods: {
+    orderStatus_v(orderStatus) {
+      if (['DYY'].includes(orderStatus)) {
+        // 待预约
+        return 'DYY'
+      } else if (['DQD'].includes(orderStatus)) {
+        // 待抢单
+        return 'DQD'
+      } else if (
+        [
+          'DSHPG',
+          'CJ',
+          'YPD',
+          'DXSPD',
+          'DZBPG',
+          'DWDSPGP',
+          'DXSSPGP',
+          'DTJXSSPGP',
+          'DZBSPGP',
+          'DFZXPD',
+          'DFZXSPGP',
+          'FL'
+        ].includes(orderStatus)
+      ) {
+        // 待商户派工
+        return 'DSHPG'
+      } else if (['DWDPG', 'DWDPD'].includes(orderStatus)) {
+        // 待网点派工
+        return 'DWDPG'
+      } else if (['DJD'].includes(orderStatus)) {
+        // 待接单
+        return 'DJD'
+      } else if (
+        ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'].includes(orderStatus)
+      ) {
+        // 服务中
+        return 'FWZ'
+      } else if (['YCD'].includes(orderStatus)) {
+        // 异常单
+        return 'YCD'
+      } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus)) {
+        // 已完工待结算
+        return 'YWG'
+      } else if (['YJS', 'LRCD'].includes(orderStatus)) {
+        // 已结算
+        return 'YJS'
+      } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(orderStatus)) {
+        // 已取消
+        return 'YQX'
+      }
+      return ''
+    },
 
-      async getList() {
-        return new Promise((resolve, reject) => {
-          this.$api.post('/pg/order/base/list2', {
+    async getList() {
+      return new Promise((resolve, reject) => {
+        this.$api
+          .post('/pg/order/base/list2', {
             pageNum: this.pageNum,
             pageSize: 10,
             flag: this.tabCurrent,
             pgIncreOrderId: this.pgIncreOrderId || '',
             isWb: this.isWb
-          }).then(res => {
-          	this.loadStatus = 0;
-          	let list = res.data.records;
-          	if (list.length < 10) {
-          	  this.loadStatus = 2;
-          	}
-          	this.dataList = this.dataList.concat(list);
-          }).catch(() => {
-            this.loadStatus = 2;
-          }).finally(res => {
-            resolve(1);
           })
-        })
-      },
+          .then(res => {
+            this.loadStatus = 0
+            let list = res.data.records
+            if (list.length < 10) {
+              this.loadStatus = 2
+            }
+            this.dataList = this.dataList.concat(list)
+          })
+          .catch(() => {
+            this.loadStatus = 2
+          })
+          .finally(res => {
+            resolve(1)
+          })
+      })
+    },
 
-      async refreshList() {
-        this.dataList = [];
-        this.pageNum = 1;
-        await this.getList();
-      },
+    async refreshList() {
+      this.dataList = []
+      this.pageNum = 1
+      await this.getList()
+    },
 
-      // 下拉刷新
-      async refresherrefresh() {
-        this.refresherTriggered = true;
-        await this.refreshList();
-        this.refresherTriggered = false;
-      },
+    // 下拉刷新
+    async refresherrefresh() {
+      this.refresherTriggered = true
+      await this.refreshList()
+      this.refresherTriggered = false
+    },
 
-      // 触底加载
-      scrolltolower() {
-        if (this.loadStatus === 0) {
-        	this.pageNum++;
-        	this.getList();
-        }
-      },
+    // 触底加载
+    scrolltolower() {
+      if (this.loadStatus === 0) {
+        this.pageNum++
+        this.getList()
+      }
+    },
 
-      getStatus(item) {
-        if(this.orderStatus_v(item.orderStatus) == 'DYY') {
-          return '待预约'
-        }else if(this.orderStatus_v(item.orderStatus) == 'FWZ') {
-          return '服务中'
-        }else if((this.orderStatus_v(item.orderStatus) == 'YWG' || this.orderStatus_v(item.orderStatus) == 'YJS') && item.appraiseStatus == 'N') {
-          return '待评价'
-        }else if((this.orderStatus_v(item.orderStatus) == 'YWG' || this.orderStatus_v(item.orderStatus) == 'YJS') && item.appraiseStatus != 'N') {
-          return '已完成'
-        }
-      },
+    getStatus(item) {
+      if (this.orderStatus_v(item.orderStatus) == 'DYY') {
+        return '待预约'
+      } else if (this.orderStatus_v(item.orderStatus) == 'FWZ') {
+        return '服务中'
+      } else if (
+        (this.orderStatus_v(item.orderStatus) == 'YWG' || this.orderStatus_v(item.orderStatus) == 'YJS') &&
+        item.appraiseStatus == 'N'
+      ) {
+        return '待评价'
+      } else if (
+        (this.orderStatus_v(item.orderStatus) == 'YWG' || this.orderStatus_v(item.orderStatus) == 'YJS') &&
+        item.appraiseStatus != 'N'
+      ) {
+        return '已完成'
+      }
+    },
 
-      // 去评价
-      toAppraise(id) {
-        this.navToPage(`/packageWorkorder/pages/appraise?id=${id}`);
-      },
+    // 去评价
+    toAppraise(id) {
+      this.navToPage(`/packageWorkorder/pages/appraise?id=${id}`)
+    },
 
-      // 去预约改约
-      toBook(id, type) {
-        this.navToPage(`/packageWorkorder/pages/bookTime?id=${id}&type=${type}`);
-      },
+    // 去预约改约
+    toBook(id, type) {
+      this.navToPage(`/packageWorkorder/pages/bookTime?id=${id}&type=${type}`)
+    },
 
-      // 切换类型
-      changeTab(item) {
-      	this.tabCurrent = item.key;
-        this.refreshList();
-      },
+    // 切换类型
+    changeTab(item) {
+      this.tabCurrent = item.key
+      this.refreshList()
+    },
 
-      toDetail(item) {
-        this.navToPage(`/packageWorkorder/pages/userWorkorderDetail?id=${item.id}`);
-      },
+    toDetail(item) {
+      this.navToPage(`/packageWorkorder/pages/userWorkorderDetail?id=${item.id}`)
+    },
 
-      searchData() {
-        this.navToPage(`/packageWorkorder/pages/search?keyword=${this.keyword}`)
-      },
+    searchData() {
+      this.navToPage(`/packageWorkorder/pages/search?keyword=${this.keyword}`)
+    },
 
-      navToPage(url) {
-        this.$navToPage({
-          url
-        })
-      },
+    navToPage(url) {
+      this.$navToPage({
+        url
+      })
     }
-
   }
+}
 </script>
 
 <style lang="scss" scoped>
 .tab-container {
-  background: #FFFFFF;
+  background: #ffffff;
 }
 
 .list-container {
   padding: 1rpx 20rpx 40rpx;
   .item {
     margin-top: 20rpx;
-    background: #FFFFFF;
+    background: #ffffff;
     border-radius: 20rpx;
     padding: 0 20rpx;
     .top {
@@ -372,7 +400,6 @@
         width: 128rpx;
       }
       .value {
-
       }
       .iconfont {
         margin-left: 16rpx;
@@ -418,7 +445,7 @@
           border: 1px solid $theme-color;
         }
         &.red {
-          color: #FFFFFF;
+          color: #ffffff;
           border: 1px solid $theme-color;
           background: $theme-color;
         }