Quellcode durchsuchen

合同评审关联项目

lamphua vor 1 Jahr
Ursprung
Commit
10fad62a0e

+ 20
- 10
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcContractMeetingController.java Datei anzeigen

@@ -1,19 +1,14 @@
1 1
 package com.ruoyi.web.controller.oa;
2 2
 
3
+import java.util.Date;
3 4
 import java.util.List;
4 5
 import javax.servlet.http.HttpServletResponse;
5 6
 
7
+import com.alibaba.fastjson2.JSONObject;
6 8
 import com.ruoyi.common.utils.SnowFlake;
7 9
 import org.springframework.security.access.prepost.PreAuthorize;
8 10
 import org.springframework.beans.factory.annotation.Autowired;
9
-import org.springframework.web.bind.annotation.GetMapping;
10
-import org.springframework.web.bind.annotation.PostMapping;
11
-import org.springframework.web.bind.annotation.PutMapping;
12
-import org.springframework.web.bind.annotation.DeleteMapping;
13
-import org.springframework.web.bind.annotation.PathVariable;
14
-import org.springframework.web.bind.annotation.RequestBody;
15
-import org.springframework.web.bind.annotation.RequestMapping;
16
-import org.springframework.web.bind.annotation.RestController;
11
+import org.springframework.web.bind.annotation.*;
17 12
 import com.ruoyi.common.annotation.Log;
18 13
 import com.ruoyi.common.core.controller.BaseController;
19 14
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -73,9 +68,19 @@ public class CmcContractMeetingController extends BaseController
73 68
      */
74 69
     @Log(title = "cmc合同会审", businessType = BusinessType.INSERT)
75 70
     @PostMapping
76
-    public AjaxResult add(@RequestBody CmcContractMeeting cmcContractMeeting)
71
+    public AjaxResult add(@RequestParam("form")String formData)
77 72
     {
73
+        JSONObject formDataJson = JSONObject.parse(formData);
74
+        CmcContractMeeting cmcContractMeeting = new CmcContractMeeting();
78 75
         cmcContractMeeting.setMeetingId(new SnowFlake().generateId());
76
+        cmcContractMeeting.setContractId(formDataJson.getString("contractId"));
77
+        cmcContractMeeting.setMeetingTime(formDataJson.getDate("meetingTime"));
78
+        cmcContractMeeting.setPlace(formDataJson.getString("place"));
79
+        cmcContractMeeting.setHostId(formDataJson.getLong("hostId"));
80
+        if (formDataJson.getJSONArray("users").size() > 0) {
81
+            String userString = formDataJson.getString("users").substring(1, formDataJson.getString("users").length() - 1);
82
+            cmcContractMeeting.setUsers(userString);
83
+        }
79 84
         return toAjax(cmcContractMeetingService.insertCmcContractMeeting(cmcContractMeeting));
80 85
     }
81 86
 
@@ -84,8 +89,13 @@ public class CmcContractMeetingController extends BaseController
84 89
      */
85 90
     @Log(title = "cmc合同会审", businessType = BusinessType.UPDATE)
86 91
     @PutMapping
87
-    public AjaxResult edit(@RequestBody CmcContractMeeting cmcContractMeeting)
92
+    public AjaxResult edit(@RequestParam("form")String formData)
88 93
     {
94
+        JSONObject formDataJson = JSONObject.parse(formData);
95
+        CmcContractMeeting cmcContractMeeting = cmcContractMeetingService.selectCmcContractMeetingByContractId(formDataJson.getString("contractId"));
96
+        cmcContractMeeting.setDocument(formDataJson.getString("document"));
97
+        cmcContractMeeting.setConclusion(formDataJson.getString("conclusion"));
98
+        cmcContractMeeting.setCommentTime(new Date());
89 99
         return toAjax(cmcContractMeetingService.updateCmcContractMeeting(cmcContractMeeting));
90 100
     }
91 101
 

+ 12
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContractMeeting.java Datei anzeigen

@@ -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;
@@ -33,6 +34,8 @@ public class CmcContractMeeting extends BaseEntity
33 34
     @Excel(name = "评审主持人")
34 35
     private Long hostId;
35 36
 
37
+    private SysUser hostUser;
38
+
36 39
     /** 评审地点 */
37 40
     @Excel(name = "评审地点")
38 41
     private String place;
@@ -90,6 +93,15 @@ public class CmcContractMeeting extends BaseEntity
90 93
     {
91 94
         return hostId;
92 95
     }
96
+    public void setHostUser(SysUser hostUser)
97
+    {
98
+        this.hostUser = hostUser;
99
+    }
100
+
101
+    public SysUser getHostUser()
102
+    {
103
+        return hostUser;
104
+    }
93 105
     public void setPlace(String place)
