소스 검색

no message

linwenxin 5 달 전
부모
커밋
a4cca34156
2개의 변경된 파일25개의 추가작업 그리고 3개의 파일을 삭제
  1. 11 1
      src/packageWorkorder/pages/orderDetail.vue
  2. 14 2
      src/packageWorkorder/pages/orderList.vue

+ 11 - 1
src/packageWorkorder/pages/orderDetail.vue

@@ -631,7 +631,13 @@
             </block>
             <!-- 服务中 -->
             <block v-if="orderStatus_v == 'FWZ' || orderStatus_v == 'YCD'">
-              <u-button plain type="primary" text="变更小工" @tap="biangengxiaogong()"></u-button>
+              <u-button
+                v-if="userInfo.workerNumber == detail.workerNumber"
+                plain
+                type="primary"
+                text="变更小工"
+                @tap="biangengxiaogong()"
+              ></u-button>
               <u-button
                 plain
                 type="primary"
@@ -694,6 +700,7 @@ import Logistics from '@/components/logistics2/common-logistics.vue'
 import selectionWorkers from '@/components/selectionWorkers.vue'
 import zhifutanchuan from '@/components/zhifutanchuan.vue'
 import { wxScanCode } from '@/common/utils/util.js'
+import { getStorage } from '@/common/utils/storage.js'
 export default {
   components: {
     zjDialogPicker,
@@ -759,6 +766,9 @@ export default {
   },
 
   computed: {
+    userInfo() {
+      return getStorage('user')
+    },
     orderStatus_v() {
       if (['DYY'].includes(this?.detail?.orderStatus)) {
         // 待预约

+ 14 - 2
src/packageWorkorder/pages/orderList.vue

@@ -152,7 +152,13 @@
               </block>
               <!-- 服务中 -->
               <block v-if="orderStatus_v(item.orderStatus) == 'FWZ' || orderStatus_v(item.orderStatus) == 'YCD'">
-                <u-button plain type="primary" text="变更小工" @tap="biangengxiaogong(item)"></u-button>
+                <u-button
+                  v-if="userInfo.workerNumber == item.workerNumber"
+                  plain
+                  type="primary"
+                  text="变更小工"
+                  @tap="biangengxiaogong(item)"
+                ></u-button>
                 <u-button
                   plain
                   type="primary"
@@ -216,7 +222,7 @@
 <script>
 import zjDialogDateRangePicker from '@/components/zj-dialog/zj-dialog-dateRangePicker.vue'
 import selectionWorkers from '@/components/selectionWorkers.vue'
-
+import { getStorage } from '@/common/utils/storage.js'
 export default {
   components: {
     selectionWorkers,
@@ -295,6 +301,12 @@ export default {
     this.crossPage.$off('refreshWorkorderList')
   },
 
+  computed: {
+    userInfo() {
+      return getStorage('user')
+    }
+  },
+
   methods: {
     isToday(dateString) {
       const inputDate = new Date(dateString)