Pārlūkot izejas kodu

项目流转分管审核或签,生产确认会签

lamphua 1 gadu atpakaļ
vecāks
revīzija
131daa1406

+ 4
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java Parādīt failu

@@ -105,6 +105,10 @@ public class CmcCarApprovalController extends BaseController
105 105
             cmcCarApproval.setManagerUserId(getLoginUser().getUserId());
106 106
             cmcCarApproval.setManagerComment(formDataJson.getString("managerComment"));
107 107
         }
108
+        if (formDataJson.getString("gmComment") != null) {
109
+            cmcCarApproval.setGmUserId(getLoginUser().getUserId());
110
+            cmcCarApproval.setGmComment(formDataJson.getString("gmComment"));
111
+        }
108 112
         if (formDataJson.getString("unionComment") != null) {
109 113
             cmcCarApproval.setUnionUserId(getLoginUser().getUserId());
110 114
             cmcCarApproval.setUnionComment(formDataJson.getString("unionComment"));

+ 3
- 3
oa-back/sql/sql.sql
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 31
- 22
oa-ui/src/views/flowable/form/carForm.vue Parādīt failu

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-04-10 10:16:05
5
+ * @LastEditTime: 2024-04-10 17:14:03
6 6
 -->
7 7
 
8 8
 <template>
@@ -36,7 +36,8 @@
36 36
                 </el-col>
37 37
                 <el-col :span="6" :xs="24">
38 38
                   <el-form-item label="申请用途:" prop="carUsage">
39
-                    <el-radio-group v-model="form.carUsage" @change="useChange" size="small">
39
+                    <el-radio-group v-model="form.carUsage" @change="useChange" size="small"
40
+                      :disabled="taskName != '用车申请'">
40 41
                       <el-radio-button label="1">工会用车</el-radio-button>
41 42
                       <el-radio-button label="0">非工会用车</el-radio-button>
42 43
                     </el-radio-group>
@@ -98,25 +99,25 @@
98 99
               </el-row>
99 100
               <el-divider></el-divider>
100 101
               <!-- 部门审核意见 -->
101
-              <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px" v-if="dept > 102">
102
+              <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px" v-if="showFormItem('部门审核')">
102 103
                 <el-input type="textarea" :rows="2" placeholder="请输入部门审核意见" v-model="form.deptComment"
103 104
                   :disabled="taskName != '部门审核'">
104 105
                 </el-input>
105 106
               </el-form-item>
106 107
               <!-- 分管审核意见 -->
107
-              <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px" v-if="dept > 102">
108
+              <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px" v-if="showFormItem('分管审核')">
108 109
                 <el-input type="textarea" :rows="2" placeholder="请输入分管审核意见" v-model="form.managerComment"
109 110
                   :disabled="taskName != '分管审核'">
110 111
                 </el-input>
111 112
               </el-form-item>
112 113
               <!-- 工会审核意见 -->
113
-              <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px" v-if="dept == 101">
114
+              <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px" v-if="showFormItem('工会审核')">
114 115
                 <el-input type="textarea" :rows="2" placeholder="请输入工会审核意见" v-model="form.unionComment"
115 116
                   :disabled="taskName != '工会审核'">
116 117
                 </el-input>
117 118
               </el-form-item>
118 119
               <!-- 总经理审核意见 -->
119
-              <el-form-item label="总经理审核意见" prop="gmComment" label-width="120px" v-if="dept == 102">
120
+              <el-form-item label="总经理审核意见" prop="gmComment" label-width="120px" v-if="showFormItem('总经理审核')">
120 121
                 <el-input type="textarea" :rows="2" placeholder="请输入总经理审核意见" v-model="form.gmComment"
121 122
                   :disabled="taskName != '总经理审核'">
122 123
                 </el-input>
@@ -192,10 +193,7 @@ export default {
192 193
     }
193 194
   },
194 195
   created() {
195
-    this.form.user.nickName = this.$store.getters.name;
196 196
     this.dept = this.$store.getters.deptId;
197
-    console.log(this.dept)
198
-    this.form.dept.deptName = this.$store.getters.deptName;
199 197
     this.getProjectList();
200 198
     this.getCarList();
201 199
     this.getDriverList();
@@ -286,10 +284,12 @@ export default {
286 284
             data.cars = arr;
287 285
           }
288 286
           this.form = data;
289
-          getProject(data.projectId).then(response => {
290
-            this.chooseProject = response.data;
291
-            this.isSelect = true
292
-          })
287
+          if (data.projectId) {
288
+            getProject(data.projectId).then(response => {
289
+              this.chooseProject = response.data;
290
+              this.isSelect = true
291
+            })
292
+          }
293 293
         }
294 294
       })
295 295
     },
@@ -336,12 +336,9 @@ export default {
336 336
     getNextFlowNodeApproval() {
337 337
       if (this.taskName == '用车申请') {
338 338
         getUsersDeptLeader({ userId: this.$store.getters.userId }).then(res => {
339
-          let userId = res.data.userId;
340
-          if (this.form.carUsage == '0')
341
-            this.$set(this.taskForm.variables, "dept", this.form.dept.deptId);
342
-          else
343
-            this.$set(this.taskForm.variables, "dept", 0);
344
-          this.$set(this.taskForm.variables, "approval", userId);
339
+          this.$set(this.taskForm.variables, "dept", this.dept);
340
+          if (res.data)
341
+            this.$set(this.taskForm.variables, "approval", res.data.userId);
345 342
           complete(this.taskForm).then(response => {
346 343
             this.$modal.msgSuccess(response.msg);
347 344
             this.$emit('goBack')
@@ -356,7 +353,7 @@ export default {
356 353
             this.$emit('goBack')
357 354
           });
358 355
         })
359
-      } else if (this.taskName == '分管审核' || this.taskName == '工会审核') {
356
+      } else if (this.taskName == '分管审核' || this.taskName == '工会审核' || this.taskName == '总经理审核') {
360 357
         this.$set(this.taskForm.variables, "approvalList", [8, 16]);
361 358
         complete(this.taskForm).then(response => {
362 359
           this.$modal.msgSuccess(response.msg);
@@ -437,10 +434,22 @@ export default {
437 434
     },
438 435
     useChange(val) {
439 436
       if (val == '1')
440
-        this.dept = 101;
437
+        this.dept = 0;
441 438
       else
442 439
         this.dept = this.$store.getters.deptId;
443
-    }
440
+    },
441
+    showFormItem(taskName) {
442
+      let isShow = false;
443
+      if (taskName == '部门审核')
444
+        isShow = (this.dept > 102 && this.taskName == '用车申请') || (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.deptUserId != null);
445
+      else if (taskName == '分管审核')
446
+        isShow = (this.dept > 102 && this.taskName == '用车申请') || (this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.managerUserId != null);
447
+      else if (taskName == '工会审核')
448
+        isShow = (this.dept == 0 && this.taskName == '用车申请') || this.taskName == '工会审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.unionUserId != null);
449
+      else if (taskName == '总经理审核')
450
+        isShow = (this.dept == 102 && this.taskName == '用车申请') || this.taskName == '总经理审核' || ((this.taskName == '安排用车' || this.taskName == '申请确认') && this.form.gmUserId != null);
451
+      return isShow;
452
+    },
444 453
   },
445 454
 }
446 455
 </script>

Notiek ielāde…
Atcelt
Saglabāt