|
|
@@ -111,8 +111,7 @@
|
|
111
|
111
|
:key="index"
|
|
112
|
112
|
:label="item.T_Woname"
|
|
113
|
113
|
:value="item.T_Woname"
|
|
114
|
|
- >
|
|
115
|
|
- </el-option>
|
|
|
114
|
+ />
|
|
116
|
115
|
</el-select>
|
|
117
|
116
|
</el-form-item>
|
|
118
|
117
|
</el-col>
|
|
|
@@ -181,103 +180,104 @@ import {
|
|
181
|
180
|
// getList,
|
|
182
|
181
|
getModelDetail,
|
|
183
|
182
|
getAddWorkOrder,
|
|
184
|
|
- getUpdateWorkOrder,
|
|
185
|
|
-} from "@/api/vehicleDispatch/vehicleScheduling.js";
|
|
186
|
|
-import { getOrderTypeList } from "@/api/commonAPI.js";
|
|
|
183
|
+ getUpdateWorkOrder
|
|
|
184
|
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
|
|
|
185
|
+import { getOrderTypeList } from '@/api/commonAPI.js'
|
|
187
|
186
|
// import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
|
|
188
|
|
-import { getUserMsg } from "@/api/orderManagement/orderList";
|
|
189
|
|
-import { getCartype } from "@/api/vehicleDispatch/vehicleManagement";
|
|
190
|
|
-import { GetPerson } from "@/api/commonAPI";
|
|
191
|
|
-import { getTypeDetail } from "@/api/systemSetup/roleSetting/department";
|
|
192
|
|
-import { GetYuanqu } from "@/api/telCall/report";
|
|
193
|
|
-import { Send, ws } from "../../../utils/telWebsocket.js";
|
|
194
|
|
-import { mapGetters } from "vuex";
|
|
|
187
|
+import { getUserMsg } from '@/api/orderManagement/orderList'
|
|
|
188
|
+import { getCartype } from '@/api/vehicleDispatch/vehicleManagement'
|
|
|
189
|
+import { GetPerson } from '@/api/commonAPI'
|
|
|
190
|
+import { getTypeDetail } from '@/api/systemSetup/roleSetting/department'
|
|
|
191
|
+import { GetYuanqu } from '@/api/telCall/report'
|
|
|
192
|
+import { Send, ws } from '../../../utils/telWebsocket.js'
|
|
|
193
|
+import { mapGetters } from 'vuex'
|
|
|
194
|
+import { encrypt, decrypt } from '@/utils/secretKey'
|
|
195
|
195
|
export default {
|
|
196
|
|
- name: "AddOrEdit",
|
|
|
196
|
+ name: 'AddOrEdit',
|
|
197
|
197
|
props: {
|
|
198
|
198
|
orderTypeData: {
|
|
199
|
199
|
type: Object,
|
|
200
|
200
|
default() {
|
|
201
|
|
- return {};
|
|
202
|
|
- },
|
|
|
201
|
+ return {}
|
|
|
202
|
+ }
|
|
203
|
203
|
},
|
|
204
|
204
|
callid: {
|
|
205
|
205
|
type: String,
|
|
206
|
|
- default: "",
|
|
|
206
|
+ default: ''
|
|
207
|
207
|
},
|
|
208
|
208
|
rowid: {
|
|
209
|
209
|
type: String,
|
|
210
|
|
- default: "",
|
|
|
210
|
+ default: ''
|
|
211
|
211
|
},
|
|
212
|
212
|
wid: {
|
|
213
|
213
|
type: String,
|
|
214
|
|
- default: "",
|
|
|
214
|
+ default: ''
|
|
215
|
215
|
},
|
|
216
|
216
|
fid: {
|
|
217
|
217
|
type: String,
|
|
218
|
|
- default: "",
|
|
|
218
|
+ default: ''
|
|
219
|
219
|
},
|
|
220
|
220
|
wocode: {
|
|
221
|
221
|
type: String,
|
|
222
|
|
- default: "",
|
|
|
222
|
+ default: ''
|
|
223
|
223
|
},
|
|
224
|
224
|
layerid: {
|
|
225
|
225
|
type: String,
|
|
226
|
|
- default: "",
|
|
|
226
|
+ default: ''
|
|
227
|
227
|
},
|
|
228
|
228
|
iswomanage: {
|
|
229
|
229
|
type: String,
|
|
230
|
|
- default: "",
|
|
231
|
|
- },
|
|
|
230
|
+ default: ''
|
|
|
231
|
+ }
|
|
232
|
232
|
},
|
|
233
|
233
|
data() {
|
|
234
|
234
|
return {
|
|
235
|
|
- worktypeInfo: "",
|
|
236
|
|
- cid: "",
|
|
|
235
|
+ worktypeInfo: '',
|
|
|
236
|
+ cid: '',
|
|
237
|
237
|
typeList: [],
|
|
238
|
238
|
carArr: [],
|
|
239
|
239
|
repairman: [], // 申请人数据
|
|
240
|
240
|
yqarr: [],
|
|
241
|
241
|
hospitalsParam: {
|
|
242
|
242
|
id: 0,
|
|
243
|
|
- name: "",
|
|
|
243
|
+ name: ''
|
|
244
|
244
|
},
|
|
245
|
245
|
departmentsParam: {
|
|
246
|
246
|
id: 0,
|
|
247
|
|
- name: "",
|
|
|
247
|
+ name: ''
|
|
248
|
248
|
},
|
|
249
|
249
|
repairmanParam: {
|
|
250
|
250
|
id: 0,
|
|
251
|
|
- name: "",
|
|
|
251
|
+ name: ''
|
|
252
|
252
|
},
|
|
253
|
253
|
rules: {
|
|
254
|
254
|
type: [
|
|
255
|
255
|
{
|
|
256
|
256
|
required: true,
|
|
257
|
|
- message: "请选择",
|
|
258
|
|
- trigger: "change",
|
|
259
|
|
- },
|
|
|
257
|
+ message: '请选择',
|
|
|
258
|
+ trigger: 'change'
|
|
|
259
|
+ }
|
|
260
|
260
|
],
|
|
261
|
261
|
deptid: [
|
|
262
|
262
|
{
|
|
263
|
263
|
required: true,
|
|
264
|
|
- message: "请选择",
|
|
265
|
|
- trigger: "change",
|
|
266
|
|
- },
|
|
|
264
|
+ message: '请选择',
|
|
|
265
|
+ trigger: 'change'
|
|
|
266
|
+ }
|
|
267
|
267
|
],
|
|
268
|
268
|
needman: [
|
|
269
|
269
|
{
|
|
270
|
270
|
required: true,
|
|
271
|
|
- message: "请选择",
|
|
272
|
|
- trigger: "change",
|
|
273
|
|
- },
|
|
|
271
|
+ message: '请选择',
|
|
|
272
|
+ trigger: 'change'
|
|
|
273
|
+ }
|
|
274
|
274
|
],
|
|
275
|
275
|
cartype: [
|
|
276
|
276
|
{
|
|
277
|
277
|
required: true,
|
|
278
|
|
- message: "请选择",
|
|
279
|
|
- trigger: "change",
|
|
280
|
|
- },
|
|
|
278
|
+ message: '请选择',
|
|
|
279
|
+ trigger: 'change'
|
|
|
280
|
+ }
|
|
281
|
281
|
],
|
|
282
|
282
|
// usertime: [{
|
|
283
|
283
|
// type: 'string',
|
|
|
@@ -288,10 +288,10 @@ export default {
|
|
288
|
288
|
phon: [
|
|
289
|
289
|
{
|
|
290
|
290
|
required: true,
|
|
291
|
|
- trigger: "blur",
|
|
|
291
|
+ trigger: 'blur',
|
|
292
|
292
|
// pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
|
|
293
|
|
- message: "请输入电话号码",
|
|
294
|
|
- },
|
|
|
293
|
+ message: '请输入电话号码'
|
|
|
294
|
+ }
|
|
295
|
295
|
// {
|
|
296
|
296
|
// pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
|
|
297
|
297
|
// message: '请输入正确的电话号码或者固话号码',
|
|
|
@@ -302,32 +302,32 @@ export default {
|
|
302
|
302
|
contact: [
|
|
303
|
303
|
{
|
|
304
|
304
|
required: true,
|
|
305
|
|
- message: "请输入联系人",
|
|
306
|
|
- trigger: "blur",
|
|
307
|
|
- },
|
|
|
305
|
+ message: '请输入联系人',
|
|
|
306
|
+ trigger: 'blur'
|
|
|
307
|
+ }
|
|
308
|
308
|
],
|
|
309
|
309
|
contactnumber: [
|
|
310
|
310
|
{
|
|
311
|
311
|
required: true,
|
|
312
|
|
- trigger: "blur",
|
|
|
312
|
+ trigger: 'blur',
|
|
313
|
313
|
// pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
|
|
314
|
|
- message: "请输入电话号码",
|
|
315
|
|
- },
|
|
|
314
|
+ message: '请输入电话号码'
|
|
|
315
|
+ }
|
|
316
|
316
|
],
|
|
317
|
317
|
startplace: [
|
|
318
|
318
|
{
|
|
319
|
319
|
required: true,
|
|
320
|
|
- message: "请输入",
|
|
321
|
|
- trigger: "blur",
|
|
322
|
|
- },
|
|
|
320
|
+ message: '请输入',
|
|
|
321
|
+ trigger: 'blur'
|
|
|
322
|
+ }
|
|
323
|
323
|
],
|
|
324
|
324
|
endplace: [
|
|
325
|
325
|
{
|
|
326
|
326
|
required: true,
|
|
327
|
|
- message: "请输入",
|
|
328
|
|
- trigger: "blur",
|
|
329
|
|
- },
|
|
330
|
|
- ],
|
|
|
327
|
+ message: '请输入',
|
|
|
328
|
+ trigger: 'blur'
|
|
|
329
|
+ }
|
|
|
330
|
+ ]
|
|
331
|
331
|
// content: [{
|
|
332
|
332
|
// required: true,
|
|
333
|
333
|
// message: '请输入',
|
|
|
@@ -335,187 +335,187 @@ export default {
|
|
335
|
335
|
// }]
|
|
336
|
336
|
},
|
|
337
|
337
|
ruleForm: {
|
|
338
|
|
- F_ID: "",
|
|
339
|
|
- startplace: "",
|
|
340
|
|
- endplace: "",
|
|
341
|
|
- source: "",
|
|
342
|
|
- hosid: "", // 院区id
|
|
343
|
|
- hosname: "", // 院区id
|
|
344
|
|
- deptid: "", // 申请科室id
|
|
345
|
|
- deptname: "", // 申请科室名称
|
|
346
|
|
- usercode: "", // 申请人编码
|
|
347
|
|
- username: "", // 申请人
|
|
348
|
|
- needman: "",
|
|
|
338
|
+ F_ID: '',
|
|
|
339
|
+ startplace: '',
|
|
|
340
|
+ endplace: '',
|
|
|
341
|
+ source: '',
|
|
|
342
|
+ hosid: '', // 院区id
|
|
|
343
|
+ hosname: '', // 院区id
|
|
|
344
|
+ deptid: '', // 申请科室id
|
|
|
345
|
+ deptname: '', // 申请科室名称
|
|
|
346
|
+ usercode: '', // 申请人编码
|
|
|
347
|
+ username: '', // 申请人
|
|
|
348
|
+ needman: '',
|
|
349
|
349
|
birth: 1,
|
|
350
|
|
- phon: "",
|
|
351
|
|
- deptphone: "",
|
|
352
|
|
- contact: "",
|
|
353
|
|
- contactnumber: "",
|
|
354
|
|
- type: "",
|
|
355
|
|
- cartype: "",
|
|
356
|
|
- F_CarMessage: "",
|
|
357
|
|
- remark: "",
|
|
358
|
|
- content: "",
|
|
359
|
|
- EmergencyTypes: "一般",
|
|
|
350
|
+ phon: '',
|
|
|
351
|
+ deptphone: '',
|
|
|
352
|
+ contact: '',
|
|
|
353
|
+ contactnumber: '',
|
|
|
354
|
+ type: '',
|
|
|
355
|
+ cartype: '',
|
|
|
356
|
+ F_CarMessage: '',
|
|
|
357
|
+ remark: '',
|
|
|
358
|
+ content: '',
|
|
|
359
|
+ EmergencyTypes: '一般',
|
|
360
|
360
|
type2Arr: [],
|
|
361
|
|
- dispatch: "",
|
|
|
361
|
+ dispatch: ''
|
|
362
|
362
|
},
|
|
363
|
363
|
deptid: [],
|
|
364
|
|
- usercodeSearch: "",
|
|
365
|
|
- loading: false,
|
|
366
|
|
- };
|
|
|
364
|
+ usercodeSearch: '',
|
|
|
365
|
+ loading: false
|
|
|
366
|
+ }
|
|
367
|
367
|
},
|
|
368
|
368
|
watch: {
|
|
369
|
|
- "orderTypeData.F_Type2": function () {
|
|
370
|
|
- console.log(this.orderTypeData.type2Arr);
|
|
371
|
|
- this.ruleForm.type2Arr = this.orderTypeData.type2Arr;
|
|
|
369
|
+ 'orderTypeData.F_Type2': function() {
|
|
|
370
|
+ console.log(this.orderTypeData.type2Arr)
|
|
|
371
|
+ this.ruleForm.type2Arr = this.orderTypeData.type2Arr
|
|
372
|
372
|
this.worktypeInfo =
|
|
373
|
373
|
this.$store.getters.workTypeMap[
|
|
374
|
374
|
parseInt(this.orderTypeData.type2Arr[0])
|
|
375
|
|
- ].tag || "";
|
|
376
|
|
- console.log(this.worktypeInfo, "标识11");
|
|
|
375
|
+ ].tag || ''
|
|
|
376
|
+ console.log(this.worktypeInfo, '标识11')
|
|
377
|
377
|
// this.ruleForm.F_Type2 = this.orderTypeData.F_Type2
|
|
378
|
378
|
// this.ruleForm.identification = this.orderTypeData.identification
|
|
379
|
|
- },
|
|
|
379
|
+ }
|
|
380
|
380
|
},
|
|
381
|
381
|
computed: {
|
|
382
|
382
|
...mapGetters([
|
|
383
|
|
- "telTopRightState", // 状态信息
|
|
384
|
|
- ]),
|
|
|
383
|
+ 'telTopRightState' // 状态信息
|
|
|
384
|
+ ])
|
|
385
|
385
|
},
|
|
386
|
386
|
created() {
|
|
387
|
|
- this.cid = this.callid;
|
|
|
387
|
+ this.cid = this.callid
|
|
388
|
388
|
if (!this.cid) {
|
|
389
|
|
- this.cid = window.localStorage.getItem("callidSave");
|
|
|
389
|
+ this.cid = window.localStorage.getItem('callidSave')
|
|
390
|
390
|
}
|
|
391
|
|
- this.getTypeOrder();
|
|
392
|
|
- this.getCarlist();
|
|
393
|
|
- this.getHos();
|
|
|
391
|
+ this.getTypeOrder()
|
|
|
392
|
+ this.getCarlist()
|
|
|
393
|
+ this.getHos()
|
|
394
|
394
|
if (this.wocode) {
|
|
395
|
|
- this.wocode = this.wocode;
|
|
396
|
|
- this.getDetail("0");
|
|
|
395
|
+ this.wocode = this.wocode
|
|
|
396
|
+ this.getDetail('0')
|
|
397
|
397
|
}
|
|
398
|
398
|
if (this.wid) {
|
|
399
|
|
- this.wocode = this.wid;
|
|
400
|
|
- this.getDetail("0");
|
|
|
399
|
+ this.wocode = this.wid
|
|
|
400
|
+ this.getDetail('0')
|
|
401
|
401
|
}
|
|
402
|
|
- if (this.iswomanage === "1") {
|
|
403
|
|
- this.usercodeSearch = window.localStorage.getItem("storageUsercode");
|
|
404
|
|
- const dept = this.$store.getters.teamId;
|
|
405
|
|
- this.deptid = this.$store.getters.deptmap[parseInt(dept)].ids;
|
|
406
|
|
- this.ruleForm.hosid = this.$store.getters.deptmap[parseInt(dept)].ids[0];
|
|
407
|
|
- this.ruleForm.deptid = dept;
|
|
408
|
|
- this.getRepairman(dept);
|
|
409
|
|
- this.getDeptAddress(dept);
|
|
410
|
|
- this.ruleForm.needman = this.$store.getters.usercode;
|
|
411
|
|
- this.ruleForm.phon = this.$store.getters.mobile;
|
|
412
|
|
- this.ruleForm.startplace = this.$store.getters.location;
|
|
|
402
|
+ if (this.iswomanage === '1') {
|
|
|
403
|
+ this.usercodeSearch = window.localStorage.getItem('storageUsercode')
|
|
|
404
|
+ const dept = this.$store.getters.teamId
|
|
|
405
|
+ this.deptid = this.$store.getters.deptmap[parseInt(dept)].ids
|
|
|
406
|
+ this.ruleForm.hosid = this.$store.getters.deptmap[parseInt(dept)].ids[0]
|
|
|
407
|
+ this.ruleForm.deptid = dept
|
|
|
408
|
+ this.getRepairman(dept)
|
|
|
409
|
+ this.getDeptAddress(dept)
|
|
|
410
|
+ this.ruleForm.needman = this.$store.getters.usercode
|
|
|
411
|
+ this.ruleForm.phon = this.$store.getters.mobile
|
|
|
412
|
+ this.ruleForm.startplace = this.$store.getters.location
|
|
413
|
413
|
}
|
|
414
|
414
|
// this.getUserData()
|
|
415
|
415
|
},
|
|
416
|
416
|
methods: {
|
|
417
|
417
|
getHos() {
|
|
418
|
|
- const params = {};
|
|
|
418
|
+ const params = {}
|
|
419
|
419
|
GetYuanqu(params).then((res) => {
|
|
420
|
|
- this.yqarr = res.data;
|
|
421
|
|
- });
|
|
|
420
|
+ this.yqarr = res.data
|
|
|
421
|
+ })
|
|
422
|
422
|
},
|
|
423
|
423
|
getUserData() {
|
|
424
|
424
|
if (!this.usercodeSearch) {
|
|
425
|
|
- return;
|
|
|
425
|
+ return
|
|
426
|
426
|
}
|
|
427
|
427
|
const params = {
|
|
428
|
|
- usercode: this.usercodeSearch,
|
|
429
|
|
- };
|
|
|
428
|
+ usercode: this.usercodeSearch
|
|
|
429
|
+ }
|
|
430
|
430
|
getUserMsg(params).then((res) => {
|
|
431
|
|
- const data = res.data;
|
|
432
|
|
- this.ruleForm.deptid = data.F_DeptId;
|
|
433
|
|
- this.deptid = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids;
|
|
|
431
|
+ const data = res.data
|
|
|
432
|
+ this.ruleForm.deptid = data.F_DeptId
|
|
|
433
|
+ this.deptid = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids
|
|
434
|
434
|
this.ruleForm.hosid =
|
|
435
|
|
- this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids[0];
|
|
436
|
|
- this.getRepairman(data.F_DeptId);
|
|
437
|
|
- this.getDeptAddress(data.F_DeptId);
|
|
438
|
|
- this.ruleForm.needman = data.F_UserCode;
|
|
439
|
|
- this.ruleForm.phon = data.F_Telephone;
|
|
440
|
|
- this.ruleForm.startplace = data.F_Location;
|
|
441
|
|
- });
|
|
|
435
|
+ this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids[0]
|
|
|
436
|
+ this.getRepairman(data.F_DeptId)
|
|
|
437
|
+ this.getDeptAddress(data.F_DeptId)
|
|
|
438
|
+ this.ruleForm.needman = data.F_UserCode
|
|
|
439
|
+ this.ruleForm.phon = data.F_Telephone ? decrypt(data.F_TelephoneShow) : ''
|
|
|
440
|
+ this.ruleForm.startplace = data.F_Location
|
|
|
441
|
+ })
|
|
442
|
442
|
},
|
|
443
|
443
|
// 获取申请人数据
|
|
444
|
444
|
getRepairman(id) {
|
|
445
|
445
|
return new Promise((resolve) => {
|
|
446
|
446
|
const params = {
|
|
447
|
|
- deptid: id, // 字典管理的工单标识
|
|
448
|
|
- };
|
|
|
447
|
+ deptid: id // 字典管理的工单标识
|
|
|
448
|
+ }
|
|
449
|
449
|
GetPerson(params).then((res) => {
|
|
450
|
|
- this.repairman = res.rows;
|
|
451
|
|
- });
|
|
452
|
|
- resolve();
|
|
453
|
|
- });
|
|
|
450
|
+ this.repairman = res.rows
|
|
|
451
|
+ })
|
|
|
452
|
+ resolve()
|
|
|
453
|
+ })
|
|
454
|
454
|
},
|
|
455
|
455
|
// 申请人
|
|
456
|
456
|
changeRepairman(data) {
|
|
457
|
|
- this.ruleForm.needman = data;
|
|
|
457
|
+ this.ruleForm.needman = data
|
|
458
|
458
|
const user = this.repairman.find((o) => {
|
|
459
|
|
- return o.usercode === data.toString();
|
|
460
|
|
- });
|
|
|
459
|
+ return o.usercode === data.toString()
|
|
|
460
|
+ })
|
|
461
|
461
|
if (user) {
|
|
462
|
|
- this.ruleForm.phon = user.usertelphone;
|
|
|
462
|
+ this.ruleForm.phon = user.usertelphone
|
|
463
|
463
|
}
|
|
464
|
464
|
},
|
|
465
|
465
|
getCarlist() {
|
|
466
|
466
|
const params = {
|
|
467
|
|
- Flag: "CLLX",
|
|
468
|
|
- Name: "",
|
|
469
|
|
- };
|
|
|
467
|
+ Flag: 'CLLX',
|
|
|
468
|
+ Name: ''
|
|
|
469
|
+ }
|
|
470
|
470
|
getCartype(params).then((res) => {
|
|
471
|
|
- this.carArr = res.rows;
|
|
472
|
|
- });
|
|
|
471
|
+ this.carArr = res.rows
|
|
|
472
|
+ })
|
|
473
|
473
|
},
|
|
474
|
474
|
getTypeOrder() {
|
|
475
|
475
|
const params = {
|
|
476
|
476
|
pid: 2,
|
|
477
|
|
- typeid: 4000,
|
|
478
|
|
- };
|
|
|
477
|
+ typeid: 4000
|
|
|
478
|
+ }
|
|
479
|
479
|
getOrderTypeList(params.pid, params.typeid).then((res) => {
|
|
480
|
|
- this.typeList = res.rows;
|
|
481
|
|
- });
|
|
|
480
|
+ this.typeList = res.rows
|
|
|
481
|
+ })
|
|
482
|
482
|
},
|
|
483
|
483
|
getDeptid(data) {
|
|
484
|
|
- this.ruleForm.hosid = data[0];
|
|
485
|
|
- this.ruleForm.deptid = data[data.length - 1];
|
|
486
|
|
- this.deptid = data;
|
|
487
|
|
- this.ruleForm.needman = "";
|
|
488
|
|
- this.getRepairman(data[data.length - 1]);
|
|
489
|
|
- this.getDeptAddress(data[data.length - 1]);
|
|
|
484
|
+ this.ruleForm.hosid = data[0]
|
|
|
485
|
+ this.ruleForm.deptid = data[data.length - 1]
|
|
|
486
|
+ this.deptid = data
|
|
|
487
|
+ this.ruleForm.needman = ''
|
|
|
488
|
+ this.getRepairman(data[data.length - 1])
|
|
|
489
|
+ this.getDeptAddress(data[data.length - 1])
|
|
490
|
490
|
},
|
|
491
|
491
|
getDeptAddress(id) {
|
|
492
|
492
|
getTypeDetail(id).then((res) => {
|
|
493
|
|
- this.ruleForm.startplace = res.data.F_Location;
|
|
494
|
|
- this.ruleForm.deptphone = res.data.F_OfficeTelephone;
|
|
495
|
|
- });
|
|
|
493
|
+ this.ruleForm.startplace = res.data.F_Location ? decrypt(res.data.F_LocationShow) : ''
|
|
|
494
|
+ this.ruleForm.deptphone = res.data.F_OfficeTelephone ? decrypt(res.data.F_OfficeTelephoneShow) : ''
|
|
|
495
|
+ })
|
|
496
|
496
|
},
|
|
497
|
497
|
submitForm() {
|
|
498
|
|
- if (this.telTopRightState == "通话中") {
|
|
499
|
|
- if (window.location.href.indexOf("callScreen") >= 0) {
|
|
500
|
|
- this.$message("请挂断后再提交工单");
|
|
501
|
|
- return;
|
|
|
498
|
+ if (this.telTopRightState == '通话中') {
|
|
|
499
|
+ if (window.location.href.indexOf('callScreen') >= 0) {
|
|
|
500
|
+ this.$message('请挂断后再提交工单')
|
|
|
501
|
+ return
|
|
502
|
502
|
}
|
|
503
|
503
|
}
|
|
504
|
504
|
if (this.orderTypeData.type2Arr.length == 0 && !this.wid) {
|
|
505
|
|
- this.$message.error("请选择工单类别");
|
|
506
|
|
- return;
|
|
|
505
|
+ this.$message.error('请选择工单类别')
|
|
|
506
|
+ return
|
|
507
|
507
|
}
|
|
508
|
508
|
if (
|
|
509
|
|
- this.worktypeInfo === "cldd_xsezy" &&
|
|
|
509
|
+ this.worktypeInfo === 'cldd_xsezy' &&
|
|
510
|
510
|
this.ruleForm.birth === 0 &&
|
|
511
|
|
- this.ruleForm.content === ""
|
|
|
511
|
+ this.ruleForm.content === ''
|
|
512
|
512
|
) {
|
|
513
|
|
- this.$message.error("填写工单内容");
|
|
514
|
|
- return;
|
|
|
513
|
+ this.$message.error('填写工单内容')
|
|
|
514
|
+ return
|
|
515
|
515
|
}
|
|
516
|
|
- if(this.worktypeInfo == "bloodtransfer"){
|
|
517
|
|
- this.ruleForm.contact = ""
|
|
518
|
|
- this.ruleForm.contactnumber = ""
|
|
|
516
|
+ if (this.worktypeInfo == 'bloodtransfer') {
|
|
|
517
|
+ this.ruleForm.contact = ''
|
|
|
518
|
+ this.ruleForm.contactnumber = ''
|
|
519
|
519
|
}
|
|
520
|
520
|
|
|
521
|
521
|
this.$refs.ruleForm.validate((valid) => {
|
|
|
@@ -544,13 +544,13 @@ export default {
|
|
544
|
544
|
dispatch: this.ruleForm.dispatch,
|
|
545
|
545
|
content: this.ruleForm.content, // 备注
|
|
546
|
546
|
OrderSource: window.localStorage.getItem('loginway') || ''
|
|
547
|
|
- };
|
|
|
547
|
+ }
|
|
548
|
548
|
getAddWorkOrder(datas)
|
|
549
|
549
|
.then((response) => {
|
|
550
|
|
- this.loading = false;
|
|
551
|
|
- if (response.state.toLowerCase() === "success") {
|
|
552
|
|
- this.getUrl();
|
|
553
|
|
- this.$parent.$layer.closeAll();
|
|
|
550
|
+ this.loading = false
|
|
|
551
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
552
|
+ this.getUrl()
|
|
|
553
|
+ this.$parent.$layer.closeAll()
|
|
554
|
554
|
// this.$parent.$layer.close(this.layerid)
|
|
555
|
555
|
// this.$parent.$parent.getList() // 重新加载父级数据
|
|
556
|
556
|
// this.$refs.ruleForm.resetFields()
|
|
|
@@ -559,27 +559,27 @@ export default {
|
|
559
|
559
|
// type: 'success',
|
|
560
|
560
|
// duration: 1000
|
|
561
|
561
|
// })
|
|
562
|
|
- if (window.location.href.indexOf("addWorkOrder") >= 0) {
|
|
|
562
|
+ if (window.location.href.indexOf('addWorkOrder') >= 0) {
|
|
563
|
563
|
this.$message({
|
|
564
|
|
- message: "工单已提交成功!",
|
|
565
|
|
- type: "success",
|
|
566
|
|
- duration: 500,
|
|
567
|
|
- });
|
|
|
564
|
+ message: '工单已提交成功!',
|
|
|
565
|
+ type: 'success',
|
|
|
566
|
+ duration: 500
|
|
|
567
|
+ })
|
|
568
|
568
|
this.$router.push({
|
|
569
|
|
- path: "/orderManage/mySubmit",
|
|
570
|
|
- });
|
|
|
569
|
+ path: '/orderManage/mySubmit'
|
|
|
570
|
+ })
|
|
571
|
571
|
} else {
|
|
572
|
572
|
this.$message({
|
|
573
|
|
- message: "恭喜你,添加工单成功!",
|
|
574
|
|
- type: "success",
|
|
575
|
|
- duration: 500,
|
|
576
|
|
- });
|
|
|
573
|
+ message: '恭喜你,添加工单成功!',
|
|
|
574
|
+ type: 'success',
|
|
|
575
|
+ duration: 500
|
|
|
576
|
+ })
|
|
577
|
577
|
}
|
|
578
|
578
|
}
|
|
579
|
579
|
})
|
|
580
|
580
|
.catch(() => {
|
|
581
|
|
- this.loading = false;
|
|
582
|
|
- });
|
|
|
581
|
+ this.loading = false
|
|
|
582
|
+ })
|
|
583
|
583
|
} else {
|
|
584
|
584
|
// 编辑
|
|
585
|
585
|
const datas = {
|
|
|
@@ -601,48 +601,48 @@ export default {
|
|
601
|
601
|
dispatch: this.ruleForm.dispatch,
|
|
602
|
602
|
content: this.ruleForm.content, // 备注
|
|
603
|
603
|
OrderSource: window.localStorage.getItem('loginway') || ''
|
|
604
|
|
- };
|
|
|
604
|
+ }
|
|
605
|
605
|
getUpdateWorkOrder(datas)
|
|
606
|
606
|
.then((response) => {
|
|
607
|
|
- if (response.state.toLowerCase() === "success") {
|
|
|
607
|
+ if (response.state.toLowerCase() === 'success') {
|
|
608
|
608
|
// this.$parent.$layer.closeAll()
|
|
609
|
609
|
// this.$parent.$layer.close(this.layerid)
|
|
610
|
610
|
// this.$parent.$parent.getList() // 重新加载父级数据
|
|
611
|
|
- this.$emit("closeLayer");
|
|
612
|
|
- this.usercodeSearch = "";
|
|
|
611
|
+ this.$emit('closeLayer')
|
|
|
612
|
+ this.usercodeSearch = ''
|
|
613
|
613
|
this.$message({
|
|
614
|
|
- message: "恭喜你,编辑工单成功!",
|
|
615
|
|
- type: "success",
|
|
616
|
|
- duration: 1000,
|
|
617
|
|
- });
|
|
|
614
|
+ message: '恭喜你,编辑工单成功!',
|
|
|
615
|
+ type: 'success',
|
|
|
616
|
+ duration: 1000
|
|
|
617
|
+ })
|
|
618
|
618
|
}
|
|
619
|
619
|
})
|
|
620
|
|
- .catch(() => {});
|
|
|
620
|
+ .catch(() => {})
|
|
621
|
621
|
}
|
|
622
|
622
|
} else {
|
|
623
|
|
- this.$message.error("请输入有效的必填项信息!");
|
|
624
|
|
- return false;
|
|
|
623
|
+ this.$message.error('请输入有效的必填项信息!')
|
|
|
624
|
+ return false
|
|
625
|
625
|
}
|
|
626
|
|
- });
|
|
|
626
|
+ })
|
|
627
|
627
|
},
|
|
628
|
628
|
resetForm() {
|
|
629
|
|
- this.$refs.ruleForm.resetFields();
|
|
|
629
|
+ this.$refs.ruleForm.resetFields()
|
|
630
|
630
|
},
|
|
631
|
631
|
getUrl() {
|
|
632
|
|
- if (window.location.href.indexOf("callScreen") >= 0) {
|
|
633
|
|
- this.$store.dispatch("delView", this.$route);
|
|
|
632
|
+ if (window.location.href.indexOf('callScreen') >= 0) {
|
|
|
633
|
+ this.$store.dispatch('delView', this.$route)
|
|
634
|
634
|
const scoketDatas = {
|
|
635
|
|
- Type: "SayFree",
|
|
636
|
|
- AgentID: window.localStorage.getItem("storageUsercode"),
|
|
637
|
|
- AgentExten: window.localStorage.getItem("ext"),
|
|
638
|
|
- };
|
|
639
|
|
- if (this.telTopRightState == "话后处理中") {
|
|
640
|
|
- Send(scoketDatas);
|
|
|
635
|
+ Type: 'SayFree',
|
|
|
636
|
+ AgentID: window.localStorage.getItem('storageUsercode'),
|
|
|
637
|
+ AgentExten: window.localStorage.getItem('ext')
|
|
641
|
638
|
}
|
|
642
|
|
- window.sessionStorage.setItem("isBusyOrFree", 1); // 0是置忙1是置闲
|
|
|
639
|
+ if (this.telTopRightState == '话后处理中') {
|
|
|
640
|
+ Send(scoketDatas)
|
|
|
641
|
+ }
|
|
|
642
|
+ window.sessionStorage.setItem('isBusyOrFree', 1) // 0是置忙1是置闲
|
|
643
|
643
|
this.$router.push({
|
|
644
|
|
- path: "/Dashboard",
|
|
645
|
|
- });
|
|
|
644
|
+ path: '/Dashboard'
|
|
|
645
|
+ })
|
|
646
|
646
|
}
|
|
647
|
647
|
// else{
|
|
648
|
648
|
// window.location.reload()
|
|
|
@@ -652,51 +652,51 @@ export default {
|
|
652
|
652
|
getDetail(num) {
|
|
653
|
653
|
const params = {
|
|
654
|
654
|
WorkOrderCode: this.wocode,
|
|
655
|
|
- type: num,
|
|
656
|
|
- };
|
|
|
655
|
+ type: num
|
|
|
656
|
+ }
|
|
657
|
657
|
getModelDetail(params).then((response) => {
|
|
658
|
|
- if (response.state.toLowerCase() === "success") {
|
|
659
|
|
- const res = response.model;
|
|
660
|
|
- this.getRepairman(res.F_ProposerDeptId);
|
|
661
|
|
- this.getDeptAddress(res.F_ProposerDeptId);
|
|
662
|
|
- this.ruleForm.F_ID = res.F_ID;
|
|
663
|
|
- this.ruleForm.type = res.F_Type;
|
|
664
|
|
- this.type = res.F_Type;
|
|
665
|
|
- this.hospitalsParam.id = res.F_HosId;
|
|
666
|
|
- this.hospitalsParam.name = res.HosName;
|
|
667
|
|
- this.departmentsParam.id = res.F_ProposerDeptId;
|
|
668
|
|
- this.departmentsParam.name = res.F_ProposerDeptName;
|
|
669
|
|
- this.repairmanParam.id = res.F_ProposerCode;
|
|
670
|
|
- this.repairmanParam.name = res.F_ProposerName;
|
|
671
|
|
- this.ruleForm.username = res.F_ProposerName;
|
|
672
|
|
- this.ruleForm.hosid = res.F_HosId;
|
|
673
|
|
- this.ruleForm.hosname = res.HosName;
|
|
674
|
|
- this.ruleForm.deptid = res.F_ProposerDeptId;
|
|
675
|
|
- this.ruleForm.deptname = res.F_ProposerDeptName;
|
|
676
|
|
- this.ruleForm.usercode = res.F_ProposerCode;
|
|
677
|
|
- this.ruleForm.username = res.F_ProposerName;
|
|
678
|
|
- this.ruleForm.phon = res.F_Phon;
|
|
679
|
|
- this.ruleForm.contact = res.F_Contact;
|
|
680
|
|
- this.ruleForm.contactnumber = res.F_ContactNumber;
|
|
681
|
|
- this.ruleForm.cartype = res.F_CarType;
|
|
682
|
|
- this.ruleForm.startplace = res.F_DepartPlace;
|
|
683
|
|
- this.ruleForm.endplace = res.F_Destination;
|
|
684
|
|
- this.ruleForm.F_CarMessage = res.F_CarMessage;
|
|
685
|
|
- this.ruleForm.remark = res.F_Remark;
|
|
686
|
|
- this.ruleForm.usertime = res.F_UseTime;
|
|
687
|
|
- this.ruleForm.birth = res.F_Birth;
|
|
688
|
|
- this.ruleForm.content = res.F_Content;
|
|
689
|
|
- this.ruleForm.EmergencyTypes = res.F_EmergencyTypes;
|
|
690
|
|
- this.ruleForm.dispatch = res.F_Dispatch;
|
|
|
658
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
659
|
+ const res = response.model
|
|
|
660
|
+ this.getRepairman(res.F_ProposerDeptId)
|
|
|
661
|
+ this.getDeptAddress(res.F_ProposerDeptId)
|
|
|
662
|
+ this.ruleForm.F_ID = res.F_ID
|
|
|
663
|
+ this.ruleForm.type = res.F_Type
|
|
|
664
|
+ this.type = res.F_Type
|
|
|
665
|
+ this.hospitalsParam.id = res.F_HosId
|
|
|
666
|
+ this.hospitalsParam.name = res.HosName
|
|
|
667
|
+ this.departmentsParam.id = res.F_ProposerDeptId
|
|
|
668
|
+ this.departmentsParam.name = res.F_ProposerDeptName
|
|
|
669
|
+ this.repairmanParam.id = res.F_ProposerCode
|
|
|
670
|
+ this.repairmanParam.name = res.F_ProposerName
|
|
|
671
|
+ this.ruleForm.username = res.F_ProposerName
|
|
|
672
|
+ this.ruleForm.hosid = res.F_HosId
|
|
|
673
|
+ this.ruleForm.hosname = res.HosName
|
|
|
674
|
+ this.ruleForm.deptid = res.F_ProposerDeptId
|
|
|
675
|
+ this.ruleForm.deptname = res.F_ProposerDeptName
|
|
|
676
|
+ this.ruleForm.usercode = res.F_ProposerCode
|
|
|
677
|
+ this.ruleForm.username = res.F_ProposerName
|
|
|
678
|
+ this.ruleForm.phon = res.F_Phon
|
|
|
679
|
+ this.ruleForm.contact = res.F_Contact
|
|
|
680
|
+ this.ruleForm.contactnumber = res.F_ContactNumber
|
|
|
681
|
+ this.ruleForm.cartype = res.F_CarType
|
|
|
682
|
+ this.ruleForm.startplace = res.F_DepartPlace
|
|
|
683
|
+ this.ruleForm.endplace = res.F_Destination
|
|
|
684
|
+ this.ruleForm.F_CarMessage = res.F_CarMessage
|
|
|
685
|
+ this.ruleForm.remark = res.F_Remark
|
|
|
686
|
+ this.ruleForm.usertime = res.F_UseTime
|
|
|
687
|
+ this.ruleForm.birth = res.F_Birth
|
|
|
688
|
+ this.ruleForm.content = res.F_Content
|
|
|
689
|
+ this.ruleForm.EmergencyTypes = res.F_EmergencyTypes
|
|
|
690
|
+ this.ruleForm.dispatch = res.F_Dispatch
|
|
691
|
691
|
this.deptid =
|
|
692
|
|
- this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids;
|
|
693
|
|
- this.ruleForm.needman = res.F_ProposerCode;
|
|
694
|
|
- this.usercodeSearch = res.F_ProposerCode;
|
|
|
692
|
+ this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids
|
|
|
693
|
+ this.ruleForm.needman = res.F_ProposerCode
|
|
|
694
|
+ this.usercodeSearch = res.F_ProposerCode
|
|
695
|
695
|
}
|
|
696
|
|
- });
|
|
697
|
|
- },
|
|
698
|
|
- },
|
|
699
|
|
-};
|
|
|
696
|
+ })
|
|
|
697
|
+ }
|
|
|
698
|
+ }
|
|
|
699
|
+}
|
|
700
|
700
|
</script>
|
|
701
|
701
|
|
|
702
|
702
|
<style rel="stylesheet/scss" lang="scss" scoped>
|