浏览代码

no message

linwenxin 5 月之前
父节点
当前提交
1b70c63bb9

+ 1 - 1
src/packageMine/pages/coreLssuedFile/detail.vue

@@ -88,7 +88,7 @@ export default {
       this.$api
         .get('/worker/comlist/record', {
           comListId: this.id,
-          workerNumber: (await getUserInfo()).workerNumber
+          workerNumber: (await getUserInfo())?.workerNumber
         })
         .then(({ data }) => {
           this.dataList = data

+ 1 - 1
src/packageMine/pages/coreLssuedFile/index.vue

@@ -75,7 +75,7 @@ export default {
           remark: this.remark,
           status: this.status,
           title: this.title,
-          workerNumber: (await getUserInfo()).workerNumber
+          workerNumber: (await getUserInfo())?.workerNumber
         })
         .then(res => {
           if (this.pageNum === 1) {

+ 11 - 11
src/packageMine/pages/repairSettle/detail.vue

@@ -106,9 +106,7 @@
 </template>
 
 <script>
-import {
-  getUserInfo,
-} from '@/common/utils/util'
+import { getUserInfo } from '@/common/utils/util'
 export default {
   filters: {
     statusFilter(val) {
@@ -149,14 +147,16 @@ export default {
         url = '/daily/mywallet/not/issue/list'
       }
 
-      this.$api.get(url,{
-        workerNumber:(await getUserInfo()).workerNumber,
-        salaryNo: this.salaryNo || '',
-        summaryBatchNo: this.summaryBatchNo || '',
-        id: this.id || ''
-      }).then(res => {
-        this.detailData = res.data[0]
-      })
+      this.$api
+        .get(url, {
+          workerNumber: (await getUserInfo())?.workerNumber,
+          salaryNo: this.salaryNo || '',
+          summaryBatchNo: this.summaryBatchNo || '',
+          id: this.id || ''
+        })
+        .then(res => {
+          this.detailData = res.data[0]
+        })
     },
 
     copy(val) {

+ 3 - 3
src/packageMine/pages/repairSettle/detailed.vue

@@ -83,7 +83,7 @@ export default {
       if (this.type == 1) {
         url = '/daily/mywallet/repair/detail'
         params = {
-          workerNumber: (await getUserInfo()).workerNumber,
+          workerNumber: (await getUserInfo())?.workerNumber,
           salaryNo: this.salaryNo || '',
           summaryBatchNo: this.summaryBatchNo || '',
           q: this.keyword
@@ -91,7 +91,7 @@ export default {
       } else if (this.type == 2) {
         url = '/daily/mywallet/repair/month/detail'
         params = {
-          workerNumber: (await getUserInfo()).workerNumber,
+          workerNumber: (await getUserInfo())?.workerNumber,
           salaryNo: this.salaryNo || '',
           summaryBatchNo: this.summaryBatchNo || '',
           q: this.keyword
@@ -99,7 +99,7 @@ export default {
       } else {
         url = '/daily/mywallet/not/issue/list'
         params = {
-          workerNumber: (await getUserInfo()).workerNumber,
+          workerNumber: (await getUserInfo())?.workerNumber,
           salaryNo: this.salaryNo || '',
           summaryBatchNo: this.summaryBatchNo || '',
           q: this.keyword,

+ 1 - 1
src/packageMine/pages/repairSettle/list.vue

@@ -170,7 +170,7 @@ export default {
     async getList() {
       this.$api
         .get(this.currentTab === 1 ? '/daily/mywallet/issue/list' : '/daily/mywallet/issue/monthlist', {
-          workerNumber: (await getUserInfo()).workerNumber,
+          workerNumber: (await getUserInfo())?.workerNumber,
           date: this.currentDate == '请选择日期' ? '' : this.currentDate,
           install: false
         })

+ 5 - 66
src/pages/index/index.vue

@@ -187,20 +187,7 @@
             <view class="left">工单管理</view>
           </view>
           <view class="list">
-            <view
-              class="item"
-              v-for="(item, index) in orderList"
-              :key="index"
-              @tap="
-                toPage(
-                  !userInfo.mobile
-                    ? '/packageMine/pages/phone'
-                    : !userInfo.workerNumber
-                    ? '/packageMine/pages/myWebsit'
-                    : item.url
-                )
-              "
-            >
+            <view class="item" v-for="(item, index) in orderList" :key="index" @tap="toPage(item.url)">
               <image :src="require(`@/static/images/home/order-icon${item.code}.png`)" mode=""></image>
               <text>{{ item.title }}</text>
             </view>
@@ -211,37 +198,13 @@
         <view class="other-container card">
           <view class="home-title">
             <view class="left">辅材</view>
-            <view
-              class="right"
-              @tap="
-                toPage(
-                  !userInfo.mobile
-                    ? '/packageMine/pages/phone'
-                    : !userInfo.workerNumber
-                    ? '/packageMine/pages/myWebsit'
-                    : `/packageMaterial/pages/index?type=M`
-                )
-              "
-            >
+            <view class="right" @tap="toPage(`/packageMaterial/pages/index?type=M`)">
               <text class="text">查看详细</text>
               <text class="iconfont icon-jinru"></text>
             </view>
           </view>
           <view class="list">
-            <view
-              class="item"
-              v-for="(item, index) in otherList"
-              :key="index"
-              @tap="
-                toPage(
-                  !userInfo.mobile
-                    ? '/packageMine/pages/phone'
-                    : !userInfo.workerNumber
-                    ? '/packageMine/pages/myWebsit'
-                    : item.url
-                )
-              "
-            >
+            <view class="item" v-for="(item, index) in otherList" :key="index" @tap="toPage(item.url)">
               <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
               <text>{{ item.title }}</text>
             </view>
@@ -251,37 +214,13 @@
         <view class="other-container card">
           <view class="home-title">
             <view class="left">配件</view>
-            <view
-              class="right"
-              @tap="
-                toPage(
-                  !userInfo.mobile
-                    ? '/packageMine/pages/phone'
-                    : !userInfo.workerNumber
-                    ? '/packageMine/pages/myWebsit'
-                    : `/packageMaterial/pages/index?type=P`
-                )
-              "
-            >
+            <view class="right" @tap="toPage(`/packageMaterial/pages/index?type=P`)">
               <text class="text">查看详细</text>
               <text class="iconfont icon-jinru"></text>
             </view>
           </view>
           <view class="list">
-            <view
-              class="item"
-              v-for="(item, index) in otherList2"
-              :key="index"
-              @tap="
-                toPage(
-                  !userInfo.mobile
-                    ? '/packageMine/pages/phone'
-                    : !userInfo.workerNumber
-                    ? '/packageMine/pages/myWebsit'
-                    : item.url
-                )
-              "
-            >
+            <view class="item" v-for="(item, index) in otherList2" :key="index" @tap="toPage(item.url)">
               <image :src="require(`@/static/images/home/other-icon${item.code}.png`)" mode=""></image>
               <text>{{ item.title }}</text>
             </view>