Browse Source

no message

linwenxin 6 months ago
parent
commit
9c289028da
1 changed files with 40 additions and 1 deletions
  1. 40 1
      src/packageWorkorder/pages/search.vue

+ 40 - 1
src/packageWorkorder/pages/search.vue

@@ -144,21 +144,43 @@
     </view>
 
     <Loading :loadStatus="loadStatus" :dataList="dataList" />
+    <selectionWorkers
+      v-if="item"
+      :title="title"
+      :detail="item"
+      :type="selectionWorkersType"
+      :callback="callback"
+      @close="
+        () => {
+          item = null
+          selectionWorkersType = null
+          callback = null
+        }
+      "
+    />
   </zj-page-layout>
 </template>
 
 <script>
 import orderBtnsShow from './mixins/orderBtnsShow.js'
 import { getStorage } from '@/common/utils/storage.js'
+import selectionWorkers from '@/components/selectionWorkers.vue'
 export default {
   mixins: [orderBtnsShow],
+  components: {
+    selectionWorkers
+  },
   data() {
     return {
       keyword: '',
       dataList: [],
       pageNum: 1,
       loadStatus: 0,
-      refresherTriggered: false
+      refresherTriggered: false,
+      selectionWorkersType: '',
+      item: null,
+      callback: null,
+      title: ''
     }
   },
 
@@ -177,6 +199,23 @@ export default {
   },
 
   methods: {
+    // 变更小工
+    biangengxiaogong(item) {
+      this.title = '更换小工'
+      this.selectionWorkersType = 3
+      this.item = { ...item }
+      this.callback = () => {
+        this.$successToast()
+        this.refreshList()
+        this.toDetail(item.id)
+        this.$nextTick(() => {
+          this.item = null
+          this.selectionWorkersType = null
+          this.callback = null
+          this.title = null
+        })
+      }
+    },
     orderStatus_v(orderStatus, item) {
       if (item?.isImportExcel && item?.isMeet === false) {
         return 'DJD'