ソースを参照

增加借款用途、申请人说明

lamphua 1年前
コミット
a100805ed4

+ 13
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBorrow.java ファイルの表示

@@ -33,6 +33,10 @@ public class CmcBorrow extends BaseEntity
33 33
     @Excel(name = "借款事由")
34 34
     private String applyReason;
35 35
 
36
+    /** 借款用途 */
37
+    @Excel(name = "借款用途")
38
+    private String borrowUsage;
39
+
36 40
     /** 借款部门 */
37 41
     @Excel(name = "借款部门")
38 42
     private Long applyDept;
@@ -169,6 +173,15 @@ public class CmcBorrow extends BaseEntity
169 173
     {
170 174
         return applyReason;
171 175
     }
176
+    public void setBorrowUsage(String borrowUsage)
177
+    {
178
+        this.borrowUsage = borrowUsage;
179
+    }
180
+
181
+    public String getBorrowUsage()
182
+    {
183
+        return borrowUsage;
184
+    }
172 185
     public void setApplyDept(Long applyDept)
173 186
     {
174 187
         this.applyDept = applyDept;

+ 12
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContractComment.java ファイルの表示

@@ -2,6 +2,7 @@ package com.ruoyi.oa.domain;
2 2
 
3 3
 import java.util.Date;
4 4
 import com.fasterxml.jackson.annotation.JsonFormat;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
6 7
 import org.apache.commons.lang3.builder.ToStringStyle;
7 8
 import com.ruoyi.common.annotation.Excel;
@@ -36,6 +37,8 @@ public class CmcContractComment extends BaseEntity
36 37
     @Excel(name = "会审人")
37 38
     private Long userId;
38 39
 
40
+    private SysUser commentUser;
41
+
39 42
     /** 会审意见 */
40 43
     @Excel(name = "会审意见")
41 44
     private String comment;
@@ -94,6 +97,15 @@ public class CmcContractComment extends BaseEntity
94 97
     {
95 98
         return userId;
96 99
     }
100
+    public void setCommentUser(SysUser commentUser)
101
+    {
102
+        this.commentUser = commentUser;
103
+    }
104
+
105
+    public SysUser getCommentUser()
106
+    {
107
+        return commentUser;
108
+    }
97 109
     public void setComment(String comment)
98 110
     {
99 111
         this.comment = comment;

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBorrowMapper.xml ファイルの表示

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
8 8
         <result property="borrowId"    column="borrow_id"    />
9 9
         <result property="projectId"    column="project_id"    />
10 10
         <result property="applyReason"    column="apply_reason"    />
11
+        <result property="borrowUsage"    column="borrow_usage"    />
11 12
         <result property="applier"    column="applier"    />
12 13
         <result property="applyDept"    column="apply_dept"    />
13 14
         <result property="applyDate"    column="apply_date"    />
@@ -81,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
81 82
     </resultMap>
82 83
 
83 84
     <sql id="selectCmcBorrowVo">
84
-        select b.borrow_id, b.project_id, p.project_number, p.project_name, b.apply_reason, b.applier, u.nick_name as applier_nick_name, d.dept_name, b.apply_dept, b.remark,
85
+        select b.borrow_id, b.project_id, p.project_number, p.project_name, b.apply_reason, b.applier, u.nick_name as applier_nick_name, d.dept_name, b.apply_dept, b.remark, b.borrow_usage,
85 86
                b.apply_date, b.apply_amount, b.manager_amount, b.dept_comment, b.dept_user_id, u1.nick_name as dept_nick_name, b.xm_user_id, u2.nick_name as xm_nick_name, b.xm_comment,
86 87
                b.manager_comment, b.manager_user_id, u3.nick_name as manager_nick_name, b.zjl_user_id, u4.nick_name as zjl_nick_name, b.zjl_comment, b.cw_user_id, u5.nick_name as cw_nick_name,
87 88
                b.cw_comment, b.dept_time, b.xm_time, b.manager_time, b.zjl_time, b.lend_time from cmc_borrow as b
@@ -100,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
100 101
         <where>  
101 102
             <if test="projectId != null  and projectId != ''"> and b.project_id = #{projectId}</if>
102 103
             <if test="applyReason != null  and applyReason != ''"> and b.apply_reason = #{applyReason}</if>
104
+            <if test="borrowUsage != null  and borrowUsage != ''"> and b.borrow_usage = #{borrowUsage}</if>
103 105
             <if test="applyDept != null  and applyDept != ''"> and b.apply_dept = #{applyDept}</if>
104 106
             <if test="applier != null "> and b.applier = #{applier}</if>
105 107
             <if test="remark != null "> and b.remark = #{remark}</if>
@@ -135,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
135 137
             <if test="borrowId != null">borrow_id,</if>
136 138
             <if test="projectId != null">project_id,</if>
137 139
             <if test="applyReason != null">apply_reason,</if>
140
+            <if test="borrowUsage != null">borrow_usage,</if>
138 141
             <if test="applier != null">applier,</if>
139 142
             <if test="remark != null">remark,</if>
140 143
             <if test="applyDept != null">apply_dept,</if>
@@ -161,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
161 164
             <if test="borrowId != null">#{borrowId},</if>
162 165
             <if test="projectId != null">#{projectId},</if>
163 166
             <if test="applyReason != null">#{applyReason},</if>
167
+            <if test="borrowUsage != null">#{borrowUsage},</if>
164 168
             <if test="applier != null">#{applier},</if>
165 169
             <if test="remark != null">#{remark},</if>
166 170
             <if test="applyDept != null">#{applyDept},</if>
@@ -190,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
190 194
         <trim prefix="SET" suffixOverrides=",">
191 195
             <if test="projectId != null">project_id = #{projectId},</if>
192 196
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
197
+            <if test="borrowUsage != null">borrow_usage = #{borrowUsage},</if>
193 198
             <if test="applier != null">applier = #{applier},</if>
194 199
             <if test="remark != null">remark = #{remark},</if>
195 200
             <if test="applyDept != null">apply_dept = #{applyDept},</if>

+ 9
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractCommentMapper.xml ファイルの表示

@@ -13,10 +13,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
13 13
         <result property="comment"    column="comment"    />
14 14
         <result property="document"    column="document"    />
15 15
         <result property="commentTime"    column="comment_time"    />
16
+        <association property="commentUser"    javaType="SysUser"         resultMap="CommentUserResult" />
17
+    </resultMap>
18
+
19
+    <resultMap type="SysUser" id="CommentUserResult">
20
+        <result property="userId"    column="user_id"    />
21
+        <result property="nickName"    column="nick_name"    />
16 22
     </resultMap>
17 23
 
18 24
     <sql id="selectCmcContractCommentVo">
19
-        select comment_id, contract_id, sub_contract_id, dept_id, user_id, comment, document, comment_time from cmc_contract_comment
25
+        select cc.comment_id, cc.contract_id, cc.sub_contract_id, cc.dept_id, cc.user_id, u.nick_name, cc.comment, cc.document, cc.comment_time from cmc_contract_comment as cc
26
+        left join sys_user as u on u.user_id = cc.user_id
20 27
     </sql>
21 28
 
22 29
     <select id="selectCmcContractCommentList" parameterType="CmcContractComment" resultMap="CmcContractCommentResult">
@@ -33,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
33 40
 
34 41
     <select id="selectCmcContractCommentByContractId" parameterType="String" resultMap="CmcContractCommentResult">
35 42
         <include refid="selectCmcContractCommentVo"/>
36
-        where contract_id = #{contractId}
43
+        where cc.contract_id = #{contractId}
37 44
     </select>
38 45
 
39 46
     <insert id="insertCmcContractComment" parameterType="CmcContractComment">

+ 1
- 0
oa-back/sql/sql.sql ファイルの表示

@@ -3778,6 +3778,7 @@ drop table if exists `cmc_borrow`;
3778 3778
 create table `cmc_borrow`  (
3779 3779
   `borrow_id` 		char(19)		not null 	comment '借款申请id',
3780 3780
   `project_id` 		char(19)  		default null comment '项目id',
3781
+  `borrow_usage` 	char(1)  		default null comment '借款用途',
3781 3782
   `apply_reason` 	varchar(255)  	default null comment '借款事由',
3782 3783
   `applier` 		bigint 			default null comment '借款人',
3783 3784
   `apply_dept`		bigint			default null comment '申请部门',

+ 35
- 17
oa-ui/src/views/flowable/form/contractForm.vue ファイルの表示

@@ -153,9 +153,9 @@
153 153
           <el-divider></el-divider>
154 154
           <el-form-item label="评审方式" prop="commentType">
155 155
             <el-radio-group v-model="form.commentType" @change="changeCommentType" :disabled="taskName != '合同拟稿'">
156
-              <el-radio :label="0">无须评审</el-radio>
157
-              <el-radio :label="1">会议评审</el-radio>
158
-              <el-radio :label="2">线上评审</el-radio>
156
+              <el-radio :label="'0'">无须评审</el-radio>
157
+              <el-radio :label="'1'">会议评审</el-radio>
158
+              <el-radio :label="'2'">线上评审</el-radio>
159 159
             </el-radio-group>
160 160
           </el-form-item>
161 161
           <el-form-item label="线上评审:" v-if="commentOpen">
@@ -189,16 +189,16 @@
189 189
                 </td>
190 190
                 <td>
191 191
                   <el-input v-model="comment.comment" type="textarea" clearable
192
-                    :autosize="{ minRows: 4, maxRows: 10 }"></el-input>
192
+                    :autosize="{ minRows: 4, maxRows: 10 }" :disabled="taskName == '合同拟稿' || !comment.commentUser"></el-input>
193 193
                 </td>
194 194
                 <td>
195
-                  <el-input v-model="comment.document" clearable></el-input>
195
+                  <el-input v-model="comment.document" clearable :disabled="taskName == '合同拟稿' || !comment.commentUser"></el-input>
196 196
                 </td>
197 197
                 <td>
198
-                  <span class="auditor"> {{ comment.User ? comment.User.nickName : commentUser }} </span>
198
+                  <span class="auditor"> {{ comment.commentUser ? comment.commentUser.nickName : commentUser }} </span>
199 199
                 </td>
200 200
                 <td>
201
-                  <span> {{ form.commentTime ? form.commentTime : commentTime }} </span>
201
+                  <span> {{ comment.commentTime }} </span>
202 202
                 </td>
203 203
                 <td>
204 204
                   <el-button type="danger" icon="el-icon-minus" size="mini" circle
@@ -342,8 +342,6 @@ export default {
342 342
       draftTime: undefined,
343 343
       managerUser: '',
344 344
       managerTime: undefined,
345
-      commentUser: '',
346
-      commentTime: undefined,
347 345
       // 遮罩层
348 346
       loading: true,
349 347
       // 选中数组
@@ -375,7 +373,7 @@ export default {
375 373
         signDate: null,
376 374
         signRemark: null,
377 375
         signScan: null,
378
-        commentType: null
376
+        commentType: ''
379 377
       },
380 378
       // 表单参数
381 379
       form: {},
@@ -472,6 +470,18 @@ export default {
472 470
         else {
473 471
           this.formTotal = 1;
474 472
           this.form = res.data;
473
+          if (this.form.commentType == '0') {
474
+            this.commentOpen = false;
475
+            this.meetingOpen = false;
476
+          }
477
+          else if (this.form.commentType == '1') {
478
+            this.commentOpen = false;
479
+            this.meetingOpen = true;
480
+          }
481
+          else if (this.form.commentType == '2') {
482
+            this.commentOpen = true;
483
+            this.meetingOpen = false;
484
+          }
475 485
           if (res.data.tenderId) {
476 486
             getTender(res.data.tenderId).then(response => {
477 487
               this.chooseTender = response.data;
@@ -489,6 +499,14 @@ export default {
489 499
           getContractComment(this.taskForm.formId).then(res => {
490 500
             if (res.data)
491 501
               this.commentList = res.data;
502
+            for (let comment of this.commentList) {
503
+              if (comment.userId != this.$store.getters.userId) {
504
+                comment.commentUser = undefined;
505
+              }
506
+              else
507
+                comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
508
+            }
509
+            console.log(this.commentList);
492 510
           });
493 511
           getContractMeeting(this.taskForm.formId).then(res => {
494 512
             if (res.data)
@@ -644,15 +662,15 @@ export default {
644 662
       }
645 663
     },
646 664
     changeCommentType(val) {
647
-      if (val == 0) {
665
+      if (val == '0') {
648 666
         this.commentOpen = false;
649 667
         this.meetingOpen = false;
650 668
       }
651
-      else if (val == 1) {
669
+      else if (val == '1') {
652 670
         this.commentOpen = false;
653 671
         this.meetingOpen = true;
654 672
       }
655
-      else if (val == 2) {
673
+      else if (val == '2') {
656 674
         this.commentOpen = true;
657 675
         this.meetingOpen = false;
658 676
         for (let comment of this.commentList) {
@@ -685,7 +703,7 @@ export default {
685 703
         signDate: null,
686 704
         signRemark: null,
687 705
         signScan: null,
688
-        commentType: null
706
+        commentType: ''
689 707
       };
690 708
       this.resetForm("form");
691 709
     },
@@ -752,7 +770,7 @@ export default {
752 770
                 getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
753 771
                   let userId = res.data.userId;
754 772
                   this.$set(this.taskForm.variables, "approval", userId);
755
-                  this.$set(this.taskForm.variables, "commentType", 0);
773
+                  this.$set(this.taskForm.variables, "commentType", '0');
756 774
                   complete(this.taskForm).then(response => {
757 775
                     this.$modal.msgSuccess(response.msg);
758 776
                     this.$emit('goBack')
@@ -767,7 +785,7 @@ export default {
767 785
                   approvalList.push(commment.userId)
768 786
                 }
769 787
                 this.$set(this.taskForm.variables, "approvalList", approvalList);
770
-                this.$set(this.taskForm.variables, "commentType", 2);
788
+                this.$set(this.taskForm.variables, "commentType", '2');
771 789
                 complete(this.taskForm).then(response => {
772 790
                   this.$modal.msgSuccess(response.msg);
773 791
                   this.$emit('goBack')
@@ -777,7 +795,7 @@ export default {
777 795
                 this.meetingForm.contractId = this.form.contractId;
778 796
                 addContractMeeting(this.meetingForm);
779 797
                 this.$set(this.taskForm.variables, "approval", this.meetingForm.hostId);
780
-                this.$set(this.taskForm.variables, "commentType", 1);
798
+                this.$set(this.taskForm.variables, "commentType", '1');
781 799
                 complete(this.taskForm).then(response => {
782 800
                   this.$modal.msgSuccess(response.msg);
783 801
                   this.$emit('goBack')

読み込み中…
キャンセル
保存