Procházet zdrojové kódy

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

lamphua před 1 rokem
rodič
revize
a100805ed4

+ 13
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBorrow.java Zobrazit soubor

33
     @Excel(name = "借款事由")
33
     @Excel(name = "借款事由")
34
     private String applyReason;
34
     private String applyReason;
35
 
35
 
36
+    /** 借款用途 */
37
+    @Excel(name = "借款用途")
38
+    private String borrowUsage;
39
+
36
     /** 借款部门 */
40
     /** 借款部门 */
37
     @Excel(name = "借款部门")
41
     @Excel(name = "借款部门")
38
     private Long applyDept;
42
     private Long applyDept;
169
     {
173
     {
170
         return applyReason;
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
     public void setApplyDept(Long applyDept)
185
     public void setApplyDept(Long applyDept)
173
     {
186
     {
174
         this.applyDept = applyDept;
187
         this.applyDept = applyDept;

+ 12
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContractComment.java Zobrazit soubor

2
 
2
 
3
 import java.util.Date;
3
 import java.util.Date;
4
 import com.fasterxml.jackson.annotation.JsonFormat;
4
 import com.fasterxml.jackson.annotation.JsonFormat;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5
 import org.apache.commons.lang3.builder.ToStringBuilder;
6
 import org.apache.commons.lang3.builder.ToStringBuilder;
6
 import org.apache.commons.lang3.builder.ToStringStyle;
7
 import org.apache.commons.lang3.builder.ToStringStyle;
7
 import com.ruoyi.common.annotation.Excel;
8
 import com.ruoyi.common.annotation.Excel;
36
     @Excel(name = "会审人")
37
     @Excel(name = "会审人")
37
     private Long userId;
38
     private Long userId;
38
 
39
 
40
+    private SysUser commentUser;
41
+
39
     /** 会审意见 */
42
     /** 会审意见 */
40
     @Excel(name = "会审意见")
43
     @Excel(name = "会审意见")
41
     private String comment;
44
     private String comment;
94
     {
97
     {
95
         return userId;
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
     public void setComment(String comment)
109
     public void setComment(String comment)
98
     {
110
     {
99
         this.comment = comment;
111
         this.comment = comment;

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBorrowMapper.xml Zobrazit soubor

8
         <result property="borrowId"    column="borrow_id"    />
8
         <result property="borrowId"    column="borrow_id"    />
9
         <result property="projectId"    column="project_id"    />
9
         <result property="projectId"    column="project_id"    />
10
         <result property="applyReason"    column="apply_reason"    />
10
         <result property="applyReason"    column="apply_reason"    />
11
+        <result property="borrowUsage"    column="borrow_usage"    />
11
         <result property="applier"    column="applier"    />
12
         <result property="applier"    column="applier"    />
12
         <result property="applyDept"    column="apply_dept"    />
13
         <result property="applyDept"    column="apply_dept"    />
13
         <result property="applyDate"    column="apply_date"    />
14
         <result property="applyDate"    column="apply_date"    />
81
     </resultMap>
82
     </resultMap>
82
 
83
 
83
     <sql id="selectCmcBorrowVo">
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
                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
                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
                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
                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
                b.cw_comment, b.dept_time, b.xm_time, b.manager_time, b.zjl_time, b.lend_time from cmc_borrow as b
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
         <where>  
101
         <where>  
101
             <if test="projectId != null  and projectId != ''"> and b.project_id = #{projectId}</if>
102
             <if test="projectId != null  and projectId != ''"> and b.project_id = #{projectId}</if>
102
             <if test="applyReason != null  and applyReason != ''"> and b.apply_reason = #{applyReason}</if>
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
             <if test="applyDept != null  and applyDept != ''"> and b.apply_dept = #{applyDept}</if>
105
             <if test="applyDept != null  and applyDept != ''"> and b.apply_dept = #{applyDept}</if>
104
             <if test="applier != null "> and b.applier = #{applier}</if>
106
             <if test="applier != null "> and b.applier = #{applier}</if>
105
             <if test="remark != null "> and b.remark = #{remark}</if>
107
             <if test="remark != null "> and b.remark = #{remark}</if>
135
             <if test="borrowId != null">borrow_id,</if>
137
             <if test="borrowId != null">borrow_id,</if>
136
             <if test="projectId != null">project_id,</if>
138
             <if test="projectId != null">project_id,</if>
137
             <if test="applyReason != null">apply_reason,</if>
139
             <if test="applyReason != null">apply_reason,</if>
140
+            <if test="borrowUsage != null">borrow_usage,</if>
138
             <if test="applier != null">applier,</if>
141
             <if test="applier != null">applier,</if>
139
             <if test="remark != null">remark,</if>
142
             <if test="remark != null">remark,</if>
140
             <if test="applyDept != null">apply_dept,</if>
143
             <if test="applyDept != null">apply_dept,</if>
161
             <if test="borrowId != null">#{borrowId},</if>
164
             <if test="borrowId != null">#{borrowId},</if>
162
             <if test="projectId != null">#{projectId},</if>
165
             <if test="projectId != null">#{projectId},</if>
163
             <if test="applyReason != null">#{applyReason},</if>
166
             <if test="applyReason != null">#{applyReason},</if>
167
+            <if test="borrowUsage != null">#{borrowUsage},</if>
164
             <if test="applier != null">#{applier},</if>
168
             <if test="applier != null">#{applier},</if>
165
             <if test="remark != null">#{remark},</if>
169
             <if test="remark != null">#{remark},</if>
166
             <if test="applyDept != null">#{applyDept},</if>
170
             <if test="applyDept != null">#{applyDept},</if>
190
         <trim prefix="SET" suffixOverrides=",">
194
         <trim prefix="SET" suffixOverrides=",">
191
             <if test="projectId != null">project_id = #{projectId},</if>
195
             <if test="projectId != null">project_id = #{projectId},</if>
192
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
196
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
197
+            <if test="borrowUsage != null">borrow_usage = #{borrowUsage},</if>
193
             <if test="applier != null">applier = #{applier},</if>
198
             <if test="applier != null">applier = #{applier},</if>
194
             <if test="remark != null">remark = #{remark},</if>
199
             <if test="remark != null">remark = #{remark},</if>
195
             <if test="applyDept != null">apply_dept = #{applyDept},</if>
200
             <if test="applyDept != null">apply_dept = #{applyDept},</if>

+ 9
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractCommentMapper.xml Zobrazit soubor

13
         <result property="comment"    column="comment"    />
13
         <result property="comment"    column="comment"    />
14
         <result property="document"    column="document"    />
14
         <result property="document"    column="document"    />
15
         <result property="commentTime"    column="comment_time"    />
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
     </resultMap>
22
     </resultMap>
17
 
23
 
18
     <sql id="selectCmcContractCommentVo">
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
     </sql>
27
     </sql>
21
 
28
 
22
     <select id="selectCmcContractCommentList" parameterType="CmcContractComment" resultMap="CmcContractCommentResult">
29
     <select id="selectCmcContractCommentList" parameterType="CmcContractComment" resultMap="CmcContractCommentResult">
33
 
40
 
34
     <select id="selectCmcContractCommentByContractId" parameterType="String" resultMap="CmcContractCommentResult">
41
     <select id="selectCmcContractCommentByContractId" parameterType="String" resultMap="CmcContractCommentResult">
35
         <include refid="selectCmcContractCommentVo"/>
42
         <include refid="selectCmcContractCommentVo"/>
36
-        where contract_id = #{contractId}
43
+        where cc.contract_id = #{contractId}
37
     </select>
44
     </select>
38
 
45
 
39
     <insert id="insertCmcContractComment" parameterType="CmcContractComment">
46
     <insert id="insertCmcContractComment" parameterType="CmcContractComment">

+ 1
- 0
oa-back/sql/sql.sql Zobrazit soubor

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

+ 35
- 17
oa-ui/src/views/flowable/form/contractForm.vue Zobrazit soubor

153
           <el-divider></el-divider>
153
           <el-divider></el-divider>
154
           <el-form-item label="评审方式" prop="commentType">
154
           <el-form-item label="评审方式" prop="commentType">
155
             <el-radio-group v-model="form.commentType" @change="changeCommentType" :disabled="taskName != '合同拟稿'">
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
             </el-radio-group>
159
             </el-radio-group>
160
           </el-form-item>
160
           </el-form-item>
161
           <el-form-item label="线上评审:" v-if="commentOpen">
161
           <el-form-item label="线上评审:" v-if="commentOpen">
189
                 </td>
189
                 </td>
190
                 <td>
190
                 <td>
191
                   <el-input v-model="comment.comment" type="textarea" clearable
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
                 </td>
193
                 </td>
194
                 <td>
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
                 </td>
196
                 </td>
197
                 <td>
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
                 </td>
199
                 </td>
200
                 <td>
200
                 <td>
201
-                  <span> {{ form.commentTime ? form.commentTime : commentTime }} </span>
201
+                  <span> {{ comment.commentTime }} </span>
202
                 </td>
202
                 </td>
203
                 <td>
203
                 <td>
204
                   <el-button type="danger" icon="el-icon-minus" size="mini" circle
204
                   <el-button type="danger" icon="el-icon-minus" size="mini" circle
342
       draftTime: undefined,
342
       draftTime: undefined,
343
       managerUser: '',
343
       managerUser: '',
344
       managerTime: undefined,
344
       managerTime: undefined,
345
-      commentUser: '',
346
-      commentTime: undefined,
347
       // 遮罩层
345
       // 遮罩层
348
       loading: true,
346
       loading: true,
349
       // 选中数组
347
       // 选中数组
375
         signDate: null,
373
         signDate: null,
376
         signRemark: null,
374
         signRemark: null,
377
         signScan: null,
375
         signScan: null,
378
-        commentType: null
376
+        commentType: ''
379
       },
377
       },
380
       // 表单参数
378
       // 表单参数
381
       form: {},
379
       form: {},
472
         else {
470
         else {
473
           this.formTotal = 1;
471
           this.formTotal = 1;
474
           this.form = res.data;
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
           if (res.data.tenderId) {
485
           if (res.data.tenderId) {
476
             getTender(res.data.tenderId).then(response => {
486
             getTender(res.data.tenderId).then(response => {
477
               this.chooseTender = response.data;
487
               this.chooseTender = response.data;
489
           getContractComment(this.taskForm.formId).then(res => {
499
           getContractComment(this.taskForm.formId).then(res => {
490
             if (res.data)
500
             if (res.data)
491
               this.commentList = res.data;
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
           getContractMeeting(this.taskForm.formId).then(res => {
511
           getContractMeeting(this.taskForm.formId).then(res => {
494
             if (res.data)
512
             if (res.data)
644
       }
662
       }
645
     },
663
     },
646
     changeCommentType(val) {
664
     changeCommentType(val) {
647
-      if (val == 0) {
665
+      if (val == '0') {
648
         this.commentOpen = false;
666
         this.commentOpen = false;
649
         this.meetingOpen = false;
667
         this.meetingOpen = false;
650
       }
668
       }
651
-      else if (val == 1) {
669
+      else if (val == '1') {
652
         this.commentOpen = false;
670
         this.commentOpen = false;
653
         this.meetingOpen = true;
671
         this.meetingOpen = true;
654
       }
672
       }
655
-      else if (val == 2) {
673
+      else if (val == '2') {
656
         this.commentOpen = true;
674
         this.commentOpen = true;
657
         this.meetingOpen = false;
675
         this.meetingOpen = false;
658
         for (let comment of this.commentList) {
676
         for (let comment of this.commentList) {
685
         signDate: null,
703
         signDate: null,
686
         signRemark: null,
704
         signRemark: null,
687
         signScan: null,
705
         signScan: null,
688
-        commentType: null
706
+        commentType: ''
689
       };
707
       };
690
       this.resetForm("form");
708
       this.resetForm("form");
691
     },
709
     },
752
                 getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
770
                 getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
753
                   let userId = res.data.userId;
771
                   let userId = res.data.userId;
754
                   this.$set(this.taskForm.variables, "approval", userId);
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
                   complete(this.taskForm).then(response => {
774
                   complete(this.taskForm).then(response => {
757
                     this.$modal.msgSuccess(response.msg);
775
                     this.$modal.msgSuccess(response.msg);
758
                     this.$emit('goBack')
776
                     this.$emit('goBack')
767
                   approvalList.push(commment.userId)
785
                   approvalList.push(commment.userId)
768
                 }
786
                 }
769
                 this.$set(this.taskForm.variables, "approvalList", approvalList);
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
                 complete(this.taskForm).then(response => {
789
                 complete(this.taskForm).then(response => {
772
                   this.$modal.msgSuccess(response.msg);
790
                   this.$modal.msgSuccess(response.msg);
773
                   this.$emit('goBack')
791
                   this.$emit('goBack')
777
                 this.meetingForm.contractId = this.form.contractId;
795
                 this.meetingForm.contractId = this.form.contractId;
778
                 addContractMeeting(this.meetingForm);
796
                 addContractMeeting(this.meetingForm);
779
                 this.$set(this.taskForm.variables, "approval", this.meetingForm.hostId);
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
                 complete(this.taskForm).then(response => {
799
                 complete(this.taskForm).then(response => {
782
                   this.$modal.msgSuccess(response.msg);
800
                   this.$modal.msgSuccess(response.msg);
783
                   this.$emit('goBack')
801
                   this.$emit('goBack')

Loading…
Zrušit
Uložit