94 106
     {
95 107
         this.place = place;

+ 28
- 28
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcSubContract.java Datei anzeigen

@@ -24,7 +24,7 @@ public class CmcSubContract extends BaseEntity
24 24
 
25 25
     /** 主合同id */
26 26
     @Excel(name = "主合同id")
27
-    private String contractId;
27
+    private String projectId;
28 28
 
29 29
     /** 合同名称 */
30 30
     @Excel(name = "合同名称")
@@ -85,66 +85,66 @@ public class CmcSubContract extends BaseEntity
85 85
     @Excel(name = "分管审批日期", width = 30, dateFormat = "yyyy-MM-dd")
86 86
     private Date managerTime;
87 87
 
88
-    public void setSubContractId(String subContractId) 
88
+    public void setSubContractId(String subContractId)
89 89
     {
90 90
         this.subContractId = subContractId;
91 91
     }
92 92
 
93
-    public String getSubContractId() 
93
+    public String getSubContractId()
94 94
     {
95 95
         return subContractId;
96 96
     }
97
-    public void setContractId(String contractId) 
97
+    public void setProjectId(String projectId)
98 98
     {
99
-        this.contractId = contractId;
99
+        this.projectId = projectId;
100 100
     }
101 101
 
102
-    public String getContractId() 
102
+    public String getProjectId()
103 103
     {
104
-        return contractId;
104
+        return projectId;
105 105
     }
106
-    public void setSubContractName(String subContractName) 
106
+    public void setSubContractName(String subContractName)
107 107
     {
108 108
         this.subContractName = subContractName;
109 109
     }
110 110
 
111
-    public String getSubContractName() 
111
+    public String getSubContractName()
112 112
     {
113 113
         return subContractName;
114 114
     }
115
-    public void setSubAmount(BigDecimal subAmount) 
115
+    public void setSubAmount(BigDecimal subAmount)
116 116
     {
117 117
         this.subAmount = subAmount;
118 118
     }
119 119
 
120
-    public BigDecimal getSubAmount() 
120
+    public BigDecimal getSubAmount()
121 121
     {
122 122
         return subAmount;
123 123
     }
124
-    public void setPartnerId(String partnerId) 
124
+    public void setPartnerId(String partnerId)
125 125
     {
126 126
         this.partnerId = partnerId;
127 127
     }
128 128
 
129
-    public String getPartnerId() 
129
+    public String getPartnerId()
130 130
     {
131 131
         return partnerId;
132 132
     }
133
-    public void setContactPerson(String contactPerson) 
133
+    public void setContactPerson(String contactPerson)
134 134
     {
135 135
         this.contactPerson = contactPerson;
136 136
     }
137 137
 
138
-    public String getContactPerson() 
138
+    public String getContactPerson()
139 139
     {
140 140
         return contactPerson;
141 141
     }
142
-    public void setDrafter(Long drafter) 
142
+    public void setDrafter(Long drafter)
143 143
     {
144 144
         this.drafter = drafter;
145 145
     }
146 146
 
147
-    public Long getDrafter() 
147
+    public Long getDrafter()
148 148
     {
149 149
         return drafter;
150 150
     }
@@ -166,48 +166,48 @@ public class CmcSubContract extends BaseEntity
166 166
     {
167 167
         return managerUser;
168 168
     }
169
-    public void setDraftTime(Date draftTime) 
169
+    public void setDraftTime(Date draftTime)
170 170
     {
171 171
         this.draftTime = draftTime;
172 172
     }
173 173
 
174
-    public Date getDraftTime() 
174
+    public Date getDraftTime()
175 175
     {
176 176
         return draftTime;
177 177
     }
178
-    public void setSignDate(Date signDate) 
178
+    public void setSignDate(Date signDate)
179 179
     {
180 180
         this.signDate = signDate;
181 181
     }
182 182
 
183
-    public Date getSignDate() 
183
+    public Date getSignDate()
184 184
     {
185 185
         return signDate;
186 186
     }
187
-    public void setSignRemark(String signRemark) 
187
+    public void setSignRemark(String signRemark)
188 188
     {
189 189
         this.signRemark = signRemark;
190 190
     }
191 191
 
192
-    public String getSignRemark() 
192
+    public String getSignRemark()
193 193
     {
194 194
         return signRemark;
195 195
     }
196
-    public void setSignScan(String signScan) 
196
+    public void setSignScan(String signScan)
197 197
     {
198 198
         this.signScan = signScan;
199 199
     }
200 200
 
201
-    public String getSignScan() 
201
+    public String getSignScan()
202 202
     {
203 203
         return signScan;
204 204
     }
205
-    public void setCommentType(String commentType) 
205
+    public void setCommentType(String commentType)
206 206
     {
207 207
         this.commentType = commentType;
208 208
     }
209 209
 
210
-    public String getCommentType() 
210
+    public String getCommentType()
211 211
     {
212 212
         return commentType;
213 213
     }
@@ -244,7 +244,7 @@ public class CmcSubContract extends BaseEntity
244 244
     public String toString() {
245 245
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
246 246
             .append("subContractId", getSubContractId())
247
-            .append("contractId", getContractId())
247
+            .append("projectId", getProjectId())
248 248
             .append("subContractName", getSubContractName())
249 249
             .append("subAmount", getSubAmount())
250 250
             .append("partnerId", getPartnerId())

+ 17
- 10
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMeetingMapper.xml Datei anzeigen

@@ -14,29 +14,36 @@
14 14
         <result property="conclusion"    column="conclusion"    />
15 15
         <result property="document"    column="document"    />
16 16
         <result property="commentTime"    column="comment_time"    />
17
+        <association property="hostUser"    javaType="SysUser"         resultMap="HostUserResult" />
18
+    </resultMap>
19
+
20
+    <resultMap type="SysUser" id="HostUserResult">
21
+        <result property="userId"    column="user_id"    />
22
+        <result property="nickName"    column="nick_name"    />
17 23
     </resultMap>
18 24
 
19 25
     <sql id="selectCmcContractMeetingVo">
20
-        select meeting_id, contract_id, meeting_time, host_id, place, users, conclusion, document, comment_time from cmc_contract_meeting
26
+        select cm.meeting_id, cm.contract_id, cm.meeting_time, cm.host_id, u.nick_name as nick_name, cm.place, cm.users, cm.conclusion, cm.document, cm.comment_time from cmc_contract_meeting as cm
27
+        left join sys_user as u on u.user_id = cm.host_id
21 28
     </sql>
22 29
 
23 30
     <select id="selectCmcContractMeetingList" parameterType="CmcContractMeeting" resultMap="CmcContractMeetingResult">
24 31
         <include refid="selectCmcContractMeetingVo"/>
25 32
         <where>
26
-            <if test="contractId != null  and contractId != ''"> and contract_id = #{contractId}</if>
27
-            <if test="meetingTime != null "> and meeting_time = #{meetingTime}</if>
28
-            <if test="hostId != null "> and host_id = #{hostId}</if>
29
-            <if test="place != null  and place != ''"> and place = #{place}</if>
30
-            <if test="users != null  and users != ''"> and users = #{users}</if>
31
-            <if test="conclusion != null  and conclusion != ''"> and conclusion = #{conclusion}</if>
32
-            <if test="document != null  and document != ''"> and document = #{document}</if>
33
-            <if test="commentTime != null "> and comment_time = #{commentTime}</if>
33
+            <if test="contractId != null  and contractId != ''"> and cm.contract_id = #{contractId}</if>
34
+            <if test="meetingTime != null "> and cm.meeting_time = #{meetingTime}</if>
35
+            <if test="hostId != null "> and cm.host_id = #{hostId}</if>
36
+            <if test="place != null  and place != ''"> and cm.place = #{place}</if>
37
+            <if test="users != null  and users != ''"> and cm.users = #{users}</if>
38
+            <if test="conclusion != null  and conclusion != ''"> and cm.conclusion = #{conclusion}</if>
39
+            <if test="document != null  and document != ''"> and cm.document = #{document}</if>
40
+            <if test="commentTime != null "> and cm.comment_time = #{commentTime}</if>
34 41
         </where>
35 42
     </select>
36 43
 
37 44
     <select id="selectCmcContractMeetingByContractId" parameterType="String" resultMap="CmcContractMeetingResult">
38 45
         <include refid="selectCmcContractMeetingVo"/>
39
-        where contract_id = #{contractId}
46
+        where cm.contract_id = #{contractId}
40 47
     </select>
41 48
 
42 49
     <insert id="insertCmcContractMeeting" parameterType="CmcContractMeeting">

+ 3
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectContractMapper.xml Datei anzeigen

@@ -15,7 +15,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
15 15
 
16 16
     <select id="selectCmcProjectContractList" parameterType="CmcProjectContract" resultMap="CmcProjectContractResult">
17 17
         <include refid="selectCmcProjectContractVo"/>
18
-        <where>  
18
+        <where>
19
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
20
+            <if test="contractId != null  and contractId != ''"> and contract_id = #{contractId}</if>
19 21
         </where>
20 22
     </select>
21 23
     

+ 6
- 6
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSubContractMapper.xml Datei anzeigen

@@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
6 6
     
7 7
     <resultMap type="CmcSubContract" id="CmcSubContractResult">
8 8
         <result property="subContractId"    column="sub_contract_id"    />
9
-        <result property="contractId"    column="contract_id"    />
9
+        <result property="projectId"    column="project_id"    />
10 10
         <result property="subContractName"    column="sub_contract_name"    />
11 11
         <result property="subAmount"    column="sub_amount"    />
12 12
         <result property="partnerId"    column="partner_id"    />
@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
36 36
     </resultMap>
37 37
 
38 38
     <sql id="selectCmcSubContractVo">
39
-        select sc.sub_contract_id, sc.contract_id, sc.sub_contract_name, sc.sub_amount, sc.partner_id, sc.contact_person, sc.drafter, u.nick_name as draft_nick_name, sc.draft_time,
39
+        select sc.sub_contract_id, sc.project_id, sc.sub_contract_name, sc.sub_amount, sc.partner_id, sc.contact_person, sc.drafter, u.nick_name as draft_nick_name, sc.draft_time,
40 40
                sc.remark, sc.sign_date, sc.sign_remark, sc.sign_scan, sc.comment_type, sc.manager_comment, sc.manager_user_id, u1.nick_name as manager_nick_name, sc.manager_time from cmc_sub_contract as sc
41 41
         left join sys_user as u on u.user_id = sc.drafter
42 42
         left join sys_user as u1 on u1.user_id = sc.manager_user_id
@@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
45 45
     <select id="selectCmcSubContractList" parameterType="CmcSubContract" resultMap="CmcSubContractResult">
46 46
         <include refid="selectCmcSubContractVo"/>
47 47
         <where>  
48
-            <if test="contractId != null  and contractId != ''"> and sc.contract_id = #{contractId}</if>
48
+            <if test="projectId != null  and projectId != ''"> and sc.project_id = #{projectId}</if>
49 49
             <if test="subContractName != null  and subContractName != ''"> and sc.sub_contract_name like concat('%', sc.#{subContractName}, sc.'%')</if>
50 50
             <if test="subAmount != null "> and sc.sub_amount = #{subAmount}</if>
51 51
             <if test="partnerId != null  and partnerId != ''"> and sc.partner_id = #{partnerId}</if>
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
68 68
         insert into cmc_sub_contract
69 69
         <trim prefix="(" suffix=")" suffixOverrides=",">
70 70
             <if test="subContractId != null">sub_contract_id,</if>
71
-            <if test="contractId != null">contract_id,</if>
71
+            <if test="projectId != null">project_id,</if>
72 72
             <if test="subContractName != null">sub_contract_name,</if>
73 73
             <if test="subAmount != null">sub_amount,</if>
74 74
             <if test="partnerId != null">partner_id,</if>
@@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
86 86
          </trim>
87 87
         <trim prefix="values (" suffix=")" suffixOverrides=",">
88 88
             <if test="subContractId != null">#{subContractId},</if>
89
-            <if test="contractId != null">#{contractId},</if>
89
+            <if test="projectId != null">#{projectId},</if>
90 90
             <if test="subContractName != null">#{subContractName},</if>
91 91
             <if test="subAmount != null">#{subAmount},</if>
92 92
             <if test="partnerId != null">#{partnerId},</if>
@@ -107,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
107 107
     <update id="updateCmcSubContract" parameterType="CmcSubContract">
108 108
         update cmc_sub_contract
109 109
         <trim prefix="SET" suffixOverrides=",">
110
-            <if test="contractId != null">contract_id = #{contractId},</if>
110
+            <if test="projectId != null">project_id = #{projectId},</if>
111 111
             <if test="subContractName != null">sub_contract_name = #{subContractName},</if>
112 112
             <if test="subAmount != null">sub_amount = #{subAmount},</if>
113 113
             <if test="partnerId != null">partner_id = #{partnerId},</if>

+ 29
- 23
oa-back/sql/sql.sql
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 1
- 1
oa-ui/src/assets/icons/svg/desktop.svg Datei anzeigen

@@ -1 +1 @@
1
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1714012227825" class="icon" viewBox="0 0 4257 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2057" xmlns:xlink="http://www.w3.org/1999/xlink" width="831.4453125" height="200"><path d="M1633.307598 735.652979h-256.530279c-5.739491-0.124772-11.229438 1.996345-15.346899 5.989034-4.117461 3.992689-6.363348 9.482637-6.363348 15.222127v161.953455c0 5.739491 2.370659 11.229438 6.363348 15.222127 4.117461 3.992689 9.607408 6.113805 15.346899 5.989034H1633.307598c5.739491 0.124772 11.229438-1.996345 15.346899-5.989034 4.117461-3.992689 6.363348-9.482637 6.363349-15.222127V756.739369c0-5.739491-2.370659-11.229438-6.363349-15.222128-4.117461-3.992689-9.607408-6.113805-15.346899-5.864262z m0-258.651395h-256.530279c-11.603753 0-21.08639 9.482637-21.086389 21.08639V660.041428c0 5.739491 2.370659 11.229438 6.363348 15.222128 4.117461 3.992689 9.607408 6.113805 15.346899 5.989033H1633.307598c5.739491 0.124772 11.229438-1.996345 15.346899-5.989033 4.117461-3.992689 6.363348-9.482637 6.363349-15.222128V498.087974c0-5.739491-2.370659-11.229438-6.363349-15.222128-4.117461-3.867918-9.607408-5.989034-15.346899-5.864262z m0 0" fill="#2c2c2c" p-id="2058"></path><path d="M2215.865902 308.934324H1928.641825l-43.545266-26.576337V254.533934h126.518338c10.605581-0.124772 20.836847-4.616547 28.198367-12.22761 7.361521-7.611064 11.478981-17.967101 11.229438-28.572682v-172.18472c0.124772-10.605581-3.867918-20.961618-11.229438-28.572682-7.361521-7.611064-17.592787-12.102839-28.198367-12.227611h-315.671987c-10.605581 0.124772-20.836847 4.616547-28.198368 12.227611-7.361521 7.611064-11.478981 17.967101-11.229438 28.572682v172.18472c-0.124772 10.605581 3.867918 20.961618 11.229438 28.572682 7.361521 7.611064 17.592787 12.102839 28.198368 12.22761h127.890825v28.572682l-43.545267 26.576338H1444.777807v-4.117461l-5.489948-18.341416c-4.367004-15.845985-4.367004-32.565371 0-48.286585l9.482637-26.576337c5.240405-15.721214 7.361521-32.440599 6.113805-49.035214v-25.827708c-2.495431-14.972584-16.2203-25.453393-31.317656-23.831363h-68.000487c-13.974412 0.623858-25.578165 11.229438-27.200195 25.20385v25.827708c-1.247715 16.594614 0.873401 33.189229 6.113805 49.035214l9.482637 26.576337c4.367004 15.845985 4.367004 32.565371 0 48.286585l-5.489947 18.341416v4.11746h-162.702084c-13.101011 0.374315-23.831363 10.730352-24.455221 23.831364v68.000487c0 13.600097 10.855124 24.829536 24.455221 25.203851h24.455221c13.600097 0.374315 24.455221 11.478981 24.455221 25.20385v544.378214c0 13.600097 10.855124 24.829536 24.455221 25.20385h24.455222c13.600097-0.374315 24.455221-11.478981 24.455221-25.20385V453.170221c0-13.600097 10.855124-24.829536 24.455221-25.203851h745.135616c13.600097 0.374315 24.455221 11.478981 24.455221 25.203851v544.378213c0 13.600097 10.855124 24.829536 24.455221 25.203851h24.455221c13.600097-0.374315 24.455221-11.478981 24.455221-25.203851V453.170221c0-13.600097 10.855124-24.829536 24.455222-25.203851h24.455221c6.987206 0 13.724869-2.869745 18.590959-8.11015 4.741318-5.115633 7.236749-12.102839 6.612891-19.090045v-68.000487c0.124772-13.101011-10.605581-23.457049-23.706592-23.831364z m0 0" fill="#2c2c2c" p-id="2059"></path><path d="M2049.794987 498.087974c0-5.739491-2.370659-11.229438-6.363348-15.222128-4.117461-3.992689-9.607408-6.113805-15.346899-5.989034H1772.178318c-5.739491-0.124772-11.229438 1.996345-15.346899 5.989034-4.117461 3.992689-6.363348 9.482637-6.363348 15.222128v420.604849c0 5.739491 2.370659 11.229438 6.363348 15.222128 4.117461 3.992689 9.607408 6.113805 15.346899 5.989033h255.906422c5.739491 0.124772 11.229438-1.996345 15.346899-5.989033 4.117461-3.992689 6.363348-9.482637 6.363348-15.222128V498.087974z m0 0" fill="#2c2c2c" p-id="2060"></path></svg>
1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1714015008302" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6849" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M464.085 684.477H266.418c-4.425-0.094-8.653 1.539-11.825 4.617-3.176 3.077-4.906 7.307-4.906 11.728v124.796c0 4.421 1.828 8.65 4.906 11.728 3.172 3.077 7.4 4.711 11.825 4.617h197.667c4.425 0.094 8.653-1.539 11.825-4.617s4.903-7.307 4.903-11.728v-124.89c0-4.425-1.825-8.653-4.903-11.731-3.172-3.075-7.4-4.711-11.825-4.52z m0-199.299H266.418c-8.943 0-16.25 7.307-16.25 16.246v124.793c0 4.425 1.828 8.653 4.903 11.732 3.176 3.073 7.404 4.71 11.825 4.613h197.189c4.425 0.097 8.653-1.539 11.825-4.613 3.172-3.078 4.903-7.307 4.903-11.732V501.424c0-4.421-1.825-8.653-4.903-11.727a16.687 16.687 0 0 0-11.825-4.519z m0 0" p-id="6850"></path><path d="M912.973 355.671H691.655l-33.557-20.475v-21.441h97.488c8.173-0.094 16.058-3.556 21.728-9.422 5.674-5.866 8.845-13.846 8.653-22.017V149.641c0.098-8.173-2.979-16.152-8.653-22.018-5.67-5.865-13.556-9.323-21.728-9.421H512.349c-8.172 0.098-16.058 3.556-21.727 9.421-5.674 5.866-8.846 13.846-8.654 22.018v132.674c-0.097 8.172 2.98 16.152 8.654 22.017 5.669 5.866 13.556 9.327 21.727 9.422h98.546v22.017l-33.553 20.479H318.814v-3.176l-4.229-14.132c-3.367-12.209-3.367-25.092 0-37.207l7.307-20.479c4.037-12.111 5.67-24.997 4.71-37.782v-19.903c-1.922-11.536-12.498-19.614-24.132-18.361h-52.396c-10.767 0.478-19.711 8.65-20.96 19.418v19.903c-0.963 12.785 0.673 25.573 4.71 37.783l7.307 20.479c3.367 12.208 3.367 25.095 0 37.207l-4.228 14.135v3.172H111.53c-10.094 0.286-18.36 8.266-18.842 18.361v52.399c0 10.478 8.364 19.132 18.842 19.422h18.847c10.478 0.286 18.842 8.846 18.842 19.418v419.469c0 10.478 8.364 19.133 18.847 19.422h18.842c10.478-0.289 18.847-8.845 18.847-19.422V466.814c0-10.478 8.363-19.133 18.842-19.422h574.162c10.478 0.289 18.842 8.845 18.842 19.422v419.469c0 10.478 8.364 19.132 18.847 19.418h18.842c10.479-0.286 18.842-8.846 18.842-19.418V466.814c0-10.478 8.368-19.133 18.847-19.422h18.842a19.519 19.519 0 0 0 14.327-6.25c3.653-3.938 5.576-9.323 5.094-14.707v-52.399c0.095-10.095-8.175-18.075-18.269-18.365z m0 0" p-id="6851"></path><path d="M785.008 501.424c0-4.421-1.828-8.653-4.906-11.727-3.172-3.078-7.4-4.715-11.825-4.617H571.092c-4.424-0.098-8.653 1.538-11.825 4.617-3.176 3.074-4.903 7.306-4.903 11.727V825.52c0 4.421 1.825 8.653 4.903 11.727 3.172 3.078 7.401 4.715 11.825 4.617h197.185c4.425 0.098 8.653-1.538 11.825-4.617 3.176-3.073 4.906-7.306 4.906-11.727V501.424z m0 0" p-id="6852"></path></svg>

+ 1
- 0
oa-ui/src/assets/icons/svg/equipment.svg Datei anzeigen

@@ -0,0 +1 @@
1
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1714016041240" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8219" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M869 119.3H156.8c-36.4 0-66 29.6-66 66v657.9c0 36.4 29.6 66 66 66H869c36.4 0 66-29.6 66-66V185.3c0-36.4-29.6-66-66-66z m-4 70v176.6H160.8V189.3H865z m0 246.6V602H160.8V435.9H865zM160.8 839.2V672H865v167.2H160.8z" p-id="8220"></path><path d="M723.5 317.8h43c19.3 0 35-15.7 35-35s-15.7-35-35-35h-43c-19.3 0-35 15.7-35 35s15.7 35 35 35zM723.5 553.9h43c19.3 0 35-15.7 35-35s-15.7-35-35-35h-43c-19.3 0-35 15.7-35 35 0 19.4 15.7 35 35 35zM766.5 720.1h-43c-19.3 0-35 15.7-35 35s15.7 35 35 35h43c19.3 0 35-15.7 35-35 0-19.4-15.7-35-35-35z" p-id="8221"></path></svg>

+ 165
- 89
oa-ui/src/views/flowable/form/contractForm.vue Datei anzeigen

@@ -2,53 +2,81 @@
2 2
   <div class="app-container">
3 3
     <el-row :gutter="20">
4 4
       <el-col :span="18" :xs="24">
5
+        <h2 class="text-center">承接合同评审表</h2>
6
+        <el-divider></el-divider>
5 7
         <el-form ref="form" :model="form" :rules="rules" label-width="130px">
6
-          <el-form-item label="项目名称:" prop="tenderName">
7
-            <el-select v-model="form.tenderId" filterable placeholder="请选择" @change="handleSelectTender"
8
-              :disabled="taskName != '合同拟稿'" clearable>
9
-              <el-option v-for="item in tenderList" :key="item.value" :label="item.projectName" :value="item.tenderId">
10
-              </el-option>
11
-            </el-select>
12
-            <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
13
-              <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseTender.projectName
14
-              }}</el-descriptions-item>
15
-              <el-descriptions-item label="项目来源" label-class-name="my-label">{{ getProjectSource(chooseTender)
16
-              }}</el-descriptions-item>
17
-              <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseTender.partyA
18
-              }}</el-descriptions-item>
19
-              <el-descriptions-item label="联系人" label-class-name="my-label">{{ chooseTender.aPerson
20
-              }}</el-descriptions-item>
21
-              <el-descriptions-item label="联系电话" label-class-name="my-label">{{ chooseTender.aPhone
22
-              }}</el-descriptions-item>
23
-            </el-descriptions>
24
-          </el-form-item>
25
-          <el-row>
26
-            <el-col :span="6">
27
-              <el-form-item label="合同编码" prop="contractCode">
28
-                <el-input v-model="form.contractCode" :disabled="true"></el-input>
29
-              </el-form-item>
30
-            </el-col>
31
-            <el-col :span="6">
32
-              <el-form-item label="合同编号" prop="contractNumber">
33
-                <el-input v-model="form.contractNumber" placeholder="请输入合同编号" :disabled="taskName != '合同拟稿'"></el-input>
34
-              </el-form-item>
35
-            </el-col>
36
-          </el-row>
37
-          <el-row>
38
-            <el-col :span="6">
39
-              <el-form-item label="合同金额" prop="amount">
40
-                <el-input v-model="form.amount" placeholder="请输入合同金额" :disabled="taskName != '合同拟稿'" />
8
+          <el-row :gutter="20">
9
+            <el-col :span="12" :xs="24">
10
+              <el-form-item label="投标项目名称:" prop="tenderName">
11
+                <el-select v-model="form.tenderId" filterable placeholder="请选择" @change="handleSelectTender"
12
+                  :disabled="taskName != '合同拟稿'" clearable>
13
+                  <el-option v-for="item in tenderList" :key="item.value" :label="item.projectName"
14
+                    :value="item.tenderId">
15
+                  </el-option>
16
+                </el-select>
17
+                <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="2" direction="vertical">
18
+                  <el-descriptions-item label="项目名称" label-class-name="my-label" :span="2">{{ chooseTender.projectName
19
+                  }}</el-descriptions-item>
20
+                  <el-descriptions-item label="项目来源" label-class-name="my-label">{{ getProjectSource(chooseTender)
21
+                  }}</el-descriptions-item>
22
+                  <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseTender.partyA
23
+                  }}</el-descriptions-item>
24
+                  <el-descriptions-item label="联系人" label-class-name="my-label">{{ chooseTender.aPerson
25
+                  }}</el-descriptions-item>
26
+                  <el-descriptions-item label="联系电话" label-class-name="my-label">{{ chooseTender.aPhone
27
+                  }}</el-descriptions-item>
28
+                </el-descriptions>
41 29
               </el-form-item>
