Parcourir la source

网页端:新建参培审核流程何参培记录表

移动端:修改借款审批
余思翰 il y a 1 mois
Parent
révision
771e1d197b

+ 21
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcTrainApproval.java Voir le fichier

@@ -47,6 +47,9 @@ public class CmcTrainApproval extends BaseEntity
47 47
     @Excel(name = "主要内容")
48 48
     private String content;
49 49
 
50
+    /** 佐证附件 */
51
+    private String document;
52
+
50 53
     /** 时长 */
51 54
     @Excel(name = "时长")
52 55
     private Double hours;
@@ -84,6 +87,15 @@ public class CmcTrainApproval extends BaseEntity
84 87
     {
85 88
         return userId;
86 89
     }
90
+    public void setDeptId(Long deptId)
91
+    {
92
+        this.deptId = deptId;
93
+    }
94
+
95
+    public Long getDeptId()
96
+    {
97
+        return deptId;
98
+    }
87 99
     public void setReportTime(Date reportTime) 
88 100
     {
89 101
         this.reportTime = reportTime;
@@ -97,47 +109,50 @@ public class CmcTrainApproval extends BaseEntity
97 109
     {
98 110
         this.trainName = trainName;
99 111
     }
100
-
101 112
     public String getTrainName() 
102 113
     {
103 114
         return trainName;
104 115
     }
116
+
105 117
     public void setContent(String content) 
106 118
     {
107 119
         this.content = content;
108 120
     }
109
-
110 121
     public String getContent() 
111 122
     {
112 123
         return content;
113 124
     }
125
+
114 126
     public void setHours(Double hours) 
115 127
     {
116 128
         this.hours = hours;
117 129
     }
118
-
119
-    public Double getHours() 
130
+    public Double getHours()
120 131
     {
121 132
         return hours;
122 133
     }
134
+
135
+    public void setDocument(String document){this.document = document;}
136
+    public String getDocument(){return document;}
137
+
123 138
     public void setDeptUserId(Long deptUserId) 
124 139
     {
125 140
         this.deptUserId = deptUserId;
126 141
     }
127
-
128 142
     public Long getDeptUserId() 
129 143
     {
130 144
         return deptUserId;
131 145
     }
146
+
132 147
     public void setDeptTime(Date deptTime) 
133 148
     {
134 149
         this.deptTime = deptTime;
135 150
     }
136
-
137 151
     public Date getDeptTime() 
138 152
     {
139 153
         return deptTime;
140 154
     }
155
+
141 156
     public void setDeptComment(String deptComment) 
142 157
     {
143 158
         this.deptComment = deptComment;

+ 9
- 4
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcTrainApprovalMapper.xml Voir le fichier

@@ -11,12 +11,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
11 11
         <result property="reportTime"    column="report_time"    />
12 12
         <result property="trainName"    column="train_name"    />
13 13
         <result property="content"    column="content"    />
14
+        <result property="document"    column="document"    />
14 15
         <result property="hours"    column="hours"    />
15 16
         <result property="deptUserId"    column="dept_user_id"    />
16 17
         <result property="deptTime"    column="dept_time"    />
17 18
         <result property="deptComment"    column="dept_comment"    />
18
-        <association property="user"    javaType="SysUser"         resultMap="ReportUserResult" />
19
-        <association property="user"    javaType="SysUser"         resultMap="DeptUserResult" />
19
+        <association property="reportUser"    javaType="SysUser"         resultMap="ReportUserResult" />
20
+        <association property="deptUser"    javaType="SysUser"         resultMap="DeptUserResult" />
20 21
         <association property="dept"    javaType="SysDept"         resultMap="SysDeptResult" />
21 22
     </resultMap>
22 23
 
@@ -36,9 +37,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
36 37
     </resultMap>
37 38
 
38 39
     <sql id="selectCmcTrainApprovalVo">
39
-        select ta.participate_id, ta.user_id, u.nick_name as report_nick_name, ta.dept_id, d.dept_name, ta.report_time, ta.train_name, ta.content, ta.hours, ta.dept_user_id, u1.nick_name as dept_nick_name, ta.dept_time, ta.dept_comment from cmc_train_approval as ta
40
+        select ta.participate_id, ta.user_id, u.nick_name as report_nick_name, ta.dept_id, d.dept_name, ta.report_time, ta.train_name, ta.content,ta.document, ta.hours, ta.dept_user_id, u1.nick_name as dept_nick_name, ta.dept_time, ta.dept_comment from cmc_train_approval as ta
40 41
         left join sys_user as u on u.user_id = ta.user_id
41
-        left join sys_user as u1 on u1.user_id = ta.user_id
42
+        left join sys_user as u1 on u1.user_id = ta.dept_user_id
42 43
         left join sys_dept as d on d.dept_id = ta.dept_id
43 44
     </sql>
44 45
 
@@ -50,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
50 51
             <if test="reportTime != null "> and ta.report_time = #{reportTime}</if>
51 52
             <if test="trainName != null  and trainName != ''"> and ta.train_name like concat('%', #{trainName}, '%')</if>
52 53
             <if test="content != null  and content != ''"> and ta.content = #{content}</if>
54
+            <if test="document != null  and document != ''"> and ta.document = #{document}</if>
53 55
             <if test="hours != null "> and ta.hours = #{hours}</if>
54 56
             <if test="deptUserId != null "> and ta.dept_user_id = #{deptUserId}</if>
55 57
             <if test="deptTime != null "> and ta.dept_time = #{deptTime}</if>
@@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
71 73
             <if test="reportTime != null">report_time,</if>
72 74
             <if test="trainName != null">train_name,</if>
73 75
             <if test="content != null">content,</if>
76
+            <if test="document != null">document,</if>
74 77
             <if test="hours != null">hours,</if>
75 78
             <if test="deptUserId != null">dept_user_id,</if>
76 79
             <if test="deptTime != null">dept_time,</if>
@@ -83,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
83 86
             <if test="reportTime != null">#{reportTime},</if>
84 87
             <if test="trainName != null">#{trainName},</if>
85 88
             <if test="content != null">#{content},</if>
89
+            <if test="document != null">#{document},</if>
86 90
             <if test="hours != null">#{hours},</if>
87 91
             <if test="deptUserId != null">#{deptUserId},</if>
88 92
             <if test="deptTime != null">#{deptTime},</if>
@@ -98,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
98 102
             <if test="reportTime != null">report_time = #{reportTime},</if>
99 103
             <if test="trainName != null">train_name = #{trainName},</if>
100 104
             <if test="content != null">content = #{content},</if>
105
+            <if test="document != null">document = #{document},</if>
101 106
             <if test="hours != null">hours = #{hours},</if>
102 107
             <if test="deptUserId != null">dept_user_id = #{deptUserId},</if>
103 108
             <if test="deptTime != null">dept_time = #{deptTime},</if>

+ 2
- 2
oa-ui-app/config.js Voir le fichier

@@ -21,11 +21,11 @@ module.exports = {
21 21
     // 政策协议
22 22
     agreements: [{
23 23
         title: "隐私政策",
24
-        url: "https://ruoyi.vip/protocol.html"
24
+        // url: "https://ruoyi.vip/protocol.html"
25 25
       },
26 26
       {
27 27
         title: "用户服务协议",
28
-        url: "https://ruoyi.vip/protocol.html"
28
+        // url: "https://ruoyi.vip/protocol.html"
29 29
       }
30 30
     ]
31 31
   }

+ 15
- 1
oa-ui-app/main.js Voir le fichier

@@ -1,3 +1,9 @@
1
+/*
2
+ * @Author: ysh
3
+ * @Date: 2025-01-16 11:17:07
4
+ * @LastEditors: 
5
+ * @LastEditTime: 2025-03-03 14:24:08
6
+ */
1 7
 import Vue from 'vue'
2 8
 import App from './App'
3 9
 import store from './store' // store
@@ -10,11 +16,19 @@ Vue.use(uView)
10 16
 
11 17
 Vue.config.productionTip = false
12 18
 Vue.prototype.$store = store
19
+// 创建全局的 publicData 对象
20
+Vue.prototype.publicData = {
21
+  partySecretary: 4, // 党委书记
22
+  leagueSecretary: 142, // 团委书记
23
+  gm: 7, //总经理
24
+  chairman: 2,//董事长
25
+  zg: 9,
26
+}
27
+
13 28
 
14 29
 App.mpType = 'app'
15 30
 
16 31
 const app = new Vue({
17 32
   ...App
18 33
 })
19
-
20 34
 app.$mount()

+ 239
- 20
oa-ui-app/pages/form/borrow/borrow.vue Voir le fichier

@@ -2,7 +2,13 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-20 10:20:22
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-03 11:02:06
5
+ * @LastEditTime: 2025-03-03 17:23:02
6
+-->
7
+<!--
8
+ * @Author: ysh
9
+ * @Date: 2025-02-20 10:20:22
10
+ * @LastEditors: Please set LastEditors
11
+ * @LastEditTime: 2025-03-03 17:19:59
6 12
 -->
7 13
 <template>
8 14
   <view class="form-container">
@@ -30,7 +36,8 @@
30 36
 
31 37
       <!-- 借款类型 -->
32 38
       <uni-forms-item label="借款类型" required class="form-item" name="borrowUsage">
33
-        <uni-data-checkbox v-model="form.borrowUsage" :localdata="borrowUsageOptions"></uni-data-checkbox>
39
+        <uni-data-checkbox v-model="form.borrowUsage" :localdata="borrowUsageOptions"
40
+          :disabled="taskName != '借款申请'"></uni-data-checkbox>
34 41
       </uni-forms-item>
35 42
 
36 43
       <!-- 借款事由 -->
@@ -50,23 +57,37 @@
50 57
         <BorrowDetail :borrowId="form.borrowId" :taskName="taskName" @getApplyAmount="setApplyAmount"></BorrowDetail>
51 58
       </uni-forms-item>
52 59
 
53
-      <uni-forms-item label="申请金额" class="form-item">
54
-        <view>{{ (this.form.applyAmount).toFixed(2) }}</view>
55
-        <view style="color:#E74C3C" v-if="exceed && form.borrowUsage == '0'">
56
-          超过预算金额:{{ getMoreAmount('0') }}</view>
60
+      <uni-forms-item label="申请金额" required class="form-item">
61
+        <view class="amount-text">¥ {{ (this.form.applyAmount).toFixed(2) }}</view>
62
+        <view class="warning-text" v-if="exceed && form.borrowUsage == '0'">
63
+          超过预算金额:¥ {{ getMoreAmount('0') }}
64
+        </view>
57 65
       </uni-forms-item>
58 66
 
59 67
       <uni-forms-item label="最大借款金额" class="form-item">
60
-        {{ totalBudget.toFixed(2) }}
68
+        <view class="amount-text">¥ {{ totalBudget.toFixed(2) }}</view>
61 69
       </uni-forms-item>
70
+
62 71
       <uni-forms-item label="已申请借款" class="form-item">
63
-        {{ hasBorrow.toFixed(2) }}
72
+        <view class="amount-text">¥ {{ hasBorrow.toFixed(2) }}</view>
64 73
       </uni-forms-item>
74
+
65 75
       <uni-forms-item label="可用借款" class="form-item">
66
-        {{ (totalBudget - hasBorrow).toFixed(2) }}
76
+        <view class="amount-text">¥ {{ (totalBudget - hasBorrow).toFixed(2) }}</view>
67 77
       </uni-forms-item>
68
-      <view>
69
-        <u-button type="primary" size="normal" @click="submit">提交申请</u-button>
78
+      <uni-forms-item label="申请人说明" required class="form-item">
79
+        <uv-textarea v-model="form.remark" placeholder="请输入申请人说明" :disabled="taskName != '借款申请'"></uv-textarea>
80
+      </uni-forms-item>
81
+
82
+
83
+      <uni-forms-item label="部门负责人意见" required class="form-item" v-if="taskName != '借款申请'">
84
+        <uv-textarea v-model="form.deptComment" placeholder="请输入部门负责人意见"></uv-textarea>
85
+      </uni-forms-item>
86
+
87
+      <view class="form-button">
88
+        <u-button type="warning" size="normal" @click="saves" style="margin-right: 10px"
89
+          v-if="taskName == '借款申请'">保存</u-button>
90
+        <u-button type="primary" size="normal" @click="submit">{{ taskName == '借款申请' ? '提交申请' : '提交审核' }}</u-button>
70 91
       </view>
71 92
     </uni-forms>
72 93
 
@@ -80,6 +101,9 @@ import { parseTime } from "@/utils/common.js"
80 101
 import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
81 102
 import { listProject, getProject } from "@/api/oa/project/project";
82 103
 import { listBudget } from "@/api/oa/budget/budget";
104
+import { getUserByPost, getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
105
+import { complete, getNextFlowNode } from "@/api/flowable/todo";
106
+import config from '@/config'
83 107
 import BorrowDetail from './borrowDetail.vue';
84 108
 export default {
85 109
   components: {
@@ -93,6 +117,8 @@ export default {
93 117
     startUserName: String, // 流程发起人
94 118
   },
95 119
   created() {
120
+    this.form.borrowId = this.taskForm.formId;
121
+    this.deptId = this.$store.getters.deptId;
96 122
     this.initForm();
97 123
     uni.setNavigationBarTitle({
98 124
       title: '借款审批'
@@ -104,6 +130,7 @@ export default {
104 130
         submitTime: '',
105 131
         borrowUsage: '0',
106 132
         applyAmount: 0,
133
+        remark: '',
107 134
       },
108 135
       rules: {},
109 136
       borrowUsageOptions: [{
@@ -131,17 +158,18 @@ export default {
131 158
       openProject: false,
132 159
       selectedProject: null, //选中的项目
133 160
       projectObj: {}, //项目信息的项目
134
-      fromTotal: 0,
161
+      formTotal: 0,
135 162
       totalBudget: 0, //预结算额
136 163
       exceed: false, //是否超预算
137 164
       hasBorrow: 0, //已申请借款
165
+      deptId: undefined,
138 166
     }
139 167
   },
140 168
   methods: {
141 169
     async initForm() {
142 170
       getBorrow(this.taskForm.formId).then(async res => {
143 171
         if (res.data) {
144
-          this.fromTotal = 1;
172
+          this.formTotal = 1;
145 173
           this.form = res.data;
146 174
           console.log(this.form);
147 175
           if (this.form.projectId) {
@@ -184,7 +212,7 @@ export default {
184 212
             }
185 213
           }
186 214
         } else {
187
-          this.fromTotal = 0;
215
+          this.formTotal = 0;
188 216
           this.form.applier = this.$store.getters.userId;
189 217
           this.form.applyDate = parseTime(new Date(), "{y}-{m}-{d}");
190 218
         }
@@ -202,24 +230,215 @@ export default {
202 230
       return result.toFixed(2)
203 231
     },
204 232
     setApplyAmount(val) {
205
-      console.log(val);
206
-      console.log(this.from);
207 233
       this.form.applyAmount = val
208 234
     },
209 235
     handleConfirm(project) {
210 236
       console.log('选中的项目:', project);
211 237
       this.selectedProject = project;
212 238
       this.projectObj = project;
239
+      this.form.projectId = project.projectId;
240
+    },
241
+    // 保存
242
+    async saves() {
243
+      if (this.formTotal == 0) {
244
+        this.form.borrowId = this.taskForm.formId;
245
+        await addBorrow(this.form)
246
+        this.initForm();
247
+      } else {
248
+        // 更新借款审批表
249
+        await updateBorrow(this.form);
250
+      }
251
+      this.$modal.msgSuccess('保存成功');
213 252
     },
214 253
     submit() {
215
-      this.$refs.form.validate().then(res => {
216
-        console.log('表单数据信息:', res);
254
+      // 显示确认提交对话框
255
+      uni.showModal({
256
+        title: '提示',
257
+        content: '确认提交吗?',
258
+        success: (res) => {
259
+          if (!res.confirm) {
260
+            return;
261
+          }
262
+          // 继续执行后续代码
263
+          this.handleSubmit();
264
+        }
265
+      });
266
+    },
267
+    // 处理提交逻辑
268
+    handleSubmit() {
269
+      this.$refs.form.validate().then(async res => {
270
+        if (this.form.borrowUsage == '0' && !this.form.projectId) {
271
+          this.$modal.msgError('请选择项目!')
272
+          return
273
+        }
274
+        if (this.formTotal != 0) {
275
+          // 定义审核节点配置
276
+          const auditConfig = {
277
+            '部门审核': {
278
+              userIdField: 'deptUserId',
279
+              timeField: 'deptTime'
280
+            },
281
+            '分管审核': {
282
+              userIdField: 'managerUserId',
283
+              timeField: 'managerTime'
284
+            },
285
+            '总经理审核': {
286
+              userIdField: 'zjlUserId',
287
+              timeField: 'zjlTime'
288
+            },
289
+            '董事长批准': {
290
+              userIdField: 'dszUserId',
291
+              timeField: 'dszTime'
292
+            },
293
+            '党工团审核': {
294
+              userIdField: 'unionUserId',
295
+              timeField: 'unionTime'
296
+            },
297
+            '财务处理': {
298
+              userIdField: 'cwUserId',
299
+              timeField: 'lendTime'
300
+            }
301
+          }
302
+          // 根据当前节点更新审核信息
303
+          const currentConfig = auditConfig[this.taskName]
304
+          if (currentConfig) {
305
+            const currentUserId = this.$store.getters.userId
306
+            const currentTime = parseTime(new Date(), '{y}-{m}-{d}')
307
+
308
+            // 设置审核人和审核时间
309
+            this.form[currentConfig.userIdField] = currentUserId
310
+            this.form[currentConfig.timeField] = currentTime
311
+          }
312
+
313
+          // 更新借款申请
314
+          await updateBorrow(this.form);
315
+          const params = { taskId: this.taskForm.taskId };
316
+          console.log('params', params);
317
+          getNextFlowNode(params).then(async res => {
318
+            // 处理不同的流程节点
319
+            if (this.taskName == '借款申请') {
320
+              // 处理借款申请节点
321
+              await this.borrowApprovalFun();
322
+            } else if (this.taskName == '部门审核') {
323
+              // 得到分管领导根据部门
324
+              const res = await getUsersManageLeaderByDept({ deptId: this.form.applyDept });
325
+              let userIds = [];
326
+              if (res.data) {
327
+                res.data.forEach(item => {
328
+                  userIds.push(item.userId)
329
+                })
330
+              }
331
+              this.taskForm.variables.approvalList = userIds;
332
+              this.handleComplete(this.taskForm);
333
+            } else if (this.taskName == '分管审核') {
334
+              // 得到总经理
335
+              const res = await getUserByPost({ postName: '总经理' });
336
+              this.taskForm.variables.approval = res.data[0].userId;
337
+              this.handleComplete(this.taskForm);
338
+            } else if (this.taskName == '总经理审核') {
339
+              this.exceed = false;
340
+              this.taskForm.variables.exceed = this.exceed;
341
+              if (!this.exceed) {
342
+                this.submitFD(); // 提交给财务部门
343
+              } else {
344
+                const res = await getUserByPost({ postName: '董事长' });
345
+                this.taskForm.variables.approval = res.data[0].userId;
346
+                this.handleComplete(this.taskForm);
347
+              }
348
+            } else if (this.taskName == '董事长批准' || this.taskName == '党工团审核') {
349
+              this.submitFD(); // 提交给财务部门
350
+            } else if (this.taskName == '财务处理') {
351
+              uni.showModal({
352
+                title: '提示',
353
+                content: '最后一个节点,提交将结束流程,是否提交?',
354
+                success: (res) => {
355
+                  if (res.confirm) {
356
+                    this.handleComplete(this.taskForm);
357
+                  }
358
+                }
359
+              });
360
+            }
361
+          })
362
+
363
+        }
217 364
       }).catch(err => {
218 365
         console.log('表单错误信息:', err);
219 366
       })
220
-    }
367
+    },
368
+    // 处理任务完成
369
+    handleComplete(taskForm) {
370
+      complete(taskForm).then(response => {
371
+        this.$modal.msgSuccess(response.msg);
372
+        this.$emit('goBack');
373
+      })
374
+    },
375
+    // 借款申请提交方法
376
+    async borrowApprovalFun() {
377
+      let userId;
378
+      // 如果是党工团申请 deptId == 0 为党工团申请
379
+      if (this.deptId === 0) {
380
+        // 2为工会、3为党委
381
+        if (this.form.borrowUsage == 2 || this.form.borrowUsage == 3) {
382
+          userId = this.publicData.partySecretary;
383
+        } else {
384
+          userId = this.publicData.leagueSecretary;
385
+        }
386
+        this.taskForm.variables.dept = this.deptId;
387
+        this.taskForm.variables.approval = userId;
388
+        this.handleComplete(this.taskForm);
389
+      } else if (this.deptId == 102) { //如果是经营管理层申请,走总经理审批
390
+        this.form.managerAmount = this.form.applyAmount;
391
+        await updateBorrow(this.form);
392
+        const res = await getUserByPost({ postName: '总经理' });
393
+        this.taskForm.variables.dept = this.deptId;
394
+        this.taskForm.variables.approval = res.data[0].userId;
395
+        this.handleComplete(this.taskForm);
396
+      } else if (this.deptId == 101) { //如果是董事会申请,走董事长批准
397
+        const res = await getUserByPost({ postName: '董事长' });
398
+        this.taskForm.variables.dept = this.deptId;
399
+        this.taskForm.variables.approval = res.data[0].userId;
400
+        this.handleComplete(this.taskForm);
401
+      } else { //普通员工申请项目借款
402
+        const res = await getUsersDeptLeader({ userId: this.$store.getters.userId });
403
+        let userId = res.data.userId;
404
+        this.taskForm.variables.approval = userId;
405
+        this.taskForm.variables.dept = this.deptId;
406
+        this.handleComplete(this.taskForm);
407
+      }
408
+    },
409
+    // 提交给财务部审核
410
+    async submitFD() {
411
+      let approvalList = [];
412
+      const res = await getUsersDeptLeaderByDept({ deptId: 106 });
413
+      approvalList.push(res.data.userId);
414
+      const res1 = await getUsersViceDeptLeaderByDept({ deptId: 106 });
415
+      approvalList.push(res1.data.userId);
416
+      this.taskForm.variables.approvalList = approvalList;
417
+      this.handleComplete(this.taskForm);
418
+    },
221 419
   },
222 420
 }
223 421
 </script>
224 422
 
225
-<style lang="scss" scoped></style>
423
+<style lang="scss" scoped>
424
+.amount-text {
425
+  font-size: 16px;
426
+  font-weight: bold;
427
+  color: #333;
428
+}
429
+
430
+.warning-text {
431
+  font-size: 14px;
432
+  color: #ff0000;
433
+  margin-top: 5px;
434
+}
435
+
436
+.form-button {
437
+  display: flex;
438
+}
439
+
440
+.example-body {
441
+  padding: 10px;
442
+  background-color: #fff;
443
+}
444
+</style>

+ 27
- 16
oa-ui-app/pages/form/borrow/borrowDetail.vue Voir le fichier

@@ -2,11 +2,10 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-27 10:43:04
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-03 10:41:01
5
+ * @LastEditTime: 2025-03-03 16:58:18
6 6
 -->
7 7
 <template>
8 8
   <view class="container">
9
-    <u-button type="primary" @click="showAddPopup = true">+ 新增借款项</u-button>
10 9
     <!-- 列表标题 -->
11 10
     <view class="list-header">
12 11
       <text class="header-item">开支项目</text>
@@ -30,10 +29,11 @@
30 29
         </view>
31 30
       </view>
32 31
       <view class="box-button" v-if="taskName == '借款申请'">
33
-        <u-button size="normal" icon="edit-pen">修改</u-button>
32
+        <u-button size="normal" icon="edit-pen" @click="editItem(item)">修改</u-button>
34 33
         <u-button size="normal" icon="trash" @click="deleteItem(item)">删除</u-button>
35 34
       </view>
36 35
     </view>
36
+    <u-button type="primary" @click="showAddPopup = true" v-if="taskName == '借款申请'">+ 新增借款项</u-button>
37 37
     <!-- 借款弹窗 -->
38 38
     <view v-if="showAddPopup" class="add-popup">
39 39
       <view class="popup-content">
@@ -55,11 +55,12 @@
55 55
           <uni-forms-item label="合计">
56 56
             <text>{{ getTotal() }}</text>
57 57
           </uni-forms-item>
58
+          <view class="popup-buttons">
59
+            <u-button style="margin-right: 10px;" @click="cancelAdd">取消</u-button>
60
+            <u-button type="primary" class="confirm" @click="confirmAdd" v-if="!isModify">确认添加</u-button>
61
+            <u-button type="primary" class="confirm" @click="confirmAdd" v-else>确认修改</u-button>
62
+          </view>
58 63
         </uni-forms>
59
-        <view class="popup-buttons">
60
-          <u-button @click="cancelAdd">取消</u-button>
61
-          <u-button type="primary" class="confirm" @click="confirmAdd">确认添加</u-button>
62
-        </view>
63 64
       </view>
64 65
     </view>
65 66
   </view>
@@ -112,9 +113,11 @@ export default {
112 113
         },
113 114
       },
114 115
       errorMessage: '',
116
+      isModify: false,
115 117
     }
116 118
   },
117 119
   created() {
120
+    this.initList();
118 121
   },
119 122
   watch: {
120 123
     borrowId() {
@@ -127,29 +130,32 @@ export default {
127 130
   },
128 131
   methods: {
129 132
     initList() {
133
+      console.log('borrowId',  this.borrowId);
130 134
       listBorrowDetail({ pageSize: 999, borrowId: this.borrowId }).then(res => {
131 135
         if (res.rows.length != 0) {
132 136
           this.detailList = res.rows
133
-          console.log(res.rows);
134 137
         }
135 138
       });
136 139
     },
137 140
     // 确认添加
138 141
     confirmAdd() {
139
-      this.$refs.form.validate().then(res => {
140
-        console.log('表单数据信息:', res);
141
-        res.borrowId = this.borrowId;
142
-        res.applyAmount = this.getTotal();
143
-        addBorrowDetail(res);
142
+      const borrowId =  this.borrowId
143
+      this.$refs.form.validate().then(async res => {
144
+        this.newItem.applyAmount = this.getTotal();
145
+        if (this.isModify) {
146
+          await updateBorrowDetail(this.newItem);
147
+        } else {
148
+          this.newItem.borrowId = borrowId;
149
+          await addBorrowDetail(this.newItem);
150
+        }
144 151
         this.clearForm()
145 152
         this.showAddPopup = false
146 153
         this.initList();
154
+        this.$modal.msgSuccess('操作成功');
147 155
       }).catch(err => {
148 156
         console.log('表单错误信息:', err);
149 157
       })
150
-
151 158
     },
152
-
153 159
     // 清空表单
154 160
     clearForm() {
155 161
       this.newItem = {
@@ -177,7 +183,12 @@ export default {
177 183
         })
178 184
       })
179 185
 
180
-    }
186
+    },
187
+    editItem(item) {
188
+      this.newItem = item;
189
+      this.isModify = true;
190
+      this.showAddPopup = true;
191
+    },
181 192
   },
182 193
 }
183 194
 </script>

+ 133
- 121
oa-ui-app/static/scss/global.scss Voir le fichier

@@ -1,160 +1,172 @@
1 1
 .text-center {
2
-	text-align: center;
2
+  text-align: center;
3 3
 }
4 4
 
5 5
 .font-13 {
6
-	font-size: 13px;
6
+  font-size: 13px;
7 7
 }
8 8
 
9 9
 .font-12 {
10
-	font-size: 12px;
10
+  font-size: 12px;
11 11
 }
12 12
 
13 13
 .font-11 {
14
-	font-size: 11px;
14
+  font-size: 11px;
15 15
 }
16 16
 
17 17
 .text-grey1 {
18
-	color: #888;
18
+  color: #888;
19 19
 }
20
+
20 21
 .text-grey2 {
21
-	color: #aaa;
22
+  color: #aaa;
22 23
 }
23
-.text-justify{
24
-	text-align:justify;
24
+
25
+.text-justify {
26
+  text-align: justify;
25 27
 }
28
+
26 29
 .list-cell-arrow::before {
27
-    content: ' ';
28
-    height: 10px;
29
-    width: 10px;
30
-    border-width: 2px 2px 0 0;
31
-    border-color: #c0c0c0;
32
-    border-style: solid;
33
-    -webkit-transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
34
-    transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
35
-    position: absolute;
36
-    top: 50%;
37
-    margin-top: -6px;
38
-    right: 30rpx;
39
-  }
40
-  
41
-  .list-cell {
42
-    position: relative;
30
+  content: ' ';
31
+  height: 10px;
32
+  width: 10px;
33
+  border-width: 2px 2px 0 0;
34
+  border-color: #c0c0c0;
35
+  border-style: solid;
36
+  -webkit-transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
37
+  transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
38
+  position: absolute;
39
+  top: 50%;
40
+  margin-top: -6px;
41
+  right: 30rpx;
42
+}
43
+
44
+.list-cell {
45
+  position: relative;
46
+  width: 100%;
47
+  box-sizing: border-box;
48
+  background-color: #fff;
49
+  color: #333;
50
+  padding: 26rpx 30rpx;
51
+}
52
+
53
+.list-cell:first-child {
54
+  border-radius: 8rpx 8rpx 0 0;
55
+}
56
+
57
+.list-cell:last-child {
58
+  border-radius: 0 0 8rpx 8rpx;
59
+}
60
+
61
+.list-cell::after {
62
+  content: '';
63
+  position: absolute;
64
+  border-bottom: 1px solid #eaeef1;
65
+  -webkit-transform: scaleY(0.5) translateZ(0);
66
+  transform: scaleY(0.5) translateZ(0);
67
+  transform-origin: 0 100%;
68
+  bottom: 0;
69
+  right: 0;
70
+  left: 0;
71
+  pointer-events: none;
72
+}
73
+
74
+
75
+.menu-list {
76
+  margin: 15px 15px;
77
+
78
+  .menu-item-box {
43 79
     width: 100%;
44
-    box-sizing: border-box;
45
-    background-color: #fff;
46
-    color: #333;
47
-    padding: 26rpx 30rpx;
48
-  }
49
-  
50
-  .list-cell:first-child {
51
-    border-radius: 8rpx 8rpx 0 0;
52
-  }
53
-  
54
-  .list-cell:last-child {
55
-    border-radius: 0 0 8rpx 8rpx;
56
-  }
57
-  
58
-  .list-cell::after {
59
-    content: '';
60
-    position: absolute;
61
-    border-bottom: 1px solid #eaeef1;
62
-    -webkit-transform: scaleY(0.5) translateZ(0);
63
-    transform: scaleY(0.5) translateZ(0);
64
-    transform-origin: 0 100%;
65
-    bottom: 0;
66
-    right: 0;
67
-    left: 0;
68
-    pointer-events: none;
69
-  }
70
-  
71
-  
72
-  .menu-list {
73
-    margin: 15px 15px;
74
-  
75
-    .menu-item-box {
76
-      width: 100%;
77
-      display: flex;
78
-      align-items: center;
79
-  
80
-      .menu-icon {
81
-        color: #007AFF;
82
-        font-size: 16px;
83
-        margin-right: 5px;
84
-      }
85
-      
86
-      .text-right {
87
-        margin-left: auto;
88
-        margin-right: 34rpx;
89
-        color: #999;
90
-      }
80
+    display: flex;
81
+    align-items: center;
82
+
83
+    .menu-icon {
84
+      color: #007AFF;
85
+      font-size: 16px;
86
+      margin-right: 5px;
87
+    }
88
+
89
+    .text-right {
90
+      margin-left: auto;
91
+      margin-right: 34rpx;
92
+      color: #999;
91 93
     }
92 94
   }
95
+}
96
+
97
+
98
+
99
+// 提交按钮
100
+.submit-btn {
101
+  border-radius: 8px;
102
+  background-color: #007AFF;
103
+  font-size: 16px;
104
+}
105
+
106
+// 保存按钮
107
+.save-btn {
108
+  border-radius: 8px;
109
+  background-color: #f9ae3d;
110
+  color: #fff;
111
+  font-size: 16px;
112
+}
113
+
93 114
 
94 115
 
95
-	::v-deep .uni-input-input:disabled{
96
-		-webkit-text-fill-color: #333333;
97
-	}
98
-	
99
-	::v-deep .uni-textarea-textarea:disabled{
100
-		-webkit-text-fill-color: #333333;
101
-	}
102
-	
103
-	
104
-	// 提交按钮
105
-	.submit-btn {
106
-		border-radius: 8px;
107
-		background-color: #007AFF;
108
-		font-size: 16px;
109
-	}
110
-	// 保存按钮
111
-	.save-btn {
112
-		border-radius: 8px;
113
-		background-color: #f9ae3d;
114
-		color:#fff;
115
-		font-size: 16px;
116
-	}
117
-
118
-
119
-  
120 116
 .form-container {
121
-	padding: 20px;
122
-	background-color: #f8f8f8;
117
+  padding: 20px;
118
+  background-color: #f8f8f8;
123 119
 }
124 120
 
125 121
 .form-title {
126
-	margin-bottom: 15px;
127
-	text-align: center;
122
+  margin-bottom: 15px;
123
+  text-align: center;
128 124
 
129
-	.title-text {
130
-		font-size: 20px;
131
-		font-weight: bold;
132
-		color: #333;
133
-	}
125
+  .title-text {
126
+    font-size: 20px;
127
+    font-weight: bold;
128
+    color: #333;
129
+  }
134 130
 
135
-	.title-line {
136
-		width: 50px;
137
-		height: 2px;
138
-		background-color: #007AFF;
139
-		margin: 8px auto;
140
-	}
131
+  .title-line {
132
+    width: 50px;
133
+    height: 2px;
134
+    background-color: #007AFF;
135
+    margin: 8px auto;
136
+  }
141 137
 }
142 138
 
143 139
 
144 140
 .custom-form {
145
-	background-color: #fff;
146
-	padding: 15px;
147
-	border-radius: 12px;
148
-	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
141
+  background-color: #fff;
142
+  padding: 15px;
143
+  border-radius: 12px;
144
+  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
149 145
 }
150 146
 
151 147
 
152 148
 .form-item {
153
-	margin-bottom: 20px;
149
+  margin-bottom: 20px;
150
+
151
+  /deep/ .uni-forms-item__label {
152
+    font-weight: 500;
153
+    color: #666;
154
+    padding-bottom: 8px;
155
+  }
156
+}
157
+
158
+::v-deep .uni-input-input:disabled {
159
+  -webkit-text-fill-color: #333333;
160
+}
161
+
162
+::v-deep .uni-textarea-textarea:disabled {
163
+  -webkit-text-fill-color: #333333;
164
+}
165
+
166
+::v-deep .uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable .radio__inner {
167
+  opacity: 1 !important;
168
+}
154 169
 
155
-	/deep/ .uni-forms-item__label {
156
-		font-weight: 500;
157
-		color: #666;
158
-		padding-bottom: 8px;
159
-	}
170
+::v-deep .uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable .checklist-text {
171
+  opacity: 1 !important;
160 172
 }

+ 1
- 0
oa-ui-app/store/getters.js Voir le fichier

@@ -5,5 +5,6 @@ const getters = {
5 5
 	roles: state => state.user.roles,
6 6
 	permissions: state => state.user.permissions,
7 7
 	userId: state => state.user.userId,
8
+	deptId: state => state.user.deptId,
8 9
 }
9 10
 export default getters

+ 8
- 2
oa-ui-app/store/modules/user.js Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-01-16 11:17:09
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-02-19 15:06:07
5
+ * @LastEditTime: 2025-03-03 14:31:51
6 6
  */
7 7
 import config from '@/config'
8 8
 import storage from '@/utils/storage'
@@ -20,6 +20,7 @@ const user = {
20 20
     roles: storage.get(constant.roles),
21 21
     permissions: storage.get(constant.permissions),
22 22
     userId: storage.get(constant.userId),
23
+    deptId: storage.get(constant.deptId),
23 24
   },
24 25
 
25 26
   mutations: {
@@ -46,6 +47,10 @@ const user = {
46 47
       state.userId = userId
47 48
       storage.set(constant.userId, userId)
48 49
     },
50
+    SET_DEPTID: (state, deptId) => {
51
+      state.deptId = deptId
52
+      storage.set(constant.deptId, deptId)
53
+    }
49 54
   },
50 55
 
51 56
   actions: {
@@ -80,7 +85,8 @@ const user = {
80 85
           } else {
81 86
             commit('SET_ROLES', ['ROLE_DEFAULT'])
82 87
           }
83
-					commit('SET_USERID', userId)
88
+          commit('SET_USERID', userId)
89
+          commit('SET_DEPTID', user.deptId)
84 90
           commit('SET_NAME', username)
85 91
           commit('SET_AVATAR', avatar)
86 92
           resolve(res)

+ 46
- 62
oa-ui/src/components/flow/User/index.vue Voir le fichier

@@ -4,83 +4,67 @@
4 4
       <!--部门数据-->
5 5
       <el-col :span="6" :xs="24">
6 6
         <div class="head-container">
7
-          <el-input
8
-            v-model="deptName"
9
-            placeholder="请输入部门名称"
10
-            clearable
11
-            size="small"
12
-            prefix-icon="el-icon-search"
13
-            style="margin-bottom: 20px"
14
-          />
7
+          <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
8
+            style="margin-bottom: 20px" />
15 9
         </div>
16 10
         <div class="head-container">
17
-          <el-tree
18
-            :data="deptOptions"
19
-            :props="defaultProps"
20
-            :expand-on-click-node="false"
21
-            :filter-node-method="filterNode"
22
-            ref="tree"
23
-            node-key="id"
24
-            default-expand-all
25
-            highlight-current
26
-            @node-click="handleNodeClick"
27
-          />
11
+          <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
12
+            :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
13
+            @node-click="handleNodeClick" />
28 14
         </div>
29 15
       </el-col>
30 16
       <!--用户数据-->
31 17
       <el-col :span="18" :xs="24">
32
-        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
33
-          <el-form-item label="用户名称" prop="userName">
34
-            <el-input
35
-              v-model="queryParams.userName"
36
-              placeholder="请输入用户名称"
37
-              clearable
38
-              style="width: 150px"
39
-              @keyup.enter.native="handleQuery"
40
-            />
18
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
19
+          label-width="68px">
20
+          <el-form-item label="用户姓名" prop="userId">
21
+            <el-select v-model="queryParams.userId" filterable clearable @change="handleQuery">
22
+              <el-option v-for="item in $store.state.user.userList" :key="item.userId" :label="item.nickName"
23
+                :value="item.userId">
24
+              </el-option>
25
+            </el-select>
41 26
           </el-form-item>
42 27
           <el-form-item label="手机号码" prop="phonenumber">
43
-            <el-input
44
-              v-model="queryParams.phonenumber"
45
-              placeholder="请输入手机号码"
46
-              clearable
47
-              style="width: 150px"
48
-              @keyup.enter.native="handleQuery"
49
-            />
28
+            <el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable style="width: 150px"
29
+              @keyup.enter.native="handleQuery" />
50 30
           </el-form-item>
51 31
           <el-form-item>
52 32
             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
53 33
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
54 34
           </el-form-item>
55 35
         </el-form>
56
-        <el-table v-show="checkType === 'multiple'" ref="dataTable" v-loading="loading" :row-key="getRowKey" :data="userList" @selection-change="handleMultipleUserSelect">
36
+        <el-table v-show="checkType === 'multiple'" ref="dataTable" v-loading="loading" :row-key="getRowKey"
37
+          :data="userList" @selection-change="handleMultipleUserSelect">
57 38
           <el-table-column type="selection" :reserve-selection="true" width="50" align="center" />
58 39
           <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
59
-          <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
60
-          <el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
61
-          <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
62
-          <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
40
+          <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible"
41
+            :show-overflow-tooltip="true" />
42
+          <el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible"
43
+            :show-overflow-tooltip="true" />
44
+          <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible"
45
+            :show-overflow-tooltip="true" />
46
+          <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible"
47
+            width="120" />
63 48
         </el-table>
64
-        <el-table v-show="checkType === 'single'" v-loading="loading" :data="userList" @current-change="handleSingleUserSelect">
65
-          <el-table-column  width="55" align="center" >
49
+        <el-table v-show="checkType === 'single'" v-loading="loading" :data="userList"
50
+          @current-change="handleSingleUserSelect">
51
+          <el-table-column width="55" align="center">
66 52
             <template slot-scope="scope">
67
-              <el-radio v-model="radioSelected" :label="scope.row.userId">{{''}}</el-radio>
53
+              <el-radio v-model="radioSelected" :label="scope.row.userId">{{ '' }}</el-radio>
68 54
             </template>
69 55
           </el-table-column>
70 56
           <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
71
-          <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
72
-          <el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
73
-          <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
74
-          <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
57
+          <!-- <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible"
58
+            :show-overflow-tooltip="true" /> -->
59
+          <el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible"
60
+            :show-overflow-tooltip="true" />
61
+          <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible"
62
+            :show-overflow-tooltip="true" />
63
+          <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible"
64
+            width="120" />
75 65
         </el-table>
76
-        <pagination
77
-          v-show="total>0"
78
-          :total="total"
79
-          :page-sizes="[5,10]"
80
-          :page.sync="queryParams.pageNum"
81
-          :limit.sync="queryParams.pageSize"
82
-          @pagination="getList"
83
-        />
66
+        <pagination v-show="total > 0" :total="total" :page-sizes="[5, 10]" :page.sync="queryParams.pageNum"
67
+          :limit.sync="queryParams.pageSize" @pagination="getList" />
84 68
       </el-col>
85 69
     </el-row>
86 70
   </div>
@@ -90,7 +74,7 @@
90 74
 import { listUser, deptTreeSelect } from "@/api/system/user";
91 75
 import Treeselect from "@riophae/vue-treeselect";
92 76
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
93
-import {StrUtil} from "@/utils/StrUtil";
77
+import { StrUtil } from "@/utils/StrUtil";
94 78
 
95 79
 export default {
96 80
   name: "FlowUser",
@@ -183,7 +167,7 @@ export default {
183 167
     },
184 168
     userList: {
185 169
       handler(newVal) {
186
-        if (StrUtil.isNotBlank(newVal)  && this.selectUserList.length > 0) {
170
+        if (StrUtil.isNotBlank(newVal) && this.selectUserList.length > 0) {
187 171
           this.$nextTick(() => {
188 172
             this.$refs.dataTable.clearSelection();
189 173
             this.selectUserList?.split(',').forEach(key => {
@@ -207,10 +191,10 @@ export default {
207 191
     getList() {
208 192
       this.loading = true;
209 193
       listUser(this.queryParams).then(response => {
210
-          this.userList = response.rows;
211
-          this.total = response.total;
212
-          this.loading = false;
213
-        }
194
+        this.userList = response.rows;
195
+        this.total = response.total;
196
+        this.loading = false;
197
+      }
214 198
       );
215 199
     },
216 200
     /** 查询部门下拉树结构 */
@@ -220,7 +204,7 @@ export default {
220 204
       });
221 205
     },
222 206
     // 保存选中的数据id,row-key就是要指定一个key标识这一行的数据
223
-    getRowKey (row) {
207
+    getRowKey(row) {
224 208
       return row.id
225 209
     },
226 210
     // 筛选节点

+ 7
- 1
oa-ui/src/utils/deleteResource.js Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-13 17:07:59
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-01-22 16:45:18
5
+ * @LastEditTime: 2025-03-04 17:13:20
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -148,6 +148,12 @@ const apiEndpoints = [
148 148
       '/oa/safe/:id',
149 149
     ]
150 150
   },
151
+  {
152
+    procDefName: '参培审核',
153
+    apiUrl: [
154
+      '/oa/trainApproval/:id',
155
+    ]
156
+  },
151 157
 ]
152 158
 
153 159
 // 编写一个方法来处理删除请求,并同时发送所有API请求  

+ 5
- 1
oa-ui/src/views/flowable/form/components/conditionDisplay.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-23 17:08:16
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-23 16:41:08
5
+ * @LastEditTime: 2025-03-04 14:12:25
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -58,6 +58,8 @@
58 58
       v-else-if="taskForm.procDefName == '项目委外'"></outsource-form>
59 59
     <performance-form :key="'performance' + taskForm.taskId" :taskForm="taskForm" :taskName="''" :isFlow="true"
60 60
       v-else-if="taskForm.procDefName == '绩效审批'"></performance-form>
61
+    <study-form :key="'study' + taskForm.taskId" :taskForm="taskForm" :taskName="''" :isFlow="true"
62
+      v-else-if="taskForm.procDefName == '参培审核'"></study-form>
61 63
   </div>
62 64
 </template>
63 65
 
@@ -90,6 +92,7 @@ import declare from "@/views/flowable/form/work/declareForm.vue";
90 92
 import procureForm from "@/views/flowable/form/procure/procureForm.vue";
91 93
 import outsourceForm from '@/views/flowable/form/outsource/outsourceForm.vue';
92 94
 import performanceForm from '@/views/flowable/form/performance/performanceForm.vue';
95
+import StudyForm from "@/views/flowable/form//oa/studyForm.vue";
93 96
 export default {
94 97
   props: {
95 98
     passingParam: {
@@ -129,6 +132,7 @@ export default {
129 132
     procureForm,
130 133
     outsourceForm,
131 134
     performanceForm,
135
+    StudyForm
132 136
   },
133 137
   data() {
134 138
     return {

+ 4
- 0
oa-ui/src/views/flowable/form/components/detailDisplay.vue Voir le fichier

@@ -52,6 +52,8 @@
52 52
       @goBack="goBack"></outsource-form>
53 53
     <performance-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '绩效审批'"
54 54
       @goBack="goBack"></performance-form>
55
+    <study-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '参培审核'"
56
+      @goBack="goBack"></study-form>
55 57
   </div>
56 58
 </template>
57 59
 
@@ -84,6 +86,7 @@ import declareForm from '@/views/flowable/form/work/declareForm.vue';
84 86
 import procureForm from '@/views/flowable/form/procure/procureForm.vue';
85 87
 import outsourceForm from '@/views/flowable/form/outsource/outsourceForm.vue';
86 88
 import PerformanceForm from '@/views/flowable/form/performance/performanceForm.vue';
89
+import StudyForm from "@/views/flowable/form//oa/studyForm.vue";
87 90
 export default {
88 91
   components: {
89 92
     ScTable,
@@ -114,6 +117,7 @@ export default {
114 117
     procureForm,
115 118
     outsourceForm,
116 119
     PerformanceForm,
120
+    StudyForm
117 121
   },
118 122
   props: {
119 123
     taskForm: {

+ 327
- 0
oa-ui/src/views/flowable/form/oa/studyForm.vue Voir le fichier

@@ -0,0 +1,327 @@
1
+<template>
2
+  <div class="study-form">
3
+    <el-row :gutter="20">
4
+      <el-col :span="flowDisabled ? 18 : 24" :xs="24">
5
+        <div class="form-title">参培审核表</div>
6
+        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
7
+          <el-row :gutter="20">
8
+            <el-col :span="8">
9
+              <el-form-item label="上报人" prop="user.nickName">
10
+                {{ getUserName(form.userId) }}
11
+              </el-form-item>
12
+            </el-col>
13
+            <el-col :span="8">
14
+              <el-form-item label="上报人部门" prop="dept.deptName">
15
+                {{ getDeptName(form.deptId) }}
16
+              </el-form-item>
17
+            </el-col>
18
+            <el-col :span="8">
19
+              <el-form-item label="上报日期" prop="reportTime">
20
+                {{ form.reportTime }}
21
+              </el-form-item>
22
+            </el-col>
23
+          </el-row>
24
+
25
+          <el-row :gutter="20">
26
+            <el-col :span="24">
27
+              <el-form-item label="培训名称" prop="trainName">
28
+                <el-input v-model="form.trainName" placeholder="请输入培训名称" :disabled="taskName != '参培上报'" />
29
+              </el-form-item>
30
+            </el-col>
31
+          </el-row>
32
+
33
+          <el-form-item label="主要内容" prop="content">
34
+            <el-input v-model="form.content" type="textarea" :rows="4" placeholder="请输入主要内容"
35
+              :disabled="taskName != '参培上报'" />
36
+          </el-form-item>
37
+
38
+          <el-form-item label="佐证附件" prop="document">
39
+            <FileUpload v-if="form.document == null || form.document == ''" :disabled="taskName != '参培上报'"
40
+              :isShowTip="false" :limit="1" :filePathName="'参培/佐证附件'"
41
+              :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="getDocumentPath"></FileUpload>
42
+            <div v-if="form.document">
43
+              <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + form.document}`)">
44
+                {{ getFileName(form.document) }}
45
+              </el-link>
46
+              <el-link class="ml20" type="warning" :href="`${baseUrl}${'/profile/upload' + form.document}`"
47
+                :underline="false" target="_blank">
48
+                <span class="el-icon-download">下载文件</span>
49
+              </el-link>
50
+              <el-link class="ml20" type="danger" @click="handleDeleteDocument" v-if="taskName == '参培上报'"
51
+                :underline="false">
52
+                <span class="el-icon-delete">删除文件</span>
53
+              </el-link>
54
+              <FileUpload v-if="taskName == '参培申请'" :limit="1" :filePathName="'参培/佐证附件'"
55
+                :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="getDocumentPath"></FileUpload>
56
+            </div>
57
+          </el-form-item>
58
+
59
+          <el-row :gutter="20">
60
+            <el-col :span="12">
61
+              <el-form-item label="学时" prop="hours">
62
+                <el-input-number v-model="form.hours" :min="0" :precision="1" :disabled="taskName != '参培上报'" />
63
+              </el-form-item>
64
+            </el-col>
65
+          </el-row>
66
+
67
+          <template v-if="taskName != '参培上报'">
68
+            <el-form-item label="部门审核意见" prop="dept_comment">
69
+              <el-input v-model="form.deptComment" type="textarea" :rows="3" placeholder="请输入部门审核意见" :disabled="taskName != '部门审核'" />
70
+            </el-form-item>
71
+
72
+            <el-row>
73
+              <el-col :span="6" :offset="12" :xs="24">
74
+                <el-form-item label="签名:" label-width="120px">
75
+                  <span class="auditor"> {{ getUserName(form.deptUserId) }} </span>
76
+                </el-form-item>
77
+              </el-col>
78
+              <el-col :span="6">
79
+                <el-form-item label="日期:" label-width="120px">
80
+                  <span> {{ form.deptTime ? form.deptTime : deptTime }} </span>
81
+                </el-form-item>
82
+              </el-col>
83
+            </el-row>
84
+          </template>
85
+        </el-form>
86
+        <div style="text-align: center;" v-if="taskName != ''">
87
+          <el-button type="warning" @click="saves">保 存</el-button>
88
+          <el-button type="primary" @click="submit">提 交</el-button>
89
+        </div>
90
+      </el-col>
91
+      <el-col :span="6" :xs="24" v-if="flowDisabled">
92
+        <el-card>
93
+          <h2 style="text-align: center;">流程进度</h2>
94
+          <div>
95
+            <flow :flowData="flowData" />
96
+          </div>
97
+        </el-card>
98
+      </el-col>
99
+    </el-row>
100
+  </div>
101
+</template>
102
+
103
+<script>
104
+import flow from '@/views/flowable/task/todo/detail/flow'
105
+import { flowXmlAndNode } from "@/api/flowable/definition";
106
+import { parseTime } from "@/utils/ruoyi";
107
+import { getTrainApproval, updateTrainApproval, addTrainApproval } from "@/api/oa/study/trainApproval";
108
+import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
109
+import { complete, getNextFlowNode } from "@/api/flowable/todo";
110
+
111
+export default {
112
+  name: 'StudyForm',
113
+  components: {
114
+    flow,
115
+  },
116
+  props: {
117
+    taskForm: {
118
+      type: Object,
119
+      required: true
120
+    },
121
+    flowDisabled: {
122
+      type: Boolean,
123
+      default: true
124
+    },
125
+    taskName: {
126
+      type: String,
127
+      required: true
128
+    }
129
+  },
130
+  watch: {
131
+    'taskForm.formId'() {
132
+      this.initForm();
133
+    }
134
+  },
135
+  data() {
136
+    return {
137
+      baseUrl: process.env.VUE_APP_BASE_API,
138
+      form: {
139
+        participateId: '',
140
+        userId: '',
141
+        deptId: '',
142
+        reportTime: '',
143
+        trainName: '',
144
+        content: '',
145
+        document: '',
146
+        hours: 0,
147
+        dept_user_id: '',
148
+        dept_time: '',
149
+        dept_comment: '',
150
+        user: {
151
+          nickName: '',
152
+        },
153
+        dept: {
154
+          deptName: '',
155
+        },
156
+        applierUser: null
157
+      },
158
+      rules: {
159
+        reportTime: [
160
+          { required: true, message: '请选择上报日期', trigger: 'change' }
161
+        ],
162
+        trainName: [
163
+          { required: true, message: '请输入培训名称', trigger: 'blur' }
164
+        ],
165
+        content: [
166
+          { required: true, message: '请输入主要内容', trigger: 'blur' }
167
+        ],
168
+        hours: [
169
+          { required: true, message: '请输入学时', trigger: 'blur' }
170
+        ]
171
+      },
172
+      flowData: {},
173
+      deptUser: '',
174
+      deptTime: undefined,
175
+      formTotal: 0,
176
+    }
177
+  },
178
+  created() {
179
+    if (this.flowDisabled) {
180
+      flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
181
+        this.flowData = res.data;
182
+      })
183
+    }
184
+    this.form.user.nickName = this.$store.getters.name;
185
+    this.form.dept.deptName = this.$store.getters.deptName;
186
+    this.form.userId = this.$store.getters.userId;
187
+    this.form.deptId = this.$store.getters.deptId;
188
+    this.form.reportTime = parseTime(new Date(), '{y}-{m}-{d}');
189
+    if (this.taskForm && this.taskForm.formId) {
190
+      this.form.participateId = this.taskForm.formId;
191
+    }
192
+    this.initForm();
193
+  },
194
+  methods: {
195
+    initForm() {
196
+      getTrainApproval(this.taskForm.formId).then(res => {
197
+        console.log(res.data)
198
+        if (res.data) {
199
+          this.formTotal = 1;
200
+          this.form = res.data;
201
+          if (this.taskName == '部门审核') {
202
+            this.form.deptUserId = this.$store.getters.userId;
203
+            this.form.deptTime = parseTime(new Date(), '{y}-{m}-{d}')
204
+          }
205
+        } else {
206
+          this.formTotal = 0;
207
+        }
208
+      })
209
+    },
210
+    getDocumentPath(val) {
211
+      let arr = val.split('/upload')
212
+      this.form.document = arr[1]
213
+      if (val == "") {
214
+        this.form.document = ""
215
+      }
216
+    },
217
+    getFileName(val) {
218
+      if (val) {
219
+        return val.substring(val.lastIndexOf('/') + 1)
220
+      }
221
+      return ''
222
+    },
223
+    handleDeleteDocument() {
224
+      this.$modal.confirm('是否确认删除该附件?').then(() => {
225
+        this.form.document = '';
226
+      }).catch(() => { });
227
+    },
228
+    saves() {
229
+      this.$refs["form"].validate(valid => {
230
+        if (valid) {
231
+          // 更新参培审批表
232
+          if (this.formTotal) {
233
+            updateTrainApproval(this.form).then(() => {
234
+              this.$modal.msgSuccess("保存成功");
235
+            });
236
+          } else {
237
+            addTrainApproval(this.form).then(() => {
238
+              this.$modal.msgSuccess("保存成功");
239
+              this.formTotal = 1;
240
+            });
241
+          }
242
+        }
243
+      });
244
+    },
245
+    submit() {
246
+      this.$modal.confirm('是否提交流程?').then(() => {
247
+        this.submitForm();
248
+      }).catch(() => { });
249
+    },
250
+    submitForm() {
251
+      this.$refs["form"].validate(valid => {
252
+        if (valid) {
253
+          if (this.taskName == '部门审核') {
254
+            this.form.dept_user_id = this.$store.getters.userId;
255
+            this.form.dept_time = parseTime(new Date(), '{y}-{m}-{d}')
256
+          }
257
+          // 更新参培审批表
258
+          if (this.formTotal) {
259
+            updateTrainApproval(this.form).then(() => {
260
+              // 获取下一步流程
261
+              this.getNextFlowFn();
262
+            });
263
+          } else {
264
+            addTrainApproval(this.form).then(() => {
265
+              // 获取下一步流程
266
+              this.getNextFlowFn();
267
+            });
268
+          }
269
+        }
270
+      });
271
+    },
272
+    getNextFlowFn() {
273
+      getNextFlowNode({ taskId: this.taskForm.taskId }).then(() => {
274
+        if (this.taskName == '参培上报') {
275
+          getUsersDeptLeader({ userId: this.$store.getters.userId }).then(res => {
276
+            let userId = res.data.userId;
277
+            this.$set(this.taskForm.variables, "approval", userId);
278
+            this.handleComplete(this.taskForm);
279
+          })
280
+        } else {
281
+          this.handleComplete(this.taskForm);
282
+        }
283
+      });
284
+    },
285
+    handleComplete(taskForm) {
286
+      complete(taskForm).then(response => {
287
+        this.$modal.msgSuccess(response.msg);
288
+        this.$emit('goBack');
289
+      })
290
+    }
291
+  }
292
+}
293
+</script>
294
+
295
+<style lang="scss" scoped>
296
+@import "@/assets/styles/element-reset.scss";
297
+
298
+.study-form {
299
+  padding: 20px;
300
+  background-color: #fff;
301
+  border-radius: 4px;
302
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
303
+
304
+  .form-title {
305
+    font-size: 20px;
306
+    font-weight: bold;
307
+    text-align: center;
308
+    margin-bottom: 30px;
309
+    color: #303133;
310
+  }
311
+
312
+  .el-form {
313
+    max-width: 1200px;
314
+    margin: 0 auto;
315
+  }
316
+
317
+  .el-divider {
318
+    margin: 24px 0;
319
+  }
320
+
321
+  .upload-demo {
322
+    .el-upload {
323
+      width: 100%;
324
+    }
325
+  }
326
+}
327
+</style>

+ 2
- 1
oa-ui/src/views/flowable/task/myProcess/index.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-02-26 17:16:24
5
+ * @LastEditTime: 2025-03-04 14:27:27
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -342,6 +342,7 @@ export default {
342 342
       let formId = new Snowflake(1n, 1n, 0n).nextId().toString();
343 343
       getNextFlowNodeByStart({ deploymentId: row.deploymentId, variables: { formId: formId } }).then(res => {
344 344
         let data = res.data;
345
+        debugger
345 346
         if (data.dataType === 'dynamic' && row.name != '项目预算') {
346 347
           if (data.type === 'assignee') { // 指定人员
347 348
             this.checkSendUser = true;

+ 30
- 134
oa-ui/src/views/oa/study/approval.vue Voir le fichier

@@ -2,69 +2,24 @@
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4 4
       <el-form-item label="上报人" prop="userId">
5
-        <el-input
6
-          v-model="queryParams.userId"
7
-          placeholder="请输入上报人"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
5
+        <el-select v-model="queryParams.userId" filterable clearable @change="handleQuery">
6
+          <el-option v-for="item in $store.state.user.userList" :key="item.userId" :label="item.nickName"
7
+            :value="item.userId">
8
+          </el-option>
9
+        </el-select>
11 10
       </el-form-item>
12 11
       <el-form-item label="部门" prop="deptId">
13
-        <el-input
14
-            v-model="queryParams.deptId"
15
-            placeholder="请输入部门"
16
-            clearable
17
-            @keyup.enter.native="handleQuery"
18
-          />
12
+        <el-select v-model="queryParams.deptId" filterable clearable @change="handleQuery">
13
+          <el-option v-for="item in $store.state.user.deptList" :key="item.deptId" :label="item.deptName"
14
+            :value="item.deptId">
15
+          </el-option>
16
+        </el-select>
19 17
       </el-form-item>
20 18
       <el-form-item label="上报日期" prop="reportTime">
21
-        <el-date-picker clearable
22
-          v-model="queryParams.reportTime"
23
-          type="date"
24
-          value-format="yyyy-MM-dd"
19
+        <el-date-picker clearable v-model="queryParams.reportTime" type="date" value-format="yyyy-MM-dd"
25 20
           placeholder="请选择上报日期">
26 21
         </el-date-picker>
27 22
       </el-form-item>
28
-      <el-form-item label="培训名称" prop="trainName">
29
-        <el-input
30
-          v-model="queryParams.trainName"
31
-          placeholder="请输入培训名称"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
35
-      </el-form-item>
36
-      <el-form-item label="时长" prop="hours">
37
-        <el-input
38
-          v-model="queryParams.hours"
39
-          placeholder="请输入时长"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
43
-      </el-form-item>
44
-      <el-form-item label="部门审核人" prop="deptUserId">
45
-        <el-input
46
-          v-model="queryParams.deptUserId"
47
-          placeholder="请输入部门审核人"
48
-          clearable
49
-          @keyup.enter.native="handleQuery"
50
-        />
51
-      </el-form-item>
52
-      <el-form-item label="部门审核时间" prop="deptTime">
53
-        <el-date-picker clearable
54
-          v-model="queryParams.deptTime"
55
-          type="date"
56
-          value-format="yyyy-MM-dd"
57
-          placeholder="请选择部门审核时间">
58
-        </el-date-picker>
59
-      </el-form-item>
60
-      <el-form-item label="部门审核意见" prop="deptComment">
61
-        <el-input
62
-          v-model="queryParams.deptComment"
63
-          placeholder="请输入部门审核意见"
64
-          clearable
65
-          @keyup.enter.native="handleQuery"
66
-        />
67
-      </el-form-item>
68 23
       <el-form-item>
69 24
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
70 25
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -73,55 +28,17 @@
73 28
 
74 29
     <el-row :gutter="10" class="mb8">
75 30
       <el-col :span="1.5">
76
-        <el-button
77
-          type="primary"
78
-          plain
79
-          icon="el-icon-plus"
80
-          size="mini"
81
-          @click="handleAdd"
82
-          v-hasPermi="['oa:trainApproval:add']"
83
-        >新增</el-button>
84
-      </el-col>
85
-      <el-col :span="1.5">
86
-        <el-button
87
-          type="success"
88
-          plain
89
-          icon="el-icon-edit"
90
-          size="mini"
91
-          :disabled="single"
92
-          @click="handleUpdate"
93
-          v-hasPermi="['oa:trainApproval:edit']"
94
-        >修改</el-button>
95
-      </el-col>
96
-      <el-col :span="1.5">
97
-        <el-button
98
-          type="danger"
99
-          plain
100
-          icon="el-icon-delete"
101
-          size="mini"
102
-          :disabled="multiple"
103
-          @click="handleDelete"
104
-          v-hasPermi="['oa:trainApproval:remove']"
105
-        >删除</el-button>
106
-      </el-col>
107
-      <el-col :span="1.5">
108
-        <el-button
109
-          type="warning"
110
-          plain
111
-          icon="el-icon-download"
112
-          size="mini"
113
-          @click="handleExport"
114
-          v-hasPermi="['oa:trainApproval:export']"
115
-        >导出</el-button>
31
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
32
+          v-hasPermi="['oa:trainApproval:export']">导出</el-button>
116 33
       </el-col>
117 34
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
118 35
     </el-row>
119 36
 
120 37
     <el-table v-loading="loading" :data="trainApprovalList" @selection-change="handleSelectionChange">
121 38
       <el-table-column type="selection" width="55" align="center" />
122
-      <el-table-column label="参培id" align="center" prop="participateId" />
123
-      <el-table-column label="上报人" align="center" prop="userId" />
124
-      <el-table-column label="部门" align="center" prop="deptId" />
39
+      <!-- <el-table-column label="参培id" align="center" prop="participateId" /> -->
40
+      <el-table-column label="上报人" align="center" prop="reportUser.nickName" />
41
+      <el-table-column label="部门" align="center" prop="dept.deptName" />
125 42
       <el-table-column label="上报日期" align="center" prop="reportTime" width="180">
126 43
         <template slot-scope="scope">
127 44
           <span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d}') }}</span>
@@ -130,7 +47,7 @@
130 47
       <el-table-column label="培训名称" align="center" prop="trainName" />
131 48
       <el-table-column label="主要内容" align="center" prop="content" />
132 49
       <el-table-column label="时长" align="center" prop="hours" />
133
-      <el-table-column label="部门审核人" align="center" prop="deptUserId" />
50
+      <el-table-column label="部门审核人" align="center" prop="deptUser.nickName" />
134 51
       <el-table-column label="部门审核时间" align="center" prop="deptTime" width="180">
135 52
         <template slot-scope="scope">
136 53
           <span>{{ parseTime(scope.row.deptTime, '{y}-{m}-{d}') }}</span>
@@ -139,31 +56,16 @@
139 56
       <el-table-column label="部门审核意见" align="center" prop="deptComment" />
140 57
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
141 58
         <template slot-scope="scope">
142
-          <el-button
143
-            size="mini"
144
-            type="text"
145
-            icon="el-icon-edit"
146
-            @click="handleUpdate(scope.row)"
147
-            v-hasPermi="['oa:trainApproval:edit']"
148
-          >修改</el-button>
149
-          <el-button
150
-            size="mini"
151
-            type="text"
152
-            icon="el-icon-delete"
153
-            @click="handleDelete(scope.row)"
154
-            v-hasPermi="['oa:trainApproval:remove']"
155
-          >删除</el-button>
59
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
60
+            v-hasPermi="['oa:trainApproval:edit']">修改</el-button>
61
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
62
+            v-hasPermi="['oa:trainApproval:remove']">删除</el-button>
156 63
         </template>
157 64
       </el-table-column>
158 65
     </el-table>
159
-    
160
-    <pagination
161
-      v-show="total>0"
162
-      :total="total"
163
-      :page.sync="queryParams.pageNum"
164
-      :limit.sync="queryParams.pageSize"
165
-      @pagination="getList"
166
-    />
66
+
67
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
68
+      @pagination="getList" />
167 69
 
168 70
     <!-- 添加或修改参培审核对话框 -->
169 71
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -172,10 +74,7 @@
172 74
           <el-input v-model="form.userId" placeholder="请输入上报人" />
173 75
         </el-form-item>
174 76
         <el-form-item label="上报日期" prop="reportTime">
175
-          <el-date-picker clearable
176
-            v-model="form.reportTime"
177
-            type="date"
178
-            value-format="yyyy-MM-dd"
77
+          <el-date-picker clearable v-model="form.reportTime" type="date" value-format="yyyy-MM-dd"
179 78
             placeholder="请选择上报日期">
180 79
           </el-date-picker>
181 80
         </el-form-item>
@@ -183,7 +82,7 @@
183 82
           <el-input v-model="form.trainName" placeholder="请输入培训名称" />
184 83
         </el-form-item>
185 84
         <el-form-item label="主要内容">
186
-          <editor v-model="form.content" :min-height="192"/>
85
+          <editor v-model="form.content" :min-height="192" />
187 86
         </el-form-item>
188 87
         <el-form-item label="时长" prop="hours">
189 88
           <el-input v-model="form.hours" placeholder="请输入时长" />
@@ -192,10 +91,7 @@
192 91
           <el-input v-model="form.deptUserId" placeholder="请输入部门审核人" />
193 92
         </el-form-item>
194 93
         <el-form-item label="部门审核时间" prop="deptTime">
195
-          <el-date-picker clearable
196
-            v-model="form.deptTime"
197
-            type="date"
198
-            value-format="yyyy-MM-dd"
94
+          <el-date-picker clearable v-model="form.deptTime" type="date" value-format="yyyy-MM-dd"
199 95
             placeholder="请选择部门审核时间">
200 96
           </el-date-picker>
201 97
         </el-form-item>
@@ -302,7 +198,7 @@ export default {
302 198
     // 多选框选中数据
303 199
     handleSelectionChange(selection) {
304 200
       this.ids = selection.map(item => item.participateId)
305
-      this.single = selection.length!==1
201
+      this.single = selection.length !== 1
306 202
       this.multiple = !selection.length
307 203
     },
308 204
     /** 新增按钮操作 */
@@ -344,12 +240,12 @@ export default {
344 240
     /** 删除按钮操作 */
345 241
     handleDelete(row) {
346 242
       const participateIds = row.participateId || this.ids;
347
-      this.$modal.confirm('是否确认删除参培审核编号为"' + participateIds + '"的数据项?').then(function() {
243
+      this.$modal.confirm('是否确认删除参培审核编号为"' + participateIds + '"的数据项?').then(function () {
348 244
         return delTrainApproval(participateIds);
349 245
       }).then(() => {
350 246
         this.getList();
351 247
         this.$modal.msgSuccess("删除成功");
352
-      }).catch(() => {});
248
+      }).catch(() => { });
353 249
     },
354 250
     /** 导出按钮操作 */
355 251
     handleExport() {

Loading…
Annuler
Enregistrer