Parcourir la Source

fix:修复工单手机验证逻辑

scholar-wei il y a 3 ans
Parent
commit
760ea46250

+ 118 - 118
CallCenterWeb.UI/RMYY/src/views/callScreen/components/addressNumber.vue

@@ -2,7 +2,7 @@
2 2
   <el-row class="rows" style="padding: 8px 0 !important;background-color: #404040;border-radius: 8px; ">
3 3
     <el-col :span="6">
4 4
       <div class="topbox" style="">
5
-        <img style="width: 100px;height: 100px;" :src="circleUrl"></img>
5
+        <img :src="circleUrl" style="width: 100px;height: 100px;"></img>
6 6
       </div>
7 7
     </el-col>
8 8
     <el-col :span="7">
@@ -28,7 +28,7 @@
28 28
     </el-col>
29 29
     <el-col :span="8">
30 30
       <p class="callin_con" style="text-align: right;cursor: pointer;">
31
-        <i class="el-icon-circle-plus" style="color: red;font-size: 18px;" @click="btn_addBlack"></i>
31
+        <i class="el-icon-circle-plus" style="color: red;font-size: 18px;" @click="btn_addBlack"/>
32 32
         <span class="callin_num" style="color: red;font-size: 17px;" @click="btn_addBlack">加入黑名单</span>
33 33
       </p>
34 34
     </el-col>
@@ -36,135 +36,135 @@
36 36
 </template>
37 37
 
38 38
 <script>