30
+
31
+              <el-row :gutter="20">
32
+                <el-col :span="12" :xs="24">
33
+                  <el-form-item label="合同编码" prop="contractCode">
34
+                    <el-input v-model="form.contractCode" placeholder="请输入合同编码" :disabled="taskName != '合同拟稿'"></el-input>
35
+                  </el-form-item>
36
+                </el-col>
37
+                <el-col :span="12" :xs="24">
38
+                  <el-form-item label="合同编号" prop="contractNumber">
39
+                    <el-input v-model="form.contractNumber" placeholder="请输入合同编号"
40
+                      :disabled="taskName != '合同拟稿'"></el-input>
41
+                  </el-form-item>
42
+                </el-col>
43
+              </el-row>
44
+              <el-row :gutter="20">
45
+                <el-col :span="12" :xs="24">
46
+                  <el-form-item label="合同金额" prop="amount">
47
+                    <el-input v-model="form.amount" placeholder="请输入合同金额" :disabled="taskName != '合同拟稿'" />
48
+                  </el-form-item>
49
+                </el-col>
50
+                <el-col :span="12" :xs="24">
51
+                  <el-form-item label="履约保证金" prop="deposit">
52
+                    <el-input v-model="form.deposit" placeholder="请输入履约保证金" :disabled="taskName != '合同拟稿'" />
53
+                  </el-form-item>
54
+                </el-col>
55
+              </el-row>
42 56
             </el-col>
