Browse Source

no message

linwenxin 5 tháng trước cách đây
mục cha
commit
9ddb135c6e
1 tập tin đã thay đổi với 110 bổ sung101 xóa
  1. 110 101
      src/packageWorkorder/pages/search.vue

+ 110 - 101
src/packageWorkorder/pages/search.vue

@@ -1,5 +1,4 @@
 <template>
-  <!-- #ifdef H5 -->
   <zj-page-layout
     :isScroll="true"
     :refresherTriggered="refresherTriggered"
@@ -266,35 +265,26 @@
 
     <Loading :loadStatus="loadStatus" :dataList="dataList" />
   </zj-page-layout>
-  <!-- #endif -->
-
-  <!-- #ifndef H5 -->
-  <web-view
-    :src="webViewHref(`/packageWorkorder/pages/search`, pam, crossPagePam)"
-    @message="crossPage.$listener"
-  ></web-view>
-  <!-- #endif -->
 </template>
 
 <script>
-// #ifdef H5
 export default {
   data() {
     return {
       keyword: '',
-		dataList: [],
-		pageNum: 1,
-		loadStatus: 0,
-      refresherTriggered: false,
+      dataList: [],
+      pageNum: 1,
+      loadStatus: 0,
+      refresherTriggered: false
     }
   },
 
-  onLoad({keyword}) {
-    this.keyword = keyword;
-    if(keyword) {
-      this.getList();
+  onLoad({ keyword }) {
+    this.keyword = keyword
+    if (keyword) {
+      this.getList()
     }
-	// this.getList();
+    // this.getList();
   },
 
   computed: {
@@ -304,84 +294,109 @@ export default {
   },
 
   methods: {
-
-    orderStatus_v(orderStatus){
-      if (["DYY"].includes(orderStatus)) {
+    orderStatus_v(orderStatus, item) {
+      if (item?.isImportExcel && item?.isMeet === false) {
+        return 'DJD'
+      }
+      if (['DYY'].includes(orderStatus)) {
         // 待预约
-        return "DYY"
-      } else if (["DQD"].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 '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 'DSHPG'
+      } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
         // 待网点派工
-        return "DWDPG"
-      } else if (["DJD", "DSM", "YZP"].includes(orderStatus)) {
+        return 'DWDPG'
+      } else if (['DJD', 'DSM', 'YZP'].includes(orderStatus)) {
         // 待接单
-        return "DJD"
-      } else if (["FWZ", "GCSZT", "BFWG"].includes(orderStatus)) {
+        return 'DJD'
+      } else if (['FWZ', 'GCSZT', 'BFWG'].includes(orderStatus)) {
         // 服务中
-        return "FWZ"
-      } else if (["YCD"].includes(orderStatus)) {
+        return 'FWZ'
+      } else if (['YCD'].includes(orderStatus)) {
         // 异常单
-        return "YCD"
-      } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(orderStatus)) {
+        return 'YCD'
+      } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus)) {
         // 已完工待结算
-        return "YWG"
-      } else if (["YJS", "LRCD"].includes(orderStatus)) {
+        return 'YWG'
+      } else if (['YJS', 'LRCD'].includes(orderStatus)) {
         // 已结算
-        return "YJS"
-      } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(orderStatus)) {
+        return 'YJS'
+      } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(orderStatus)) {
         // 已取消
-        return "YQX"
+        return 'YQX'
       }
-      return ""
+      return ''
     },
 
     getList() {
-    	this.loadStatus = 1;
-    	this.$api.post('/pg/order/base/list', {
-        pageNum: this.pageNum,
-        pageSize: 5,
-        keyword: this.keyword,
-    	}).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 => {
-    		this.refresherTriggered = false;
-    	})
+      this.loadStatus = 1
+      this.$api
+        .post('/pg/order/base/list', {
+          pageNum: this.pageNum,
+          pageSize: 5,
+          keyword: this.keyword
+        })
+        .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 => {
+          this.refresherTriggered = false
+        })
     },
 
     searchSubmit() {
-      this.refreshList();
+      this.refreshList()
     },
 
     refreshList() {
-    	this.dataList = [];
-    	this.pageNum = 1;
-    	this.getList();
+      this.dataList = []
+      this.pageNum = 1
+      this.getList()
     },
 
     // 滚动到底部
     scrolltolower(e) {
-    	if (this.loadStatus === 0) {
-    		this.pageNum++;
-    		this.getList();
-    	}
+      if (this.loadStatus === 0) {
+        this.pageNum++
+        this.getList()
+      }
     },
 
     // 触发下拉刷新
     refresherrefresh(e) {
-    	this.refresherTriggered = true;
-    	this.refreshList();
+      this.refresherTriggered = true
+      this.refreshList()
     },
 
     // 加急
@@ -389,16 +404,20 @@ export default {
       this.$modal({
         title: '加急操作',
         content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
-      }).then(() => {
-        this.$api.post('/pg/order/base/flag', {
-          orderBaseId: id,
-          orderFlagEnum: 'JIA_JI',
-          flag: flag,
-        }).then(res => {
-          this.$successToast();
-          this.refreshList();
+      })
+        .then(() => {
+          this.$api
+            .post('/pg/order/base/flag', {
+              orderBaseId: id,
+              orderFlagEnum: 'JIA_JI',
+              flag: flag
+            })
+            .then(res => {
+              this.$successToast()
+              this.refreshList()
+            })
         })
-      }).catch(() => {})
+        .catch(() => {})
     },
 
     // 接单
@@ -406,23 +425,27 @@ export default {
       this.$modal({
         title: '接单确认',
         content: '确认接单?'
-      }).then(() => {
-        this.$api.post('/pg/order/base/rece', {
-          orderBaseId: id,
-        }).then(res => {
-          this.$successToast();
-          this.refreshList();
+      })
+        .then(() => {
+          this.$api
+            .post('/pg/order/base/rece', {
+              orderBaseId: id
+            })
+            .then(res => {
+              this.$successToast()
+              this.refreshList()
+            })
         })
-      }).catch(() => {})
+        .catch(() => {})
     },
 
     // 去收费
     toCharge(id, type) {
-      if (type=="M") {
+      if (type == 'M') {
         this.$navToPage({
           url: `/packageMaterial/pages/sale/index?type=${type}`
         })
-      } else if (type=="P"){
+      } else if (type == 'P') {
         this.$navToPage({
           url: `/packageMaterial/pages/newSale/index?type=${type}`
         })
@@ -440,23 +463,9 @@ export default {
       this.$navToPage({
         url: `/packageWorkorder/pages/orderDetail?id=${id}`
       })
-    },
-  },
-}
-
-// #endif
-// #ifndef H5
-export default {
-  data() {
-    return {
-      pam: {},
     }
-  },
-  onLoad(pam) {
-    this.pam = pam;
   }
 }
-// #endif
 </script>
 
 <style lang="scss" scoped>