39
-  import {
40
-    mapGetters
41
-  } from 'vuex'
42
-
43
-  import {
44
-    getPhoneLocation
45
-  } from '@/api/teloperation'
46
-  import {
47
-    cancelBlack
48
-  } from '@/api/callScreen/callScreen'
49
-
50
-  import addOrEditBlackList from '@/views/telCall/blackList/addOrEditBlackList'
51
-
52
-  export default {
53
-
54
-    name: 'AddressNumber',
55
-    props: {
56
-      callinNum: {
57
-        type: String,
58
-        default: ''
59
-      },
60
-      cusInfo: {
61
-        type: Object,
62
-        default () {
63
-          return {}
64
-        }
65
-      }
39
+import {
40
+  mapGetters
41
+} from 'vuex'
42
+
43
+import {
44
+  getPhoneLocation
45
+} from '@/api/teloperation'
46
+import {
47
+  cancelBlack
48
+} from '@/api/callScreen/callScreen'
49
+
50
+import addOrEditBlackList from '@/views/telCall/blackList/addOrEditBlackList'
51
+
52
+export default {
53
+
54
+  name: 'AddressNumber',
55
+  props: {
56
+    callinNum: {
57
+      type: String,
58
+      default: ''
66 59
     },
67
-    data() {
68
-      return {
69
-        circleUrl: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
70
-        phoneData: '', // 归属地
71
-        callinTime: '00:00:00', // 通话时长
72
-        isBlack: false, // 是否加入黑名单
73
-        dropoff: false, // 是否挂断
74
-        telTimer: null // 时间定时器
60
+    cusInfo: {
61
+      type: Object,
62
+      default() {
63
+        return {}
75 64
       }
76
-    },
77
-    computed: {
78
-      ...mapGetters([
79
-        'telCallNum', // 顶部显示号码
80
-        'telCallTime',
81
-        'telLineState'
82
-      ])
83
-    },
84
-    watch: {
85
-      telLineState: function(newT, oldT) {
86
-        this.watchTelLineState(newT, oldT)
65
+    }
66
+  },
67
+  data() {
68
+    return {
69
+      circleUrl: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
70
+      phoneData: '', // 归属地
71
+      callinTime: '00:00:00', // 通话时长
72
+      isBlack: false, // 是否加入黑名单
73
+      dropoff: false, // 是否挂断
74
+      telTimer: null // 时间定时器
75
+    }
76
+  },
77
+  computed: {
78
+    ...mapGetters([
79
+      'telCallNum', // 顶部显示号码
80
+      'telCallTime',
81
+      'telLineState'
82
+    ])
83
+  },
84
+  watch: {
85
+    telLineState: function(newT, oldT) {
86
+      this.watchTelLineState(newT, oldT)
87
+    }
88
+  },
89
+  created() {
90
+    if (this.callinNum) {
91
+      this.calladdress()
92
+    }
93
+  },
94
+  methods: {
95
+    // 通话时间
96
+    callTimeFun() {
97
+      // 通话时间重置为00:00:00
98
+      // 时间 计时
99
+      let _n = 0
100
+      if (this.telTimer) {
101
+        clearInterval(this.telTimer)
87 102
       }
103
+      this.telTimer = setInterval(() => {
104
+        _n++
105
+        this.callTime = {
106
+          hh: this.toDub(parseInt((_n / 60 / 60) % 60)), // 小时
107
+          mm: this.toDub(parseInt((_n / 60) % 60)), // 分钟
108
+          ss: this.toDub(parseInt(_n % 60)) // 秒
109
+        }
110
+      }, 1000)
88 111
     },
89
-    created() {
90
-      if (this.callinNum) {
91
-        this.calladdress()
112
+    toDub(i) {
113
+      return i < 10 ? '0' + i : '' + i
114
+    },
115
+    // 加入黑名单
116
+    btn_addBlack() {
117
+      if (this.callinNum.length > 4) {
118
+        this.$layer.iframe({
119
+          content: {
120
+            content: addOrEditBlackList, // 传递的组件对象
121
+            parent: this, // 当前的vue对象
122
+            data: {
123
+              callinNum: this.callinNum
124
+            } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
125
+          },
126
+          area: ['40%', '300px'],
127
+          title: '加入黑名单'
128
+        })
129
+      } else {
130
+        this.$message.error('号码格式不对')
92 131
       }
93 132
     },
94
-    methods: {
95
-      // 通话时间
96
-      callTimeFun() {
97
-        // 通话时间重置为00:00:00
98
-        // 时间 计时
99
-        let _n = 0
100
-        if (this.telTimer) {
101
-          clearInterval(this.telTimer)
133
+    // 取消加入黑名单
134
+    btn_cancelBlack() {
135
+      cancelBlack(this.callinNum).then((response) => {
136
+        if (response.state.toLowerCase() === 'success') {
137
+          this.isBlack = !this.isBlack
138
+          this.$message.success('恭喜你,取消拉黑成功!')
102 139
         }
103
-        this.telTimer = setInterval(() => {
104
-          _n++
105
-          this.callTime = {
106
-            hh: this.toDub(parseInt((_n / 60 / 60) % 60)), // 小时
107
-            mm: this.toDub(parseInt((_n / 60) % 60)), // 分钟
108
-            ss: this.toDub(parseInt(_n % 60)) // 秒
140
+      })
141
+    },
142
+    calladdress() {
143
+      getPhoneLocation(this.callinNum).then((response) => {
144
+        if (response.state.toLowerCase() === 'success') {
145
+          if (response.data) {
146
+            this.phoneData = response.data
109 147
           }
110
-        }, 1000)
111
-      },
112
-      toDub(i) {
113
-        return i < 10 ? '0' + i : '' + i
114
-      },
115
-      // 加入黑名单
116
-      btn_addBlack() {
117
-        if (this.callinNum.length > 4) {
118
-          this.$layer.iframe({
119
-            content: {
120
-              content: addOrEditBlackList, // 传递的组件对象
121
-              parent: this, // 当前的vue对象
122
-              data: {
123
-                callinNum: this.callinNum
124
-              } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
125
-            },
126
-            area: ['40%', '300px'],
127
-            title: '加入黑名单'
128
-          })
129
-        } else {
130
-          this.$message.error('号码格式不对')
131 148
         }
132
-      },
133
-      // 取消加入黑名单
134
-      btn_cancelBlack() {
135
-        cancelBlack(this.callinNum).then((response) => {
136
-          if (response.state.toLowerCase() === 'success') {
137
-            this.isBlack = !this.isBlack
138
-            this.$message.success('恭喜你,取消拉黑成功!')
139
-          }
140
-        })
141
-      },
142
-      calladdress() {
143
-        getPhoneLocation(this.callinNum).then((response) => {
144
-          if (response.state.toLowerCase() === 'success') {
145
-            if (response.data) {
146
-              this.phoneData = response.data
147
-            }
148
-          }
149
-        })
150
-      },
151
-      // 清除定时器
152
-      clearInter() {
153
-        clearInterval(this.telTimer)
154
-      },
155
-      // 监听 线路状态
156
-      watchTelLineState(newT, oldT) {
157
-        if (newT === 1) {
158
-          if (this.telTimer) {
159
-            clearInterval(this.telTimer)
160
-            this.telTimer = null
161
-          }
162
-          this.dropoff = true // 是否挂断
163
-          this.callinTime = `${this.telCallTime.hh}:${this.telCallTime.mm}:${this.telCallTime.ss}`
149
+      })
150
+    },
151
+    // 清除定时器
152
+    clearInter() {
153
+      clearInterval(this.telTimer)
154
+    },
155
+    // 监听 线路状态
156
+    watchTelLineState(newT, oldT) {
157
+      if (newT === 1) {
158
+        if (this.telTimer) {
159
+          clearInterval(this.telTimer)
160
+          this.telTimer = null
164 161
         }
162
+        this.dropoff = true // 是否挂断
163
+        this.callinTime = `${this.telCallTime.hh}:${this.telCallTime.mm}:${this.telCallTime.ss}`
165 164
       }
166 165
     }
167 166
   }
167
+}
168 168
 </script>
169 169
 
170 170
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 133 - 133
CallCenterWeb.UI/RMYY/src/views/callScreen/components/callScreen.vue

@@ -26,7 +26,7 @@
26 26
         <!-- 添加工单 -->
27 27
         <el-col :span="24">
28 28
           <div style="margin-bottom: 10px;">
29
-            <div class="msgbox"></div><span style="line-height: 30px;font-size: 14px;color: #333;">新建工单</span>
29
+            <div class="msgbox"/><span style="line-height: 30px;font-size: 14px;color: #333;">新建工单</span>
30 30
           </div>
31 31
           <add-or-edit-order :callid="callinCallid" @order-type-data="getOrderTypeData" />
32 32
         </el-col>
@@ -61,151 +61,151 @@
61 61
 </template>
62 62
 
63 63
 <script>
64
-  import {
65
-    mapGetters
66
-  } from 'vuex'
67
-  import {
68
-    GetUserInfoByPhone
69
-  } from '@/api/callScreen/callScreen'
64
+import {
65
+  mapGetters
66
+} from 'vuex'
67
+import {
68
+  GetUserInfoByPhone
69
+} from '@/api/callScreen/callScreen'
70 70
   // 此处引用的是黑名单管理的添加视图
71
-  import AddressNumber from './AddressNumber'
72
-  import AddOrEditCustomer from './AddOrEditCustomer'
73
-  import AddOrEditDept from './AddOrEditDept'
74
-  import CallList from './CallList'
75
-  import OrderList from './OrderList'
76
-  import KnowledgeList from './KnowledgeList'
77
-  import HisList from './hisList'
78
-  import AddOrEditOrder from './AddOrEditOrder'
71
+import AddressNumber from './AddressNumber'
72
+import AddOrEditCustomer from './AddOrEditCustomer'
73
+import AddOrEditDept from './AddOrEditDept'
74
+import CallList from './CallList'
75
+import OrderList from './OrderList'
76
+import KnowledgeList from './KnowledgeList'
77
+import HisList from './hisList'
78
+import AddOrEditOrder from './AddOrEditOrder'
79 79
 
80
-  export default {
81
-    name: 'CallScreenComponent',
82
-    components: {
83
-      CallList,
84
-      OrderList,
85
-      AddressNumber,
86
-      AddOrEditCustomer,
87
-      AddOrEditDept,
88
-      KnowledgeList,
89
-      HisList,
90
-      AddOrEditOrder
80
+export default {
81
+  name: 'CallScreenComponent',
82
+  components: {
83
+    CallList,
84
+    OrderList,
85
+    AddressNumber,
86
+    AddOrEditCustomer,
87
+    AddOrEditDept,
88
+    KnowledgeList,
89
+    HisList,
90
+    AddOrEditOrder
91
+  },
92
+  data() {
93
+    return {
94
+      orderTypeData: {
95
+        F_Type1: 1000, // 工单类别
96
+        F_TypeName1: '业务咨询', // 工单类别
97
+        F_Type2: 0, // 工单子类
98
+        F_TypeName2: '', // 工单子类
99
+        F_Type3: 0, // 工单三类
100
+        F_TypeName3: '', // 工单三类
101
+        identification: ''
102
+      },
103
+      phoneData: '', // 归属地
104
+      // 咨询类型级联
105
+      activeName: 'first', // tab切换默认显示来电历史工单
106
+      callinNum: '', // 来电号码
107
+      deptinNum: '',
108
+      ldphone: '', // 来电号码
109
+      callinCallid: '', // 来电id
110
+      isBlack: false, // 是否加入黑名单
111
+      cusInfo: {
112
+        // 客户信息
113
+        cusname: '未知', // 客户姓名
114
+        customertype: '潜在客户', // 客户类型
115
+        customerCode: '' // 客户代码
116
+      },
117
+      value1: true,
118
+      customerMsg: {}, // 客户信息
119
+      deptMsg: {} // 部门信息
120
+    }
121
+  },
122
+
123
+  computed: {
124
+    ...mapGetters([
125
+      'telCallNum' // 顶部显示号码
126
+    ])
127
+  },
128
+  created() {
129
+    this.callinNum = this.telCallNum // 来电号码  $route.params.telInNumber
130
+    this.ldphone = this.$route.params.telInNumber
131
+    this.callinCallid = this.$route.params.callid // 来电callid  $route.params.callid
132
+    this.getUserInfor()
133
+  },
134
+  methods: {
135
+    // tab 切换
136
+    handleClick(tab, event) {
137
+      if (tab.name === 'second') {
138
+        this.getKnowledgeList(tab.name)
139
+      } else if (tab.name === 'third') {
140
+        this.getHistoryList(tab.name)
141
+      } else if (tab.name === 'fourth') {
142
+        this.getOrderList(tab.name)
143
+      }
91 144
     },
92
-    data() {
93
-      return {
94
-        orderTypeData: {
95
-          F_Type1: 1000, // 工单类别
96
-          F_TypeName1: '业务咨询', // 工单类别
97
-          F_Type2: 0, // 工单子类
98
-          F_TypeName2: '', // 工单子类
99
-          F_Type3: 0, // 工单三类
100
-          F_TypeName3: '' ,// 工单三类
101
-          identification:'',
102
-        },
103
-        phoneData: '', // 归属地
104
-        // 咨询类型级联
105
-        activeName: 'first', // tab切换默认显示来电历史工单
106
-        callinNum: '', // 来电号码
107
-        deptinNum: '',
108
-        ldphone: '', // 来电号码
109
-        callinCallid: '', // 来电id
110
-        isBlack: false, // 是否加入黑名单
111
-        cusInfo: {
112
-          // 客户信息
113
-          cusname: '未知', // 客户姓名
114
-          customertype: '潜在客户', // 客户类型
115
-          customerCode: '' // 客户代码
116
-        },
117
-        value1: true,
118
-        customerMsg: {}, //客户信息
119
-        deptMsg: {} //部门信息
145
+    // 获取知识库列表
146
+    getKnowledgeList(acname) {
147
+      if (!acname) {
148
+        this.activeName = 'first'
120 149
       }
150
+      this.$refs.knowledgeListEl.getList()
121 151
     },
122
-
123
-    computed: {
124
-      ...mapGetters([
125
-        'telCallNum' // 顶部显示号码
126
-      ])
152
+    // 获取历史工单列表
153
+    getHistoryList(acname) {
154
+      if (!acname) {
155
+        this.activeName = 'second'
156
+      }
157
+      this.$refs.callListEl.getList()
127 158
     },
128
-    created() {
129
-      this.callinNum = this.telCallNum // 来电号码  $route.params.telInNumber
130
-      this.ldphone = this.$route.params.telInNumber
131
-      this.callinCallid = this.$route.params.callid //来电callid  $route.params.callid
132
-      this.getUserInfor()
159
+    // 获取历史通话记录
160
+    getOrderList(acname) {
161
+      if (!acname) {
162
+        this.activeName = 'third'
163
+      }
164
+      this.$refs.orderListEl.getList()
133 165
     },
134
-    methods: {
135
-      // tab 切换
136
-      handleClick(tab, event) {
137
-        if (tab.name === 'second') {
138
-          this.getKnowledgeList(tab.name)
139
-        } else if (tab.name === 'third') {
140
-          this.getHistoryList(tab.name)
141
-        } else if (tab.name === 'fourth') {
142
-          this.getOrderList(tab.name)
143
-        }
144
-      },
145
-      // 获取知识库列表
146
-      getKnowledgeList(acname) {
147
-        if (!acname) {
148
-          this.activeName = 'first'
149
-        }
150
-        this.$refs.knowledgeListEl.getList()
151
-      },
152
-      // 获取历史工单列表
153
-      getHistoryList(acname) {
154
-        if (!acname) {
155
-          this.activeName = 'second'
156
-        }
157
-        this.$refs.callListEl.getList()
158
-      },
159
-      // 获取历史通话记录
160
-      getOrderList(acname) {
161
-        if (!acname) {
162
-          this.activeName = 'third'
163
-        }
164
-        this.$refs.orderListEl.getList()
165
-      },
166 166
 
167
-      // 获取客户历史通话记录
168
-      getCusProList(acname) {
169
-        if (!acname) {
170
-          this.activeName = 'third'
171
-        }
172
-        this.$refs.cutomerListEl.getList()
173
-      },
174
-      // 获取客户信息
175
-      getCusInfos(data) {
176
-        if (data) {
177
-          this.cusInfo.cusname = data.F_CustomerName
178
-        }
179
-      },
180
-      //获取部门信息
181
-      getDeptInfos(data) {
182
-        if (data) {
183
-          // console.log(data)
167
+    // 获取客户历史通话记录
168
+    getCusProList(acname) {
169
+      if (!acname) {
170
+        this.activeName = 'third'
171
+      }
172
+      this.$refs.cutomerListEl.getList()
173
+    },
174
+    // 获取客户信息
175
+    getCusInfos(data) {
176
+      if (data) {
177
+        this.cusInfo.cusname = data.F_CustomerName
178
+      }
179
+    },
180
+    // 获取部门信息
181
+    getDeptInfos(data) {
182
+      if (data) {
183
+        // console.log(data)
184
+      }
185
+    },
186
+    getOrderTypeData(data) {
187
+      this.orderTypeData = data
188
+      // console.log(data,'88888888888888')
189
+    },
190
+    // 根据来电号码获取客户信息或者部门信息
191
+    getUserInfor() {
192
+      return new Promise((resolve) => {
193
+        const params = {
194
+          phone: this.ldphone // 联系电话
195
+          // phone:'15202369636'
184 196
         }
185
-      },
186
-      getOrderTypeData(data) {
187
-        this.orderTypeData = data
188
-        // console.log(data,'88888888888888')
189
-      },
190
-      //根据来电号码获取客户信息或者部门信息
191
-      getUserInfor() {
192
-        return new Promise((resolve) => {
193
-          const params = {
194
-            phone: this.ldphone // 联系电话
195
-            // phone:'15202369636'
197
+        GetUserInfoByPhone(params).then((response) => {
198
+          if (response.state.toLowerCase() === 'success') {
199
+            const res = response.data
200
+            this.customerMsg = res.dtcustomer[0]
201
+            this.deptMsg = res.dtuser[0]
196 202
           }
197
-          GetUserInfoByPhone(params).then((response) => {
198
-            if (response.state.toLowerCase() === 'success') {
199
-              const res = response.data
200
-              this.customerMsg = res.dtcustomer[0]
201
-              this.deptMsg = res.dtuser[0]
202
-            }
203
-          })
204
-          resolve()
205 203
         })
206
-      }
204
+        resolve()
205
+      })
207 206
     }
208 207
   }
208
+}
209 209
 </script>
210 210
 
211 211
 <style scoped>

+ 13 - 2
CallCenterWeb.UI/RMYY/src/views/comDispatch/EquipmentLeasing/components/equiAddOrEdit.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div v-loading="loading">
3
-    <el-form ref="ruleForm" :model="ruleForm" label-width="150px">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px">
4 4
       <el-col :span="24">
5 5
         <!-- <el-row>
6 6
           <el-col :span="8">
@@ -155,6 +155,18 @@ export default {
155 155
         devname: '',
156 156
         num: 1
157 157
       }],
158
+      rules: {
159
+        phon: [{
160
+          required: true,
161
+          message: '手机号不能为空',
162
+          trigger: 'blur'
163
+        },
164
+        {
165
+          pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
166
+          message: '请输入正确的电话号码或者固话号码',
167
+          trigger: 'blur'
168
+        }]
169
+      },
158 170
       resstr: '',
159 171
       headers: {
160 172
         Authorization: localStorage.getItem('Admin-Token')
@@ -204,7 +216,6 @@ export default {
204 216
     submitForm() {
205 217
       // this.getItemessage()
206 218
       this.getStr()
207
-      console.log(this.ruleForm)
208 219
       this.$refs.ruleForm.validate((valid) => {
209 220
         if (valid) {
210 221
           this.loading = true

+ 13 - 1
CallCenterWeb.UI/RMYY/src/views/comDispatch/components/addOrEditDispatch.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div>
3
-    <el-form :model="ruleForm" label-width="150px" class="order_form">
3
+    <el-form :model="ruleForm" :rules ="rules" label-width="150px" class="order_form">
4 4
       <el-col :span="24">
5 5
         <el-row v-if="JSON.stringify(orderTypeData)==='{}'">
6 6
           <el-col :span="10">
@@ -358,6 +358,18 @@ export default {
358 358
         opt: '1',
359 359
         remark: '', // 备注
360 360
         repairImageid: ''
361
+      },
362
+      rules: {
363
+        phone: [{
364
+          required: true,
365
+          message: '手机号不能为空',
366
+          trigger: 'blur'
367
+        },
368
+        {
369
+          pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
370
+          message: '请输入正确的电话号码或者固话号码',
371
+          trigger: 'blur'
372
+        }]
361 373
       }
362 374
     }
363 375
   },

+ 319 - 289
CallCenterWeb.UI/RMYY/src/views/faultRepair/clinicalReporting/components/addRepairbase.vue

@@ -10,9 +10,15 @@
10 10
           </el-col>
11 11
           <el-col :span="12">
12 12
             <el-form-item label="申请人" prop="repairmanid">
13
-              <el-select v-model="ruleForm.repairmanid" placeholder="请选择申请人" style="width: 100%;"
13
+              <el-select
14
+                v-model="ruleForm.repairmanid"
15
+                placeholder="请选择申请人"
16
+                style="width: 100%;"
14 17
                 @change="changeRepairman">
15
-                <el-option v-for="item in repairman" :key="item.usercode" :label="item.username"
18
+                <el-option
19
+                  v-for="item in repairman"
20
+                  :key="item.usercode"
21
+                  :label="item.username"
16 22
                   :value="item.usercode" />
17 23
               </el-select>
18 24
             </el-form-item>
@@ -33,7 +39,9 @@
33 39
         <el-row>
34 40
           <el-col :span="24">
35 41
             <el-form-item label="工单类别" prop="repairOrderType">
36
-              <select-order-typeTwo :orderTypeparams='ruleForm.repairOrderType' :second-order-type="secondOrderType"
42
+              <select-order-typeTwo
43
+                :order-typeparams="ruleForm.repairOrderType"
44
+                :second-order-type="secondOrderType"
37 45
                 @post-second-order-type="getSecondOOrderType" />
38 46
             </el-form-item>
39 47
           </el-col>
@@ -41,8 +49,13 @@
41 49
         <el-row>
42 50
           <el-col :span="24">
43 51
             <el-form-item label="报修内容" prop="repairCenter">
44
-              <el-input v-model="ruleForm.repairCenter" :autosize="{ minRows: 4, maxRows: 8}" show-word-limit
45
-                maxlength="100" type="textarea" placeholder="请输入报修内容" />
52
+              <el-input
53
+                v-model="ruleForm.repairCenter"
54
+                :autosize="{ minRows: 4, maxRows: 8}"
55
+                show-word-limit
56
+                maxlength="100"
57
+                type="textarea"
58
+                placeholder="请输入报修内容" />
46 59
             </el-form-item>
47 60
           </el-col>
48 61
         </el-row>
@@ -62,7 +75,10 @@
62 75
           <el-col :span="12">
63 76
             <el-form-item label="指派人" prop="assignMant">
64 77
               <el-select v-model="ruleForm.assignMant" placeholder="请选择指派人" style="width:100%;" @change="changeUser">
65
-                <el-option v-for="item in assignman" :key="item.usercode" :label="item.username"
78
+                <el-option
79
+                  v-for="item in assignman"
80
+                  :key="item.usercode"
81
+                  :label="item.username"
66 82
                   :value="item.usercode" />
67 83
               </el-select>
68 84
             </el-form-item>
@@ -71,7 +87,11 @@
71 87
         <el-row>
72 88
           <el-col :span="24">
73 89
             <el-form-item label="附件图片" prop="repairImageid">
74
-              <el-upload :headers="headers" :file-list="fileList" :on-success="handle_success" :action="imgUrl"
90
+              <el-upload
91
+                :headers="headers"
92
+                :file-list="fileList"
93
+                :on-success="handle_success"
94
+                :action="imgUrl"
75 95
                 list-type="picture-card">
76 96
                 <i class="el-icon-plus" />
77 97
               </el-upload>
@@ -88,308 +108,318 @@
88 108
 </template>
89 109
 
90 110
 <script>
91
-  import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
92
-  import selectOrderTypeTwo from '@/components/context/commonSelect/selectOrderTypeTwo.vue'
93
-  import {
94
-    GetPerson
95
-  } from '@/api/commonAPI'
96
-  import {
97
-    GetFaultRepairDetail,
98
-    UpdateFaultRepair
99
-  } from '@/api/orderManagement/orderList'
100
-  import {
101
-    getAddRepairbase
102
-  } from '@/api/faultRepairManagement/faultRepair'
103
-  export default {
104
-    name: 'AddRepairbase',
105
-    components: {
106
-      selectDeptTree,
107
-      selectOrderTypeTwo
111
+import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
112
+import selectOrderTypeTwo from '@/components/context/commonSelect/selectOrderTypeTwo.vue'
113
+import {
114
+  GetPerson
115
+} from '@/api/commonAPI'
116
+import {
117
+  GetFaultRepairDetail,
118
+  UpdateFaultRepair
119
+} from '@/api/orderManagement/orderList'
120
+import {
121
+  getAddRepairbase
122
+} from '@/api/faultRepairManagement/faultRepair'
123
+export default {
124
+  name: 'AddRepairbase',
125
+  components: {
126
+    selectDeptTree,
127
+    selectOrderTypeTwo
128
+  },
129
+  props: {
130
+    wid: {
131
+      type: String,
132
+      default: ''
108 133
     },
109
-    props: {
110
-      wid: {
111
-        type: String,
112
-        default: ''
113
-      },
114
-      fid: {
115
-        type: String,
116
-        default: ''
134
+    fid: {
135
+      type: String,
136
+      default: ''
137
+    },
138
+    layerid: {
139
+      type: String,
140
+      default: ''
141
+    },
142
+    callid: {
143
+      type: String,
144
+      default: ''
145
+    },
146
+    iswomanage: {
147
+      type: String,
148
+      default: ''
149
+    }
150
+  },
151
+  data() {
152
+    return {
153
+      secondOrderType: {
154
+        typeid: 2,
155
+        pid: 3000
117 156
       },
118
-      layerid: {
119
-        type: String,
120
-        default: ''
157
+      orderarr: [],
158
+      ordertypeArr: [],
159
+      imgUrl: this.$store.getters.serverConfig.BASE_API + 'FaultRepair/UploadFile',
160
+      fileList: [],
161
+      repairman: [], // 申请人数据
162
+      deptidArr: [], // 申请部门默认值
163
+      assignman: [], // 指派人
164
+      assignArr: [], // 默认指派部门
165
+      ruleForm: {
166
+        repairDeptid: '', // 申请部门
167
+        repairmanid: '', // 申请人
168
+        repairmanphone: '', // 申请电话
169
+        repairmanCallNumber: '', // 联系电话
170
+        repairOrderType: [], // 工单类别
171
+        repairCenter: '', // 报修内容
172
+        repairAddress: '', // 报修地点
173
+        repairImageid: '', // 附件
174
+        repairOper: '0', // 下不流程
175
+        assignDepart: '', // 指派部门
176
+        assignMant: '' // 指派人
121 177
       },
122
-      callid: {
123
-        type: String,
124
-        default: ''
178
+      headers: {
179
+        Authorization: localStorage.getItem('Admin-Token')
125 180
       },
126
-      iswomanage: {
127
-        type: String,
128
-        default: ''
181
+      imageUrl: 'http://192.168.1.37:8000/FaultRepair/UploadFile',
182
+      rules: {
183
+        repairmanphone: [{
184
+          required: true,
185
+          message: '申请电话不能为空',
186
+          trigger: 'blur'
187
+        },
188
+        {
189
+          pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
190
+          message: '请输入正确的电话号码或者固话号码',
191
+          trigger: 'blur'
192
+        }],
193
+        repairDeptid: [{
194
+          required: true,
195
+          message: '请选择申请部门',
196
+          trigger: 'change'
197
+        }],
198
+        repairmanid: [{
199
+          required: true,
200
+          message: '请选择申请人',
201
+          trigger: 'change'
202
+        }],
203
+        repairmanCallNumber: [{
204
+          required: true,
205
+          message: '请输入联系电话',
206
+          trigger: 'blur'
207
+        }],
208
+        repairOrderType: [{
209
+          required: true,
210
+          message: '请选择工单类别',
211
+          trigger: 'change'
212
+        }],
213
+        repairCenter: [{
214
+          required: true,
215
+          message: '请输入报修内容',
216
+          trigger: 'blur'
217
+        }],
218
+        repairAddress: [{
219
+          required: true,
220
+          message: '请输入报修地点',
221
+          trigger: 'blur'
222
+        }]
129 223
       }
224
+    }
225
+  },
226
+  created() {
227
+    this.ruleForm.repairDeptid = this.deptidArr[this.deptidArr.length - 1]
228
+    this.getRepairman(this.deptidArr[this.deptidArr.length - 1], 0)
229
+    // assignArr
230
+    const deptid = this.$store.getters.teamId
231
+    if (deptid) {
232
+      this.assignArr = this.$store.getters.deptmap[parseInt(deptid)].ids
233
+      this.ruleForm.assignDepart = deptid
234
+
235
+      this.getRepairman(deptid, 1)
236
+    }
237
+    this.ruleForm.assignMant = this.$store.getters.usercode
238
+    if (this.wid) {
239
+      this.getWoDetail(this.wid, '0')
240
+    }
241
+    if (this.iswomanage == 1) {
242
+      this.ruleForm.assignDepart = ''
243
+      this.ruleForm.assignMant = ''
244
+    }
245
+  },
246
+  methods: {
247
+    // 部门
248
+    getDeptid(data) {
249
+      this.ruleForm.repairDeptid = data[data.length - 1]
250
+      this.deptidArr = data
251
+      this.getRepairman(this.ruleForm.repairDeptid, 0)
130 252
     },
131
-    data() {
132
-      return {
133
-        secondOrderType: {
134
-          typeid: 2,
135
-          pid: 3000
136
-        },
137
-        orderarr: [],
138
-        ordertypeArr: [],
139
-        imgUrl: this.$store.getters.serverConfig.BASE_API + 'FaultRepair/UploadFile',
140
-        fileList: [],
141
-        repairman: [], // 申请人数据
142
-        deptidArr: [], // 申请部门默认值
143
-        assignman: [], // 指派人
144
-        assignArr: [], // 默认指派部门
145
-        ruleForm: {
146
-          repairDeptid: '', // 申请部门
147
-          repairmanid: '', // 申请人
148
-          repairmanphone: '', // 申请电话
149
-          repairmanCallNumber: '', // 联系电话
150
-          repairOrderType: [], // 工单类别
151
-          repairCenter: '', // 报修内容
152
-          repairAddress: '', // 报修地点
153
-          repairImageid: '', // 附件
154
-          repairOper: '0', // 下不流程
155
-          assignDepart: '', // 指派部门
156
-          assignMant: '' // 指派人
157
-        },
158
-        headers: {
159
-          Authorization: localStorage.getItem('Admin-Token')
160
-        },
161
-        imageUrl: 'http://192.168.1.37:8000/FaultRepair/UploadFile',
162
-        rules: {
163
-          repairDeptid: [{
164
-            required: true,
165
-            message: '请选择申请部门',
166
-            trigger: 'change'
167
-          }],
168
-          repairmanid: [{
169
-            required: true,
170
-            message: '请选择申请人',
171
-            trigger: 'change'
172
-          }],
173
-          repairmanCallNumber: [{
174
-            required: true,
175
-            message: '请输入联系电话',
176
-            trigger: 'blur'
177
-          }],
178
-          repairOrderType: [{
179
-            required: true,
180
-            message: '请选择工单类别',
181
-            trigger: 'change'
182
-          }],
183
-          repairCenter: [{
184
-            required: true,
185
-            message: '请输入报修内容',
186
-            trigger: 'blur'
187
-          }],
188
-          repairAddress: [{
189
-            required: true,
190
-            message: '请输入报修地点',
191
-            trigger: 'blur'
192
-          }],
253
+    geAssigntDeptid(data) {
254
+      this.ruleForm.assignDepart = data[data.length - 1]
255
+      this.assignArr = data
256
+      this.getRepairman(this.ruleForm.assignDepart, 1)
257
+    },
258
+    // 获取申请人数据
259
+    getRepairman(id, state) {
260
+      return new Promise((resolve) => {
261
+        const params = {
262
+          deptid: id // 字典管理的工单标识
193 263
         }
194
-      }
264
+        GetPerson(params).then((res) => {
265
+          if (res.state == 'error') {
266
+            this.$message.warning(res.message)
267
+          }
268
+          if (state === 0) {
269
+            this.repairman = res.rows
270
+          } else if (state === 1) {
271
+            this.assignman = res.rows
272
+          }
273
+        })
274
+        resolve()
275
+      })
195 276
     },
196
-    created() {
197
-      this.ruleForm.repairDeptid = this.deptidArr[this.deptidArr.length - 1]
198
-      this.getRepairman(this.deptidArr[this.deptidArr.length - 1], 0)
199
-      //assignArr
200
-      const deptid = this.$store.getters.teamId
201
-      if (deptid) {
202
-        this.assignArr = this.$store.getters.deptmap[parseInt(deptid)].ids
203
-        this.ruleForm.assignDepart = deptid
204
-
205
-        this.getRepairman(deptid, 1)
206
-      }
207
-      this.ruleForm.assignMant = this.$store.getters.usercode
208
-      if (this.wid) {
209
-        this.getWoDetail(this.wid, '0')
210
-      }
211
-      if (this.iswomanage == 1) {
212
-        this.ruleForm.assignDepart = ''
213
-        this.ruleForm.assignMant = ''
277
+    // 申请人
278
+    changeRepairman(data) {
279
+      this.ruleForm.repairmanid = data
280
+      const user = this.repairman.find((o) => {
281
+        return o.usercode === data.toString()
282
+      })
283
+      if (user) {
284
+        this.ruleForm.repairmanphone = user.usertelphone
285
+        this.ruleForm.repairmanCallNumber = user.usertelphone
214 286
       }
215 287
     },
216
-    methods: {
217
-      // 部门
218
-      getDeptid(data) {
219
-        this.ruleForm.repairDeptid = data[data.length - 1]
220
-        this.deptidArr = data
221
-        this.getRepairman(this.ruleForm.repairDeptid, 0)
222
-      },
223
-      geAssigntDeptid(data) {
224
-        this.ruleForm.assignDepart = data[data.length - 1]
225
-        this.assignArr = data
226
-        this.getRepairman(this.ruleForm.assignDepart, 1)
227
-      },
228
-      // 获取申请人数据
229
-      getRepairman(id, state) {
230
-        return new Promise((resolve) => {
231
-          const params = {
232
-            deptid: id // 字典管理的工单标识
288
+    changeUser(data) { // 指派人
289
+      this.ruleForm.assignMant = data
290
+    },
291
+    // 详情
292
+    getWoDetail(rid, type) {
293
+      const params = {
294
+        WorkOrderCode: rid,
295
+        type: type
296
+      }
297
+      GetFaultRepairDetail(params).then((response) => {
298
+        if (response.data[0]) {
299
+          this.deptidArr = this.$store.getters.deptmap[parseInt(response.data[0].F_ApplicationDept)].ids
300
+          console.log(this.deptidArr, '666')
301
+          if (response.data[0].F_MaintenanceDept) {
302
+            this.assignArr = this.$store.getters.deptmap[parseInt(response.data[0].F_MaintenanceDept)].ids
233 303
           }
234
-          GetPerson(params).then((res) => {
235
-            if(res.state=='error'){
236
-              this.$message.warning(res.message)
237
-            }
238
-            if (state === 0) {
239
-              this.repairman = res.rows
240
-            } else if (state === 1) {
241
-              this.assignman = res.rows
304
+          this.ruleForm.repairmanid = response.data[0].F_Applicant
305
+          this.ruleForm.repairmanphone = response.data[0].F_Applicantsphone
306
+          this.ruleForm.repairmanCallNumber = response.data[0].F_Phone
307
+          this.ruleForm.repairOrderType = this.$store.getters.workTypeMap[parseInt(response.data[0]
308
+            .F_WorkOrderCategory)].ids // 工单类别
309
+          this.ruleForm.repairOrderType = this.ruleForm.repairOrderType.slice(1, this.ruleForm.repairOrderType
310
+            .length)
311
+          this.ruleForm.repairDeptid = response.data[0].F_ApplicationDept // 部门
312
+          this.ruleForm.repairCenter = response.data[0].F_Content
313
+          this.ruleForm.repairAddress = response.data[0].F_PlaceOfRepair
314
+          this.ruleForm.assignDepart = response.data[0].F_MaintenanceDept
315
+          // if (response.data[0].F_Maintenancer) {
316
+          //   this.ruleForm.assignMant = this.$store.getters.response.data[0].F_Maintenancer
317
+          // }
318
+          if (response.data[0].FileUrl) {
319
+            // this.imgUrl = response.data[0].FileUrl[0].F_FileUrl
320
+            for (var i = 0; i < response.data[0].FileUrl.length; i++) {
321
+              this.ruleForm.repairImageid += response.data[0].FileUrl[i].F_FileId + ','
322
+              this.fileList.push({
323
+                name: response.data[0].FileUrl[i].F_FileName,
324
+                url: response.data[0].FileUrl[i].F_FileUrl
325
+              })
242 326
             }
243
-          })
244
-          resolve()
245
-        })
246
-      },
247
-      // 申请人
248
-      changeRepairman(data) {
249
-        this.ruleForm.repairmanid = data
250
-        const user = this.repairman.find((o) => {
251
-          return o.usercode === data.toString()
252
-        })
253
-        if (user) {
254
-          this.ruleForm.repairmanphone = user.usertelphone
255
-          this.ruleForm.repairmanCallNumber = user.usertelphone
256
-        }
257
-      },
258
-      changeUser(data) { // 指派人
259
-        this.ruleForm.assignMant = data
260
-      },
261
-      //详情
262
-      getWoDetail(rid, type) {
263
-        const params = {
264
-          WorkOrderCode: rid,
265
-          type: type
327
+          }
266 328
         }
267
-        GetFaultRepairDetail(params).then((response) => {
268
-          if (response.data[0]) {
269
-            this.deptidArr = this.$store.getters.deptmap[parseInt(response.data[0].F_ApplicationDept)].ids
270
-            console.log(this.deptidArr, '666')
271
-            if (response.data[0].F_MaintenanceDept) {
272
-              this.assignArr = this.$store.getters.deptmap[parseInt(response.data[0].F_MaintenanceDept)].ids
273
-            }
274
-            this.ruleForm.repairmanid = response.data[0].F_Applicant
275
-            this.ruleForm.repairmanphone = response.data[0].F_Applicantsphone
276
-            this.ruleForm.repairmanCallNumber = response.data[0].F_Phone
277
-            this.ruleForm.repairOrderType = this.$store.getters.workTypeMap[parseInt(response.data[0]
278
-              .F_WorkOrderCategory)].ids //工单类别
279
-            this.ruleForm.repairOrderType = this.ruleForm.repairOrderType.slice(1, this.ruleForm.repairOrderType
280
-              .length)
281
-            this.ruleForm.repairDeptid = response.data[0].F_ApplicationDept //部门
282
-            this.ruleForm.repairCenter = response.data[0].F_Content
283
-            this.ruleForm.repairAddress = response.data[0].F_PlaceOfRepair
284
-            this.ruleForm.assignDepart = response.data[0].F_MaintenanceDept
285
-            // if (response.data[0].F_Maintenancer) {
286
-            //   this.ruleForm.assignMant = this.$store.getters.response.data[0].F_Maintenancer
287
-            // }
288
-            if (response.data[0].FileUrl) {
289
-              // this.imgUrl = response.data[0].FileUrl[0].F_FileUrl
290
-              for (var i = 0; i < response.data[0].FileUrl.length; i++) {
291
-                this.ruleForm.repairImageid += response.data[0].FileUrl[i].F_FileId + ','
292
-                this.fileList.push({
293
-                  name: response.data[0].FileUrl[i].F_FileName,
294
-                  url: response.data[0].FileUrl[i].F_FileUrl
295
-                })
296
-              }
297
-            }
329
+      })
330
+    },
331
+    // 工单类型
332
+    getSecondOOrderType(data) {
333
+      // console.log(data,'3333333')
334
+      // this.ruleForm.repairOrderType = data.value
335
+      this.ruleForm.repairOrderType = data.value
336
+      console.log(this.ruleForm.repairOrderType)
337
+    },
338
+    handle_success(res) {
339
+      this.ruleForm.repairImageid += res.data[0].F_FileId + ','
340
+    },
341
+    submitForm(formName) {
342
+      console.log(this.callid, 'callid')
343
+      console.log(this.ruleForm.repairDeptid)
344
+      this.$refs[formName].validate((valid) => {
345
+        if (valid) {
346
+          if (this.ruleForm.repairImageid === '') {
347
+            this.ruleForm.repairImageid = ''
348
+          } else {
349
+            this.ruleForm.repairImageid = this.ruleForm.repairImageid.slice(0, this.ruleForm.repairImageid
350
+              .length - 1)
298 351
           }
299
-        })
300
-      },
301
-      // 工单类型
302
-      getSecondOOrderType(data) {
303
-        // console.log(data,'3333333')
304
-        // this.ruleForm.repairOrderType = data.value
305
-        this.ruleForm.repairOrderType = data.value
306
-        console.log(this.ruleForm.repairOrderType)
307
-      },
308
-      handle_success(res) {
309
-        this.ruleForm.repairImageid += res.data[0].F_FileId + ','
310
-      },
311
-      submitForm(formName) {
312
-        console.log(this.callid, 'callid')
313
-        console.log(this.ruleForm.repairDeptid)
314
-        this.$refs[formName].validate((valid) => {
315
-          if (valid) {
316
-            if (this.ruleForm.repairImageid === '') {
317
-              this.ruleForm.repairImageid = ''
318
-            } else {
319
-              this.ruleForm.repairImageid = this.ruleForm.repairImageid.slice(0, this.ruleForm.repairImageid
320
-                .length - 1)
321
-            }
322
-            this.$refs.ruleForm.validate((valid) => {
323
-              if (valid) {
324
-                if (this.wid) { //编辑
325
-                  console.log('bj')
326
-                  const params = {
327
-                    WorkOrderCode: this.wid,
328
-                    Applicant: this.ruleForm.repairmanid, // 申请人
329
-                    ApplicationDept: this.ruleForm.repairDeptid, // 申请部门
330
-                    Applicantsphone: this.ruleForm.repairmanphone, // 申请电话
331
-                    Phone: this.ruleForm.repairmanCallNumber, // 联系方式
332
-                    WorkOrderCategory: this.ruleForm.repairOrderType, // 工单类别
333
-                    Content: this.ruleForm.repairCenter, // 工单内容
334
-                    PlaceOfRepair: this.ruleForm.repairAddress, // 报修地点
335
-                    File: this.ruleForm.repairImageid, // 附件
336
-                    MaintenanceDept: this.ruleForm.assignDepart, // 指派部门
337
-                    IsEnd: '0', // 是否完结
338
-                    Maintenancer: this.ruleForm.assignMant // 指派人
339
-                  }
340
-                  UpdateFaultRepair(params).then((res) => {
341
-                    if (res.state.toLowerCase() === 'success') {
342
-                      // this.$parent.$layer.close(this.layerid)
343
-                      // this.$parent.getList()
344
-                      this.$message({
345
-                        message: '恭喜你,编辑工单成功!',
346
-                        type: 'success',
347
-                        duration: 1000
348
-                      })
349
-                    }
350
-                  })
352
+          this.$refs.ruleForm.validate((valid) => {
353
+            if (valid) {
354
+              if (this.wid) { // 编辑
355
+                console.log('bj')
356
+                const params = {
357
+                  WorkOrderCode: this.wid,
358
+                  Applicant: this.ruleForm.repairmanid, // 申请人
359
+                  ApplicationDept: this.ruleForm.repairDeptid, // 申请部门
360
+                  Applicantsphone: this.ruleForm.repairmanphone, // 申请电话
361
+                  Phone: this.ruleForm.repairmanCallNumber, // 联系方式
362
+                  WorkOrderCategory: this.ruleForm.repairOrderType, // 工单类别
363
+                  Content: this.ruleForm.repairCenter, // 工单内容
364
+                  PlaceOfRepair: this.ruleForm.repairAddress, // 报修地点
365
+                  File: this.ruleForm.repairImageid, // 附件
366
+                  MaintenanceDept: this.ruleForm.assignDepart, // 指派部门
367
+                  IsEnd: '0', // 是否完结
368
+                  Maintenancer: this.ruleForm.assignMant // 指派人
351 369
                 }
352
-                if (this.wid == '') {
353
-                  console.log('tj')
354
-                  const params = {
355
-                    LeaveRecordId: this.fid,
356
-                    CallId: this.callid,
357
-                    Applicant: this.ruleForm.repairmanid, // 申请人
358
-                    ApplicationDept: this.ruleForm.repairDeptid, // 申请部门
359
-                    Applicantsphone: this.ruleForm.repairmanphone, // 申请电话
360
-                    Phone: this.ruleForm.repairmanCallNumber, // 联系方式
361
-                    WorkOrderCategory: this.ruleForm.repairOrderType, // 工单类别
362
-                    Content: this.ruleForm.repairCenter, // 工单内容
363
-                    PlaceOfRepair: this.ruleForm.repairAddress, // 报修地点
364
-                    File: this.ruleForm.repairImageid, // 附件
365
-                    MaintenanceDept: this.ruleForm.assignDepart, // 指派部门
366
-                    IsEnd: '0', // 是否完结
367
-                    Maintenancer: this.ruleForm.assignMant // 指派人
370
+                UpdateFaultRepair(params).then((res) => {
371
+                  if (res.state.toLowerCase() === 'success') {
372
+                    // this.$parent.$layer.close(this.layerid)
373
+                    // this.$parent.getList()
374
+                    this.$message({
375
+                      message: '恭喜你,编辑工单成功!',
376
+                      type: 'success',
377
+                      duration: 1000
378
+                    })
368 379
                   }
369
-                  getAddRepairbase(params).then((res) => {
370
-                    if (res.state.toLowerCase() === 'success') {
371
-                      this.$refs.ruleForm.resetFields();
372
-                      this.deptidArr = []
373
-                      this.$message({
374
-                        message: '恭喜你,添加工单成功!',
375
-                        type: 'success',
376
-                        duration: 1000
377
-                      })
378
-                    }
379
-                  })
380
+                })
381
+              }
382
+              if (this.wid == '') {
383
+                console.log('tj')
384
+                const params = {
385
+                  LeaveRecordId: this.fid,
386
+                  CallId: this.callid,
387
+                  Applicant: this.ruleForm.repairmanid, // 申请人
388
+                  ApplicationDept: this.ruleForm.repairDeptid, // 申请部门
389
+                  Applicantsphone: this.ruleForm.repairmanphone, // 申请电话
390
+                  Phone: this.ruleForm.repairmanCallNumber, // 联系方式
391
+                  WorkOrderCategory: this.ruleForm.repairOrderType, // 工单类别
392
+                  Content: this.ruleForm.repairCenter, // 工单内容
393
+                  PlaceOfRepair: this.ruleForm.repairAddress, // 报修地点
394
+                  File: this.ruleForm.repairImageid, // 附件
395
+                  MaintenanceDept: this.ruleForm.assignDepart, // 指派部门
396
+                  IsEnd: '0', // 是否完结
397
+                  Maintenancer: this.ruleForm.assignMant // 指派人
380 398
                 }
381
-              } else {
382
-                return false
399
+                getAddRepairbase(params).then((res) => {
400
+                  if (res.state.toLowerCase() === 'success') {
401
+                    this.$refs.ruleForm.resetFields()
402
+                    this.deptidArr = []
403
+                    this.$message({
404
+                      message: '恭喜你,添加工单成功!',
405
+                      type: 'success',
406
+                      duration: 1000
407
+                    })
408
+                  }
409
+                })
383 410
               }
384
-            })
385
-          } else {
386
-            console.log('error submit!!')
387
-            return false
388
-          }
389
-        })
390
-      }
411
+            } else {
412
+              return false
413
+            }
414
+          })
415
+        } else {
416
+          console.log('error submit!!')
417
+          return false
418
+        }
419
+      })
391 420
     }
392 421
   }
422
+}
393 423
 </script>
394 424
 <style rel="stylesheet/scss" lang="scss">
395 425
   .order_form {

+ 6 - 7
CallCenterWeb.UI/RMYY/src/views/orderManage/components/addOrEditInfOrder.vue

@@ -309,13 +309,12 @@ export default {
309 309
           required: true,
310 310
           message: '手机号不能为空',
311 311
           trigger: 'blur'
312
-        }
313
-        // {
314
-        //   pattern: /^((0\d{2,3}-\d{7,8})|(1[345789]\d{9}))$/,
315
-        //   message: '请输入正确的电话号码或者固话号码',
316
-        //   trigger: 'blur'
317
-        // }
318
-        ],
312
+        },
313
+        {
314
+          pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
315
+          message: '请输入正确的电话号码或者固话号码',
316
+          trigger: 'blur'
317
+        }],
319 318
         F_IDNumber: [{
320 319
           required: true,
321 320
           message: '请输入身份证号',

+ 328 - 314
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/vehicleScheduling/vehicleSchedulingList/components/addOrEdit.vue

@@ -3,11 +3,10 @@
3 3
     <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px">
4 4
       <el-col :span="24">
5 5
         <el-row v-if="wocode!=''">
6
-          <el-col :span='24'>
6
+          <el-col :span="24">
7 7
             <el-form-item label="工单类型" prop="type">
8
-              <el-select clearable v-model="ruleForm.type" placeholder="请选择工单类型" style="width: 100%;" size="medium">
9
-                <el-option v-for="item in typeList" :key="item.fid" :label="item.fname" :value="item.fid">
10
-                </el-option>
8
+              <el-select v-model="ruleForm.type" clearable placeholder="请选择工单类型" style="width: 100%;" size="medium">
9
+                <el-option v-for="item in typeList" :key="item.fid" :label="item.fname" :value="item.fid"/>
11 10
               </el-select>
12 11
             </el-form-item>
13 12
           </el-col>
@@ -21,7 +20,10 @@
21 20
           <el-col :span="12">
22 21
             <el-form-item label="申请人" prop="needman">
23 22
               <el-select v-model="ruleForm.needman" placeholder="请选择申请人" style="width:100%;" @change="changeRepairman">
24
-                <el-option v-for="item in repairman" :key="item.usercode" :label="item.username"
23
+                <el-option
24
+                  v-for="item in repairman"
25
+                  :key="item.usercode"
26
+                  :label="item.username"
25 27
                   :value="item.usercode" />
26 28
               </el-select>
27 29
             </el-form-item>
@@ -36,8 +38,11 @@
36 38
           <el-col :span="12">
37 39
             <el-form-item label="车辆要求" prop="cartype">
38 40
               <el-select v-model="ruleForm.cartype" style="width: 100%;">
39
-                <el-option v-for="(item,index) in carArr" :key="index" :label="item.F_Name"
40
-                  :value="item.F_DictionaryValueId"></el-option>
41
+                <el-option
42
+                  v-for="(item,index) in carArr"
43
+                  :key="index"
44
+                  :label="item.F_Name"
45
+                  :value="item.F_DictionaryValueId"/>
41 46
               </el-select>
42 47
             </el-form-item>
43 48
           </el-col>
@@ -57,9 +62,13 @@
57 62
         <el-row>
58 63
           <el-col :span="24">
59 64
             <el-form-item label="发车时间" prop="usertime">
60
-              <el-date-picker v-model="ruleForm.usertime" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss"
61
-                format='yyyy-MM-dd HH:mm:ss' type="datetime" placeholder="选择发车时间">
62
-              </el-date-picker>
65
+              <el-date-picker
66
+                v-model="ruleForm.usertime"
67
+                style="width: 100%;"
68
+                value-format="yyyy-MM-dd HH:mm:ss"
69
+                format="yyyy-MM-dd HH:mm:ss"
70
+                type="datetime"
71
+                placeholder="选择发车时间"/>
63 72
             </el-form-item>
64 73
           </el-col>
65 74
         </el-row>
@@ -74,7 +83,7 @@
74 83
         <el-row>
75 84
           <el-col :span="24">
76 85
             <el-form-item label="工单内容" prop="F_Remark">
77
-              <el-input type="textarea" v-model="ruleForm.content" placeholder="请输入工单内容" />
86
+              <el-input v-model="ruleForm.content" type="textarea" placeholder="请输入工单内容" />
78 87
             </el-form-item>
79 88
           </el-col>
80 89
         </el-row>
@@ -88,324 +97,329 @@
88 97
 </template>
89 98
 
90 99
 <script>
91
-  import {
92
-    getList,
93
-    getModelDetail,
94
-    getAddWorkOrder,
95
-    getUpdateWorkOrder
96
-  } from '@/api/vehicleDispatch/vehicleScheduling.js'
97
-  import {
98
-    getOrderTypeList
99
-  } from "@/api/commonAPI.js"
100
-  import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
101
-  import {
102
-    getCartype
103
-  } from "@/api/vehicleDispatch/vehicleManagement";
104
-  import {
105
-    GetPerson
106
-  } from '@/api/commonAPI'
107
-  export default {
108
-    name: "AddOrEdit",
109
-    props: {
110
-      orderTypeData: {
111
-        type: Object,
112
-        default () {
113
-          return {}
114
-        }
115
-      },
116
-      callid: {
117
-        type: String,
118
-        default: ''
119
-      },
120
-      rowid: {
121
-        type: String,
122
-        default: "",
100
+import {
101
+  getList,
102
+  getModelDetail,
103
+  getAddWorkOrder,
104
+  getUpdateWorkOrder
105
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
106
+import {
107
+  getOrderTypeList
108
+} from '@/api/commonAPI.js'
109
+import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
110
+import {
111
+  getCartype
112
+} from '@/api/vehicleDispatch/vehicleManagement'
113
+import {
114
+  GetPerson
115
+} from '@/api/commonAPI'
116
+export default {
117
+  name: 'AddOrEdit',
118
+  props: {
119
+    orderTypeData: {
120
+      type: Object,
121
+      default() {
122
+        return {}
123
+      }
124
+    },
125
+    callid: {
126
+      type: String,
127
+      default: ''
128
+    },
129
+    rowid: {
130
+      type: String,
131
+      default: ''
132
+    },
133
+    wocode: {
134
+      type: String,
135
+      default: ''
136
+    },
137
+    layerid: {
138
+      type: String,
139
+      default: ''
140
+    }
141
+  },
142
+  data() {
143
+    return {
144
+      typeList: [],
145
+      carArr: [],
146
+      repairman: [], // 申请人数据
147
+      sourceList: [{
148
+        value: '电话',
149
+        label: '电话'
150
+      }, {
151
+        value: '电脑',
152
+        label: '电脑'
153
+      }, {
154
+        value: '微信',
155
+        label: '微信'
156
+      }],
157
+      hospitalsParam: {
158
+        id: 0,
159
+        name: ''
123 160
       },
124
-      wocode: {
125
-        type: String,
126
-        default: "",
161
+      departmentsParam: {
162
+        id: 0,
163
+        name: ''
127 164
       },
128
-      layerid: {
129
-        type: String,
130
-        default: "",
165
+      repairmanParam: {
166
+        id: 0,
167
+        name: ''
131 168
       },
132
-    },
133
-    data() {
134
-      return {
135
-        typeList: [],
136
-        carArr: [],
137
-        repairman: [], // 申请人数据
138
-        sourceList: [{
139
-          value: "电话",
140
-          label: "电话"
141
-        }, {
142
-          value: "电脑",
143
-          label: "电脑"
144
-        }, {
145
-          value: "微信",
146
-          label: "微信"
169
+      rules: {
170
+        type: [{
171
+          required: true,
172
+          message: '请选择',
173
+          trigger: 'change'
147 174
         }],
148
-        hospitalsParam: {
149
-          id: 0,
150
-          name: ''
151
-        },
152
-        departmentsParam: {
153
-          id: 0,
154
-          name: ''
155
-        },
156
-        repairmanParam: {
157
-          id: 0,
158
-          name: ''
159
-        },
160
-        rules: {
161
-          type: [{
162
-            required: true,
163
-            message: '请选择',
164
-            trigger: 'change'
165
-          }],
166
-          deptid: [{
167
-            required: true,
168
-            message: '请选择',
169
-            trigger: 'change'
170
-          }],
171
-          needman: [{
172
-            required: true,
173
-            message: '请选择',
174
-            trigger: 'change'
175
-          }],
176
-          cartype: [{
177
-            required: true,
178
-            message: '请选择',
179
-            trigger: 'change'
180
-          }],
181
-          // usertime: [{
182
-          //   type: 'string',
183
-          //   required: true,
184
-          //   message: '请选择',
185
-          //   trigger: 'change'
186
-          // }],
187
-          phon: [{
188
-            required: true,
189
-            message: '请输入',
190
-            trigger: 'blur'
191
-          }],
192
-          startplace: [{
193
-            required: true,
194
-            message: '请输入',
195
-            trigger: 'blur'
196
-          }],
197
-          endplace: [{
198
-            required: true,
199
-            message: '请输入',
200
-            trigger: 'blur'
201
-          }],
202
-        },
203
-        ruleForm: {
204
-          F_ID: '',
205
-          startplace: '',
206
-          endplace: '',
207
-          source: '',
208
-          hosid: '', // 院区id
209
-          hosname: '', // 院区id
210
-          deptid: '', // 申请科室id
211
-          deptname: '', // 申请科室名称
212
-          usercode: '', // 申请人编码
213
-          username: '', //	申请人
214
-          needman: '',
215
-          birth: '',
216
-          phon: '',
217
-          type: '',
218
-          cartype: '',
219
-          F_CarMessage: '',
220
-          remark: '',
221
-          content: ''
175
+        deptid: [{
176
+          required: true,
177
+          message: '请选择',
178
+          trigger: 'change'
179
+        }],
180
+        needman: [{
181
+          required: true,
182
+          message: '请选择',
183
+          trigger: 'change'
184
+        }],
185
+        cartype: [{
186
+          required: true,
187
+          message: '请选择',
188
+          trigger: 'change'
189
+        }],
190
+        // usertime: [{
191
+        //   type: 'string',
192
+        //   required: true,
193
+        //   message: '请选择',
194
+        //   trigger: 'change'
195
+        // }],
196
+        phon: [{
197
+          required: true,
198
+          message: '请输入联系电话',
199
+          trigger: 'blur'
222 200
         },
223
-        deptid: [],
224
-        loading: false,
225
-      };
226
-    },
227
-    created() {
228
-      this.getTypeOrder()
229
-      this.getCarlist()
230
-      if (this.rowid) {
231
-        this.ruleForm.F_ID = this.rowid;
232
-        this.getDetail('0');
233
-        console.log(this.rowid)
234
-      }
235
-    },
236
-    methods: {
237
-      // 获取申请人数据
238
-      getRepairman(id) {
239
-        return new Promise((resolve) => {
240
-          const params = {
241
-            deptid: id // 字典管理的工单标识
242
-          }
243
-          GetPerson(params).then((res) => {
244
-            this.repairman = res.rows
245
-          })
246
-          resolve()
247
-        })
248
-      },
249
-      // 申请人
250
-      changeRepairman(data) {
251
-        this.ruleForm.needman = data
201
+        {
202
+          pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
203
+          message: '请输入正确的电话号码或者固话号码',
204
+          trigger: 'blur'
205
+        }],
206
+        startplace: [{
207
+          required: true,
208
+          message: '请输入',
209
+          trigger: 'blur'
210
+        }],
211
+        endplace: [{
212
+          required: true,
213
+          message: '请输入',
214
+          trigger: 'blur'
215
+        }]
252 216
       },
253
-      getCarlist() {
254
-        const params = {
255
-          Flag: 'CLLX',
256
-          Name: ''
257
-        }
258
-        getCartype(params).then(res => {
259
-          this.carArr = res.rows
260
-        })
217
+      ruleForm: {
218
+        F_ID: '',
219
+        startplace: '',
220
+        endplace: '',
221
+        source: '',
222
+        hosid: '', // 院区id
223
+        hosname: '', // 院区id
224
+        deptid: '', // 申请科室id
225
+        deptname: '', // 申请科室名称
226
+        usercode: '', // 申请人编码
227
+        username: '', //	申请人
228
+        needman: '',
229
+        birth: '',
230
+        phon: '',
231
+        type: '',
232
+        cartype: '',
233
+        F_CarMessage: '',
234
+        remark: '',
235
+        content: ''
261 236
       },
262
-      getTypeOrder() {
237
+      deptid: [],
238
+      loading: false
239
+    }
240
+  },
241
+  created() {
242
+    this.getTypeOrder()
243
+    this.getCarlist()
244
+    if (this.rowid) {
245
+      this.ruleForm.F_ID = this.rowid
246
+      this.getDetail('0')
247
+      console.log(this.rowid)
248
+    }
249
+  },
250
+  methods: {
251
+    // 获取申请人数据
252
+    getRepairman(id) {
253
+      return new Promise((resolve) => {
263 254
         const params = {
264
-          pid: 2,
265
-          typeid: 4000
255
+          deptid: id // 字典管理的工单标识
266 256
         }
267
-        getOrderTypeList(params.pid, params.typeid).then(res => {
268
-          this.typeList = res.rows
257
+        GetPerson(params).then((res) => {
258
+          this.repairman = res.rows
269 259
         })
270
-      },
271
-      getDeptid(data) {
272
-        this.ruleForm.hosid = data[0]
273
-        this.ruleForm.deptid = data[data.length - 1]
274
-        this.deptid = data
275
-        this.getRepairman(data[data.length - 1])
276
-      },
277
-      submitForm() {
278
-        this.$refs.ruleForm.validate((valid) => {
279
-          if (valid) {
280
-            // 添加
281
-            if (!this.rowid) {
282
-              const datas = {
283
-                callid: this.callid,
284
-                type: this.orderTypeData.type2Arr[this.orderTypeData.type2Arr.length - 1],
285
-                hosid: this.ruleForm.hosid, //	院区id
286
-                detpid: this.ruleForm.deptid, //	申请科室id
287
-                startplace: this.ruleForm.startplace,
288
-                endplace: this.ruleForm.endplace,
289
-                needman: this.ruleForm.needman, //	申请人
290
-                phon: this.ruleForm.phon,
291
-                cartype: this.ruleForm.cartype,
292
-                usertime: this.ruleForm.usertime,
293
-                birth: this.ruleForm.birth,
294
-                content: this.ruleForm.content, //	备注
295
-              };
296
-              getAddWorkOrder(datas)
297
-                .then((response) => {
298
-                  this.loading = false;
299
-                  if (response.state.toLowerCase() === "success") {
300
-                    this.$parent.$layer.close(this.layerid);
301
-                    this.$parent.getList(); // 重新加载父级数据
302
-                    this.$message({
303
-                      message: '恭喜你,添加工单成功!',
304
-                      type: 'success',
305
-                      duration: 1000
306
-                    })
307
-                  }
308
-                })
309
-                .catch(() => {
310
-                  this.loading = false;
311
-                });
312
-            } else {
313
-              // 编辑
314
-              const datas = {
315
-                WorkOrderCode: this.wocode,
316
-                type: this.ruleForm.type,
317
-                hosid: this.ruleForm.hosid, //	院区id
318
-                detpid: this.ruleForm.deptid, //	申请科室id
319
-                startplace: this.ruleForm.startplace,
320
-                endplace: this.ruleForm.endplace,
321
-                needman: this.ruleForm.needman, //	申请人
322
-                phon: this.ruleForm.phon,
323
-                cartype: this.ruleForm.cartype,
324
-                usertime: this.ruleForm.usertime,
325
-                birth: this.ruleForm.birth,
326
-                content: this.ruleForm.content, //	备注
327
-              };
328
-              getUpdateWorkOrder(datas)
329
-                .then((response) => {
330
-                  if (response.state.toLowerCase() === "success") {
331
-                    this.$parent.$layer.close(this.layerid);
332
-                    this.$parent.getList(); // 重新加载父级数据
333
-                    this.$message({
334
-                      message: '恭喜你,编辑工单成功!',
335
-                      type: 'success',
336
-                      duration: 1000
337
-                    })
338
-                  }
339
-                })
340
-                .catch(() => {});
260
+        resolve()
261
+      })
262
+    },
263
+    // 申请人
264
+    changeRepairman(data) {
265
+      this.ruleForm.needman = data
266
+    },
267
+    getCarlist() {
268
+      const params = {
269
+        Flag: 'CLLX',
270
+        Name: ''
271
+      }
272
+      getCartype(params).then(res => {
273
+        this.carArr = res.rows
274
+      })
275
+    },
276
+    getTypeOrder() {
277
+      const params = {
278
+        pid: 2,
279
+        typeid: 4000
280
+      }
281
+      getOrderTypeList(params.pid, params.typeid).then(res => {
282
+        this.typeList = res.rows
283
+      })
284
+    },
285
+    getDeptid(data) {
286
+      this.ruleForm.hosid = data[0]
287
+      this.ruleForm.deptid = data[data.length - 1]
288
+      this.deptid = data
289
+      this.getRepairman(data[data.length - 1])
290
+    },
291
+    submitForm() {
292
+      this.$refs.ruleForm.validate((valid) => {
293
+        if (valid) {
294
+          // 添加
295
+          if (!this.rowid) {
296
+            const datas = {
297
+              callid: this.callid,
298
+              type: this.orderTypeData.type2Arr[this.orderTypeData.type2Arr.length - 1],
299
+              hosid: this.ruleForm.hosid, //	院区id
300
+              detpid: this.ruleForm.deptid, //	申请科室id
301
+              startplace: this.ruleForm.startplace,
302
+              endplace: this.ruleForm.endplace,
303
+              needman: this.ruleForm.needman, //	申请人
304
+              phon: this.ruleForm.phon,
305
+              cartype: this.ruleForm.cartype,
306
+              usertime: this.ruleForm.usertime,
307
+              birth: this.ruleForm.birth,
308
+              content: this.ruleForm.content //	备注
341 309
             }
310
+            getAddWorkOrder(datas)
311
+              .then((response) => {
312
+                this.loading = false
313
+                if (response.state.toLowerCase() === 'success') {
314
+                  this.$parent.$layer.close(this.layerid)
315
+                  this.$parent.getList() // 重新加载父级数据
316
+                  this.$message({
317
+                    message: '恭喜你,添加工单成功!',
318
+                    type: 'success',
319
+                    duration: 1000
320
+                  })
321
+                }
322
+              })
323
+              .catch(() => {
324
+                this.loading = false
325
+              })
342 326
           } else {
343
-            this.$message.error("请输入有效的必填项信息!");
344
-            return false;
327
+            // 编辑
328
+            const datas = {
329
+              WorkOrderCode: this.wocode,
330
+              type: this.ruleForm.type,
331
+              hosid: this.ruleForm.hosid, //	院区id
332
+              detpid: this.ruleForm.deptid, //	申请科室id
333
+              startplace: this.ruleForm.startplace,
334
+              endplace: this.ruleForm.endplace,
335
+              needman: this.ruleForm.needman, //	申请人
336
+              phon: this.ruleForm.phon,
337
+              cartype: this.ruleForm.cartype,
338
+              usertime: this.ruleForm.usertime,
339
+              birth: this.ruleForm.birth,
340
+              content: this.ruleForm.content //	备注
341
+            }
342
+            getUpdateWorkOrder(datas)
343
+              .then((response) => {
344
+                if (response.state.toLowerCase() === 'success') {
345
+                  this.$parent.$layer.close(this.layerid)
346
+                  this.$parent.getList() // 重新加载父级数据
347
+                  this.$message({
348
+                    message: '恭喜你,编辑工单成功!',
349
+                    type: 'success',
350
+                    duration: 1000
351
+                  })
352
+                }
353
+              })
354
+              .catch(() => {})
345 355
           }
346
-        });
347
-      },
348
-      resetForm() {
349
-        this.$refs.ruleForm.resetFields();
350
-      },
351
-
352
-      // 获取详情
353
-      getDetail(num) {
354
-        const params = {
355
-          orderid: this.rowid,
356
-          WorkOrderCode: this.wocode,
357
-          type: num
356
+        } else {
357
+          this.$message.error('请输入有效的必填项信息!')
358
+          return false
358 359
         }
359
-        getModelDetail(params).then((response) => {
360
-          if (response.state.toLowerCase() === "success") {
361
-            const res = response.model;
362
-            this.getRepairman(res.F_ProposerDeptId)
363
-            this.ruleForm.F_ID = res.F_ID
364
-            this.ruleForm.type = res.F_Type
365
-            this.hospitalsParam.id = res.F_HosId
366
-            this.hospitalsParam.name = res.HosName
367
-            this.departmentsParam.id = res.F_ProposerDeptId
368
-            this.departmentsParam.name = res.F_ProposerDeptName
369
-            this.repairmanParam.id = res.F_ProposerCode
370
-            this.repairmanParam.name = res.F_ProposerName
371
-            this.ruleForm.username = res.F_ProposerName
372
-            this.ruleForm.hosid = res.F_HosId
373
-            this.ruleForm.hosname = res.HosName
374
-            this.ruleForm.deptid = res.F_ProposerDeptId
375
-            this.ruleForm.deptname = res.F_ProposerDeptName
376
-            this.ruleForm.usercode = res.F_ProposerCode
377
-            this.ruleForm.username = res.F_ProposerName
378
-            this.ruleForm.phon = res.F_Phon
379
-            this.ruleForm.cartype = res.F_CarType
380
-            this.ruleForm.startplace = res.F_DepartPlace
381
-            this.ruleForm.endplace = res.F_Destination
382
-            this.ruleForm.F_CarMessage = res.F_CarMessage
383
-            this.ruleForm.remark = res.F_Remark
384
-            this.ruleForm.usertime = res.F_UseTime
385
-            this.ruleForm.birth = res.F_Birth
386
-            this.ruleForm.content = res.F_Content
387
-            this.deptid = this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids
388
-            this.ruleForm.needman = res.F_ProposerCode
389
-          }
390
-        });
391
-      },
392
-      // 科室下拉改变事件
393
-      // getDepartments(data) {
394
-      //   this.ruleForm.deptid = data.value
395
-      //   this.ruleForm.deptname = data.name
396
-      // },
397
-      // 院区下拉改变事件
398
-      // getHospitals(data) {
399
-      //   this.ruleForm.hosid = data.value
400
-      //   this.ruleForm.hosname = data.name
401
-      // },
402
-      //申请人下拉改变事件
403
-      // getRepairman(data) {
404
-      //   this.ruleForm.usercode = data.value
405
-      //   this.ruleForm.username = data.name
406
-      // },
360
+      })
361
+    },
362
+    resetForm() {
363
+      this.$refs.ruleForm.resetFields()
407 364
     },
408
-  };
365
+
366
+    // 获取详情
367
+    getDetail(num) {
368
+      const params = {
369
+        orderid: this.rowid,
370
+        WorkOrderCode: this.wocode,
371
+        type: num
372
+      }
373
+      getModelDetail(params).then((response) => {
374
+        if (response.state.toLowerCase() === 'success') {
375
+          const res = response.model
376
+          this.getRepairman(res.F_ProposerDeptId)
377
+          this.ruleForm.F_ID = res.F_ID
378
+          this.ruleForm.type = res.F_Type
379
+          this.hospitalsParam.id = res.F_HosId
380
+          this.hospitalsParam.name = res.HosName
381
+          this.departmentsParam.id = res.F_ProposerDeptId
382
+          this.departmentsParam.name = res.F_ProposerDeptName
383
+          this.repairmanParam.id = res.F_ProposerCode
384
+          this.repairmanParam.name = res.F_ProposerName
385
+          this.ruleForm.username = res.F_ProposerName
386
+          this.ruleForm.hosid = res.F_HosId
387
+          this.ruleForm.hosname = res.HosName
388
+          this.ruleForm.deptid = res.F_ProposerDeptId
389
+          this.ruleForm.deptname = res.F_ProposerDeptName
390
+          this.ruleForm.usercode = res.F_ProposerCode
391
+          this.ruleForm.username = res.F_ProposerName
392
+          this.ruleForm.phon = res.F_Phon
393
+          this.ruleForm.cartype = res.F_CarType
394
+          this.ruleForm.startplace = res.F_DepartPlace
395
+          this.ruleForm.endplace = res.F_Destination
396
+          this.ruleForm.F_CarMessage = res.F_CarMessage
397
+          this.ruleForm.remark = res.F_Remark
398
+          this.ruleForm.usertime = res.F_UseTime
399
+          this.ruleForm.birth = res.F_Birth
400
+          this.ruleForm.content = res.F_Content
401
+          this.deptid = this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids
402
+          this.ruleForm.needman = res.F_ProposerCode
403
+        }
404
+      })
405
+    }
406
+    // 科室下拉改变事件
407
+    // getDepartments(data) {
408
+    //   this.ruleForm.deptid = data.value
409
+    //   this.ruleForm.deptname = data.name
410
+    // },
411
+    // 院区下拉改变事件
412
+    // getHospitals(data) {
413
+    //   this.ruleForm.hosid = data.value
414
+    //   this.ruleForm.hosname = data.name
415
+    // },
416
+    // 申请人下拉改变事件
417
+    // getRepairman(data) {
418
+    //   this.ruleForm.usercode = data.value
419
+    //   this.ruleForm.username = data.name
420
+    // },
421
+  }
422
+}
409 423
 </script>
410 424
 
411 425
 <style rel="stylesheet/scss" lang="scss" scoped>