43
-            <el-col :span="6">
44
-              <el-form-item label="履约保证金" prop="deposit">
45
-                <el-input v-model="form.deposit" placeholder="请输入履约保证金" :disabled="taskName != '合同拟稿'" />
57
+
58
+            <el-col :span="12" :xs="24">
59
+              <el-form-item label="关联项目编号:" prop="projectIds">
60
+                <el-select v-model="projectContractForm.projectIds" multiple filterable placeholder="请选择"
61
+                  @change="handleSelectProject" :disabled="taskName != '合同拟稿'" clearable>
62
+                  <el-option v-for="item in projectList" :key="item.value" :label="item.projectNumber + item.projectName"
63
+                    :value="item.projectId">
64
+                  </el-option>
65
+                </el-select>
46 66
               </el-form-item>
67
+              <el-table v-loading="loading" :data="chooseProjectList">
68
+                <el-table-column label="项目编号" align="center" prop="projectNumber"></el-table-column>
69
+                <el-table-column label="项目名称" align="center" prop="projectName"></el-table-column>
70
+                <el-table-column label="项目负责人" align="center" prop="projectLeaderUser.nickName"></el-table-column>
71
+                <el-table-column label="承担部门" align="center" prop="undertakingDeptName"></el-table-column>
72
+              </el-table>
47 73
             </el-col>
