linwenxin vor 1 Jahr
Ursprung
Commit
ea880960a5

+ 5 - 0
src/views/workOrder/workOrderPool/components/reassignment/index.vue

@@ -54,6 +54,11 @@ export default {
           isShow: true,
           isRules: [...required]
         },
+        isQd: {
+          isEdit: false,
+          isShow: false,
+          isRules: []
+        },
         workerId: {
           isEdit: true,
           isShow: true,

+ 23 - 0
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/pandanxinxi.js

@@ -101,6 +101,29 @@ export default {
           }
         },
         {
+          isShow: this.formOptions.isQd.isShow,
+          name: 'el-switch',
+          md: 8,
+          attributes: {
+            disabled: !this.formOptions.isQd.isEdit,
+          },
+          formItemAttributes: {
+            label: '是否抢单',
+            prop: 'isQd',
+            rules: this.formOptions.isQd.isRules,
+          }
+        },
+        {
+          isShow: this.formOptions.isQd.isShow,
+          name: 'slot-component',
+          md: 8,
+          formItemAttributes: { label: '', prop: '' },
+          render: (h, { props }) => {
+            return null
+          }
+        },
+        {
+          isShow: !this.formOptions.isQd.isShow,
           name: 'slot-component',
           md: 16,
           formItemAttributes: { label: '', prop: '' },

+ 11 - 5
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js

@@ -47,6 +47,8 @@ var initdata_ = {
   // 派单信息-----------------------------
   // 服务商网点
   websitId: "",
+  // 是否抢单
+  isQd: false,
   // 主要工程师id
   workerId: "",
   // 工程师列表
@@ -262,14 +264,19 @@ export default {
           isShow: true,
           isRules: [...required]
         },
-        workerId: {
-          isEdit: !finish,
+        isQd: {
+          isEdit: !!~['DSHPG', 'DWDPG', undefined].indexOf(this.orderInfo.orderStatus),
           isShow: true,
+          isRules: [...required]
+        },
+        workerId: {
+          isEdit: !finish && !this.orderInfo.isQd,
+          isShow: !this.orderInfo.isQd,
           isRules: this.userInfo.type != 1 ? [...required] : []
         },
         orderWorkers: {
-          isEdit: !finish,
-          isShow: true,
+          isEdit: !finish && !this.orderInfo.isQd,
+          isShow: !this.orderInfo.isQd,
           isRules: this.userInfo.type != 1 ? [...required] : []
         },
       }
@@ -302,7 +309,6 @@ export default {
             cb && cb(this.orderInfo)
           })
       } if(this.cloneWorkOrder){
-       
         // 创建工单
         this.orderInfo = Object.assign({}, JSON.parse(JSON.stringify(this.cloneWorkOrder)), {
           saleType: this?.workOrderType,