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