|
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div v-loading="loading">
|
|
|
3
|
+ <el-form
|
|
|
4
|
+ ref="ruleForm"
|
|
|
5
|
+ :model="ruleForm"
|
|
|
6
|
+ :rules="rules"
|
|
|
7
|
+ label-width="140px"
|
|
|
8
|
+ >
|
|
|
9
|
+ <el-col :span="24">
|
|
|
10
|
+ <el-row>
|
|
|
11
|
+ <el-col :span="12">
|
|
|
12
|
+ <el-form-item label="工单类型" prop="type">
|
|
|
13
|
+ <el-select v-model="ruleForm.type" clearable placeholder="请选择工单类型" size="medium">
|
|
|
14
|
+ <el-option v-for="item in typeList" :key="item.fid" :label="item.fname" :value="item.fid" />
|
|
|
15
|
+ </el-select>
|
|
|
16
|
+ </el-form-item>
|
|
|
17
|
+ </el-col>
|
|
|
18
|
+ </el-row>
|
|
|
19
|
+ <el-row>
|
|
|
20
|
+ <el-col :span="12">
|
|
|
21
|
+ <el-form-item label="工号搜索">
|
|
|
22
|
+ <el-input
|
|
|
23
|
+ v-model="usercodeSearch"
|
|
|
24
|
+ placeholder="请输入工号"
|
|
|
25
|
+ @blur="getUserData"
|
|
|
26
|
+ />
|
|
|
27
|
+ </el-form-item>
|
|
|
28
|
+ </el-col>
|
|
|
29
|
+ </el-row>
|
|
|
30
|
+ <el-row>
|
|
|
31
|
+ <el-col :span="12">
|
|
|
32
|
+ <el-form-item label="申请科室" prop="deptid">
|
|
|
33
|
+ <select-dept-tree :isdisabled="true" :deptparam="deptid" @post-deptid="getDeptid" />
|
|
|
34
|
+ </el-form-item>
|
|
|
35
|
+ </el-col>
|
|
|
36
|
+ <el-col :span="12">
|
|
|
37
|
+ <el-form-item label="申请人" prop="needman">
|
|
|
38
|
+ <el-select
|
|
|
39
|
+ :disabled="true"
|
|
|
40
|
+ v-model="ruleForm.needman"
|
|
|
41
|
+ filterable
|
|
|
42
|
+ placeholder="请选择申请人"
|
|
|
43
|
+ style="width: 100%"
|
|
|
44
|
+ @change="changeRepairman"
|
|
|
45
|
+ >
|
|
|
46
|
+ <el-option
|
|
|
47
|
+ v-for="item in repairman"
|
|
|
48
|
+ :key="item.usercode"
|
|
|
49
|
+ :label="item.username"
|
|
|
50
|
+ :value="item.usercode"
|
|
|
51
|
+ />
|
|
|
52
|
+ </el-select>
|
|
|
53
|
+ </el-form-item>
|
|
|
54
|
+ </el-col>
|
|
|
55
|
+ </el-row>
|
|
|
56
|
+ <el-row>
|
|
|
57
|
+ <el-col :span="12">
|
|
|
58
|
+ <el-form-item label="联系电话" prop="phon">
|
|
|
59
|
+ <el-input
|
|
|
60
|
+ v-model="ruleForm.phon"
|
|
|
61
|
+ placeholder="请输入联系电话"
|
|
|
62
|
+ />
|
|
|
63
|
+ </el-form-item>
|
|
|
64
|
+ </el-col>
|
|
|
65
|
+ <el-col :span="12">
|
|
|
66
|
+ <el-form-item label="车辆要求" prop="cartype">
|
|
|
67
|
+ <el-select v-model="ruleForm.cartype" style="width: 100%">
|
|
|
68
|
+ <el-option
|
|
|
69
|
+ v-for="(item, index) in carArr"
|
|
|
70
|
+ :key="index"
|
|
|
71
|
+ :label="item.F_Name"
|
|
|
72
|
+ :value="item.F_DictionaryValueId"
|
|
|
73
|
+ />
|
|
|
74
|
+ </el-select>
|
|
|
75
|
+ </el-form-item>
|
|
|
76
|
+ </el-col>
|
|
|
77
|
+ </el-row>
|
|
|
78
|
+ <el-row>
|
|
|
79
|
+ <el-col :span="12">
|
|
|
80
|
+ <el-form-item label="出车地点" prop="dispatch">
|
|
|
81
|
+ <el-select
|
|
|
82
|
+ v-model="ruleForm.dispatch"
|
|
|
83
|
+ style="width: 100%"
|
|
|
84
|
+ clearable
|
|
|
85
|
+ placeholder="请选择出车地点"
|
|
|
86
|
+ >
|
|
|
87
|
+ <el-option
|
|
|
88
|
+ v-for="(item, index) in yqarr"
|
|
|
89
|
+ :key="index"
|
|
|
90
|
+ :label="item.T_Woname"
|
|
|
91
|
+ :value="item.T_Woname"
|
|
|
92
|
+ />
|
|
|
93
|
+ </el-select>
|
|
|
94
|
+ </el-form-item>
|
|
|
95
|
+ </el-col>
|
|
|
96
|
+ <el-col :span="12">
|
|
|
97
|
+ <el-form-item label="用车时间" prop="usertime">
|
|
|
98
|
+ <el-time-picker
|
|
|
99
|
+ v-model="ruleForm.usertime"
|
|
|
100
|
+ style="width: 100%"
|
|
|
101
|
+ value-format="HH:mm:ss"
|
|
|
102
|
+ format="HH:mm:ss"
|
|
|
103
|
+ type="time"
|
|
|
104
|
+ placeholder="选择用车时间"
|
|
|
105
|
+ />
|
|
|
106
|
+ </el-form-item>
|
|
|
107
|
+ </el-col>
|
|
|
108
|
+ </el-row>
|
|
|
109
|
+ <el-row>
|
|
|
110
|
+ <el-col :span="12">
|
|
|
111
|
+ <el-form-item label="出发地" prop="startplace">
|
|
|
112
|
+ <el-input
|
|
|
113
|
+ v-model="ruleForm.startplace"
|
|
|
114
|
+ placeholder="请输入出发地"
|
|
|
115
|
+ />
|
|
|
116
|
+ </el-form-item>
|
|
|
117
|
+ </el-col>
|
|
|
118
|
+ <el-col :span="12">
|
|
|
119
|
+ <el-form-item label="目的地" prop="endplace">
|
|
|
120
|
+ <el-input
|
|
|
121
|
+ v-model="ruleForm.endplace"
|
|
|
122
|
+ placeholder="请输入目的地"
|
|
|
123
|
+ />
|
|
|
124
|
+ </el-form-item>
|
|
|
125
|
+ </el-col>
|
|
|
126
|
+ </el-row>
|
|
|
127
|
+ <el-row>
|
|
|
128
|
+ <el-col :span="24">
|
|
|
129
|
+ <el-form-item label="工单添加人(工号)" prop="adduser">
|
|
|
130
|
+ <el-input
|
|
|
131
|
+ v-model="ruleForm.adduser"
|
|
|
132
|
+ type="number"
|
|
|
133
|
+ placeholder="请输入工单添加人的工号"
|
|
|
134
|
+ />
|
|
|
135
|
+ </el-form-item>
|
|
|
136
|
+ </el-col>
|
|
|
137
|
+ </el-row>
|
|
|
138
|
+ <el-row>
|
|
|
139
|
+ <el-col :span="24">
|
|
|
140
|
+ <el-form-item label="工单内容" prop="content">
|
|
|
141
|
+ <el-input
|
|
|
142
|
+ v-model="ruleForm.content"
|
|
|
143
|
+ type="textarea"
|
|
|
144
|
+ placeholder="请输入工单内容"
|
|
|
145
|
+ />
|
|
|
146
|
+ </el-form-item>
|
|
|
147
|
+ </el-col>
|
|
|
148
|
+ </el-row>
|
|
|
149
|
+ <el-row>
|
|
|
150
|
+ <el-col :span="24">
|
|
|
151
|
+ <el-form-item label="备注" prop="remark">
|
|
|
152
|
+ <el-input
|
|
|
153
|
+ v-model="ruleForm.remark"
|
|
|
154
|
+ type="textarea"
|
|
|
155
|
+ placeholder="请输入备注"
|
|
|
156
|
+ />
|
|
|
157
|
+ </el-form-item>
|
|
|
158
|
+ </el-col>
|
|
|
159
|
+ </el-row>
|
|
|
160
|
+ <el-row>
|
|
|
161
|
+ <el-col :span="12">
|
|
|
162
|
+ <el-form-item label="紧急情况">
|
|
|
163
|
+ <el-radio-group v-model="ruleForm.EmergencyTypes">
|
|
|
164
|
+ <el-radio label="一般">一般</el-radio>
|
|
|
165
|
+ <el-radio label="紧急">紧急</el-radio>
|
|
|
166
|
+ </el-radio-group>
|
|
|
167
|
+ </el-form-item>
|
|
|
168
|
+ </el-col>
|
|
|
169
|
+ </el-row>
|
|
|
170
|
+ <el-form-item>
|
|
|
171
|
+ <el-button type="primary" @click="submitForm">提交工单</el-button>
|
|
|
172
|
+ </el-form-item>
|
|
|
173
|
+ </el-col>
|
|
|
174
|
+ </el-form>
|
|
|
175
|
+ </div>
|
|
|
176
|
+</template>
|
|
|
177
|
+
|
|
|
178
|
+<script>
|
|
|
179
|
+import {
|
|
|
180
|
+ getAddCar,
|
|
|
181
|
+ getEditCar,
|
|
|
182
|
+ getCarInfo
|
|
|
183
|
+ } from '@/api/systemSetup/sysSetting/log'
|
|
|
184
|
+import { getOrderTypeList } from '@/api/commonAPI.js'
|
|
|
185
|
+import { getUserMsg } from '@/api/orderManagement/orderList'
|
|
|
186
|
+import { getCartype } from '@/api/vehicleDispatch/vehicleManagement'
|
|
|
187
|
+import { GetPerson,GetUsersByDeptId } from '@/api/commonAPI'
|
|
|
188
|
+import { getTypeDetail } from '@/api/systemSetup/roleSetting/department'
|
|
|
189
|
+import { GetYuanqu } from '@/api/telCall/report'
|
|
|
190
|
+import { mapGetters } from 'vuex'
|
|
|
191
|
+import { encrypt, decrypt } from '@/utils/secretKey'
|
|
|
192
|
+export default {
|
|
|
193
|
+ name: 'AddOrEdit',
|
|
|
194
|
+ props: {
|
|
|
195
|
+ layerid: {
|
|
|
196
|
+ type: String,
|
|
|
197
|
+ default: ''
|
|
|
198
|
+ },
|
|
|
199
|
+ rowid: {
|
|
|
200
|
+ type: String,
|
|
|
201
|
+ default: ''
|
|
|
202
|
+ }
|
|
|
203
|
+ },
|
|
|
204
|
+ data() {
|
|
|
205
|
+ return {
|
|
|
206
|
+ worktypeInfo: '',
|
|
|
207
|
+ cid: '',
|
|
|
208
|
+ typeList: [],
|
|
|
209
|
+ carArr: [],
|
|
|
210
|
+ repairman: [], // 申请人数据
|
|
|
211
|
+ yqarr: [],
|
|
|
212
|
+ hospitalsParam: {
|
|
|
213
|
+ id: 0,
|
|
|
214
|
+ name: ''
|
|
|
215
|
+ },
|
|
|
216
|
+ departmentsParam: {
|
|
|
217
|
+ id: 0,
|
|
|
218
|
+ name: ''
|
|
|
219
|
+ },
|
|
|
220
|
+ repairmanParam: {
|
|
|
221
|
+ id: 0,
|
|
|
222
|
+ name: ''
|
|
|
223
|
+ },
|
|
|
224
|
+ rules: {
|
|
|
225
|
+ type: [
|
|
|
226
|
+ {
|
|
|
227
|
+ required: true,
|
|
|
228
|
+ message: '请选择',
|
|
|
229
|
+ trigger: 'change'
|
|
|
230
|
+ }
|
|
|
231
|
+ ],
|
|
|
232
|
+ deptid: [
|
|
|
233
|
+ {
|
|
|
234
|
+ required: true,
|
|
|
235
|
+ message: '请选择',
|
|
|
236
|
+ trigger: 'change'
|
|
|
237
|
+ }
|
|
|
238
|
+ ],
|
|
|
239
|
+ needman: [
|
|
|
240
|
+ {
|
|
|
241
|
+ required: true,
|
|
|
242
|
+ message: '请选择',
|
|
|
243
|
+ trigger: 'change'
|
|
|
244
|
+ }
|
|
|
245
|
+ ],
|
|
|
246
|
+ cartype: [
|
|
|
247
|
+ {
|
|
|
248
|
+ required: true,
|
|
|
249
|
+ message: '请选择',
|
|
|
250
|
+ trigger: 'change'
|
|
|
251
|
+ }
|
|
|
252
|
+ ],
|
|
|
253
|
+ phon: [
|
|
|
254
|
+ {
|
|
|
255
|
+ required: true,
|
|
|
256
|
+ trigger: 'blur',
|
|
|
257
|
+ message: '请输入电话号码'
|
|
|
258
|
+ }
|
|
|
259
|
+ ],
|
|
|
260
|
+
|
|
|
261
|
+ contact: [
|
|
|
262
|
+ {
|
|
|
263
|
+ required: true,
|
|
|
264
|
+ message: '请输入联系人',
|
|
|
265
|
+ trigger: 'blur'
|
|
|
266
|
+ }
|
|
|
267
|
+ ],
|
|
|
268
|
+ contactnumber: [
|
|
|
269
|
+ {
|
|
|
270
|
+ required: true,
|
|
|
271
|
+ trigger: 'blur',
|
|
|
272
|
+ message: '请输入电话号码'
|
|
|
273
|
+ }
|
|
|
274
|
+ ],
|
|
|
275
|
+ startplace: [
|
|
|
276
|
+ {
|
|
|
277
|
+ required: true,
|
|
|
278
|
+ message: '请输入报工位置',
|
|
|
279
|
+ trigger: 'blur'
|
|
|
280
|
+ }
|
|
|
281
|
+ ],
|
|
|
282
|
+ endplace: [
|
|
|
283
|
+ {
|
|
|
284
|
+ required: true,
|
|
|
285
|
+ message: '请输入',
|
|
|
286
|
+ trigger: 'blur'
|
|
|
287
|
+ }
|
|
|
288
|
+ ]
|
|
|
289
|
+ },
|
|
|
290
|
+ ruleForm: {
|
|
|
291
|
+ F_ID: '',
|
|
|
292
|
+ startplace: '',
|
|
|
293
|
+ endplace: '',
|
|
|
294
|
+ source: '',
|
|
|
295
|
+ hosid: '', // 院区id
|
|
|
296
|
+ hosname: '', // 院区id
|
|
|
297
|
+ deptid: '', // 申请科室id
|
|
|
298
|
+ deptname: '', // 申请科室名称
|
|
|
299
|
+ usercode: '', // 申请人编码
|
|
|
300
|
+ username: '', // 申请人
|
|
|
301
|
+ needman: '',
|
|
|
302
|
+ birth: 1,
|
|
|
303
|
+ phon: '',
|
|
|
304
|
+ deptphone: '',
|
|
|
305
|
+ contact: '',
|
|
|
306
|
+ contactnumber: '',
|
|
|
307
|
+ type: '',
|
|
|
308
|
+ cartype: '',
|
|
|
309
|
+ F_CarMessage: '',
|
|
|
310
|
+ remark: '',
|
|
|
311
|
+ content: '',
|
|
|
312
|
+ EmergencyTypes: '一般',
|
|
|
313
|
+ adduser: '',
|
|
|
314
|
+ type2Arr: [],
|
|
|
315
|
+ dispatch: ''
|
|
|
316
|
+ },
|
|
|
317
|
+ deptid: [],
|
|
|
318
|
+ usercodeSearch: '',
|
|
|
319
|
+ loading: false
|
|
|
320
|
+ }
|
|
|
321
|
+ },
|
|
|
322
|
+ watch: {
|
|
|
323
|
+
|
|
|
324
|
+ },
|
|
|
325
|
+ computed: {
|
|
|
326
|
+
|
|
|
327
|
+ },
|
|
|
328
|
+ created() {
|
|
|
329
|
+ this.getHos()
|
|
|
330
|
+ this.getCarlist()
|
|
|
331
|
+ this.getTypeOrder()
|
|
|
332
|
+ if(this.rowid){
|
|
|
333
|
+ this.getDetail()
|
|
|
334
|
+ }
|
|
|
335
|
+ },
|
|
|
336
|
+ methods: {
|
|
|
337
|
+ getHos() {
|
|
|
338
|
+ const params = {}
|
|
|
339
|
+ GetYuanqu(params).then((res) => {
|
|
|
340
|
+ this.yqarr = res.data
|
|
|
341
|
+ })
|
|
|
342
|
+ },
|
|
|
343
|
+ getUserData() {
|
|
|
344
|
+ if (!this.usercodeSearch) {
|
|
|
345
|
+ return
|
|
|
346
|
+ }
|
|
|
347
|
+ const params = {
|
|
|
348
|
+ usercode: this.usercodeSearch
|
|
|
349
|
+ }
|
|
|
350
|
+ getUserMsg(params).then((res) => {
|
|
|
351
|
+ const data = res.data
|
|
|
352
|
+ this.ruleForm.deptid = data.F_DeptId
|
|
|
353
|
+ this.deptid = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids
|
|
|
354
|
+ this.ruleForm.hosid =
|
|
|
355
|
+ this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids[0]
|
|
|
356
|
+ this.getRepairman(data.F_DeptId)
|
|
|
357
|
+ this.getDeptAddress(data.F_DeptId)
|
|
|
358
|
+ this.ruleForm.needman = data.F_UserCode
|
|
|
359
|
+ this.ruleForm.phon = data.F_Telephone ? decrypt(data.F_TelephoneShow) : ''
|
|
|
360
|
+ })
|
|
|
361
|
+ },
|
|
|
362
|
+ // 获取申请人数据
|
|
|
363
|
+ getRepairman(id) {
|
|
|
364
|
+ return new Promise((resolve) => {
|
|
|
365
|
+ const params = {
|
|
|
366
|
+ deptid: id // 字典管理的工单标识
|
|
|
367
|
+ }
|
|
|
368
|
+ GetUsersByDeptId(params).then((res) => {
|
|
|
369
|
+ this.repairman = res.rows
|
|
|
370
|
+ })
|
|
|
371
|
+ resolve()
|
|
|
372
|
+ })
|
|
|
373
|
+ },
|
|
|
374
|
+ // 申请人
|
|
|
375
|
+ changeRepairman(data) {
|
|
|
376
|
+ this.ruleForm.needman = data
|
|
|
377
|
+ const user = this.repairman.find((o) => {
|
|
|
378
|
+ return o.usercode === data.toString()
|
|
|
379
|
+ })
|
|
|
380
|
+ if (user) {
|
|
|
381
|
+ this.ruleForm.phon = user.usertelphone
|
|
|
382
|
+ }
|
|
|
383
|
+ },
|
|
|
384
|
+ getCarlist() {
|
|
|
385
|
+ const params = {
|
|
|
386
|
+ Flag: 'CLLX',
|
|
|
387
|
+ Name: ''
|
|
|
388
|
+ }
|
|
|
389
|
+ getCartype(params).then((res) => {
|
|
|
390
|
+ this.carArr = res.rows
|
|
|
391
|
+ })
|
|
|
392
|
+ },
|
|
|
393
|
+ getTypeOrder() {
|
|
|
394
|
+ const params = {
|
|
|
395
|
+ pid: 2,
|
|
|
396
|
+ typeid: 4000
|
|
|
397
|
+ }
|
|
|
398
|
+ getOrderTypeList(params.pid, params.typeid).then((res) => {
|
|
|
399
|
+ this.typeList = res.rows
|
|
|
400
|
+ })
|
|
|
401
|
+ },
|
|
|
402
|
+ getDeptid(data) {
|
|
|
403
|
+ this.ruleForm.hosid = data[0]
|
|
|
404
|
+ this.ruleForm.deptid = data[data.length - 1]
|
|
|
405
|
+ this.deptid = data
|
|
|
406
|
+ this.ruleForm.needman = ''
|
|
|
407
|
+ this.getRepairman(data[data.length - 1])
|
|
|
408
|
+ this.getDeptAddress(data[data.length - 1])
|
|
|
409
|
+ },
|
|
|
410
|
+ getDeptAddress(id) {
|
|
|
411
|
+ getTypeDetail(id).then((res) => {
|
|
|
412
|
+ // this.ruleForm.startplace = res.data.F_Location ? decrypt(res.data.F_LocationShow) : ''
|
|
|
413
|
+ this.ruleForm.deptphone = res.data.F_OfficeTelephone ? decrypt(res.data.F_OfficeTelephoneShow) : ''
|
|
|
414
|
+ if(this.ruleForm.deptphone == 'undefined'){
|
|
|
415
|
+ this.ruleForm.deptphone = ''
|
|
|
416
|
+ }
|
|
|
417
|
+ })
|
|
|
418
|
+ },
|
|
|
419
|
+ submitForm() {
|
|
|
420
|
+ this.$refs.ruleForm.validate((valid) => {
|
|
|
421
|
+ if (valid) {
|
|
|
422
|
+ // 添加
|
|
|
423
|
+ if (!this.rowid) {
|
|
|
424
|
+ const datas = {
|
|
|
425
|
+ F_Type: this.ruleForm.type,//工单类别
|
|
|
426
|
+ F_HosId: this.ruleForm.hosid, // 院区id
|
|
|
427
|
+ F_ProposerDeptId: this.ruleForm.deptid, // 申请科室id
|
|
|
428
|
+ F_Dispatch: this.ruleForm.dispatch,//出发地点
|
|
|
429
|
+ F_DepartPlace: this.ruleForm.startplace,//出发地
|
|
|
430
|
+ F_Destination: this.ruleForm.endplace,//目的地
|
|
|
431
|
+ F_ProposerCode: this.ruleForm.needman, // 申请人工号
|
|
|
432
|
+ F_Phon: this.ruleForm.phon,//联系电话
|
|
|
433
|
+ F_CarType: this.ruleForm.cartype,//车辆要求
|
|
|
434
|
+ F_UseTime: this.ruleForm.usertime,//发车时间
|
|
|
435
|
+ F_Content: this.ruleForm.content, // 工单内容
|
|
|
436
|
+ F_Remark: this.ruleForm.remark,//备注
|
|
|
437
|
+ F_CarCreateUser: this.ruleForm.adduser,//工单添加人
|
|
|
438
|
+ F_EmergencyTypes: this.ruleForm.EmergencyTypes,//紧急程度
|
|
|
439
|
+ }
|
|
|
440
|
+ getAddCar(datas)
|
|
|
441
|
+ .then((response) => {
|
|
|
442
|
+ this.loading = false
|
|
|
443
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
444
|
+ this.$parent.$layer.close(this.layerid);
|
|
|
445
|
+ this.$parent.getListTask() // 重新加载父级数据
|
|
|
446
|
+ this.$message({
|
|
|
447
|
+ message: '恭喜你,添加工单成功!',
|
|
|
448
|
+ type: 'success',
|
|
|
449
|
+ duration: 1000
|
|
|
450
|
+ })
|
|
|
451
|
+ }
|
|
|
452
|
+ })
|
|
|
453
|
+ .catch(() => {
|
|
|
454
|
+ this.loading = false
|
|
|
455
|
+ })
|
|
|
456
|
+ } else {
|
|
|
457
|
+ // 编辑
|
|
|
458
|
+ const datas = {
|
|
|
459
|
+ F_ID :this.rowid,
|
|
|
460
|
+ F_Type: this.ruleForm.type,//工单类别
|
|
|
461
|
+ F_HosId: this.ruleForm.hosid, // 院区id
|
|
|
462
|
+ F_ProposerDeptId: this.ruleForm.deptid, // 申请科室id
|
|
|
463
|
+ F_Dispatch: this.ruleForm.dispatch,//出发地点
|
|
|
464
|
+ F_DepartPlace: this.ruleForm.startplace,//出发地
|
|
|
465
|
+ F_Destination: this.ruleForm.endplace,//目的地
|
|
|
466
|
+ F_ProposerCode: this.ruleForm.needman, // 申请人工号
|
|
|
467
|
+ F_Phon: this.ruleForm.phon,//联系电话
|
|
|
468
|
+ F_CarType: this.ruleForm.cartype,//车辆要求
|
|
|
469
|
+ F_UseTime: this.ruleForm.usertime,//发车时间
|
|
|
470
|
+ F_Content: this.ruleForm.content, // 工单内容
|
|
|
471
|
+ F_Remark: this.ruleForm.remark,//备注
|
|
|
472
|
+ F_CarCreateUser: this.ruleForm.adduser,//工单添加人
|
|
|
473
|
+ F_EmergencyTypes: this.ruleForm.EmergencyTypes,//紧急程度
|
|
|
474
|
+ }
|
|
|
475
|
+ getEditCar(datas)
|
|
|
476
|
+ .then((response) => {
|
|
|
477
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
478
|
+ this.$parent.$layer.close(this.layerid);
|
|
|
479
|
+ this.$parent.getListTask() // 重新加载父级数据
|
|
|
480
|
+ this.$message({
|
|
|
481
|
+ message: '恭喜你,编辑工单成功!',
|
|
|
482
|
+ type: 'success',
|
|
|
483
|
+ duration: 1000
|
|
|
484
|
+ })
|
|
|
485
|
+ }
|
|
|
486
|
+ })
|
|
|
487
|
+ .catch(() => {})
|
|
|
488
|
+ }
|
|
|
489
|
+ } else {
|
|
|
490
|
+ this.$message.error('请输入有效的必填项信息!')
|
|
|
491
|
+ return false
|
|
|
492
|
+ }
|
|
|
493
|
+ })
|
|
|
494
|
+ },
|
|
|
495
|
+ resetForm() {
|
|
|
496
|
+ this.$refs.ruleForm.resetFields()
|
|
|
497
|
+ },
|
|
|
498
|
+ // 获取详情
|
|
|
499
|
+ getDetail(num) {
|
|
|
500
|
+ const params = {
|
|
|
501
|
+ infoid: this.rowid
|
|
|
502
|
+ }
|
|
|
503
|
+ getCarInfo(params).then((response) => {
|
|
|
504
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
505
|
+ const res = response.data
|
|
|
506
|
+ this.ruleForm.type = res.F_Type
|
|
|
507
|
+ this.usercodeSearch = res.F_ProposerCode
|
|
|
508
|
+ this.getRepairman(res.F_ProposerDeptId)
|
|
|
509
|
+ this.getDeptAddress(res.F_ProposerDeptId)
|
|
|
510
|
+ this.ruleForm.F_ID = res.F_ID
|
|
|
511
|
+ this.ruleForm.hosid = res.F_HosId
|
|
|
512
|
+ this.ruleForm.deptid = res.F_ProposerDeptId
|
|
|
513
|
+ this.ruleForm.phon = res.F_Phon
|
|
|
514
|
+ this.ruleForm.cartype = res.F_CarType
|
|
|
515
|
+ this.ruleForm.dispatch = res.F_Dispatch
|
|
|
516
|
+ this.ruleForm.startplace = res.F_DepartPlace
|
|
|
517
|
+ this.ruleForm.endplace = res.F_Destination
|
|
|
518
|
+ this.ruleForm.usertime = res.F_UseTime
|
|
|
519
|
+ this.ruleForm.content = res.F_Content
|
|
|
520
|
+ this.ruleForm.remark = res.F_Remark
|
|
|
521
|
+ this.ruleForm.EmergencyTypes = res.F_EmergencyTypes
|
|
|
522
|
+ this.ruleForm.adduser = res.F_CarCreateUser
|
|
|
523
|
+ this.deptid =
|
|
|
524
|
+ this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids
|
|
|
525
|
+ this.ruleForm.needman = res.F_ProposerCode
|
|
|
526
|
+ }
|
|
|
527
|
+ })
|
|
|
528
|
+ }
|
|
|
529
|
+ }
|
|
|
530
|
+}
|
|
|
531
|
+</script>
|
|
|
532
|
+
|
|
|
533
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
534
|
+</style>
|