|
|
@@ -77,7 +77,7 @@
|
|
77
|
77
|
:disabled="butIsDisabled"
|
|
78
|
78
|
icon="el-icon-plus"
|
|
79
|
79
|
@click="addItem()"
|
|
80
|
|
- >添加</el-button
|
|
|
80
|
+ >添加</el-button
|
|
81
|
81
|
>
|
|
82
|
82
|
</el-form-item>
|
|
83
|
83
|
</el-col>
|
|
|
@@ -122,7 +122,7 @@
|
|
122
|
122
|
:disabled="butIsDisabled"
|
|
123
|
123
|
icon="el-icon-plus"
|
|
124
|
124
|
@click="addItem()"
|
|
125
|
|
- >添加</el-button
|
|
|
125
|
+ >添加</el-button
|
|
126
|
126
|
>
|
|
127
|
127
|
</el-form-item>
|
|
128
|
128
|
</el-col>
|
|
|
@@ -165,7 +165,7 @@
|
|
165
|
165
|
:disabled="butIsDisabled"
|
|
166
|
166
|
icon="el-icon-plus"
|
|
167
|
167
|
@click="addItem()"
|
|
168
|
|
- >添加</el-button
|
|
|
168
|
+ >添加</el-button
|
|
169
|
169
|
>
|
|
170
|
170
|
</el-form-item>
|
|
171
|
171
|
</el-col>
|
|
|
@@ -208,7 +208,7 @@
|
|
208
|
208
|
:disabled="butIsDisabled"
|
|
209
|
209
|
icon="el-icon-plus"
|
|
210
|
210
|
@click="addItem()"
|
|
211
|
|
- >添加</el-button
|
|
|
211
|
+ >添加</el-button
|
|
212
|
212
|
>
|
|
213
|
213
|
</el-form-item>
|
|
214
|
214
|
</el-col>
|
|
|
@@ -251,7 +251,7 @@
|
|
251
|
251
|
:disabled="butIsDisabled"
|
|
252
|
252
|
icon="el-icon-plus"
|
|
253
|
253
|
@click="addItem()"
|
|
254
|
|
- >添加</el-button
|
|
|
254
|
+ >添加</el-button
|
|
255
|
255
|
>
|
|
256
|
256
|
</el-form-item>
|
|
257
|
257
|
</el-col>
|
|
|
@@ -391,71 +391,76 @@ import {
|
|
391
|
391
|
GetequipList,
|
|
392
|
392
|
AddSchedulingWorkOrder,
|
|
393
|
393
|
UpdateSchedulingWorkOrder,
|
|
394
|
|
- GetOrderDetail,
|
|
395
|
|
-} from "@/api/comDispatch/addOrEditDispatch";
|
|
396
|
|
-import { GetPerson } from "@/api/commonAPI";
|
|
|
394
|
+ GetOrderDetail
|
|
|
395
|
+} from '@/api/comDispatch/addOrEditDispatch'
|
|
|
396
|
+import { GetPerson } from '@/api/commonAPI'
|
|
397
|
397
|
export default {
|
|
398
|
|
- name: "AddOrEditDispatch",
|
|
|
398
|
+ name: 'AddOrEditDispatch',
|
|
399
|
399
|
props: {
|
|
400
|
400
|
ordreId: {
|
|
401
|
401
|
type: Number,
|
|
402
|
|
- default: 0,
|
|
|
402
|
+ default: 0
|
|
403
|
403
|
},
|
|
404
|
404
|
orderTypeData: {
|
|
405
|
405
|
type: Object,
|
|
406
|
406
|
default() {
|
|
407
|
|
- return {};
|
|
408
|
|
- },
|
|
|
407
|
+ return {}
|
|
|
408
|
+ }
|
|
409
|
409
|
},
|
|
410
|
410
|
layerid: {
|
|
411
|
411
|
type: String,
|
|
412
|
|
- default: "",
|
|
|
412
|
+ default: ''
|
|
413
|
413
|
},
|
|
414
|
414
|
callid: {
|
|
415
|
415
|
type: String,
|
|
416
|
|
- default: "",
|
|
|
416
|
+ default: ''
|
|
417
|
417
|
},
|
|
418
|
418
|
wid: {
|
|
419
|
419
|
type: String,
|
|
420
|
|
- default: "",
|
|
|
420
|
+ default: ''
|
|
421
|
421
|
},
|
|
422
|
|
- iswomanage: {
|
|
|
422
|
+ fid: {
|
|
423
|
423
|
type: String,
|
|
424
|
|
- default: "",
|
|
|
424
|
+ default: ''
|
|
425
|
425
|
},
|
|
|
426
|
+ iswomanage: {
|
|
|
427
|
+ type: String,
|
|
|
428
|
+ default: ''
|
|
|
429
|
+ }
|
|
426
|
430
|
},
|
|
427
|
431
|
data() {
|
|
428
|
432
|
return {
|
|
|
433
|
+ cid: '',
|
|
429
|
434
|
butIsDisabled: false,
|
|
430
|
435
|
butIsDisabledMyList: false,
|
|
431
|
436
|
headers: {
|
|
432
|
|
- Authorization: localStorage.getItem("Admin-Token"),
|
|
|
437
|
+ Authorization: localStorage.getItem('Admin-Token')
|
|
433
|
438
|
},
|
|
434
|
439
|
imgUrl:
|
|
435
|
|
- this.$store.getters.serverConfig.BASE_API + "FaultRepair/UploadFile",
|
|
|
440
|
+ this.$store.getters.serverConfig.BASE_API + 'FaultRepair/UploadFile',
|
|
436
|
441
|
type2Arr: [],
|
|
437
|
442
|
firstOrderTypeParam: {
|
|
438
|
443
|
typeid: 1,
|
|
439
|
|
- name: "",
|
|
440
|
|
- pid: 0,
|
|
|
444
|
+ name: '',
|
|
|
445
|
+ pid: 0
|
|
441
|
446
|
},
|
|
442
|
447
|
hospitalsParam: {
|
|
443
|
448
|
id: 0,
|
|
444
|
|
- name: "",
|
|
|
449
|
+ name: ''
|
|
445
|
450
|
},
|
|
446
|
451
|
departmentsParam: {
|
|
447
|
452
|
id: 0,
|
|
448
|
|
- name: "",
|
|
|
453
|
+ name: ''
|
|
449
|
454
|
},
|
|
450
|
455
|
repairmanParam: {
|
|
451
|
456
|
id: 0,
|
|
452
|
|
- name: "",
|
|
|
457
|
+ name: ''
|
|
453
|
458
|
},
|
|
454
|
459
|
devList: [
|
|
455
|
460
|
{
|
|
456
|
|
- devname: "",
|
|
457
|
|
- num: 1,
|
|
458
|
|
- },
|
|
|
461
|
+ devname: '',
|
|
|
462
|
+ num: 1
|
|
|
463
|
+ }
|
|
459
|
464
|
],
|
|
460
|
465
|
detailists: [],
|
|
461
|
466
|
deptidArr: [],
|
|
|
@@ -469,241 +474,242 @@ export default {
|
|
469
|
474
|
drugArr: [],
|
|
470
|
475
|
ruleForm: {
|
|
471
|
476
|
orderType: 2003, // 工单类型
|
|
472
|
|
- F_Type2: "",
|
|
|
477
|
+ F_Type2: '',
|
|
473
|
478
|
hospital: 0, // 院区
|
|
474
|
|
- department: "", // 科室
|
|
|
479
|
+ department: '', // 科室
|
|
475
|
480
|
deptid: 0, // 科室id
|
|
476
|
481
|
username: 0, // 申请人
|
|
477
|
482
|
usercode: 0, // 申请人id
|
|
478
|
|
- phone: "", // 联系电话
|
|
479
|
|
- position: "",
|
|
480
|
|
- toplace: "",
|
|
481
|
|
- content: "",
|
|
482
|
|
- cfnum: "",
|
|
483
|
|
- opt: "1",
|
|
484
|
|
- remark: "", // 备注
|
|
485
|
|
- repairImageid: "",
|
|
|
483
|
+ phone: '', // 联系电话
|
|
|
484
|
+ position: '',
|
|
|
485
|
+ toplace: '',
|
|
|
486
|
+ content: '',
|
|
|
487
|
+ cfnum: '',
|
|
|
488
|
+ opt: '1',
|
|
|
489
|
+ remark: '', // 备注
|
|
|
490
|
+ repairImageid: ''
|
|
486
|
491
|
},
|
|
487
|
492
|
rules: {
|
|
488
|
493
|
phone: [
|
|
489
|
494
|
{
|
|
490
|
495
|
required: true,
|
|
491
|
|
- message: "手机号不能为空",
|
|
492
|
|
- trigger: "blur",
|
|
|
496
|
+ message: '手机号不能为空',
|
|
|
497
|
+ trigger: 'blur'
|
|
493
|
498
|
},
|
|
494
|
499
|
{
|
|
495
|
500
|
pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
|
|
496
|
|
- message: "请输入正确的电话号码或者固话号码",
|
|
497
|
|
- trigger: "blur",
|
|
498
|
|
- },
|
|
499
|
|
- ],
|
|
500
|
|
- },
|
|
501
|
|
- };
|
|
|
501
|
+ message: '请输入正确的电话号码或者固话号码',
|
|
|
502
|
+ trigger: 'blur'
|
|
|
503
|
+ }
|
|
|
504
|
+ ]
|
|
|
505
|
+ }
|
|
|
506
|
+ }
|
|
502
|
507
|
},
|
|
503
|
508
|
watch: {
|
|
504
|
|
- "orderTypeData.F_Type2": function () {
|
|
505
|
|
- this.type2Arr = this.orderTypeData.type2Arr;
|
|
506
|
|
- this.ruleForm.F_Type2 = this.orderTypeData.F_Type2;
|
|
507
|
|
- console.log(this.type2Arr);
|
|
508
|
|
- },
|
|
|
509
|
+ 'orderTypeData.F_Type2': function() {
|
|
|
510
|
+ this.type2Arr = this.orderTypeData.type2Arr
|
|
|
511
|
+ this.ruleForm.F_Type2 = this.orderTypeData.F_Type2
|
|
|
512
|
+ console.log(this.type2Arr)
|
|
|
513
|
+ }
|
|
509
|
514
|
},
|
|
510
|
515
|
created() {
|
|
511
|
|
- if (!this.callid) {
|
|
512
|
|
- this.callid = window.localStorage.getItem("callidSave");
|
|
|
516
|
+ this.cid = this.callid
|
|
|
517
|
+ if (!this.cid) {
|
|
|
518
|
+ this.cid = window.localStorage.getItem('callidSave')
|
|
513
|
519
|
}
|
|
514
|
|
- this.getequis();
|
|
515
|
|
- this.getgoods();
|
|
516
|
|
- this.getbeds();
|
|
517
|
|
- this.getbiaoben();
|
|
518
|
|
- this.getdrugs();
|
|
519
|
|
- console.log(this.iswomanage);
|
|
|
520
|
+ this.getequis()
|
|
|
521
|
+ this.getgoods()
|
|
|
522
|
+ this.getbeds()
|
|
|
523
|
+ this.getbiaoben()
|
|
|
524
|
+ this.getdrugs()
|
|
|
525
|
+ console.log(this.iswomanage)
|
|
520
|
526
|
if (this.wid) {
|
|
521
|
|
- this.butIsDisabled = true;
|
|
522
|
|
- this.getDetail();
|
|
523
|
|
- console.log(this.iswomanage);
|
|
524
|
|
- if (this.iswomanage === "2") {
|
|
525
|
|
- this.butIsDisabledMyList = true;
|
|
|
527
|
+ this.butIsDisabled = true
|
|
|
528
|
+ this.getDetail()
|
|
|
529
|
+ console.log(this.iswomanage)
|
|
|
530
|
+ if (this.iswomanage === '2') {
|
|
|
531
|
+ this.butIsDisabledMyList = true
|
|
526
|
532
|
}
|
|
527
|
533
|
}
|
|
528
|
534
|
},
|
|
529
|
535
|
methods: {
|
|
530
|
536
|
addItem() {
|
|
531
|
537
|
const params = {
|
|
532
|
|
- devname: "",
|
|
533
|
|
- num: 1,
|
|
534
|
|
- };
|
|
535
|
|
- this.devList.push(params);
|
|
|
538
|
+ devname: '',
|
|
|
539
|
+ num: 1
|
|
|
540
|
+ }
|
|
|
541
|
+ this.devList.push(params)
|
|
536
|
542
|
},
|
|
537
|
543
|
removeItem(index) {
|
|
538
|
|
- console.log(index);
|
|
539
|
|
- this.devList.splice(index, 1);
|
|
|
544
|
+ console.log(index)
|
|
|
545
|
+ this.devList.splice(index, 1)
|
|
540
|
546
|
},
|
|
541
|
547
|
selectChange(val) {
|
|
542
|
|
- console.log(val);
|
|
|
548
|
+ console.log(val)
|
|
543
|
549
|
},
|
|
544
|
550
|
getDeptid(data) {
|
|
545
|
|
- this.ruleForm.ApplicationDept = data[data.length - 1];
|
|
546
|
|
- this.getRepairman(data[data.length - 1], 0);
|
|
|
551
|
+ this.ruleForm.ApplicationDept = data[data.length - 1]
|
|
|
552
|
+ this.getRepairman(data[data.length - 1], 0)
|
|
547
|
553
|
},
|
|
548
|
554
|
getDeptid1(data) {
|
|
549
|
|
- this.ruleForm.DealDept = data[data.length - 1];
|
|
550
|
|
- this.getRepairman1(data[data.length - 1], 0);
|
|
|
555
|
+ this.ruleForm.DealDept = data[data.length - 1]
|
|
|
556
|
+ this.getRepairman1(data[data.length - 1], 0)
|
|
551
|
557
|
},
|
|
552
|
558
|
getRepairman(id, state) {
|
|
553
|
559
|
return new Promise((resolve) => {
|
|
554
|
560
|
const params = {
|
|
555
|
|
- deptid: id, // 字典管理的工单标识
|
|
556
|
|
- };
|
|
|
561
|
+ deptid: id // 字典管理的工单标识
|
|
|
562
|
+ }
|
|
557
|
563
|
GetPerson(params).then((res) => {
|
|
558
|
564
|
if (state === 0) {
|
|
559
|
|
- this.repairman = res.rows;
|
|
|
565
|
+ this.repairman = res.rows
|
|
560
|
566
|
} else if (state === 1) {
|
|
561
|
|
- this.assignman = res.rows;
|
|
|
567
|
+ this.assignman = res.rows
|
|
562
|
568
|
}
|
|
563
|
|
- });
|
|
564
|
|
- resolve();
|
|
565
|
|
- });
|
|
|
569
|
+ })
|
|
|
570
|
+ resolve()
|
|
|
571
|
+ })
|
|
566
|
572
|
},
|
|
567
|
573
|
getRepairman1(id, state) {
|
|
568
|
574
|
return new Promise((resolve) => {
|
|
569
|
575
|
const params = {
|
|
570
|
|
- deptid: id, // 字典管理的工单标识
|
|
571
|
|
- };
|
|
|
576
|
+ deptid: id // 字典管理的工单标识
|
|
|
577
|
+ }
|
|
572
|
578
|
GetPerson(params).then((res) => {
|
|
573
|
579
|
if (state === 0) {
|
|
574
|
|
- this.repairman1 = res.rows;
|
|
|
580
|
+ this.repairman1 = res.rows
|
|
575
|
581
|
} else if (state === 1) {
|
|
576
|
|
- this.assignman1 = res.rows;
|
|
|
582
|
+ this.assignman1 = res.rows
|
|
577
|
583
|
}
|
|
578
|
|
- });
|
|
579
|
|
- resolve();
|
|
580
|
|
- });
|
|
|
584
|
+ })
|
|
|
585
|
+ resolve()
|
|
|
586
|
+ })
|
|
581
|
587
|
},
|
|
582
|
588
|
changeRepairman(data) {},
|
|
583
|
589
|
changeRepairman1(data) {},
|
|
584
|
590
|
handle_success(res) {
|
|
585
|
|
- this.ruleForm.repairImageid += res.data[0].F_FileId + ",";
|
|
|
591
|
+ this.ruleForm.repairImageid += res.data[0].F_FileId + ','
|
|
586
|
592
|
},
|
|
587
|
593
|
getequis() {
|
|
588
|
|
- const params = {};
|
|
|
594
|
+ const params = {}
|
|
589
|
595
|
GetequipList(params).then((res) => {
|
|
590
|
|
- this.equipArr = res.data;
|
|
591
|
|
- });
|
|
|
596
|
+ this.equipArr = res.data
|
|
|
597
|
+ })
|
|
592
|
598
|
},
|
|
593
|
599
|
getgoods() {
|
|
594
|
600
|
const params = {
|
|
595
|
|
- Flag: "WZXX",
|
|
596
|
|
- Name: "",
|
|
597
|
|
- };
|
|
|
601
|
+ Flag: 'WZXX',
|
|
|
602
|
+ Name: ''
|
|
|
603
|
+ }
|
|
598
|
604
|
GetDicValueList(params).then((res) => {
|
|
599
|
|
- this.goodsArr = res.rows;
|
|
600
|
|
- });
|
|
|
605
|
+ this.goodsArr = res.rows
|
|
|
606
|
+ })
|
|
601
|
607
|
},
|
|
602
|
608
|
getbeds() {
|
|
603
|
609
|
const params = {
|
|
604
|
|
- Flag: "BCXX",
|
|
605
|
|
- Name: "",
|
|
606
|
|
- };
|
|
|
610
|
+ Flag: 'BCXX',
|
|
|
611
|
+ Name: ''
|
|
|
612
|
+ }
|
|
607
|
613
|
GetDicValueList(params).then((res) => {
|
|
608
|
|
- this.bedsArr = res.rows;
|
|
609
|
|
- });
|
|
|
614
|
+ this.bedsArr = res.rows
|
|
|
615
|
+ })
|
|
610
|
616
|
},
|
|
611
|
617
|
getbiaoben() {
|
|
612
|
618
|
const params = {
|
|
613
|
|
- Flag: "BBXX",
|
|
614
|
|
- Name: "",
|
|
615
|
|
- };
|
|
|
619
|
+ Flag: 'BBXX',
|
|
|
620
|
+ Name: ''
|
|
|
621
|
+ }
|
|
616
|
622
|
GetDicValueList(params).then((res) => {
|
|
617
|
|
- this.specimenArr = res.rows;
|
|
618
|
|
- });
|
|
|
623
|
+ this.specimenArr = res.rows
|
|
|
624
|
+ })
|
|
619
|
625
|
},
|
|
620
|
626
|
getdrugs() {
|
|
621
|
627
|
const params = {
|
|
622
|
|
- Flag: "YPXX",
|
|
623
|
|
- Name: "",
|
|
624
|
|
- };
|
|
|
628
|
+ Flag: 'YPXX',
|
|
|
629
|
+ Name: ''
|
|
|
630
|
+ }
|
|
625
|
631
|
GetDicValueList(params).then((res) => {
|
|
626
|
|
- this.drugArr = res.rows;
|
|
627
|
|
- });
|
|
|
632
|
+ this.drugArr = res.rows
|
|
|
633
|
+ })
|
|
628
|
634
|
},
|
|
629
|
635
|
getDetail() {
|
|
630
|
636
|
const datas = {
|
|
631
|
|
- WorkOrderCode: this.wid,
|
|
632
|
|
- };
|
|
|
637
|
+ WorkOrderCode: this.wid
|
|
|
638
|
+ }
|
|
633
|
639
|
// 详情
|
|
634
|
640
|
GetOrderDetail(datas)
|
|
635
|
641
|
.then((response) => {
|
|
636
|
|
- if (response.state.toLowerCase() === "success") {
|
|
637
|
|
- const res = response.data[0];
|
|
638
|
|
- this.firstOrderTypeParam.name = res.TypeName;
|
|
639
|
|
- this.$emit("r2type", res.F_WorkOrderCategory);
|
|
640
|
|
- this.ruleForm.F_Type2 = res.F_WorkOrderCategory;
|
|
|
642
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
643
|
+ const res = response.data[0]
|
|
|
644
|
+ this.firstOrderTypeParam.name = res.TypeName
|
|
|
645
|
+ this.$emit('r2type', res.F_WorkOrderCategory)
|
|
|
646
|
+ this.ruleForm.F_Type2 = res.F_WorkOrderCategory
|
|
641
|
647
|
if (res.F_WorkOrderCategory) {
|
|
642
|
648
|
this.type2Arr =
|
|
643
|
649
|
this.$store.getters.workTypeMap[
|
|
644
|
650
|
parseInt(res.F_WorkOrderCategory)
|
|
645
|
|
- ].ids.slice(1);
|
|
646
|
|
- console.log(this.type2Arr, "111");
|
|
|
651
|
+ ].ids.slice(1)
|
|
|
652
|
+ console.log(this.type2Arr, '111')
|
|
647
|
653
|
}
|
|
648
|
654
|
if (res.F_CreateUserDept) {
|
|
649
|
655
|
this.deptidArr =
|
|
650
|
|
- this.$store.getters.deptmap[parseInt(res.F_CreateUserDept)].ids;
|
|
651
|
|
- this.getRepairman(res.F_CreateUserDept, 0);
|
|
652
|
|
- this.ruleForm.ApplicationDept = res.F_CreateUserDept;
|
|
653
|
|
- this.ruleForm.Applicant = res.F_CreateUser;
|
|
|
656
|
+ this.$store.getters.deptmap[parseInt(res.F_CreateUserDept)].ids
|
|
|
657
|
+ this.getRepairman(res.F_CreateUserDept, 0)
|
|
|
658
|
+ this.ruleForm.ApplicationDept = res.F_CreateUserDept
|
|
|
659
|
+ this.ruleForm.Applicant = res.F_CreateUser
|
|
654
|
660
|
}
|
|
655
|
661
|
if (res.F_DealDept) {
|
|
656
|
|
- this.ruleForm.opt = "2";
|
|
|
662
|
+ this.ruleForm.opt = '2'
|
|
657
|
663
|
this.deptidArr1 =
|
|
658
|
|
- this.$store.getters.deptmap[parseInt(res.F_DealDept)].ids;
|
|
|
664
|
+ this.$store.getters.deptmap[parseInt(res.F_DealDept)].ids
|
|
659
|
665
|
// console.log(this.$store.getters.deptmap[parseInt(res.F_DealDept)].ids)
|
|
660
|
|
- this.getRepairman1(res.F_DealDept, 0);
|
|
661
|
|
- this.ruleForm.DealDept = res.F_DealDept;
|
|
662
|
|
- this.ruleForm.clid = res.F_DealMan;
|
|
|
666
|
+ this.getRepairman1(res.F_DealDept, 0)
|
|
|
667
|
+ this.ruleForm.DealDept = res.F_DealDept
|
|
|
668
|
+ this.ruleForm.clid = res.F_DealMan
|
|
663
|
669
|
}
|
|
664
|
|
- this.ruleForm.cfnum = res.F_RemindCount;
|
|
665
|
|
- this.ruleForm.phone = res.F_Phone;
|
|
666
|
|
- this.ruleForm.position = res.F_Location;
|
|
667
|
|
- this.ruleForm.toplace = res.F_ToPlace;
|
|
668
|
|
- this.ruleForm.content = res.F_Content;
|
|
669
|
|
- const arr = [];
|
|
670
|
|
- res.PSInfo.forEach(function (v, n) {
|
|
|
670
|
+ this.ruleForm.cfnum = res.F_RemindCount
|
|
|
671
|
+ this.ruleForm.phone = res.F_Phone
|
|
|
672
|
+ this.ruleForm.position = res.F_Location
|
|
|
673
|
+ this.ruleForm.toplace = res.F_ToPlace
|
|
|
674
|
+ this.ruleForm.content = res.F_Content
|
|
|
675
|
+ const arr = []
|
|
|
676
|
+ res.PSInfo.forEach(function(v, n) {
|
|
671
|
677
|
arr.push({
|
|
672
|
|
- devname: v.F_DicName + "," + v.F_DicId,
|
|
673
|
|
- num: v.F_Number,
|
|
674
|
|
- });
|
|
675
|
|
- });
|
|
676
|
|
- this.devList = arr;
|
|
|
678
|
+ devname: v.F_DicName + ',' + v.F_DicId,
|
|
|
679
|
+ num: v.F_Number
|
|
|
680
|
+ })
|
|
|
681
|
+ })
|
|
|
682
|
+ this.devList = arr
|
|
677
|
683
|
}
|
|
678
|
684
|
})
|
|
679
|
|
- .catch(() => {});
|
|
|
685
|
+ .catch(() => {})
|
|
680
|
686
|
},
|
|
681
|
687
|
submitForm() {
|
|
682
|
|
- const details = [];
|
|
683
|
|
- let isNull = false;
|
|
684
|
|
- this.devList.forEach(function (v, n) {
|
|
685
|
|
- if (!isNull && !v.devname.split(",")[1]) {
|
|
686
|
|
- isNull = true;
|
|
|
688
|
+ const details = []
|
|
|
689
|
+ let isNull = false
|
|
|
690
|
+ this.devList.forEach(function(v, n) {
|
|
|
691
|
+ if (!isNull && !v.devname.split(',')[1]) {
|
|
|
692
|
+ isNull = true
|
|
687
|
693
|
}
|
|
688
|
694
|
details.push({
|
|
689
|
|
- F_DicId: v.devname.split(",")[1],
|
|
690
|
|
- F_DicName: v.devname.split(",")[0],
|
|
691
|
|
- F_Number: v.num,
|
|
692
|
|
- });
|
|
693
|
|
- });
|
|
|
695
|
+ F_DicId: v.devname.split(',')[1],
|
|
|
696
|
+ F_DicName: v.devname.split(',')[0],
|
|
|
697
|
+ F_Number: v.num
|
|
|
698
|
+ })
|
|
|
699
|
+ })
|
|
694
|
700
|
|
|
695
|
701
|
if (isNull) {
|
|
696
|
|
- this.$message.error("请选择对应物资");
|
|
697
|
|
- return;
|
|
|
702
|
+ this.$message.error('请选择对应物资')
|
|
|
703
|
+ return
|
|
698
|
704
|
}
|
|
699
|
705
|
|
|
700
|
|
- if (this.ruleForm.repairImageid === "") {
|
|
701
|
|
- this.ruleForm.repairImageid = "";
|
|
|
706
|
+ if (this.ruleForm.repairImageid === '') {
|
|
|
707
|
+ this.ruleForm.repairImageid = ''
|
|
702
|
708
|
} else {
|
|
703
|
709
|
this.ruleForm.repairImageid = this.ruleForm.repairImageid.slice(
|
|
704
|
710
|
0,
|
|
705
|
711
|
this.ruleForm.repairImageid.length - 1
|
|
706
|
|
- );
|
|
|
712
|
+ )
|
|
707
|
713
|
}
|
|
708
|
714
|
// if (JSON.stringify(this.orderTypeData) !== '{}') {
|
|
709
|
715
|
// if (this.orderTypeData.F_Type2 !== '') {
|
|
|
@@ -714,9 +720,9 @@ export default {
|
|
714
|
720
|
// }
|
|
715
|
721
|
// console.log(this.ruleForm.orderType)
|
|
716
|
722
|
var datas = {
|
|
717
|
|
- CallId: this.callid,
|
|
718
|
|
- CallRecordsId: "",
|
|
719
|
|
- LeaveRecordId: "",
|
|
|
723
|
+ CallId: this.cid,
|
|
|
724
|
+ CallRecordsId: '',
|
|
|
725
|
+ LeaveRecordId: this.fid,
|
|
720
|
726
|
ApplicationDept: this.ruleForm.ApplicationDept,
|
|
721
|
727
|
Applicant: this.ruleForm.Applicant,
|
|
722
|
728
|
// Applicantsphone: this.ruleForm.phone,
|
|
|
@@ -728,10 +734,10 @@ export default {
|
|
728
|
734
|
DealDept: this.ruleForm.DealDept,
|
|
729
|
735
|
DealMan: this.ruleForm.clid,
|
|
730
|
736
|
File: this.ruleForm.repairImageid,
|
|
731
|
|
- detailists: details,
|
|
732
|
|
- };
|
|
|
737
|
+ detailists: details
|
|
|
738
|
+ }
|
|
733
|
739
|
var editdatas = {
|
|
734
|
|
- usertype: "0",
|
|
|
740
|
+ usertype: '0',
|
|
735
|
741
|
WorkOrderCode: this.wid,
|
|
736
|
742
|
ApplicationDept: this.ruleForm.ApplicationDept,
|
|
737
|
743
|
Applicant: this.ruleForm.Applicant,
|
|
|
@@ -743,38 +749,38 @@ export default {
|
|
743
|
749
|
DealDept: this.ruleForm.DealDept,
|
|
744
|
750
|
DealMan: this.ruleForm.clid,
|
|
745
|
751
|
File: this.ruleForm.repairImageid,
|
|
746
|
|
- detailists: details,
|
|
747
|
|
- };
|
|
|
752
|
+ detailists: details
|
|
|
753
|
+ }
|
|
748
|
754
|
// 添加
|
|
749
|
755
|
if (this.wid) {
|
|
750
|
|
- if (this.iswomanage === "2") {
|
|
751
|
|
- editdatas.usertype = 1;
|
|
|
756
|
+ if (this.iswomanage === '2') {
|
|
|
757
|
+ editdatas.usertype = 1
|
|
752
|
758
|
} else {
|
|
753
|
|
- editdatas.usertype = 0;
|
|
|
759
|
+ editdatas.usertype = 0
|
|
754
|
760
|
}
|
|
755
|
761
|
UpdateSchedulingWorkOrder(editdatas)
|
|
756
|
762
|
.then((response) => {
|
|
757
|
|
- if (response.state.toLowerCase() === "success") {
|
|
758
|
|
- this.$parent.$layer.closeAll();
|
|
|
763
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
764
|
+ this.$parent.$layer.closeAll()
|
|
759
|
765
|
// this.$parent.$layer.close(this.layerid)
|
|
760
|
766
|
// this.$parent.getList() // 重新加载父级数据
|
|
761
|
|
- this.$message.success("恭喜你,修改成功!");
|
|
|
767
|
+ this.$message.success('恭喜你,修改成功!')
|
|
762
|
768
|
}
|
|
763
|
769
|
})
|
|
764
|
|
- .catch(() => {});
|
|
|
770
|
+ .catch(() => {})
|
|
765
|
771
|
} else {
|
|
766
|
772
|
AddSchedulingWorkOrder(datas)
|
|
767
|
773
|
.then((response) => {
|
|
768
|
|
- if (response.state.toLowerCase() === "success") {
|
|
769
|
|
- this.$parent.$layer.closeAll();
|
|
|
774
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
775
|
+ this.$parent.$layer.closeAll()
|
|
770
|
776
|
// this.$parent.$layer.close(this.layerid)
|
|
771
|
777
|
// this.$parent.getList() // 重新加载父级数据
|
|
772
|
|
- this.$message.success("恭喜你,添加成功!");
|
|
|
778
|
+ this.$message.success('恭喜你,添加成功!')
|
|
773
|
779
|
}
|
|
774
|
780
|
})
|
|
775
|
|
- .catch(() => {});
|
|
|
781
|
+ .catch(() => {})
|
|
776
|
782
|
}
|
|
777
|
|
- },
|
|
|
783
|
+ }
|
|
778
|
784
|
// resetForm() {
|
|
779
|
785
|
// this.$refs.ruleForm.resetFields()
|
|
780
|
786
|
// this.itemessageList = [
|
|
|
@@ -793,8 +799,8 @@ export default {
|
|
793
|
799
|
// }
|
|
794
|
800
|
// ]
|
|
795
|
801
|
// }
|
|
796
|
|
- },
|
|
797
|
|
-};
|
|
|
802
|
+ }
|
|
|
803
|
+}
|
|
798
|
804
|
</script>
|
|
799
|
805
|
<style rel="stylesheet/scss" lang="scss">
|
|
800
|
806
|
.addOp span {
|