74
+
48 75
           </el-row>
49 76
           <el-form-item label="合同文件" prop="contractDocument">
50 77
             <el-input v-model="form.contractDocument" placeholder="请输入合同文件" :disabled="taskName != '合同拟稿'" />
51 78
           </el-form-item>
79
+          <el-divider></el-divider>
52 80
           <el-form-item label="合同计划工作量:">
53 81
             <table border="1">
54 82
               <tr>
@@ -215,19 +243,19 @@
215 243
                 <td>评审时间</td>
216 244
                 <td>
217 245
                   <el-date-picker clearable v-model="meetingForm.meetingTime" type="date" value-format="yyyy-MM-dd"
218
-                    placeholder="请选择评审日期">
246
+                    placeholder="请选择评审日期" :disabled="taskName != '合同拟稿'">
219 247
                   </el-date-picker>
220 248
                 </td>
221 249
                 <td>评审地点</td>
222 250
                 <td>
223
-                  <el-select v-model="meetingForm.place" clearable style="width:120px">
251
+                  <el-select v-model="meetingForm.place" clearable style="width:120px" :disabled="taskName != '合同拟稿'">
224 252
                     <el-option v-for="item in placeList" :key="item.id" :label="item.name" :value="item.id">
225 253
                     </el-option>
226 254
                   </el-select>
