|
@@ -2,7 +2,7 @@
|
2
|
2
|
* @Author: ysh
|
3
|
3
|
* @Date: 2024-02-29 11:44:28
|
4
|
4
|
* @LastEditors: wrh
|
5
|
|
- * @LastEditTime: 2024-03-27 16:47:27
|
|
5
|
+ * @LastEditTime: 2024-04-09 14:17:41
|
6
|
6
|
-->
|
7
|
7
|
|
8
|
8
|
<template>
|
|
@@ -35,7 +35,11 @@
|
35
|
35
|
</el-form-item>
|
36
|
36
|
</el-col>
|
37
|
37
|
</el-row>
|
38
|
|
- <el-form-item label="项目编号:" prop="projectId" v-if="taskForm.procDefName == '用车审批'">
|
|
38
|
+ <el-radio-group v-model="isUnion" v-if="taskName == '用车申请'">
|
|
39
|
+ <el-radio-button label="工会用车"></el-radio-button>
|
|
40
|
+ <el-radio-button label="非工会用车"></el-radio-button>
|
|
41
|
+ </el-radio-group>
|
|
42
|
+ <el-form-item label="项目编号:" prop="projectId">
|
39
|
43
|
<el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
|
40
|
44
|
:disabled="taskName != '用车申请'" clearable>
|
41
|
45
|
<el-option v-for="item in projectList" :key="item.value" :label="item.projectNumber"
|
|
@@ -47,7 +51,8 @@
|
47
|
51
|
}}</el-descriptions-item>
|
48
|
52
|
<el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
|
49
|
53
|
}}</el-descriptions-item>
|
50
|
|
- <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ? chooseProject.projectLeaderUser.nickName : ''
|
|
54
|
+ <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
|
|
55
|
+ chooseProject.projectLeaderUser.nickName : ''
|
51
|
56
|
}}</el-descriptions-item>
|
52
|
57
|
<el-descriptions-item label="承担部门" label-class-name="my-label">
|
53
|
58
|
<el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
|
|
@@ -87,28 +92,31 @@
|
87
|
92
|
</el-row>
|
88
|
93
|
<el-divider></el-divider>
|
89
|
94
|
<!-- 部门审核意见 -->
|
90
|
|
- <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px" v-if="taskForm.procDefName == '用车审批'">
|
|
95
|
+ <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px" v-if="form.dept.deptId > 102">
|
91
|
96
|
<el-input type="textarea" :rows="2" placeholder="请输入部门审核意见" v-model="form.deptComment"
|
92
|
97
|
:disabled="taskName != '部门审核'">
|
93
|
98
|
</el-input>
|
94
|
99
|
</el-form-item>
|
95
|
100
|
<!-- 分管审核意见 -->
|
96
|
|
- <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px"
|
97
|
|
- v-if="taskForm.procDefName == '用车审批'">
|
|
101
|
+ <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px" v-if="form.dept.deptId > 102">
|
98
|
102
|
<el-input type="textarea" :rows="2" placeholder="请输入分管审核意见" v-model="form.managerComment"
|
99
|
103
|
:disabled="taskName != '分管审核'">
|
100
|
104
|
</el-input>
|
101
|
105
|
</el-form-item>
|
102
|
106
|
<!-- 工会审核意见 -->
|
103
|
|
- <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px"
|
104
|
|
- v-if="taskForm.procDefName == '用车审批(工会)'">
|
|
107
|
+ <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px" v-if="form.dept.deptId == 0">
|
105
|
108
|
<el-input type="textarea" :rows="2" placeholder="请输入工会审核意见" v-model="form.unionComment"
|
106
|
109
|
:disabled="taskName != '工会审核'">
|
107
|
110
|
</el-input>
|
108
|
111
|
</el-form-item>
|
|
112
|
+ <!-- 总经理审核意见 -->
|
|
113
|
+ <el-form-item label="总经理审核意见" prop="gmComment" label-width="120px" v-if="form.dept.deptId == 102">
|
|
114
|
+ <el-input type="textarea" :rows="2" placeholder="请输入总经理审核意见" v-model="form.gmComment"
|
|
115
|
+ :disabled="taskName != '总经理审核'">
|
|
116
|
+ </el-input>
|
|
117
|
+ </el-form-item>
|
109
|
118
|
<!-- 安排用车意见 -->
|
110
|
|
- <el-form-item label="安排用车意见:" prop="dispatchComment" label-width="120px"
|
111
|
|
- v-if="taskForm.procDefName == '用车审批'">
|
|
119
|
+ <el-form-item label="安排用车意见:" prop="dispatchComment" label-width="120px">
|
112
|
120
|
<el-input type="textarea" :rows="2" placeholder="请输入安排用车意见" v-model="form.dispatchComment"
|
113
|
121
|
:disabled="taskName != '安排用车'">
|
114
|
122
|
</el-input>
|
|
@@ -179,6 +187,8 @@ export default {
|
179
|
187
|
},
|
180
|
188
|
created() {
|
181
|
189
|
this.form.user.nickName = this.$store.getters.name;
|
|
190
|
+ this.form.dept.deptId = this.$store.getters.deptId;
|
|
191
|
+ console.log(this.form.dept.deptId)
|
182
|
192
|
this.form.dept.deptName = this.$store.getters.deptName;
|
183
|
193
|
this.getProjectList();
|
184
|
194
|
this.getCarList();
|
|
@@ -196,6 +206,7 @@ export default {
|
196
|
206
|
nickName: '',
|
197
|
207
|
},
|
198
|
208
|
dept: {
|
|
209
|
+ deptId: '',
|
199
|
210
|
deptName: '',
|
200
|
211
|
},
|
201
|
212
|
applyDate: undefined,
|
|
@@ -224,6 +235,7 @@ export default {
|
224
|
235
|
driverList: [],
|
225
|
236
|
chooseProject: {},
|
226
|
237
|
isSelect: false,
|
|
238
|
+ isUnion: '非工会用车',
|
227
|
239
|
formTotal: 0,
|
228
|
240
|
flowData: {}
|
229
|
241
|
}
|
|
@@ -235,11 +247,11 @@ export default {
|
235
|
247
|
// 初始化表单
|
236
|
248
|
initForm() {
|
237
|
249
|
getCarApproval(this.taskForm.formId).then(res => {
|
238
|
|
- console.log(res.data)
|
239
|
250
|
if (this.isEmptyObject(res.data)) {
|
240
|
251
|
this.formTotal = 0;
|
241
|
252
|
this.form.user.nickName = this.$store.getters.name;
|
242
|
253
|
this.form.applier = this.$store.getters.userId;
|
|
254
|
+ this.form.dept.deptId = this.$store.getters.deptId;
|
243
|
255
|
this.form.dept.deptName = this.$store.getters.deptName;
|
244
|
256
|
this.form.applyDate = new Date();
|
245
|
257
|
}
|
|
@@ -316,9 +328,11 @@ export default {
|
316
|
328
|
if (this.taskName == '用车申请') {
|
317
|
329
|
getUsersDeptLeader({ userId: this.$store.getters.userId }).then(res => {
|
318
|
330
|
let userId = res.data.userId;
|
319
|
|
- if (this.taskForm.procDefName == '用车审批') {
|
320
|
|
- this.$set(this.taskForm.variables, "approval", userId);
|
321
|
|
- }
|
|
331
|
+ if (this.isUnion == '非工会用车')
|
|
332
|
+ this.$set(this.taskForm.variables, "dept", this.form.dept.deptId);
|
|
333
|
+ else
|
|
334
|
+ this.$set(this.taskForm.variables, "dept", 0);
|
|
335
|
+ this.$set(this.taskForm.variables, "approval", userId);
|
322
|
336
|
complete(this.taskForm).then(response => {
|
323
|
337
|
this.$modal.msgSuccess(response.msg);
|
324
|
338
|
this.$emit('goBack')
|
|
@@ -430,4 +444,5 @@ export default {
|
430
|
444
|
|
431
|
445
|
::v-deep .el-textarea.is-disabled .el-textarea__inner {
|
432
|
446
|
color: #121212 !important;
|
433
|
|
-}</style>
|
|
447
|
+}
|
|
448
|
+</style>
|