瀏覽代碼

no message

linwenxin 8 月之前
父節點
當前提交
afb107282f
共有 1 個文件被更改,包括 72 次插入33 次删除
  1. 72 33
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js

+ 72 - 33
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js

@@ -5,7 +5,8 @@ export default {
   data() {
     return {
       orderSmallTypeData: [],
-      orderChannels: []
+      orderChannels: [],
+      WORKER_ORDER_SOURCE: []
     }
   },
   computed: {
@@ -117,12 +118,12 @@ export default {
           name: 'el-date-picker',
           md: 6,
           attributes: {
-            "picker-options": "pickerOptions11",
-            "popper-class": "custom-popper11",
+            'picker-options': 'pickerOptions11',
+            'popper-class': 'custom-popper11',
             'append-to-body': true,
             disabled: !this.formOptions.appointmentTime.isEdit,
             style: { width: '100%' },
-            type: "datetime",
+            type: 'datetime',
             placeholder: '请选择',
             'value-format': 'yyyy-MM-dd HH:mm:ss',
             'picker-options': {
@@ -132,12 +133,12 @@ export default {
             }
           },
           events: {
-            change: (value) => {
-              if (value && new Date(value).getTime() < (new Date().getTime() - 2000)) {
-                this.orderInfo.appointmentTime = ""
+            change: value => {
+              if (value && new Date(value).getTime() < new Date().getTime() - 2000) {
+                this.orderInfo.appointmentTime = ''
                 this.$message.warning('必须大于当前时间')
               } else {
-                this.orderInfo.appointmentEndTime = ""
+                this.orderInfo.appointmentEndTime = ''
               }
             }
           },
@@ -152,25 +153,28 @@ export default {
           name: 'el-date-picker',
           md: 6,
           attributes: {
-            "picker-options": "pickerOptions11",
-            "popper-class": "custom-popper11",
+            'picker-options': 'pickerOptions11',
+            'popper-class': 'custom-popper11',
             'append-to-body': true,
             disabled: !this.formOptions.appointmentTime.isEdit,
             style: { width: '100%' },
-            type: "datetime",
+            type: 'datetime',
             placeholder: '请选择',
             'value-format': 'yyyy-MM-dd HH:mm:ss',
             'picker-options': {
               disabledDate: time => {
-                var data = this.orderInfo?.appointmentTime?.split(" ")?.[0]
-                return time.getTime() < new Date(data ? `${data} 00:00:00` : "").getTime() || time.getTime() > new Date(data ? `${data} 23:59:59` : "").getTime()
-              },
+                var data = this.orderInfo?.appointmentTime?.split(' ')?.[0]
+                return (
+                  time.getTime() < new Date(data ? `${data} 00:00:00` : '').getTime() ||
+                  time.getTime() > new Date(data ? `${data} 23:59:59` : '').getTime()
+                )
+              }
             }
           },
           events: {
-            change: (value) => {
-              if (value && new Date(value).getTime() < (new Date().getTime() - 2000)) {
-                this.orderInfo.appointmentEndTime = ""
+            change: value => {
+              if (value && new Date(value).getTime() < new Date().getTime() - 2000) {
+                this.orderInfo.appointmentEndTime = ''
                 this.$message.warning('必须大于当前时间')
               } else if (value && new Date(value).getTime() < new Date(this.orderInfo?.appointmentTime).getTime()) {
                 this.orderInfo.appointmentTime = value
@@ -245,13 +249,17 @@ export default {
             rules: this.formOptions.saleCompany.isRules
           }
         },
+
         {
           isShow: this.formOptions.source.isShow,
-          name: 'el-input',
+          name: 'el-select',
           md: 6,
+          options: this.WORKER_ORDER_SOURCE,
           attributes: {
             disabled: !this.formOptions.source.isEdit,
-            placeholder: '请输入'
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
           },
           formItemAttributes: {
             label: '工单来源',
@@ -259,6 +267,21 @@ export default {
             rules: this.formOptions.source.isRules
           }
         },
+
+        // {
+        //   isShow: this.formOptions.source.isShow,
+        //   name: 'el-input',
+        //   md: 6,
+        //   attributes: {
+        //     disabled: !this.formOptions.source.isEdit,
+        //     placeholder: '请输入'
+        //   },
+        //   formItemAttributes: {
+        //     label: '工单来源',
+        //     prop: 'source',
+        //     rules: this.formOptions.source.isRules
+        //   }
+        // },
         {
           isShow: this.formOptions.salesPlatform.isShow,
           name: 'el-input',
@@ -306,9 +329,9 @@ export default {
           name: 'el-select',
           md: 6,
           options: [
-            { value: "一般", label: "一般" },
-            { value: "急", label: "急" },
-            { value: "紧急", label: "紧急" }
+            { value: '一般', label: '一般' },
+            { value: '急', label: '急' },
+            { value: '紧急', label: '紧急' }
           ],
           attributes: {
             clearable: true,
@@ -327,10 +350,10 @@ export default {
           name: 'el-select',
           md: 6,
           options: [
-            { value: "特级", label: "特级" },
-            { value: "一级", label: "一级" },
-            { value: "二级", label: "二级" },
-            { value: "三级", label: "三级" }
+            { value: '特级', label: '特级' },
+            { value: '一级', label: '一级' },
+            { value: '二级', label: '二级' },
+            { value: '三级', label: '三级' }
           ],
           attributes: {
             clearable: true,
@@ -349,11 +372,11 @@ export default {
           name: 'el-select',
           md: 6,
           options: [
-            { value: "满意(默认)", label: "满意(默认)" },
-            { value: "好评", label: "好评" },
-            { value: "满意", label: "满意" },
-            { value: "中评", label: "中评" },
-            { value: "差评", label: "差评" }
+            { value: '满意(默认)', label: '满意(默认)' },
+            { value: '好评', label: '好评' },
+            { value: '满意', label: '满意' },
+            { value: '中评', label: '中评' },
+            { value: '差评', label: '差评' }
           ],
           attributes: {
             clearable: true,
@@ -408,7 +431,7 @@ export default {
             prop: 'reqText',
             rules: this.formOptions.reqText.isRules
           }
-        },
+        }
       ]
     }
   },
@@ -425,7 +448,8 @@ export default {
         }
       )
     }
-    // 获取工单来源
+
+    // 获取工单渠道
     getDataDictionary({
       pageNum: 1,
       pageSize: -1,
@@ -439,5 +463,20 @@ export default {
         label: item.dictValue
       }))
     })
+
+    // 获取工单来源
+    getDataDictionary({
+      pageNum: 1,
+      pageSize: -1,
+      params: [
+        { param: 'a.status', compare: '=', value: 'ON' },
+        { param: 'a.dict_type', compare: '=', value: 'WORKER_ORDER_SOURCE' }
+      ]
+    }).then(res => {
+      this.WORKER_ORDER_SOURCE = res.data.records.map(item => ({
+        value: item.dictValue,
+        label: item.dictValue
+      }))
+    })
   }
 }