227 255
                 </td>
228 256
                 <td>评审主持人</td>
229 257
                 <td>
230
-                  <el-select v-model="meetingForm.hostId" clearable style="width:120px">
258
+                  <el-select v-model="meetingForm.hostId" clearable style="width:120px" :disabled="taskName != '合同拟稿'">
231 259
                     <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId">
232 260
                     </el-option>
233 261
                   </el-select>
@@ -236,7 +264,8 @@
236 264
               <tr>
237 265
                 <td>参与评审人员</td>
238 266
                 <td colspan="5">
239
-                  <el-select v-model="meetingForm.users" multiple clearable style="width:600px">
267
+                  <el-select v-model="meetingForm.users" multiple clearable style="width:600px"
268
+                    :disabled="taskName != '合同拟稿'">
240 269
                     <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId">
241 270
                     </el-option>
242 271
                   </el-select>
@@ -245,19 +274,23 @@
245 274
               <tr>
246 275
                 <td>评审意见表</td>
247 276
                 <td colspan="5">
248
-                  <el-input v-model="meetingForm.document" clearable></el-input>
277
+                  <el-input v-model="meetingForm.document" clearable :disabled="taskName != '会议评审'"></el-input>
249 278
                 </td>
250 279
               </tr>
251 280
               <tr>
252 281
                 <td>评审结论</td>
253 282
                 <td colspan="5">
254
-                  <el-input type="textarea" v-model="meetingForm.conclusion" clearable></el-input>
283
+                  <el-input type="textarea" v-model="meetingForm.conclusion" clearable
284
+                    :disabled="taskName != '会议评审'"></el-input>
255 285
                 </td>
256 286
               </tr>
257 287
               <tr>
288
+                <td colspan="2"></td>
289
+                <td>主持人签名</td>
258 290
                 <td>
259
-                  <span class="auditor"> {{ meetingForm.User ? meetingForm.User.nickName : meetingUser }} </span>
291
+                  <span class="auditor"> {{ meetingForm.hostUser ? meetingForm.hostUser.nickName : hostUser }} </span>
260 292
                 </td>
293
+                <td>日期</td>
261 294
                 <td>
262 295
                   <span> {{ meetingForm.commentTime ? meetingForm.commentTime : commentTime }} </span>
263 296
                 </td>
@@ -311,13 +344,15 @@
311 344
 
312 345
 <script>
313 346
 import { parseTime } from "@/utils/ruoyi";
347
+import { listProject, getProject } from "@/api/oa/project/project";
314 348
 import { listDept } from '@/api/system/dept'
315 349
 import { listUser } from '@/api/system/user'
316 350
 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
317 351
 import { getContractWork, addContractWork } from "@/api/oa/contract/contractWork";
318 352
 import { getContractPayment, addContractPayment } from "@/api/oa/contract/contractPayment";
319 353
 import { getContractComment, addContractComment, updateContractComment } from "@/api/oa/contract/contractComment";
320
-import { getContractMeeting, addContractMeeting } from "@/api/oa/contract/contractMeeting";
354
+import { getContractMeeting, addContractMeeting, updateContractMeeting } from "@/api/oa/contract/contractMeeting";
355
+import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
321 356
 import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm, } from "@/api/flowable/todo";
322 357
 import { listTender, getTender } from "@/api/oa/tender/tender";
323 358
 import { getUsersDeptLeader, getUsersManageLeader, getUsersDeptLeaderByDept } from '@/api/system/post.js'
