|
@@ -1,12 +1,12 @@
|
1
|
1
|
<!--
|
2
|
2
|
* @Author: ysh
|
3
|
3
|
* @Date: 2024-02-29 11:44:28
|
4
|
|
- * @LastEditors: wrh
|
5
|
|
- * @LastEditTime: 2024-04-19 17:39:20
|
|
4
|
+ * @LastEditors: Please set LastEditors
|
|
5
|
+ * @LastEditTime: 2024-04-23 14:48:39
|
6
|
6
|
-->
|
7
|
7
|
|
8
|
8
|
<template>
|
9
|
|
- <div>
|
|
9
|
+ <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading">
|
10
|
10
|
<el-row :gutter="20">
|
11
|
11
|
<el-col :span="18" :xs="24">
|
12
|
12
|
<el-card>
|
|
@@ -35,36 +35,36 @@
|
35
|
35
|
</el-date-picker>
|
36
|
36
|
</el-form-item>
|
37
|
37
|
</el-col>
|
38
|
|
- <el-col :span="6" :xs="24">
|
39
|
|
- <el-form-item label="申请用途:" prop="carUsage">
|
40
|
|
- <el-radio-group v-model="form.carUsage" @change="useChange" size="small"
|
41
|
|
- :disabled="taskName != '用车申请'">
|
42
|
|
- <el-radio-button label="1">工会用车</el-radio-button>
|
43
|
|
- <el-radio-button label="0">非工会用车</el-radio-button>
|
44
|
|
- </el-radio-group>
|
45
|
|
- </el-form-item>
|
46
|
|
- </el-col>
|
47
|
38
|
</el-row>
|
48
|
|
- <el-form-item label="项目编号:" prop="projectId">
|
|
39
|
+ <el-form-item label="申请用途:" prop="carUsage">
|
|
40
|
+ <el-radio-group v-model="form.carUsage" @change="useChange" size="small" :disabled="taskName != '用车申请'">
|
|
41
|
+ <el-radio label="0">项目用车</el-radio>
|
|
42
|
+ <el-radio label="1">非项目用车</el-radio>
|
|
43
|
+ <el-radio label="2">工会用车</el-radio>
|
|
44
|
+ <el-radio label="3">党委用车</el-radio>
|
|
45
|
+ <el-radio label="4">团委用车</el-radio>
|
|
46
|
+ </el-radio-group>
|
|
47
|
+ </el-form-item>
|
|
48
|
+ <el-form-item label="项目编号:" prop="projectId" v-if="form.carUsage == '0'">
|
49
|
49
|
<el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
|
50
|
|
- :disabled="taskName != '用车申请' || form.carUsage == '1'" clearable>
|
|
50
|
+ :disabled="taskName != '用车申请'" clearable>
|
51
|
51
|
<el-option v-for="item in projectList" :key="item.value" :label="item.projectNumber"
|
52
|
52
|
:value="item.projectId">
|
53
|
53
|
</el-option>
|
54
|
54
|
</el-select>
|
55
|
55
|
<el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
|
56
|
56
|
<el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
|
57
|
|
- }}</el-descriptions-item>
|
|
57
|
+ }}</el-descriptions-item>
|
58
|
58
|
<el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
|
59
|
|
- }}</el-descriptions-item>
|
|
59
|
+ }}</el-descriptions-item>
|
60
|
60
|
<el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
|
61
|
|
- chooseProject.projectLeaderUser.nickName : ''
|
62
|
|
- }}</el-descriptions-item>
|
|
61
|
+ chooseProject.projectLeaderUser.nickName : ''
|
|
62
|
+ }}</el-descriptions-item>
|
63
|
63
|
<el-descriptions-item label="承担部门" label-class-name="my-label">
|
64
|
64
|
<el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
|
65
|
65
|
</el-descriptions-item>
|
66
|
66
|
<el-descriptions-item label="项目类型" label-class-name="my-label">{{ chooseProject.projectType
|
67
|
|
- }}</el-descriptions-item>
|
|
67
|
+ }}</el-descriptions-item>
|
68
|
68
|
</el-descriptions>
|
69
|
69
|
</el-form-item>
|
70
|
70
|
<el-form-item label="用车事由:" prop="applyReason">
|
|
@@ -75,7 +75,8 @@
|
75
|
75
|
<el-row>
|
76
|
76
|
<el-col :span="6" :xs="24">
|
77
|
77
|
<el-form-item label="乘车人数:" prop="passengers">
|
78
|
|
- <el-input-number v-model="form.passengers" :min="1" :disabled="taskName != '用车申请'"></el-input-number>
|
|
78
|
+ <el-input-number v-model="form.passengers" :min="1"
|
|
79
|
+ :disabled="taskName != '用车申请'"></el-input-number>
|
79
|
80
|
</el-form-item>
|
80
|
81
|
</el-col>
|
81
|
82
|
<el-col :span="6" :xs="24">
|
|
@@ -135,20 +136,20 @@
|
135
|
136
|
</el-form-item>
|
136
|
137
|
</el-col>
|
137
|
138
|
</el-row>
|
138
|
|
- <!-- 工会审核意见 -->
|
139
|
|
- <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px" v-if="showFormItem('工会审核')">
|
140
|
|
- <el-input type="textarea" :rows="2" placeholder="请输入工会审核意见" v-model="form.unionComment"
|
141
|
|
- :disabled="taskName != '工会审核'">
|
|
139
|
+ <!-- 党工团审核意见 -->
|
|
140
|
+ <el-form-item :label="dgtAdvice" prop="unionComment" label-width="120px" v-if="showFormItem('党工团审核')">
|
|
141
|
+ <el-input type="textarea" :rows="2" placeholder="请输入审核意见" v-model="form.unionComment"
|
|
142
|
+ :disabled="taskName != '党工团审核'">
|
142
|
143
|
</el-input>
|
143
|
144
|
</el-form-item>
|
144
|
145
|
<el-row>
|
145
|
146
|
<el-col :span="6" :xs="24" :offset="12">
|
146
|
|
- <el-form-item label="签名:" label-width="120px" v-if="showFormItem('工会审核签名')">
|
|
147
|
+ <el-form-item label="签名:" label-width="120px" v-if="showFormItem('党工团审核签名')">
|
147
|
148
|
<span class="auditor"> {{ form.unionUser ? form.unionUser.nickName : unionUser }} </span>
|
148
|
149
|
</el-form-item>
|
149
|
150
|
</el-col>
|
150
|
151
|
<el-col :span="6">
|
151
|
|
- <el-form-item label="日期:" label-width="120px" v-if="showFormItem('工会审核签名')">
|
|
152
|
+ <el-form-item label="日期:" label-width="120px" v-if="showFormItem('党工团审核签名')">
|
152
|
153
|
<span> {{ form.unionTime ? form.unionTime : unionTime }} </span>
|
153
|
154
|
</el-form-item>
|
154
|
155
|
</el-col>
|
|
@@ -263,7 +264,7 @@ export default {
|
263
|
264
|
this.managerUser = this.$store.getters.name;
|
264
|
265
|
this.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
|
265
|
266
|
}
|
266
|
|
- if (this.taskName == '工会审核') {
|
|
267
|
+ if (this.taskName == '党工团审核') {
|
267
|
268
|
this.unionUser = this.$store.getters.name;
|
268
|
269
|
this.unionTime = parseTime(new Date(), '{y}-{m}-{d}')
|
269
|
270
|
}
|
|
@@ -285,6 +286,7 @@ export default {
|
285
|
286
|
},
|
286
|
287
|
data() {
|
287
|
288
|
return {
|
|
289
|
+ loading: true,
|
288
|
290
|
deptUser: '',
|
289
|
291
|
managerUser: '',
|
290
|
292
|
unionUser: '',
|
|
@@ -335,6 +337,7 @@ export default {
|
335
|
337
|
formTotal: 0,
|
336
|
338
|
flowData: {},
|
337
|
339
|
dept: 0,
|
|
340
|
+ dgtAdvice: '审核意见'//党工团审核意见的label
|
338
|
341
|
}
|
339
|
342
|
},
|
340
|
343
|
mounted() {
|
|
@@ -351,10 +354,19 @@ export default {
|
351
|
354
|
this.dept = this.$store.getters.deptId;
|
352
|
355
|
this.form.dept.deptName = this.$store.getters.deptName;
|
353
|
356
|
this.form.applyDate = new Date();
|
|
357
|
+ this.loading = false
|
354
|
358
|
}
|
355
|
359
|
else {
|
356
|
360
|
this.formTotal = 1;
|
357
|
361
|
let data = res.data;
|
|
362
|
+ // 初始化党工团审核意见的label
|
|
363
|
+ if (data.carUsage == '2') {
|
|
364
|
+ this.dgtAdvice = '工会审核意见'
|
|
365
|
+ } else if (data.carUsage == '3') {
|
|
366
|
+ this.dgtAdvice = '党委审核意见'
|
|
367
|
+ } else {
|
|
368
|
+ this.dgtAdvice = '团委审核意见'
|
|
369
|
+ }
|
358
|
370
|
if (res.data.drivers == null || res.data.drivers == undefined || res.data.drivers == "") {
|
359
|
371
|
data.drivers = []
|
360
|
372
|
} else {
|
|
@@ -382,6 +394,7 @@ export default {
|
382
|
394
|
this.isSelect = true
|
383
|
395
|
})
|
384
|
396
|
}
|
|
397
|
+ this.loading = false
|
385
|
398
|
}
|
386
|
399
|
})
|
387
|
400
|
},
|
|
@@ -410,6 +423,7 @@ export default {
|
410
|
423
|
})
|
411
|
424
|
},
|
412
|
425
|
completeApply() {
|
|
426
|
+ debugger
|
413
|
427
|
this.form.formId = this.taskForm.formId;
|
414
|
428
|
this.form.carApplyId = this.taskForm.formId;
|
415
|
429
|
let formData = new FormData();
|
|
@@ -428,9 +442,15 @@ export default {
|
428
|
442
|
getNextFlowNodeApproval() {
|
429
|
443
|
if (this.taskName == '用车申请') {
|
430
|
444
|
getUsersDeptLeader({ userId: this.$store.getters.userId }).then(res => {
|
|
445
|
+ debugger
|
431
|
446
|
this.$set(this.taskForm.variables, "dept", this.dept);
|
432
|
|
- if (res.data)
|
|
447
|
+ if (res.data && this.dept != 0) {
|
433
|
448
|
this.$set(this.taskForm.variables, "approval", res.data.userId);
|
|
449
|
+ } else {
|
|
450
|
+ let userId = this.getChooseType()
|
|
451
|
+ this.$set(this.taskForm.variables, "approval", userId);
|
|
452
|
+ }
|
|
453
|
+
|
434
|
454
|
complete(this.taskForm).then(response => {
|
435
|
455
|
this.$modal.msgSuccess(response.msg);
|
436
|
456
|
this.$emit('goBack')
|
|
@@ -445,7 +465,7 @@ export default {
|
445
|
465
|
this.$emit('goBack')
|
446
|
466
|
});
|
447
|
467
|
})
|
448
|
|
- } else if (this.taskName == '分管审核' || this.taskName == '工会审核' || this.taskName == '总经理审核') {
|
|
468
|
+ } else if (this.taskName == '分管审核' || this.taskName == '党工团审核' || this.taskName == '总经理审核') {
|
449
|
469
|
this.$set(this.taskForm.variables, "approvalList", [8, 16]);
|
450
|
470
|
complete(this.taskForm).then(response => {
|
451
|
471
|
this.$modal.msgSuccess(response.msg);
|
|
@@ -458,6 +478,13 @@ export default {
|
458
|
478
|
});
|
459
|
479
|
}
|
460
|
480
|
},
|
|
481
|
+ getChooseType() {
|
|
482
|
+ if (this.form.carUsage == '2' || this.form.carUsage == '3') {
|
|
483
|
+ return 4 // 4为党委书记
|
|
484
|
+ } else {
|
|
485
|
+ return 142 //142为团委书记
|
|
486
|
+ }
|
|
487
|
+ },
|
461
|
488
|
// 查询项目列表
|
462
|
489
|
getProjectList() {
|
463
|
490
|
this.loading = true
|
|
@@ -525,8 +552,9 @@ export default {
|
525
|
552
|
return true;
|
526
|
553
|
},
|
527
|
554
|
useChange(val) {
|
528
|
|
- if (val == '1')
|
|
555
|
+ if (val == '2' || val == '3' || val == '4') {
|
529
|
556
|
this.dept = 0;
|
|
557
|
+ }
|
530
|
558
|
else
|
531
|
559
|
this.dept = this.$store.getters.deptId;
|
532
|
560
|
},
|
|
@@ -536,16 +564,16 @@ export default {
|
536
|
564
|
isShow = (this.dept > 102 && this.taskName == '用车申请') || (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.deptUserId != null);
|
537
|
565
|
else if (name == '分管审核')
|
538
|
566
|
isShow = (this.dept > 102 && this.taskName == '用车申请') || (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.managerUserId != null);
|
539
|
|
- else if (name == '工会审核')
|
540
|
|
- isShow = (this.dept == 0 && this.taskName == '用车申请') || this.taskName == '工会审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.unionUserId != null);
|
|
567
|
+ else if (name == '党工团审核')
|
|
568
|
+ isShow = (this.dept == 0 && this.taskName == '用车申请') || this.taskName == '党工团审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.unionUserId != null);
|
541
|
569
|
else if (name == '总经理审核')
|
542
|
570
|
isShow = (this.dept == 102 && this.taskName == '用车申请') || this.taskName == '总经理审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.gmUserId != null);
|
543
|
571
|
else if (name == '部门审核签名')
|
544
|
572
|
isShow = (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.deptUserId != null);
|
545
|
573
|
else if (name == '分管审核签名')
|
546
|
574
|
isShow = this.taskName == '分管审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.managerUserId != null);
|
547
|
|
- else if (name == '工会审核签名')
|
548
|
|
- isShow = this.taskName == '工会审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.unionUserId != null);
|
|
575
|
+ else if (name == '党工团审核签名')
|
|
576
|
+ isShow = this.taskName == '党工团审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.unionUserId != null);
|
549
|
577
|
else if (name == '总经理审核签名')
|
550
|
578
|
isShow = this.taskName == '总经理审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.gmUserId != null);
|
551
|
579
|
return isShow;
|
|
@@ -554,7 +582,9 @@ export default {
|
554
|
582
|
}
|
555
|
583
|
</script>
|
556
|
584
|
|
557
|
|
-<style lang="scss" scoped></style>
|
|
585
|
+<style lang="scss" scoped>
|
|
586
|
+@import "@/assets/styles/element-reset.scss";
|
|
587
|
+</style>
|
558
|
588
|
|
559
|
589
|
<style>
|
560
|
590
|
.auditor {
|
|
@@ -566,12 +596,4 @@ export default {
|
566
|
596
|
width: 100px;
|
567
|
597
|
background: #E1F3D8;
|
568
|
598
|
}
|
569
|
|
-
|
570
|
|
-::v-deep .el-input.is-disabled .el-input__inner {
|
571
|
|
- color: #121212 !important;
|
572
|
|
-}
|
573
|
|
-
|
574
|
|
-::v-deep .el-textarea.is-disabled .el-textarea__inner {
|
575
|
|
- color: #121212 !important;
|
576
|
|
-}
|
577
|
599
|
</style>
|