@@ -344,6 +379,8 @@ export default {
344 379
       draftTime: undefined,
345 380
       managerUser: '',
346 381
       managerTime: undefined,
382
+      hostUser: '',
383
+      commentTime: undefined,
347 384
       // 遮罩层
348 385
       loading: true,
349 386
       // 选中数组
@@ -379,14 +416,25 @@ export default {
379 416
       },
380 417
       // 表单参数
381 418
       form: {},
382
-      meetingForm: {},
419
+      meetingForm: {
420
+        users: [],
421
+      },
422
+      projectContractForm: {
423
+        projectIds: [],
424
+      },
383 425
       // 表单校验
384 426
       rules: {
427
+        contractCode: [
428
+          { required: true, message: '请输入合同编码', trigger: 'blur' },
429
+        ],
385 430
       },
386 431
       meetingOpen: false,
387 432
       commentOpen: false,
433
+      chooseProjectList: [],
434
+      projectList: [],
388 435
       deptList: [],
389 436
       userList: [],
437
+      users: undefined,
390 438
       workList: [{
391 439
         content: "",
392 440
         scale: "",
@@ -402,7 +450,7 @@ export default {
402 450
         paymentTime: undefined,
403 451
         remark: "",
404 452
       }],
405
-      placeList: [{ id: 0, name: '301会议室' }, { id: 1, name: '216会议室' }],
453
+      placeList: [{ id: '0', name: '301会议室' }, { id: '1', name: '216会议室' }],
406 454
       commentList: [
407 455
         {
408 456
           deptId: 105,
@@ -446,10 +494,15 @@ export default {
446 494
       this.draftUser = this.$store.getters.name;
447 495
       this.draftTime = parseTime(new Date(), '{y}-{m}-{d}')
448 496
     }
497
+    else if (this.taskName == '会议评审') {
498
+      this.hostUser = this.$store.getters.name;
499
+      this.commentTime = parseTime(new Date(), '{y}-{m}-{d}')
500
+    }
449 501
     else if (this.taskName == '分管审核') {
450 502
       this.managerUser = this.$store.getters.name;
451 503
       this.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
452 504
     }
505
+    this.getProjectList();
453 506
     this.getDeptList();
454 507
     this.getTenderList();
455 508
     this.getUserList();
@@ -513,9 +566,31 @@ export default {
513 566
             }
514 567
           });
515 568
           getContractMeeting(this.taskForm.formId).then(res => {
516
-            if (res.data)
517
-              this.meetingForm = res.data;
569
+            if (res.data) {
570
+              let data = res.data;
571
+              if (res.data.users == null || res.data.users == undefined || res.data.users == "") {
572
+                data.users = []
573
+              } else {
574
+                data.users = data.users.split(',');
575
+                let arr = []
576
+                for (let d of data.users) {
577
+                  arr.push(parseInt(d))
578
+                }
579
+                data.users = arr;
580
+              }
581
+              this.meetingForm = data;
582
+            }
518 583
           });
584
+          listProjectContract({ contractId: this.taskForm.formId }).then(res => {
585
+            if (res.rows) {
586
+              for (let row of res.rows) {
587
+                this.projectContractForm.projectIds.push(row.projectId);
588
+                getProject(row.projectId).then(response => {
589
+                  this.chooseProjectList.push(response.data)
590
+                })
591
+              }
592
+            }
593
+          })
519 594
         }
520 595
       })
521 596
     },
@@ -528,6 +603,16 @@ export default {
528 603
         this.loading = false;
529 604
       });
530 605
     },
606
+    // 查询项目列表
607
+    getProjectList() {
608
+      this.loading = true
609
+      listProject({
610
+        pageNum: 1,
611
+        pageSize: 99999999
612
+      }).then(response => {
613
+        this.projectList = response.rows;
614
+      })
615
+    },
531 616
     getUserList() {
532 617
       listUser({ pageSize: 9999, pageNum: 1 }).then(res => {
533 618
         this.userList = res.rows
@@ -554,7 +639,6 @@ export default {
554 639
         getTender(val).then(res => {
555 640
           this.chooseTender = res.data;
556 641
           this.isSelect = true;
557
-          this.getContractCode(this.chooseTender)
558 642
         })
559 643
       } else {
560 644
         this.isSelect = false
@@ -577,39 +661,6 @@ export default {
577 661
       let partyAList = ['中国电建集团成都勘测设计研究院勘测设计分公司', '成勘院 水环境与城建工程分公司'];
578 662
       return partyAList.indexOf(chooseTender.partyA) != -1 ? '院内' : '院外';
579 663
     },
580
-    getContractCode(chooseTender) {
581
-      let contractCode = '';
582
-      if (chooseTender) {
583
-        if (this.getProjectSource(chooseTender) == '院内') {
584
-          listContract({ contractCode: 'C' }).then(res => {
585
-            if (res.total == 0)
586
-              contractCode = 'HT' + new Date().getFullYear() + 'C' + '001';
587
-            else
588
-              contractCode = 'HT' + new Date().getFullYear() + 'C' + this.fillZero(Number(res.rows[0].contractCode.substring(7, 10)) + 1);
589
-            this.$set(this.form, 'contractCode', contractCode);
590
-          })
591
-        }
592
-        else {
593
-          listContract({ contractCode: 'W' }).then(res => {
594
-            if (res.total == 0)
595
-              contractCode = 'HT' + new Date().getFullYear() + 'W' + '001';
596
-            else
597
-              contractCode = 'HT' + new Date().getFullYear() + 'W' + this.fillZero(Number(res.rows[0].contractCode.substring(7, 10)) + 1);
598
-            this.$set(this.form, 'contractCode', contractCode);
599
-          })
600
-        }
601
-      }
602
-    },
603
-    fillZero(number) {
604
-      let fullNumber = '';
605
-      if (number < 10)
606
-        fullNumber = '00' + number;
607
-      else if (number >= 10 & number < 100)
608
-        fullNumber = '0' + number;
609
-      else
610
-        fullNumber = number;
611
-      return fullNumber;
612
-    },
613 664
     addWorkList() {
614 665
       this.workList.push({
615 666
         content: "",
@@ -692,6 +743,14 @@ export default {
692 743
         }
693 744
       })
694 745
     },
746
+    handleSelectProject() {
747
+      this.chooseProjectList = [];
748
+      for (let projectId of this.projectContractForm.projectIds) {
749
+        getProject(projectId).then(res => {
750
+          this.chooseProjectList.push(res.data)
751
+        })
752
+      }
753
+    },
695 754
     // 表单重置
696 755
     reset() {
697 756
       this.form = {
@@ -778,9 +837,20 @@ export default {
778 837
               }
779 838
               else if (this.taskName == '会议评审') {
780 839
                 this.meetingForm.contractId = this.form.contractId;
781
-                addContractMeeting(this.meetingForm);
782
-                this.$set(this.taskForm.variables, "approval", this.meetingForm.hostId);
783
-                this.$set(this.taskForm.variables, "commentType", '1');
840
+                let formData = new FormData();
841
+                let jsonForm = JSON.stringify(this.meetingForm);
842
+                formData.append("form", jsonForm);
843
+                updateContractMeeting(formData);
844
+                getUsersManageLeader({ userId: this.form.drafter }).then(res => {
845
+                  let userId = res.data.userId;
846
+                  this.$set(this.taskForm.variables, "approval", userId);
847
+                  complete(this.taskForm).then(response => {
848
+                    this.$modal.msgSuccess(response.msg);
849
+                    this.$emit('goBack')
850
+                  });
851
+                })
852
+              }
853
+              else if (this.taskName == '合同签订') {
784 854
                 complete(this.taskForm).then(response => {
785 855
                   this.$modal.msgSuccess(response.msg);
786 856
                   this.$emit('goBack')
@@ -802,6 +872,9 @@ export default {
802 872
               payment.contractId = this.form.contractId
803 873
               addContractPayment(payment);
804 874
             }
875
+            for (let projectId of this.projectContractForm.projectIds) {
876
+              addProjectContract({projectId: projectId, contractId: this.form.contractId});
877
+            }
805 878
             const params = { taskId: this.taskForm.taskId };
806 879
             getNextFlowNode(params).then(res => {
807 880
               if (this.commentOpen == false && this.meetingOpen == false) {
@@ -831,7 +904,10 @@ export default {
831 904
               }
832 905
               else if (this.commentOpen == false && this.meetingOpen == true) {
833 906
                 this.meetingForm.contractId = this.form.contractId;
834
-                addContractMeeting(this.meetingForm);
907
+                let formData = new FormData();
908
+                let jsonForm = JSON.stringify(this.meetingForm);
909
+                formData.append("form", jsonForm);
910
+                addContractMeeting(formData);
835 911
                 this.$set(this.taskForm.variables, "approval", this.meetingForm.hostId);
836 912
                 this.$set(this.taskForm.variables, "commentType", '1');
837 913
                 complete(this.taskForm).then(response => {
@@ -864,7 +940,7 @@ export default {
864 940
 }
865 941
 </script>
866 942
 
867
-<style>
943
+<style lang="scss" scoped>
868 944
 table {
869 945
   /*居中*/
870 946
   margin: 0 auto;

+ 47
- 3
oa-ui/src/views/flowable/form/subContract.vue Datei anzeigen

@@ -2,9 +2,29 @@
2 2
   <div class="app-container">
3 3
     <el-row :gutter="20">
4 4
       <el-col :span="18" :xs="24">
5
+        <h2 class="text-center">分包合同评审表</h2>
5 6
         <el-form ref="form" :model="form" :rules="rules" label-width="80px">
6
-          <el-form-item label="主合同id" prop="contractId">
7
-            <el-input v-model="form.contractId" placeholder="请输入主合同id" />
7
+          <el-form-item label="项目编号:" prop="projectId">
8
+            <el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
9
+              :disabled="taskName != '合同拟稿'" clearable>
10
+              <el-option v-for="item in projectList" :key="item.value" :label="item.projectNumber"
11
+                :value="item.projectId">
12
+              </el-option>
13
+            </el-select>
14
+            <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
15
+              <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
16
+              }}</el-descriptions-item>
17
+              <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
18
+              }}</el-descriptions-item>
19
+              <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
20
+                chooseProject.projectLeaderUser.nickName : ''
21
+              }}</el-descriptions-item>
22
+              <el-descriptions-item label="承担部门" label-class-name="my-label">
23
+                <el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
24
+              </el-descriptions-item>
25
+              <el-descriptions-item label="项目类型" label-class-name="my-label">{{ chooseProject.projectType
26
+              }}</el-descriptions-item>
27
+            </el-descriptions>
8 28
           </el-form-item>
9 29
           <el-form-item label="合同名称" prop="subContractName">
10 30
             <el-input v-model="form.subContractName" placeholder="请输入合同名称" />
@@ -63,6 +83,7 @@
63 83
 
64 84
 <script>
65 85
 import { parseTime } from "@/utils/ruoyi";
86
+import { listProject, getProject } from "@/api/oa/project/project";
66 87
 import { listSubContract, getSubContract, delSubContract, addSubContract, updateSubContract } from "@/api/oa/contract/subContract";
67 88
 import flow from '@/views/flowable/task/todo/detail/flow'
68 89
 import { flowXmlAndNode } from "@/api/flowable/definition";
@@ -83,7 +104,7 @@ export default {
83 104
   name: "SubContract",
84 105
   data() {
85 106
     return {
86
-      drafter:'',
107
+      drafter: '',
87 108
       draftTime: undefined,
88 109
       // 遮罩层
89 110
       loading: true,
@@ -135,6 +156,7 @@ export default {
135 156
       this.drafter = this.$store.getters.name;
136 157
       this.draftTime = parseTime(new Date(), '{y}-{m}-{d}')
137 158
     }
159
+    this.getProjectList();
138 160
     this.getList();
139 161
     flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
140 162
       this.flowData = res.data;
@@ -150,6 +172,28 @@ export default {
150 172
         this.loading = false;
151 173
       });
152 174
     },
175
+    // 查询项目列表
176
+    getProjectList() {
177
+      this.loading = true
178
+      listProject({
179
+        pageNum: 1,
180
+        pageSize: 99999999
181
+      }).then(response => {
182
+        this.projectList = response.rows;
183
+      })
184
+    },
185
+    // 选择项目
186
+    handleSelectProject(val) {
187
+      if (val != "" && val != undefined && val != null) {
188
+        getProject(val).then(res => {
189
+          this.chooseProject = res.data;
190
+          this.isSelect = true
191
+        })
192
+      } else {
193
+        this.isSelect = false
194
+      }
195
+
196
+    },
153 197
     // 取消按钮
154 198
     cancel() {
155 199
       this.open = false;

Laden…
Abbrechen
Speichern