Browse Source

品牌项目支付、保证金申请、成果归档流程

lamphua 1 year ago
parent
commit
603238552e
28 changed files with 1023 additions and 239 deletions
  1. 17
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcArchiveController.java
  2. 3
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandController.java
  3. 5
    2
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandPaymentController.java
  4. 11
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDepositController.java
  5. 1
    1
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcTechnicalController.java
  6. 20
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  7. 46
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcArchive.java
  8. 14
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBrand.java
  9. 11
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContract.java
  10. 48
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeposit.java
  11. 22
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcProject.java
  12. 8
    23
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcSettleSummary.java
  13. 50
    20
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcArchiveMapper.xml
  14. 6
    1
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBrandMapper.xml
  15. 17
    2
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMapper.xml
  16. 48
    21
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDepositMapper.xml
  17. 18
    1
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml
  18. 6
    11
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleSummaryMapper.xml
  19. 8
    7
      oa-back/sql/sql.sql
  20. 18
    0
      oa-ui/src/api/system/post.js
  21. 206
    59
      oa-ui/src/views/flowable/form/archiveForm.vue
  22. 32
    21
      oa-ui/src/views/flowable/form/borrowForm.vue
  23. 142
    7
      oa-ui/src/views/flowable/form/brandForm.vue
  24. 0
    1
      oa-ui/src/views/flowable/form/contractForm.vue
  25. 264
    61
      oa-ui/src/views/flowable/form/depositForm.vue
  26. 1
    0
      oa-ui/src/views/flowable/form/safeForm.vue
  27. 0
    1
      oa-ui/src/views/flowable/form/subContract.vue
  28. 1
    0
      oa-ui/src/views/flowable/form/technicalForm.vue

+ 17
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcArchiveController.java View File

@@ -1,5 +1,6 @@
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
 import org.springframework.beans.factory.annotation.Autowired;
@@ -82,6 +83,22 @@ public class CmcArchiveController extends BaseController
82 83
     @PutMapping
83 84
     public AjaxResult edit(@RequestBody CmcArchive cmcArchive)
84 85
     {
86
+        if (cmcArchive.getProduceComment() != null && cmcArchive.getQualityComment() == null) {
87
+            cmcArchive.setProduceInspector(getLoginUser().getUserId());
88
+            cmcArchive.setProduceTime(new Date());
89
+        }
90
+        else if (cmcArchive.getQualityComment() != null && cmcArchive.getDeptComment() == null) {
91
+            cmcArchive.setQualityInspector(getLoginUser().getUserId());
92
+            cmcArchive.setQualityTime(new Date());
93
+        }
94
+        else if (cmcArchive.getDeptComment() != null && cmcArchive.getArchiveComment() == null) {
95
+            cmcArchive.setDeptLeader(getLoginUser().getUserId());
96
+            cmcArchive.setDeptTime(new Date());
97
+        }
98
+        else if (cmcArchive.getArchiveComment() != null) {
99
+            cmcArchive.setArchiver(getLoginUser().getUserId());
100
+            cmcArchive.setArchiveTime(new Date());
101
+        }
85 102
         return toAjax(cmcArchiveService.updateCmcArchive(cmcArchive));
86 103
     }
87 104
 

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandController.java View File

@@ -1,5 +1,6 @@
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
 import org.springframework.beans.factory.annotation.Autowired;
@@ -82,6 +83,8 @@ public class CmcBrandController extends BaseController
82 83
     @PutMapping
83 84
     public AjaxResult edit(@RequestBody CmcBrand cmcBrand)
84 85
     {
86
+        cmcBrand.setCwUserId(getLoginUser().getUserId());
87
+        cmcBrand.setCwTime(new Date());
85 88
         return toAjax(cmcBrandService.updateCmcBrand(cmcBrand));
86 89
     }
87 90
 

+ 5
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandPaymentController.java View File

@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.oa;
2 2
 
3 3
 import java.util.List;
4 4
 import javax.servlet.http.HttpServletResponse;
5
+
6
+import com.ruoyi.common.utils.SnowFlake;
5 7
 import org.springframework.beans.factory.annotation.Autowired;
6 8
 import org.springframework.web.bind.annotation.GetMapping;
7 9
 import org.springframework.web.bind.annotation.PostMapping;
@@ -70,8 +72,9 @@ public class CmcBrandPaymentController extends BaseController
70 72
      */
71 73
     @Log(title = "cmc品牌项目支付记录", businessType = BusinessType.INSERT)
72 74
     @PostMapping
73
-    public AjaxResult add(@RequestBody CmcBrandPayment cmcBrandPayment)
74
-    {
75
+    public AjaxResult add(@RequestBody CmcBrandPayment cmcBrandPayment) throws InterruptedException {
76
+        Thread.sleep(1);
77
+        cmcBrandPayment.setBrandPaymentId(new SnowFlake().generateId());
75 78
         return toAjax(cmcBrandPaymentService.insertCmcBrandPayment(cmcBrandPayment));
76 79
     }
77 80
 

+ 11
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDepositController.java View File

@@ -1,7 +1,10 @@
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;
6
+
7
+import liquibase.pro.packaged.D;
5 8
 import org.springframework.beans.factory.annotation.Autowired;
6 9
 import org.springframework.web.bind.annotation.GetMapping;
7 10
 import org.springframework.web.bind.annotation.PostMapping;
@@ -82,6 +85,14 @@ public class CmcDepositController extends BaseController
82 85
     @PutMapping
83 86
     public AjaxResult edit(@RequestBody CmcDeposit cmcDeposit)
84 87
     {
88
+        if (cmcDeposit.getManagerComment() != null && cmcDeposit.getRemitTime() == null) {
89
+            cmcDeposit.setManagerUserId(getLoginUser().getUserId());
90
+            cmcDeposit.setManagerTime(new Date());
91
+        }
92
+        if (cmcDeposit.getRemitTime() != null) {
93
+            cmcDeposit.setCwUserId(getLoginUser().getUserId());
94
+            cmcDeposit.setCwTime(new Date());
95
+        }
85 96
         return toAjax(cmcDepositService.updateCmcDeposit(cmcDeposit));
86 97
     }
87 98
 

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcTechnicalController.java View File

@@ -84,7 +84,7 @@ public class CmcTechnicalController extends BaseController
84 84
     @PutMapping
85 85
     public AjaxResult edit(@RequestBody CmcTechnical cmcTechnical)
86 86
     {
87
-        if (cmcTechnical.getDesignDescription() != null) {
87
+        if (cmcTechnical.getTechnicalDocument() != null) {
88 88
             cmcTechnical.setTechnicalUploadTime(new Date());
89 89
         }
90 90
         if (cmcTechnical.getTechnicalComment() != null) {

+ 20
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java View File

@@ -78,6 +78,16 @@ public class SysPostController extends BaseController
78 78
         return success(deptLeader);
79 79
     }
80 80
 
81
+    /**
82
+     * 获取部门副主任
83
+     */
84
+    @GetMapping("/deptViceLeader")
85
+    public AjaxResult getViceDeptLeader(String userId)
86
+    {
87
+        SysUser deptLeader = postService.selectViceDeptLeaderByUserId(userId);
88
+        return success(deptLeader);
89
+    }
90
+
81 91
     /**
82 92
      * 通过deptId获取部门主任
83 93
      */
@@ -90,6 +100,16 @@ public class SysPostController extends BaseController
90 100
         return success(deptLeader);
91 101
     }
92 102
 
103
+    /**
104
+     * 通过deptId获取部门副主任
105
+     */
106
+    @GetMapping("/deptViceLeaderByDept")
107
+    public AjaxResult getViceDeptLeaderByDeptId(String deptId)
108
+    {
109
+        SysUser deptLeader = postService.selectViceDeptLeaderByDeptId(deptId);
110
+        return success(deptLeader);
111
+    }
112
+
93 113
     /**
94 114
      * 通过userId获取分管领导
95 115
      */

+ 46
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcArchive.java View File

@@ -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;
@@ -57,6 +58,14 @@ public class CmcArchive extends BaseEntity
57 58
     @Excel(name = "归档人")
58 59
     private Long archiver;
59 60
 
61
+    private SysUser produceUser;
62
+
63
+    private SysUser qualityUser;
64
+
65
+    private SysUser deptUser;
66
+
67
+    private SysUser archiveUser;
68
+
60 69
     /** 资料接收时间 */
61 70
     @JsonFormat(pattern = "yyyy-MM-dd")
62 71
     @Excel(name = "资料接收时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -269,6 +278,43 @@ public class CmcArchive extends BaseEntity
269 278
     {
270 279
         return archiveComment;
271 280
     }
281
+    public void setProduceUser(SysUser produceUser)
282
+    {
283
+        this.produceUser = produceUser;
284
+    }
285
+
286
+    public SysUser getProduceUser()
287
+    {
288
+        return produceUser;
289
+    }
290
+    public void setQualityUser(SysUser qualityUser)
291
+    {
292
+        this.qualityUser = qualityUser;
293
+    }
294
+
295
+    public SysUser getQualityUser()
296
+    {
297
+        return qualityUser;
298
+    }
299
+    public void setDeptUser(SysUser deptUser)
300
+    {
301
+        this.deptUser = deptUser;
302
+    }
303
+
304
+    public SysUser getDeptUser()
305
+    {
306
+        return deptUser;
307
+    }
308
+    public void setArchiveUser(SysUser archiveUser)
309
+    {
310
+        this.archiveUser = archiveUser;
311
+    }
312
+
313
+    public SysUser getArchiveUser()
314
+    {
315
+        return archiveUser;
316
+    }
317
+
272 318
 
273 319
     @Override
274 320
     public String toString() {

+ 14
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBrand.java View File

@@ -44,6 +44,11 @@ public class CmcBrand extends BaseEntity
44 44
     @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
45 45
     private Date applyTime;
46 46
 
47
+    /** 反馈时间 */
48
+    @JsonFormat(pattern = "yyyy-MM-dd")
49
+    @Excel(name = "反馈时间", width = 30, dateFormat = "yyyy-MM-dd")
50
+    private Date cwTime;
51
+
47 52
     /** 财务部经办人 */
48 53
     @Excel(name = "财务部经办人")
49 54
     private Long cwUserId;
@@ -113,6 +118,15 @@ public class CmcBrand extends BaseEntity
113 118
     {
114 119
         return applyTime;
115 120
     }
121
+    public void setCwTime(Date cwTime)
122
+    {
123
+        this.cwTime = cwTime;
124
+    }
125
+
126
+    public Date getCwTime()
127
+    {
128
+        return cwTime;
129
+    }
116 130
     public void setCwUserId(Long cwUserId) 
117 131
     {
118 132
         this.cwUserId = cwUserId;

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContract.java View File

@@ -33,6 +33,9 @@ public class CmcContract extends BaseEntity
33 33
     /** 投标项目 */
34 34
     private String tenderId;
35 35
 
36
+    /** 投标项目 */
37
+    private CmcTender tender;
38
+
36 39
     /** 合同金额 */
37 40
     @Excel(name = "合同金额")
38 41
     private BigDecimal amount;
@@ -124,7 +127,15 @@ public class CmcContract extends BaseEntity
124 127
     {
125 128
         return tenderId;
126 129
     }
130
+    public void setTender(CmcTender tender)
131
+    {
132
+        this.tender = tender;
133
+    }
127 134
 
135
+    public CmcTender getTender()
136
+    {
137
+        return tender;
138
+    }
128 139
     public void setAmount(BigDecimal amount)
129 140
     {
130 141
         this.amount = amount;

+ 48
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeposit.java View File

@@ -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;
@@ -57,6 +58,13 @@ public class CmcDeposit extends BaseEntity
57 58
     @Excel(name = "申请人")
58 59
     private Long applier;
59 60
 
61
+
62
+    private SysUser applierUser;
63
+
64
+    private SysUser managerUser;
65
+
66
+    private SysUser cwUser;
67
+
60 68
     /** 申请日期 */
61 69
     @JsonFormat(pattern = "yyyy-MM-dd")
62 70
     @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -70,6 +78,10 @@ public class CmcDeposit extends BaseEntity
70 78
     @Excel(name = "相关附件")
71 79
     private String applyDocument;
72 80
 
81
+    /** 分管审批意见 */
82
+    @Excel(name = "分管审批意见")
83
+    private String managerComment;
84
+
73 85
     /** 分管审批时间 */
74 86
     @JsonFormat(pattern = "yyyy-MM-dd")
75 87
     @Excel(name = "分管审批时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -192,6 +204,15 @@ public class CmcDeposit extends BaseEntity
192 204
     {
193 205
         return applier;
194 206
     }
207
+    public void setApplierUser(SysUser applierUser)
208
+    {
209
+        this.applierUser = applierUser;
210
+    }
211
+
212
+    public SysUser getApplierUser()
213
+    {
214
+        return applierUser;
215
+    }
195 216
     public void setApplyTime(Date applyTime) 
196 217
     {
197 218
         this.applyTime = applyTime;
@@ -219,6 +240,15 @@ public class CmcDeposit extends BaseEntity
219 240
     {
220 241
         return applyDocument;
221 242
     }
243
+    public void setManagerComment(String managerComment)
244
+    {
245
+        this.managerComment = managerComment;
246
+    }
247
+
248
+    public String getManagerComment()
249
+    {
250
+        return managerComment;
251
+    }
222 252
     public void setManagerTime(Date managerTime) 
223 253
     {
224 254
         this.managerTime = managerTime;
@@ -237,6 +267,15 @@ public class CmcDeposit extends BaseEntity
237 267
     {
238 268
         return managerUserId;
239 269
     }
270
+    public void setManagerUser(SysUser managerUser)
271
+    {
272
+        this.managerUser = managerUser;
273
+    }
274
+
275
+    public SysUser getManagerUser()
276
+    {
277
+        return managerUser;
278
+    }
240 279
     public void setRemitTime(Date remitTime) 
241 280
     {
242 281
         this.remitTime = remitTime;
@@ -282,6 +321,15 @@ public class CmcDeposit extends BaseEntity
282 321
     {
283 322
         return cwUserId;
284 323
     }
324
+    public void setCwUser(SysUser cwUser)
325
+    {
326
+        this.cwUser = cwUser;
327
+    }
328
+
329
+    public SysUser getCwUser()
330
+    {
331
+        return cwUser;
332
+    }
285 333
 
286 334
     @Override
287 335
     public String toString() {

+ 22
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcProject.java View File

@@ -35,6 +35,10 @@ public class CmcProject extends BaseEntity
35 35
 
36 36
     private SysUser projectLeaderUser;
37 37
 
38
+    private SysUser technicalDirectorUser;
39
+
40
+    private SysUser qualityInspectorUser;
41
+
38 42
     /** 项目状态(0进行中、1已结束) */
39 43
     @Excel(name = "项目状态", readConverterExp = "0=进行中、1已结束")
40 44
     private String isFinished;
@@ -329,6 +333,24 @@ public class CmcProject extends BaseEntity
329 333
     {
330 334
         return projectRegistrantUser;
331 335
     }
336
+    public void setTechnicalDirectorUser(SysUser technicalDirectorUser)
337
+    {
338
+        this.technicalDirectorUser = technicalDirectorUser;
339
+    }
340
+
341
+    public SysUser getTechnicalDirectorUser()
342
+    {
343
+        return technicalDirectorUser;
344
+    }
345
+    public void setQualityInspectorUser(SysUser qualityInspectorUser)
346
+    {
347
+        this.qualityInspectorUser = qualityInspectorUser;
348
+    }
349
+
350
+    public SysUser getQualityInspectorUser()
351
+    {
352
+        return qualityInspectorUser;
353
+    }
332 354
 
333 355
     @Override
334 356
     public String toString() {

+ 8
- 23
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcSettleSummary.java View File

@@ -27,18 +27,14 @@ public class CmcSettleSummary extends BaseEntity
27 27
     @Excel(name = "结算内容")
28 28
     private String content;
29 29
 
30
+    /** 表格编号 */
31
+    @Excel(name = "表格编号")
32
+    private String tableNumber;
33
+
30 34
     /** 结算金额 */
31 35
     @Excel(name = "结算金额")
32 36
     private BigDecimal amount;
33 37
 
34
-    /** 结算金额(项目部) */
35
-    @Excel(name = "结算金额", readConverterExp = "项=目部")
36
-    private BigDecimal amountXm;
37
-
38
-    /** 结算金额(分管) */
39
-    @Excel(name = "结算金额", readConverterExp = "分=管")
40
-    private BigDecimal amountManager;
41
-
42 38
     public void setSummaryId(String summaryId) 
43 39
     {
44 40
         this.summaryId = summaryId;
@@ -75,23 +71,14 @@ public class CmcSettleSummary extends BaseEntity
75 71
     {
76 72
         return amount;
77 73
     }
78
-    public void setAmountXm(BigDecimal amountXm) 
79
-    {
80
-        this.amountXm = amountXm;
81
-    }
82
-
83
-    public BigDecimal getAmountXm() 
84
-    {
85
-        return amountXm;
86
-    }
87
-    public void setAmountManager(BigDecimal amountManager) 
74
+    public void setTableNumber(String tableNumber)
88 75
     {
89
-        this.amountManager = amountManager;
76
+        this.tableNumber = tableNumber;
90 77
     }
91 78
 
92
-    public BigDecimal getAmountManager() 
79
+    public String getTableNumber()
93 80
     {
94
-        return amountManager;
81
+        return tableNumber;
95 82
     }
96 83
 
97 84
     @Override
@@ -101,8 +88,6 @@ public class CmcSettleSummary extends BaseEntity
101 88
             .append("settleId", getSettleId())
102 89
             .append("content", getContent())
103 90
             .append("amount", getAmount())
104
-            .append("amountXm", getAmountXm())
105
-            .append("amountManager", getAmountManager())
106 91
             .append("remark", getRemark())
107 92
             .toString();
108 93
     }

+ 50
- 20
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcArchiveMapper.xml View File

@@ -24,39 +24,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
24 24
         <result property="qualityComment"    column="quality_comment"    />
25 25
         <result property="deptComment"    column="dept_comment"    />
26 26
         <result property="archiveComment"    column="archive_comment"    />
27
+        <association property="produceUser"    javaType="SysUser"         resultMap="ProduceUserResult" />
28
+        <association property="qualityUser"    javaType="SysUser"         resultMap="QualityUserResult" />
29
+        <association property="deptUser"    javaType="SysUser"         resultMap="DeptUserResult" />
30
+        <association property="archiveUser"    javaType="SysUser"         resultMap="ArchiveUserResult" />
31
+    </resultMap>
32
+
33
+    <resultMap type="SysUser" id="ProduceUserResult">
34
+        <result property="userId"    column="user_id"    />
35
+        <result property="nickName"    column="produce_nick_name"    />
36
+    </resultMap>
37
+
38
+    <resultMap type="SysUser" id="QualityUserResult">
39
+        <result property="userId"    column="user_id"    />
40
+        <result property="nickName"    column="quality_nick_name"    />
41
+    </resultMap>
42
+
43
+    <resultMap type="SysUser" id="DeptUserResult">
44
+        <result property="userId"    column="user_id"    />
45
+        <result property="nickName"    column="dept_nick_name"    />
46
+    </resultMap>
47
+
48
+    <resultMap type="SysUser" id="ArchiveUserResult">
49
+        <result property="userId"    column="user_id"    />
50
+        <result property="nickName"    column="archive_nick_name"    />
27 51
     </resultMap>
28 52
 
29 53
     <sql id="selectCmcArchiveVo">
30
-        select archive_id, project_id, submit_time, submit_situation, location_lng, location_lat, produce_inspector, quality_inspector, dept_leader, archiver, receive_time, quality_time, produce_time, dept_time, archive_time, produce_comment, quality_comment, dept_comment, archive_comment from cmc_archive
54
+        select a.archive_id, a.project_id, a.submit_time, a.submit_situation, a.location_lng, a.location_lat, a.produce_inspector, u.nick_name as produce_nick_name, a.quality_inspector,
55
+               u1.nick_name as quality_nick_name, a.dept_leader, u2.nick_name as dept_nick_name, a.archiver, u3.nick_name as archive_nick_name, a.receive_time, a.quality_time, a.produce_time,
56
+               a.dept_time, a.archive_time, a.produce_comment, a.quality_comment, a.dept_comment, a.archive_comment from cmc_archive as a
57
+        left join sys_user as u on u.user_id = a.produce_inspector
58
+        left join sys_user as u1 on u1.user_id = a.quality_inspector
59
+        left join sys_user as u2 on u2.user_id = a.dept_leader
60
+        left join sys_user as u3 on u3.user_id = a.archiver
31 61
     </sql>
32 62
 
33 63
     <select id="selectCmcArchiveList" parameterType="CmcArchive" resultMap="CmcArchiveResult">
34 64
         <include refid="selectCmcArchiveVo"/>
35 65
         <where>  
36
-            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
37
-            <if test="submitTime != null "> and submit_time = #{submitTime}</if>
38
-            <if test="submitSituation != null  and submitSituation != ''"> and submit_situation = #{submitSituation}</if>
39
-            <if test="locationLng != null  and locationLng != ''"> and location_lng = #{locationLng}</if>
40
-            <if test="locationLat != null  and locationLat != ''"> and location_lat = #{locationLat}</if>
41
-            <if test="produceInspector != null "> and produce_inspector = #{produceInspector}</if>
42
-            <if test="qualityInspector != null "> and quality_inspector = #{qualityInspector}</if>
43
-            <if test="deptLeader != null "> and dept_leader = #{deptLeader}</if>
44
-            <if test="archiver != null "> and archiver = #{archiver}</if>
45
-            <if test="receiveTime != null "> and receive_time = #{receiveTime}</if>
46
-            <if test="qualityTime != null "> and quality_time = #{qualityTime}</if>
47
-            <if test="produceTime != null "> and produce_time = #{produceTime}</if>
48
-            <if test="deptTime != null "> and dept_time = #{deptTime}</if>
49
-            <if test="archiveTime != null "> and archive_time = #{archiveTime}</if>
50
-            <if test="produceComment != null  and produceComment != ''"> and produce_comment = #{produceComment}</if>
51
-            <if test="qualityComment != null  and qualityComment != ''"> and quality_comment = #{qualityComment}</if>
52
-            <if test="deptComment != null  and deptComment != ''"> and dept_comment = #{deptComment}</if>
53
-            <if test="archiveComment != null  and archiveComment != ''"> and archive_comment = #{archiveComment}</if>
66
+            <if test="projectId != null  and projectId != ''"> and a.project_id = #{projectId}</if>
67
+            <if test="submitTime != null "> and a.submit_time = #{submitTime}</if>
68
+            <if test="submitSituation != null  and submitSituation != ''"> and a.submit_situation = #{submitSituation}</if>
69
+            <if test="locationLng != null  and locationLng != ''"> and a.location_lng = #{locationLng}</if>
70
+            <if test="locationLat != null  and locationLat != ''"> and a.location_lat = #{locationLat}</if>
71
+            <if test="produceInspector != null "> and a.produce_inspector = #{produceInspector}</if>
72
+            <if test="qualityInspector != null "> and a.quality_inspector = #{qualityInspector}</if>
73
+            <if test="deptLeader != null "> and a.dept_leader = #{deptLeader}</if>
74
+            <if test="archiver != null "> and a.archiver = #{archiver}</if>
75
+            <if test="receiveTime != null "> and a.receive_time = #{receiveTime}</if>
76
+            <if test="qualityTime != null "> and a.quality_time = #{qualityTime}</if>
77
+            <if test="produceTime != null "> and a.produce_time = #{produceTime}</if>
78
+            <if test="deptTime != null "> and a.dept_time = #{deptTime}</if>
79
+            <if test="archiveTime != null "> and a.archive_time = #{archiveTime}</if>
80
+            <if test="produceComment != null  and produceComment != ''"> and a.produce_comment = #{produceComment}</if>
81
+            <if test="qualityComment != null  and qualityComment != ''"> and a.quality_comment = #{qualityComment}</if>
82
+            <if test="deptComment != null  and deptComment != ''"> and a.dept_comment = #{deptComment}</if>
83
+            <if test="archiveComment != null  and archiveComment != ''"> and a.archive_comment = #{archiveComment}</if>
54 84
         </where>
55 85
     </select>
56 86
     
57 87
     <select id="selectCmcArchiveByArchiveId" parameterType="String" resultMap="CmcArchiveResult">
58 88
         <include refid="selectCmcArchiveVo"/>
59
-        where archive_id = #{archiveId}
89
+        where a.archive_id = #{archiveId}
60 90
     </select>
61 91
         
62 92
     <insert id="insertCmcArchive" parameterType="CmcArchive">

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBrandMapper.xml View File

@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
11 11
         <result property="approvalDocument"    column="approval_document"    />
12 12
         <result property="applier"    column="applier"    />
13 13
         <result property="applyTime"    column="apply_time"    />
14
+        <result property="cwTime"    column="cw_time"    />
14 15
         <result property="cwUserId"    column="cw_user_id"    />
15 16
         <association property="applierUser"    javaType="SysUser"         resultMap="ApplierUserResult" />
16 17
         <association property="cwUser"    javaType="SysUser"         resultMap="CwUserResult" />
@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
27 28
     </resultMap>
28 29
 
29 30
     <sql id="selectCmcBrandVo">
30
-        select b.brand_id, b.project_id, b.apply_reason, b.approval_document, b.applier, u.nick_name as applier_nick_name, b.apply_time, b.cw_user_id, u1.nick_name as cw_nick_name from cmc_brand as b
31
+        select b.brand_id, b.project_id, b.apply_reason, b.approval_document, b.applier, u.nick_name as applier_nick_name, b.apply_time, b.cw_time, b.cw_user_id, u1.nick_name as cw_nick_name from cmc_brand as b
31 32
         left join sys_user as u on u.user_id = b.applier
32 33
         left join sys_user as u1 on u1.user_id = b.cw_user_id
33 34
     </sql>
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
40 41
             <if test="approvalDocument != null  and approvalDocument != ''"> and b.approval_document = #{approvalDocument}</if>
41 42
             <if test="applier != null "> and b.applier = #{applier}</if>
42 43
             <if test="applyTime != null "> and b.apply_time = #{applyTime}</if>
44
+            <if test="cwTime != null "> and b.cw_time = #{cwTime}</if>
43 45
             <if test="cwUserId != null "> and b.cw_user_id = #{cwUserId}</if>
44 46
         </where>
45 47
     </select>
@@ -58,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
58 60
             <if test="approvalDocument != null">approval_document,</if>
59 61
             <if test="applier != null">applier,</if>
60 62
             <if test="applyTime != null">apply_time,</if>
63
+            <if test="cwTime != null">cw_time,</if>
61 64
             <if test="cwUserId != null">cw_user_id,</if>
62 65
          </trim>
63 66
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -67,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
67 70
             <if test="approvalDocument != null">#{approvalDocument},</if>
68 71
             <if test="applier != null">#{applier},</if>
69 72
             <if test="applyTime != null">#{applyTime},</if>
73
+            <if test="cwTime != null">#{cwTime},</if>
70 74
             <if test="cwUserId != null">#{cwUserId},</if>
71 75
          </trim>
72 76
     </insert>
@@ -79,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
79 83
             <if test="approvalDocument != null">approval_document = #{approvalDocument},</if>
80 84
             <if test="applier != null">applier = #{applier},</if>
81 85
             <if test="applyTime != null">apply_time = #{applyTime},</if>
86
+            <if test="cwTime != null">cw_time = #{cwTime},</if>
82 87
             <if test="cwUserId != null">cw_user_id = #{cwUserId},</if>
83 88
         </trim>
84 89
         where brand_id = #{brandId}

+ 17
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMapper.xml View File

@@ -24,6 +24,18 @@
24 24
         <result property="managerTime"    column="manager_time"    />
25 25
         <association property="draftUser"    javaType="SysUser"         resultMap="DraftUserResult" />
26 26
         <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
27
+        <association property="tender"    javaType="CmcTender"         resultMap="CmcTenderResult" />
28
+    </resultMap>
29
+
30
+    <resultMap type="CmcTender" id="CmcTenderResult">
31
+        <result property="tenderId"    column="tender_id"    />
32
+        <result property="projectName"    column="project_name"    />
33
+        <result property="partyA"    column="party_a"    />
34
+        <result property="aPerson"    column="a_person"    />
35
+        <result property="aPhone"    column="a_phone"    />
36
+        <result property="agent"    column="agent"    />
37
+        <result property="agentPerson"    column="agent_person"    />
38
+        <result property="agentPhone"    column="agent_phone"    />
27 39
     </resultMap>
28 40
 
29 41
     <resultMap type="SysUser" id="DraftUserResult">
@@ -37,10 +49,13 @@
37 49
     </resultMap>
38 50
 
39 51
     <sql id="selectCmcContractVo">
40
-        select c.contract_id, c.contract_code, c.contract_number, c.tender_id, c.amount, c.deposit, c.contract_document, c.drafter, u.nick_name as draft_nick_name, c.draft_time, c.remark, c.sign_date, c.sign_remark,
41
-               c.sign_scan, c.comment_type, c.manager_comment, c.manager_user_id, u1.nick_name as manager_nick_name, c.manager_time from cmc_contract as c
52
+        select c.contract_id, c.contract_code, c.contract_number, c.tender_id, t.project_name as project_name, t.party_a as party_a, t.a_person as a_person,
53
+               t.a_phone as a_phone, t.agent as agent, t.agent_person as agent_person, t.agent_phone as agent_phone, c.amount, c.deposit, c.contract_document,
54
+               c.drafter, u.nick_name as draft_nick_name, c.draft_time, c.remark, c.sign_date, c.sign_remark, c.sign_scan, c.comment_type, c.manager_comment, c.manager_user_id, u1.nick_name as manager_nick_name,
55
+               c.manager_time from cmc_contract as c
42 56
         left join sys_user as u on u.user_id = c.drafter
43 57
         left join sys_user as u1 on u1.user_id = c.manager_user_id
58
+        left join cmc_tender as t on t.tender_id = c.tender_id
44 59
     </sql>
45 60
 
46 61
     <select id="selectCmcContractList" parameterType="CmcContract" resultMap="CmcContractResult">

+ 48
- 21
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDepositMapper.xml View File

@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
18 18
         <result property="applyTime"    column="apply_time"    />
19 19
         <result property="applyReason"    column="apply_reason"    />
20 20
         <result property="applyDocument"    column="apply_document"    />
21
+        <result property="managerComment"    column="manager_comment"    />
21 22
         <result property="managerTime"    column="manager_time"    />
22 23
         <result property="managerUserId"    column="manager_user_id"    />
23 24
         <result property="remitTime"    column="remit_time"    />
@@ -25,40 +26,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
25 26
         <result property="backTime"    column="back_time"    />
26 27
         <result property="cwComment"    column="cw_comment"    />
27 28
         <result property="cwUserId"    column="cw_user_id"    />
29
+        <association property="applierUser"    javaType="SysUser"         resultMap="ApplierUserResult" />
30
+        <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
31
+        <association property="cwUser"    javaType="SysUser"         resultMap="CwUserResult" />
32
+    </resultMap>
33
+
34
+    <resultMap type="SysUser" id="ApplierUserResult">
35
+        <result property="userId"    column="user_id"    />
36
+        <result property="nickName"    column="applier_nick_name"    />
37
+    </resultMap>
38
+
39
+    <resultMap type="SysUser" id="ManagerUserResult">
40
+        <result property="userId"    column="user_id"    />
41
+        <result property="nickName"    column="manager_nick_name"    />
42
+    </resultMap>
43
+
44
+    <resultMap type="SysUser" id="CwUserResult">
45
+        <result property="userId"    column="user_id"    />
46
+        <result property="nickName"    column="cw_nick_name"    />
28 47
     </resultMap>
29 48
 
30 49
     <sql id="selectCmcDepositVo">
31
-        select deposit_id, deposit_type, tender_id, contract_id, return_time, account_name, account_bank, card_number, deposit_way, applier, apply_time, apply_reason, apply_document, manager_time, manager_user_id, remit_time, cw_time, back_time, cw_comment, cw_user_id from cmc_deposit
50
+        select d.deposit_id, d.deposit_type, d.tender_id, d.contract_id, d.return_time, d.account_name, d.account_bank, d.card_number, d.deposit_way, d.applier, u.nick_name as applier_nick_name,
51
+               d.apply_time, d.apply_reason, d.apply_document, d.manager_time, d.manager_comment, d.manager_user_id, u1.nick_name as manager_nick_name, d.remit_time, d.cw_time, d.back_time, d.cw_comment,
52
+               d.cw_user_id, u2.nick_name as cw_nick_name from cmc_deposit as d
53
+         left join sys_user as u on u.user_id = d.applier
54
+         left join sys_user as u1 on u1.user_id = d.manager_user_id
55
+         left join sys_user as u2 on u2.user_id = d.cw_user_id
32 56
     </sql>
33 57
 
34 58
     <select id="selectCmcDepositList" parameterType="CmcDeposit" resultMap="CmcDepositResult">
35 59
         <include refid="selectCmcDepositVo"/>
36 60
         <where>  
37
-            <if test="depositType != null  and depositType != ''"> and deposit_type = #{depositType}</if>
38
-            <if test="tenderId != null  and tenderId != ''"> and tender_id = #{tenderId}</if>
39
-            <if test="contractId != null  and contractId != ''"> and contract_id = #{contractId}</if>
40
-            <if test="returnTime != null "> and return_time = #{returnTime}</if>
41
-            <if test="accountName != null  and accountName != ''"> and account_name like concat('%', #{accountName}, '%')</if>
42
-            <if test="accountBank != null  and accountBank != ''"> and account_bank = #{accountBank}</if>
43
-            <if test="cardNumber != null  and cardNumber != ''"> and card_number = #{cardNumber}</if>
44
-            <if test="depositWay != null  and depositWay != ''"> and deposit_way = #{depositWay}</if>
45
-            <if test="applier != null "> and applier = #{applier}</if>
46
-            <if test="applyTime != null "> and apply_time = #{applyTime}</if>
47
-            <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
48
-            <if test="applyDocument != null  and applyDocument != ''"> and apply_document = #{applyDocument}</if>
49
-            <if test="managerTime != null "> and manager_time = #{managerTime}</if>
50
-            <if test="managerUserId != null "> and manager_user_id = #{managerUserId}</if>
51
-            <if test="remitTime != null "> and remit_time = #{remitTime}</if>
52
-            <if test="cwTime != null "> and cw_time = #{cwTime}</if>
53
-            <if test="backTime != null "> and back_time = #{backTime}</if>
54
-            <if test="cwComment != null  and cwComment != ''"> and cw_comment = #{cwComment}</if>
55
-            <if test="cwUserId != null "> and cw_user_id = #{cwUserId}</if>
61
+            <if test="depositType != null  and depositType != ''"> and d.deposit_type = #{depositType}</if>
62
+            <if test="tenderId != null  and tenderId != ''"> and d.tender_id = #{tenderId}</if>
63
+            <if test="contractId != null  and contractId != ''"> and d.contract_id = #{contractId}</if>
64
+            <if test="returnTime != null "> and d.return_time = #{returnTime}</if>
65
+            <if test="accountName != null  and accountName != ''"> and d.account_name like concat('%', #{accountName}, '%')</if>
66
+            <if test="accountBank != null  and accountBank != ''"> and d.account_bank = #{accountBank}</if>
67
+            <if test="cardNumber != null  and cardNumber != ''"> and d.card_number = #{cardNumber}</if>
68
+            <if test="depositWay != null  and depositWay != ''"> and d.deposit_way = #{depositWay}</if>
69
+            <if test="applier != null "> and d.applier = #{applier}</if>
70
+            <if test="applyTime != null "> and d.apply_time = #{applyTime}</if>
71
+            <if test="applyReason != null  and applyReason != ''"> and d.apply_reason = #{applyReason}</if>
72
+            <if test="applyDocument != null  and applyDocument != ''"> and d.apply_document = #{applyDocument}</if>
73
+            <if test="managerTime != null "> and d.manager_time = #{managerTime}</if>
74
+            <if test="managerUserId != null "> and d.manager_user_id = #{managerUserId}</if>
75
+            <if test="remitTime != null "> and d.remit_time = #{remitTime}</if>
76
+            <if test="cwTime != null "> and d.cw_time = #{cwTime}</if>
77
+            <if test="backTime != null "> and d.back_time = #{backTime}</if>
78
+            <if test="cwComment != null  and cwComment != ''"> and d.cw_comment = #{cwComment}</if>
79
+            <if test="cwUserId != null "> and d.cw_user_id = #{cwUserId}</if>
56 80
         </where>
57 81
     </select>
58 82
     
59 83
     <select id="selectCmcDepositByDepositId" parameterType="String" resultMap="CmcDepositResult">
60 84
         <include refid="selectCmcDepositVo"/>
61
-        where deposit_id = #{depositId}
85
+        where d.deposit_id = #{depositId}
62 86
     </select>
63 87
         
64 88
     <insert id="insertCmcDeposit" parameterType="CmcDeposit">
@@ -77,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
77 101
             <if test="applyTime != null">apply_time,</if>
78 102
             <if test="applyReason != null">apply_reason,</if>
79 103
             <if test="applyDocument != null">apply_document,</if>
104
+            <if test="managerComment != null">manager_comment,</if>
80 105
             <if test="managerTime != null">manager_time,</if>
81 106
             <if test="managerUserId != null">manager_user_id,</if>
82 107
             <if test="remitTime != null">remit_time,</if>
@@ -99,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
99 124
             <if test="applyTime != null">#{applyTime},</if>
100 125
             <if test="applyReason != null">#{applyReason},</if>
101 126
             <if test="applyDocument != null">#{applyDocument},</if>
127
+            <if test="managerComment != null">#{managerComment},</if>
102 128
             <if test="managerTime != null">#{managerTime},</if>
103 129
             <if test="managerUserId != null">#{managerUserId},</if>
104 130
             <if test="remitTime != null">#{remitTime},</if>
@@ -124,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
124 150
             <if test="applyTime != null">apply_time = #{applyTime},</if>
125 151
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
126 152
             <if test="applyDocument != null">apply_document = #{applyDocument},</if>
153
+            <if test="managerComment != null">manager_comment = #{managerComment},</if>
127 154
             <if test="managerTime != null">manager_time = #{managerTime},</if>
128 155
             <if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
129 156
             <if test="remitTime != null">remit_time = #{remitTime},</if>

+ 18
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml View File

@@ -27,6 +27,8 @@
27 27
         <result property="remark"    column="remark"    />
28 28
         <association property="projectLeaderUser"    javaType="SysUser"         resultMap="ProjectLeaderResult" />
29 29
         <association property="projectRegistrantUser"    javaType="SysUser"         resultMap="ProjectRegistrantResult" />
30
+        <association property="technicalDirectorUser"    javaType="SysUser"         resultMap="TechnicalDirectorResult" />
31
+        <association property="qualityInspectorUser"    javaType="SysUser"         resultMap="QualityInspectorResult" />
30 32
     </resultMap>
31 33
 
32 34
     <resultMap type="SysUser" id="ProjectLeaderResult">
@@ -39,10 +41,25 @@
39 41
         <result property="nickName"    column="registrant_nick_name"    />
40 42
     </resultMap>
41 43
 
44
+    <resultMap type="SysUser" id="TechnicalDirectorResult">
45
+        <result property="userId"    column="user_id"    />
46
+        <result property="nickName"    column="director_nick_name"    />
47
+    </resultMap>
48
+
49
+    <resultMap type="SysUser" id="QualityInspectorResult">
50
+        <result property="userId"    column="inspector_user_id"    />
51
+        <result property="nickName"    column="inspector_nick_name"    />
52
+    </resultMap>
53
+
42 54
     <sql id="selectCmcProjectVo">
43
-        select p.project_id, p.project_number, p.project_name, p.project_leader, u.nick_name as leader_nick_name, p.is_finished, p.project_source, p.party_a, p.contact_person, p.telephone, p.project_type, p.project_level, p.project_registrant, u1.nick_name as registrant_nick_name, p.undertaking_dept, p.project_planner, p.site_leader, p.register_time, p.plan_time, p.entry_time, p.exit_time, p.remark from cmc_project as p
55
+        select p.project_id, p.project_number, p.project_name, p.project_leader, u.nick_name as leader_nick_name, p.is_finished, p.project_source, p.party_a, p.contact_person, p.telephone,
56
+               p.project_type, p.project_level, p.project_registrant, u1.nick_name as registrant_nick_name, p.undertaking_dept, p.project_planner, p.site_leader, p.register_time, p.plan_time,
57
+               p.entry_time, p.exit_time, p.remark, c.technical_director, u2.nick_name as director_nick_name, c.quality_inspector, u3.nick_name as inspector_nick_name, u3.user_id as inspector_user_id from cmc_project as p
44 58
         left join sys_user as u on u.user_id = p.project_leader
45 59
         left join sys_user as u1 on u1.user_id = p.project_registrant
60
+        left join cmc_technical as c on c.project_id = p.project_id
61
+        left join sys_user as u2 on u2.user_id = c.technical_director
62
+        left join sys_user as u3 on u3.user_id = c.quality_inspector
46 63
     </sql>
47 64
 
48 65
     <select id="selectCmcProjectList" parameterType="CmcProject" resultMap="CmcProjectResult">

+ 6
- 11
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleSummaryMapper.xml View File

@@ -9,13 +9,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
9 9
         <result property="settleId"    column="settle_id"    />
10 10
         <result property="content"    column="content"    />
11 11
         <result property="amount"    column="amount"    />
12
-        <result property="amountXm"    column="amount_xm"    />
13
-        <result property="amountManager"    column="amount_manager"    />
14 12
         <result property="remark"    column="remark"    />
13
+        <result property="tableNumber"    column="table_number"    />
15 14
     </resultMap>
16 15
 
17 16
     <sql id="selectCmcSettleSummaryVo">
18
-        select summary_id, settle_id, content, amount, amount_xm, amount_manager, remark from cmc_settle_summary
17
+        select summary_id, settle_id, content, amount, table_number, remark from cmc_settle_summary
19 18
     </sql>
20 19
 
21 20
     <select id="selectCmcSettleSummaryList" parameterType="CmcSettleSummary" resultMap="CmcSettleSummaryResult">
@@ -24,8 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
24 23
             <if test="settleId != null  and settleId != ''"> and settle_id = #{settleId}</if>
25 24
             <if test="content != null  and content != ''"> and content = #{content}</if>
26 25
             <if test="amount != null "> and amount = #{amount}</if>
27
-            <if test="amountXm != null "> and amount_xm = #{amountXm}</if>
28
-            <if test="amountManager != null "> and amount_manager = #{amountManager}</if>
26
+            <if test="tableNumber != null  and tableNumber != ''"> and table_number = #{tableNumber}</if>
29 27
         </where>
30 28
         order by #{summaryId} asc
31 29
     </select>
@@ -42,8 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
42 40
             <if test="settleId != null">settle_id,</if>
43 41
             <if test="content != null">content,</if>
44 42
             <if test="amount != null">amount,</if>
45
-            <if test="amountXm != null">amount_xm,</if>
46
-            <if test="amountManager != null">amount_manager,</if>
43
+            <if test="tableNumber != null">table_number,</if>
47 44
             <if test="remark != null">remark,</if>
48 45
          </trim>
49 46
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -51,8 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
51 48
             <if test="settleId != null">#{settleId},</if>
52 49
             <if test="content != null">#{content},</if>
53 50
             <if test="amount != null">#{amount},</if>
54
-            <if test="amountXm != null">#{amountXm},</if>
55
-            <if test="amountManager != null">#{amountManager},</if>
51
+            <if test="tableNumber != null">#{tableNumber},</if>
56 52
             <if test="remark != null">#{remark},</if>
57 53
          </trim>
58 54
     </insert>
@@ -63,8 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
63 59
             <if test="settleId != null">settle_id = #{settleId},</if>
64 60
             <if test="content != null">content = #{content},</if>
65 61
             <if test="amount != null">amount = #{amount},</if>
66
-            <if test="amountXm != null">amount_xm = #{amountXm},</if>
67
-            <if test="amountManager != null">amount_manager = #{amountManager},</if>
62
+            <if test="tableNumber != null">table_number = #{tableNumber},</if>
68 63
             <if test="remark != null">remark = #{remark},</if>
69 64
         </trim>
70 65
         where summary_id = #{summaryId}

+ 8
- 7
oa-back/sql/sql.sql
File diff suppressed because it is too large
View File


+ 18
- 0
oa-ui/src/api/system/post.js View File

@@ -76,6 +76,24 @@ export function getUsersDeptLeaderByDept(query) {
76 76
   })
77 77
 }
78 78
 
79
+// 查询当前用户的部门负责人
80
+export function getUsersViceDeptLeader(query) {
81
+  return request({
82
+    url: '/system/post/deptViceLeader',
83
+    method: 'get',
84
+    params: query
85
+  })
86
+}
87
+
88
+// 查询当前部门的部门负责人
89
+export function getUsersViceDeptLeaderByDept(query) {
90
+  return request({
91
+    url: '/system/post/deptViceLeaderByDept',
92
+    method: 'get',
93
+    params: query
94
+  })
95
+}
96
+
79 97
 // 查询当前用户的分管领导
80 98
 export function getUsersManageLeader(query) {
81 99
   return request({

+ 206
- 59
oa-ui/src/views/flowable/form/archiveForm.vue View File

@@ -11,79 +11,119 @@
11 11
               <el-option v-for="item in projectList" :key="item.value" :label="item.projectName" :value="item.projectId">
12 12
               </el-option>
13 13
             </el-select>
14
-            <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
14
+            <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="2" direction="vertical">
15
+              <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
16
+              }}</el-descriptions-item>
15 17
               <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
16 18
               }}</el-descriptions-item>
17
-              <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
19
+              <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseProject.partyA
20
+              }}</el-descriptions-item>
21
+              <el-descriptions-item label="合同编码" label-class-name="my-label">{{ contractCode
18 22
               }}</el-descriptions-item>
19
-              <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
20
-                chooseProject.projectLeaderUser.nickName : ''
23
+              <el-descriptions-item label="承担部门" label-class-name="my-label">{{
24
+                chooseProject.undertakingDeptName
25
+              }}</el-descriptions-item>
26
+              <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser
27
+                ? chooseProject.projectLeaderUser.nickName : ''
28
+              }}</el-descriptions-item>
29
+              <el-descriptions-item label="技术负责人" label-class-name="my-label">{{
30
+                chooseProject.technicalDirectorUser ? chooseProject.technicalDirectorUser.nickName :
31
+                '' }}</el-descriptions-item>
32
+              <el-descriptions-item label="质检审核员" label-class-name="my-label">{{
33
+                chooseProject.qualityInspectorUser ? chooseProject.qualityInspectorUser.nickName : ''
21 34
               }}</el-descriptions-item>
22 35
             </el-descriptions>
23 36
           </el-form-item>
24
-          <el-form-item label="成果汇交日期" prop="submitTime">
37
+          <el-form-item label="成果交日期" prop="submitTime">
25 38
             <el-date-picker clearable v-model="form.submitTime" type="date" value-format="yyyy-MM-dd"
26
-              placeholder="请选择成果汇交日期">
39
+              placeholder="请选择成果提交日期" :disabled="taskName != '成果上传'">
27 40
             </el-date-picker>
28 41
           </el-form-item>
42
+          <el-row :gutter="20">
43
+            <el-col :span="12" :xs="24">
44
+              <el-form-item label="坐标经度" prop="locationLng">
45
+                <el-input v-model="form.locationLng" placeholder="请输入坐标经度" :disabled="taskName != '成果上传'" />
46
+              </el-form-item>
47
+            </el-col>
48
+            <el-col :span="12" :xs="24">
49
+              <el-form-item label="坐标纬度" prop="locationLat">
50
+                <el-input v-model="form.locationLat" placeholder="请输入坐标纬度" :disabled="taskName != '成果上传'" />
51
+              </el-form-item>
52
+            </el-col>
53
+          </el-row>
29 54
           <el-form-item label="备注说明" prop="submitSituation">
30
-            <el-input v-model="form.submitSituation" placeholder="请输入备注说明" />
31
-          </el-form-item>
32
-          <el-form-item label="坐标经度" prop="locationLng">
33
-            <el-input v-model="form.locationLng" placeholder="请输入坐标经度" />
55
+            <el-input v-model="form.submitSituation" placeholder="请输入备注说明" :disabled="taskName != '成果上传'" />
34 56
           </el-form-item>
35
-          <el-form-item label="坐标纬度" prop="locationLat">
36
-            <el-input v-model="form.locationLat" placeholder="请输入坐标纬度" />
37
-          </el-form-item>
38
-          <el-form-item label="生产部门检查员" prop="produceInspector">
39
-            <el-input v-model="form.produceInspector" placeholder="请输入生产部门检查员" />
40
-          </el-form-item>
41
-          <el-form-item label="质量检查员" prop="qualityInspector">
42
-            <el-input v-model="form.qualityInspector" placeholder="请输入质量检查员" />
43
-          </el-form-item>
44
-          <el-form-item label="技术部负责人" prop="deptLeader">
45
-            <el-input v-model="form.deptLeader" placeholder="请输入技术部负责人" />
46
-          </el-form-item>
47
-          <el-form-item label="归档人" prop="archiver">
48
-            <el-input v-model="form.archiver" placeholder="请输入归档人" />
57
+          <el-divider></el-divider>
58
+          <el-form-item label="部门检查员检查" prop="produceComment">
59
+            <el-input v-model="form.produceComment" placeholder="请输入部门检查员检查意见" :disabled="taskName != '部门检查'" />
49 60
           </el-form-item>
61
+          <el-row>
62
+            <el-col :span="6" :xs="24" :offset="12">
63
+              <el-form-item label="签名:" label-width="120px" v-if="taskName != '成果上传'">
64
+                <span class="auditor"> {{ form.produceUser ? form.produceUser.nickName : produceUser }}
65
+                </span>
66
+              </el-form-item>
67
+            </el-col>
68
+            <el-col :span="6">
69
+              <el-form-item label="日期:" label-width="120px" v-if="taskName != '成果上传'">
70
+                <span> {{ form.produceTime ? form.produceTime : produceTime }} </span>
71
+              </el-form-item>
72
+            </el-col>
73
+          </el-row>
50 74
           <el-form-item label="资料接收时间" prop="receiveTime">
51 75
             <el-date-picker clearable v-model="form.receiveTime" type="date" value-format="yyyy-MM-dd"
52
-              placeholder="请选择资料接收时间">
76
+              placeholder="请选择资料接收时间" :disabled="taskName != '质检审核'">
53 77
             </el-date-picker>
54 78
           </el-form-item>
55
-          <el-form-item label="质量检查时间" prop="qualityTime">
56
-            <el-date-picker clearable v-model="form.qualityTime" type="date" value-format="yyyy-MM-dd"
57
-              placeholder="请选择质量检查时间">
58
-            </el-date-picker>
79
+          <el-form-item label="质量检查员审核" prop="qualityComment">
80
+            <el-input v-model="form.qualityComment" placeholder="请输入质量检查员审核意见" :disabled="taskName != '质检审核'" />
59 81
           </el-form-item>
60
-          <el-form-item label="生产部门检查时间" prop="produceTime">
61
-            <el-date-picker clearable v-model="form.produceTime" type="date" value-format="yyyy-MM-dd"
62
-              placeholder="请选择生产部门检查时间">
63
-            </el-date-picker>
82
+          <el-row>
83
+            <el-col :span="6" :xs="24" :offset="12">
84
+              <el-form-item label="签名:" label-width="120px" v-if="taskName != '成果上传' && taskName != '部门检查'">
85
+                <span class="auditor"> {{ form.qualityUser ? form.qualityUser.nickName : qualityUser }}
86
+                </span>
87
+              </el-form-item>
88
+            </el-col>
89
+            <el-col :span="6">
90
+              <el-form-item label="日期:" label-width="120px" v-if="taskName != '成果上传' && taskName != '部门检查'">
91
+                <span> {{ form.qualityTime ? form.qualityTime : qualityTime }} </span>
92
+              </el-form-item>
93
+            </el-col>
94
+          </el-row>
95
+          <el-form-item label="技术质量部负责人审核" prop="deptComment">
96
+            <el-input v-model="form.deptComment" placeholder="请输入技术质量部负责人审核意见" :disabled="taskName != '技术部审核'" />
64 97
           </el-form-item>
65
-          <el-form-item label="技术部审核时间" prop="deptTime">
66
-            <el-date-picker clearable v-model="form.deptTime" type="date" value-format="yyyy-MM-dd"
67
-              placeholder="请选择技术部审核时间">
68
-            </el-date-picker>
69
-          </el-form-item>
70
-          <el-form-item label="归档时间" prop="archiveTime">
71
-            <el-date-picker clearable v-model="form.archiveTime" type="date" value-format="yyyy-MM-dd"
72
-              placeholder="请选择归档时间">
73
-            </el-date-picker>
74
-          </el-form-item>
75
-          <el-form-item label="生产部门意见" prop="produceComment">
76
-            <el-input v-model="form.produceComment" placeholder="请输入生产部门意见" />
77
-          </el-form-item>
78
-          <el-form-item label="质量检查意见" prop="qualityComment">
79
-            <el-input v-model="form.qualityComment" placeholder="请输入质量检查意见" />
80
-          </el-form-item>
81
-          <el-form-item label="技术部审核意见" prop="deptComment">
82
-            <el-input v-model="form.deptComment" placeholder="请输入技术部审核意见" />
83
-          </el-form-item>
84
-          <el-form-item label="归档审核意见" prop="archiveComment">
85
-            <el-input v-model="form.archiveComment" placeholder="请输入归档审核意见" />
98
+          <el-row>
99
+            <el-col :span="6" :xs="24" :offset="12">
100
+              <el-form-item label="签名:" label-width="120px" v-if="taskName == '技术部审核' || taskName == '成果归档'">
101
+                <span class="auditor"> {{ form.deptUser ? form.deptUser.nickName : deptUser }}
102
+                </span>
103
+              </el-form-item>
104
+            </el-col>
105
+            <el-col :span="6">
106
+              <el-form-item label="日期:" label-width="120px" v-if="taskName == '技术部审核' || taskName == '成果归档'">
107
+                <span> {{ form.deptTime ? form.deptTime : deptTime }} </span>
108
+              </el-form-item>
109
+            </el-col>
110
+          </el-row>
111
+          <el-form-item label="技术质量部归档" prop="archiveComment">
112
+            <el-input v-model="form.archiveComment" placeholder="请输入技术质量部归档意见" :disabled="taskName != '成果归档'" />
86 113
           </el-form-item>
114
+          <el-row>
115
+            <el-col :span="6" :xs="24" :offset="12">
116
+              <el-form-item label="签名:" label-width="120px" v-if="taskName == '成果归档'">
117
+                <span class="auditor"> {{ form.archiveUser ? form.archiveUser.nickName : archiveUser }}
118
+                </span>
119
+              </el-form-item>
120
+            </el-col>
121
+            <el-col :span="6">
122
+              <el-form-item label="归档日期:" label-width="120px" v-if="taskName == '成果归档'">
123
+                <span> {{ form.archiveTime ? form.archiveTime : archiveTime }} </span>
124
+              </el-form-item>
125
+            </el-col>
126
+          </el-row>
87 127
         </el-form>
88 128
         <div style="text-align: center;">
89 129
           <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -106,6 +146,9 @@
106 146
 import { parseTime } from "@/utils/ruoyi";
107 147
 import { listProject, getProject } from "@/api/oa/project/project";
108 148
 import { listArchive, getArchive, delArchive, addArchive, updateArchive } from "@/api/oa/archive/archive";
149
+import { listProjectContract } from "@/api/oa/contract/projectContract";
150
+import { getContract } from "@/api/oa/contract/contract";
151
+import { getUsersDeptLeaderByDept } from '@/api/system/post'
109 152
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
110 153
 import flow from '@/views/flowable/task/todo/detail/flow'
111 154
 import { flowXmlAndNode } from "@/api/flowable/definition";
@@ -127,6 +170,14 @@ export default {
127 170
   name: "Archive",
128 171
   data() {
129 172
     return {
173
+      produceUser: '',
174
+      qualityUser: '',
175
+      deptUser: '',
176
+      archiveUser: '',
177
+      produceTime: undefined,
178
+      qualityTime: undefined,
179
+      deptTime: undefined,
180
+      archiveTime: undefined,
130 181
       // 遮罩层
131 182
       loading: true,
132 183
       // 选中数组
@@ -178,9 +229,29 @@ export default {
178 229
       formTotal: 0,
179 230
       flowData: {},
180 231
       projectList: [],
232
+      contractCode: '',
181 233
     };
182 234
   },
235
+  mounted() {
236
+    this.initForm();
237
+  },
183 238
   created() {
239
+    if (this.taskName == '部门检查') {
240
+      this.produceUser = this.$store.getters.name;
241
+      this.produceTime = parseTime(new Date(), '{y}-{m}-{d}')
242
+    }
243
+    else if (this.taskName == '质检审核') {
244
+      this.qualityUser = this.$store.getters.name;
245
+      this.qualityTime = parseTime(new Date(), '{y}-{m}-{d}')
246
+    }
247
+    else if (this.taskName == '技术部审核') {
248
+      this.deptUser = this.$store.getters.name;
249
+      this.deptTime = parseTime(new Date(), '{y}-{m}-{d}')
250
+    }
251
+    else if (this.taskName == '成果归档') {
252
+      this.archiveUser = this.$store.getters.name;
253
+      this.archiveTime = parseTime(new Date(), '{y}-{m}-{d}')
254
+    }
184 255
     this.getProjectList();
185 256
     this.getList();
186 257
     flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
@@ -194,15 +265,32 @@ export default {
194 265
         if (this.isEmptyObject(res.data)) {
195 266
           this.formTotal = 0;
196 267
           this.form.applier = this.$store.getters.userId;
197
-          this.form.applyTime = parseTime(new Date(), '{y}-{m}-{d}')
268
+          this.form.submitTime = new Date();
198 269
         }
199 270
         else {
200 271
           this.formTotal = 1;
201 272
           this.form = res.data;
202 273
           if (res.data.projectId) {
203
-            getProject(data.projectId).then(response => {
274
+            getProject(res.data.projectId).then(response => {
204 275
               this.chooseProject = response.data;
205
-              this.isSelect = true
276
+              this.isSelect = true;
277
+              listProjectContract({ projectId: response.data.projectId }).then(res => {
278
+                if (res.rows.length > 0) {
279
+                  for (let row of res.rows) {
280
+                    getContract(row.contractId).then(res => {
281
+                      if (res.data) {
282
+                        if (this.contractCode != '') {
283
+                          this.contractCode = this.contractCode + '、' + res.data.contractCode;
284
+                        } else {
285
+                          this.contractCode = res.data.contractCode;
286
+                        }
287
+                      }
288
+                    })
289
+                  }
290
+                }
291
+                else
292
+                  this.contractCode = '';
293
+              })
206 294
             })
207 295
           }
208 296
           this.loading = false
@@ -236,9 +324,26 @@ export default {
236 324
     // 选择项目
237 325
     handleSelectProject(val) {
238 326
       if (val != "" && val != undefined && val != null) {
239
-        getProject(val).then(res => {
240
-          this.chooseProject = res.data;
327
+        getProject(val).then(response => {
328
+          this.chooseProject = response.data;
241 329
           this.isSelect = true;
330
+          listProjectContract({ projectId: response.data.projectId }).then(res => {
331
+            if (res.rows.length > 0) {
332
+              for (let row of res.rows) {
333
+                getContract(row.contractId).then(res => {
334
+                  if (res.data) {
335
+                    if (this.contractCode != '') {
336
+                      this.contractCode = this.contractCode + '、' + res.data.contractCode;
337
+                    } else {
338
+                      this.contractCode = res.data.contractCode;
339
+                    }
340
+                  }
341
+                })
342
+              }
343
+            }
344
+            else
345
+              this.contractCode = '';
346
+          })
242 347
         })
243 348
       } else {
244 349
         this.isSelect = false
@@ -319,12 +424,54 @@ export default {
319 424
               this.open = false;
320 425
               this.getList();
321 426
             });
427
+            const params = { taskId: this.taskForm.taskId };
428
+            getNextFlowNode(params).then(res => {
429
+              if (this.taskName == '部门检查') {
430
+                this.$set(this.taskForm.variables, "approval", this.chooseProject.qualityInspectorUser.userId);
431
+                complete(this.taskForm).then(response => {
432
+                  this.$modal.msgSuccess(response.msg);
433
+                  this.$emit('goBack')
434
+                });
435
+              }              
436
+              if (this.taskName == '质检审核') {
437
+                getUsersDeptLeaderByDept({ deptId: 110 }).then(res => {
438
+                  let userId = res.data.userId;
439
+                  this.$set(this.taskForm.variables, "approval", userId);
440
+                  complete(this.taskForm).then(response => {
441
+                    this.$modal.msgSuccess(response.msg);
442
+                    this.$emit('goBack')
443
+                  });
444
+                });
445
+              }              
446
+              if (this.taskName == '技术部审核') {
447
+                this.$set(this.taskForm.variables, "approval", '57');
448
+                complete(this.taskForm).then(response => {
449
+                  this.$modal.msgSuccess(response.msg);
450
+                  this.$emit('goBack')
451
+                });
452
+              }              
453
+              if (this.taskName == '成果归档') {
454
+                complete(this.taskForm).then(response => {
455
+                  this.$modal.msgSuccess(response.msg);
456
+                  this.$emit('goBack')
457
+                });
458
+              }
459
+            })
322 460
           } else {
461
+            this.form.archiveId = this.taskForm.formId;
323 462
             addArchive(this.form).then(response => {
324 463
               this.$modal.msgSuccess("新增成功");
325 464
               this.open = false;
326 465
               this.getList();
327 466
             });
467
+            const params = { taskId: this.taskForm.taskId };
468
+            getNextFlowNode(params).then(res => {
469
+              this.$set(this.taskForm.variables, "approval", '46');
470
+              complete(this.taskForm).then(response => {
471
+                this.$modal.msgSuccess(response.msg);
472
+                this.$emit('goBack')
473
+              });
474
+            })
328 475
           }
329 476
         }
330 477
       });

+ 32
- 21
oa-ui/src/views/flowable/form/borrowForm.vue View File

@@ -44,17 +44,17 @@
44 44
             </el-select>
45 45
             <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
46 46
               <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
47
-                }}</el-descriptions-item>
47
+              }}</el-descriptions-item>
48 48
               <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
49
-                }}</el-descriptions-item>
49
+              }}</el-descriptions-item>
50 50
               <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
51
-    chooseProject.projectLeaderUser.nickName : ''
52
-                }}</el-descriptions-item>
51
+                chooseProject.projectLeaderUser.nickName : ''
52
+              }}</el-descriptions-item>
53 53
               <el-descriptions-item label="承担部门" label-class-name="my-label">
54 54
                 <el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
55 55
               </el-descriptions-item>
56 56
               <el-descriptions-item label="项目类型" label-class-name="my-label">{{ chooseProject.projectType
57
-                }}</el-descriptions-item>
57
+              }}</el-descriptions-item>
58 58
             </el-descriptions>
59 59
           </el-form-item>
60 60
           <el-form-item label="借款明细">
@@ -213,8 +213,7 @@
213 213
 
214 214
 
215 215
           <el-form-item label="财务部支付备注" prop="cwComment">
216
-            <el-input type="textarea" v-model="form.cwComment" placeholder="请输入财务部支付备注"
217
-              :disabled="taskName != '财务处理'" />
216
+            <el-input type="textarea" v-model="form.cwComment" placeholder="请输入财务部支付备注" :disabled="taskName != '财务处理'" />
218 217
           </el-form-item>
219 218
           <el-row>
220 219
             <el-col :span="6" :xs="24" :offset="12">
@@ -250,7 +249,7 @@
250 249
 
251 250
 <script>
252 251
 import { parseTime } from "@/utils/ruoyi";
253
-import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
252
+import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
254 253
 import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
255 254
 import { listBorrowDetail, addBorrowDetail, updateBorrowDetail } from "@/api/oa/borrow/borrowDetail";
256 255
 import { listProject, getProject } from "@/api/oa/project/project";
@@ -356,13 +355,13 @@ export default {
356 355
     this.deptId = this.$store.getters.deptId;
357 356
     this.getProjectList();
358 357
     if (this.$route.query.projectId) {
359
-      getProject(this.$route.query.projectId).then(res=>{
360
-        if(res.data){
358
+      getProject(this.$route.query.projectId).then(res => {
359
+        if (res.data) {
361 360
           this.form.projectId = res.data.projectId;
362 361
           this.handleSelectProject(res.data.projectId)
363 362
         }
364 363
       })
365
-    }else{
364
+    } else {
366 365
       this.handleSelectProject(this.form.projectId)
367 366
     }
368 367
     flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
@@ -374,7 +373,7 @@ export default {
374 373
   },
375 374
   methods: {
376 375
     initForm() {
377
-      listBorrowDetail({borrowId: this.taskForm.formId}).then(res => {
376
+      listBorrowDetail({ borrowId: this.taskForm.formId }).then(res => {
378 377
         if (res.rows.length != 0) {
379 378
           this.detailList = res.rows
380 379
         }
@@ -499,19 +498,31 @@ export default {
499 498
                 });
500 499
               }
501 500
               else if (this.taskName == '总经理审核') {
501
+                let approvalList = [];
502 502
                 getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
503
-                  let userId = res.data.userId;
504
-                  this.$set(this.taskForm.variables, "approval", userId);
505
-                  complete(this.taskForm).then(response => {
506
-                    this.$modal.msgSuccess(response.msg);
507
-                    this.$emit('goBack')
508
-                  });
503
+                  approvalList.push(res.data.userId);
504
+                  getUsersViceDeptLeaderByDept({ deptId: 106 }).then(res1 => {
505
+                    approvalList.push(res1.data.userId);
506
+                    this.$set(this.taskForm.variables, "approvalList", approvalList);
507
+                    complete(this.taskForm).then(response => {
508
+                      this.$modal.msgSuccess(response.msg);
509
+                      this.$emit('goBack')
510
+                    })
511
+                  })
509 512
                 });
510 513
               }
511 514
               else if (this.taskName == '党工团审核') {
512
-                complete(this.taskForm).then(response => {
513
-                  this.$modal.msgSuccess(response.msg);
514
-                  this.$emit('goBack')
515
+                let approvalList = [];
516
+                getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
517
+                  approvalList.push(res.data.userId);
518
+                  getUsersViceDeptLeaderByDept({ deptId: 106 }).then(res1 => {
519
+                    approvalList.push(res1.data.userId);
520
+                    this.$set(this.taskForm.variables, "approvalList", approvalList);
521
+                    complete(this.taskForm).then(response => {
522
+                      this.$modal.msgSuccess(response.msg);
523
+                      this.$emit('goBack')
524
+                    })
525
+                  })
515 526
                 });
516 527
               }
517 528
               else if (this.taskName == '财务处理') {

+ 142
- 7
oa-ui/src/views/flowable/form/brandForm.vue View File

@@ -22,10 +22,10 @@
22 22
             </el-descriptions>
23 23
           </el-form-item>
24 24
           <el-form-item label="申请支付说明" prop="applyReason">
25
-            <el-input v-model="form.applyReason" placeholder="请输入申请支付说明" />
25
+            <el-input v-model="form.applyReason" placeholder="请输入申请支付说明" :disabled="taskName != '支付申请'" />
26 26
           </el-form-item>
27 27
           <el-form-item label="审核文件" prop="approvalDocument">
28
-            <el-input v-model="form.approvalDocument" placeholder="请输入审核文件" />
28
+            <el-input v-model="form.approvalDocument" placeholder="请输入审核文件" :disabled="taskName != '支付申请'" />
29 29
           </el-form-item>
30 30
           <el-row>
31 31
             <el-col :span="6" :xs="24" :offset="12">
@@ -39,13 +39,53 @@
39 39
               </el-form-item>
40 40
             </el-col>
41 41
           </el-row>
42
-          <el-form-item label="财务部经办人" prop="cwUserId">
43
-            <el-input v-model="form.cwUserId" placeholder="请输入财务部经办人" />
42
+          <el-divider></el-divider>
43
+          <el-form-item label="财务反馈:">
44
+            <table border="1">
45
+              <tr>
46
+                <td>序号</td>
47
+                <td>到账情况</td>
48
+                <td>到账时间</td>
49
+              </tr>
50
+              <tr v-for="(payment, index) in paymentList" :key="index">
51
+                <td>
52
+                  {{ index + 1 }}
53
+                </td>
54
+                <td>
55
+                  <el-input v-model="payment.cwComment" placeholder="请输入到账情况" :disabled="taskName != '财务反馈'" />
56
+                </td>
57
+                <td>
58
+                  <el-date-picker clearable v-model="payment.paymentTime" type="date" value-format="yyyy-MM-dd"
59
+                    placeholder="请选择到账时间" :disabled="taskName != '财务反馈'">
60
+                  </el-date-picker>
61
+                </td>
62
+                <td>
63
+                  <el-button type="danger" icon="el-icon-minus" size="mini" circle @click="deletPaymentItem(index)"
64
+                    :disabled="taskName != '财务反馈'"></el-button>
65
+                </td>
66
+              </tr>
67
+            </table>
68
+            <el-button icon="el-icon-plus" size="mini" @click="addPaymentList()" type="primary" plain
69
+              :disabled="taskName != '财务反馈'"></el-button>
70
+            <el-row>
71
+              <el-col :span="6" :xs="24" :offset="12">
72
+                <el-form-item label="签名:" label-width="120px" v-if="taskName == '财务反馈'">
73
+                  <span class="auditor"> {{ form.cwUser ? form.cwUser.nickName : cwUser }} </span>
74
+                </el-form-item>
75
+              </el-col>
76
+              <el-col :span="6">
77
+                <el-form-item label="日期:" label-width="120px" v-if="taskName == '财务反馈'">
78
+                  <span> {{ form.cwTime ? form.cwTime : cwTime }} </span>
79
+                </el-form-item>
80
+              </el-col>
81
+            </el-row>
44 82
           </el-form-item>
45 83
         </el-form>
46 84
         <div style="text-align: center;">
47
-          <el-button type="primary" @click="submitForm">确 定</el-button>
48
-          <el-button @click="cancel">取 消</el-button>
85
+          <el-button type="primary" @click="submitForm" v-if="taskName == '支付申请'">确 定</el-button>
86
+          <el-button @click="cancel" v-if="taskName == '支付申请'">取 消</el-button>
87
+          <el-button @click="preserve()" type="warning" v-if="taskName == '财务反馈'">保 存</el-button>
88
+          <el-button @click="submitForm" type="danger" v-if="taskName == '财务反馈'">保存并结束</el-button>
49 89
         </div>
50 90
       </el-col>
51 91
       <el-col :span="6" :xs="24">
@@ -62,7 +102,9 @@
62 102
 
63 103
 <script>
64 104
 import { parseTime } from "@/utils/ruoyi";
105
+import { getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept } from '@/api/system/post.js'
65 106
 import { listBrandProject, getBrandProject } from "@/api/oa/brand/brandProject";
107
+import { listBrandPayment, addBrandPayment, delBrandPayment } from "@/api/oa/brand/brandPayment";
66 108
 import { listBrand, getBrand, delBrand, addBrand, updateBrand } from "@/api/oa/brand/brand";
67 109
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
68 110
 import flow from '@/views/flowable/task/todo/detail/flow'
@@ -85,6 +127,10 @@ export default {
85 127
   name: "Brand",
86 128
   data() {
87 129
     return {
130
+      applierUser: '',
131
+      applyTime: undefined,
132
+      cwUser: '',
133
+      cwTime: undefined,
88 134
       // 遮罩层
89 135
       loading: true,
90 136
       // 选中数组
@@ -112,10 +158,17 @@ export default {
112 158
         approvalDocument: null,
113 159
         applier: null,
114 160
         applyTime: null,
161
+        cwTime: null,
115 162
         cwUserId: null
116 163
       },
117 164
       // 表单参数
118 165
       form: {},
166
+      paymentList: [
167
+        {
168
+          cwComment: '',
169
+          paymentTime: undefined
170
+        }
171
+      ],
119 172
       // 表单校验
120 173
       rules: {
121 174
       },
@@ -134,6 +187,10 @@ export default {
134 187
       this.applierUser = this.$store.getters.name;
135 188
       this.applyTime = parseTime(new Date(), '{y}-{m}-{d}')
136 189
     }
190
+    if (this.taskName == '财务反馈') {
191
+      this.cwUser = this.$store.getters.name;
192
+      this.cwTime = parseTime(new Date(), '{y}-{m}-{d}')
193
+    }
137 194
     this.getProjectList();
138 195
     this.getList();
139 196
     flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
@@ -152,8 +209,13 @@ export default {
152 209
         else {
153 210
           this.formTotal = 1;
154 211
           this.form = res.data;
212
+          listBrandPayment({ brandId: this.taskForm.formId }).then(res => {
213
+            this.oldPaymentList = res.rows;
214
+            if (res.rows.length > 0)
215
+              this.paymentList = res.rows;
216
+          });
155 217
           if (res.data.projectId) {
156
-            getProject(data.projectId).then(response => {
218
+            getBrandProject(res.data.projectId).then(response => {
157 219
               this.chooseProject = response.data;
158 220
               this.isSelect = true
159 221
             })
@@ -205,6 +267,43 @@ export default {
205 267
       }
206 268
       return true;
207 269
     },
270
+    addPaymentList() {
271
+      this.paymentList.push({
272
+        paymentCondition: "",
273
+        paymentPercentage: "",
274
+        paymentAmount: "",
275
+        paymentTime: undefined,
276
+        remark: "",
277
+      });
278
+    },
279
+    deletPaymentItem(index) {
280
+      let arr = this.paymentList;
281
+      if (arr.length == 1) {
282
+        return;
283
+      }
284
+      if (index >= 0 && index < arr.length) {
285
+        arr.splice(index, 1);
286
+      }
287
+    },
288
+    // 暂存数据
289
+    preserve() {
290
+      if (this.oldPaymentList.length != 0) {
291
+        delBrandPayment([this.taskForm.formId]).then(res => {
292
+          for (let payment of this.paymentList) {
293
+            payment.brandId = this.taskForm.formId;
294
+            addBrandPayment(payment);
295
+          }
296
+        });
297
+      } else {
298
+        for (let payment of this.paymentList) {
299
+          payment.brandId = this.taskForm.formId;
300
+          addBrandPayment(payment);
301
+        }
302
+      }
303
+      updateBrand(this.form).then(res => {
304
+        this.$message.success("保存成功");
305
+      });
306
+    },
208 307
     // 表单重置
209 308
     reset() {
210 309
       this.form = {
@@ -214,6 +313,7 @@ export default {
214 313
         approvalDocument: null,
215 314
         applier: null,
216 315
         applyTime: null,
316
+        cwTime: null,
217 317
         cwUserId: null
218 318
       };
219 319
       this.resetForm("form");
@@ -260,12 +360,35 @@ export default {
260 360
               this.open = false;
261 361
               this.getList();
262 362
             });
363
+            const params = { taskId: this.taskForm.taskId };
364
+            getNextFlowNode(params).then(res => {
365
+              complete(this.taskForm).then(response => {
366
+                this.$modal.msgSuccess(response.msg);
367
+                this.$emit('goBack')
368
+              })
369
+            })
263 370
           } else {
371
+            this.form.brandId = this.taskForm.formId;
264 372
             addBrand(this.form).then(response => {
265 373
               this.$modal.msgSuccess("新增成功");
266 374
               this.open = false;
267 375
               this.getList();
268 376
             });
377
+            const params = { taskId: this.taskForm.taskId };
378
+            getNextFlowNode(params).then(res => {
379
+              let approvalList = [];
380
+              getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
381
+                approvalList.push(res.data.userId);
382
+                getUsersViceDeptLeaderByDept({ deptId: 106 }).then(res1 => {
383
+                  approvalList.push(res1.data.userId);
384
+                  this.$set(this.taskForm.variables, "approvalList", approvalList);
385
+                  complete(this.taskForm).then(response => {
386
+                    this.$modal.msgSuccess(response.msg);
387
+                    this.$emit('goBack')
388
+                  })
389
+                })
390
+              });
391
+            })
269 392
           }
270 393
         }
271 394
       });
@@ -289,3 +412,15 @@ export default {
289 412
   }
290 413
 };
291 414
 </script>
415
+<style lang="scss" scoped>
416
+table {
417
+  /*居中*/
418
+  margin: 0 auto;
419
+  /*边框*/
420
+  /* border: 1px solid black; */
421
+  text-align: center;
422
+  border-collapse: collapse;
423
+  /*设置背景颜色*/
424
+  /* background-color: #bfa; */
425
+}
426
+</style>

+ 0
- 1
oa-ui/src/views/flowable/form/contractForm.vue View File

@@ -818,7 +818,6 @@ export default {
818 818
             });
819 819
             const params = { taskId: this.taskForm.taskId };
820 820
             getNextFlowNode(params).then(res => {
821
-              updateContract(this.form);
822 821
               if (this.taskName == '分管审核') {
823 822
                 complete(this.taskForm).then(response => {
824 823
                   this.$modal.msgSuccess(response.msg);

+ 264
- 61
oa-ui/src/views/flowable/form/depositForm.vue View File

@@ -5,78 +5,156 @@
5 5
         <h2 class="text-center">保证金审批表</h2>
6 6
         <el-divider></el-divider>
7 7
         <el-form ref="form" :model="form" :rules="rules" label-width="120px">
8
-          <el-form-item label="投标项目id" prop="tenderId">
8
+          <el-row :gutter="20">
9
+            <el-col :span="12" :xs="24">
10
+              <el-form-item label="保证金类型" prop="depositType">
11
+                <el-radio-group v-model="form.depositType" @change="changeDepositType" :disabled="taskName != '保证金申请'">
12
+                  <el-radio :label="'0'">投标保证金</el-radio>
13
+                  <el-radio :label="'1'">合同履约保证金</el-radio>
14
+                </el-radio-group>
15
+              </el-form-item>
16
+            </el-col>
17
+            <el-col :span="12" :xs="24">
18
+              <el-form-item label="预计退还日期" prop="returnTime">
19
+                <el-date-picker clearable v-model="form.returnTime" type="date" value-format="yyyy-MM-dd"
20
+                  placeholder="请选择预计退还日期" :disabled="taskName != '保证金申请'">
21
+                </el-date-picker>
22
+              </el-form-item>
23
+            </el-col>
24
+          </el-row>
25
+          <el-form-item label="投标项目名称" prop="tenderId" v-if="tenderOpen">
9 26
             <el-select v-model="form.tenderId" filterable placeholder="请选择" @change="handleSelectTender"
10 27
               :disabled="taskName != '保证金申请'" clearable>
11 28
               <el-option v-for="item in tenderList" :key="item.value" :label="item.projectName" :value="item.tenderId">
12 29
               </el-option>
13 30
             </el-select>
31
+            <el-descriptions border v-if="isTenderSelect" style="margin-top: 10px;" :column="1">
32
+              <el-descriptions-item label="投标保证金" label-class-name="my-label">{{ chooseTender.deposit
33
+              }}</el-descriptions-item>
34
+              <el-descriptions-item label="招标代理人" label-class-name="my-label">{{ chooseTender.agent
35
+              }}</el-descriptions-item>
36
+              <el-descriptions-item label="联系人及电话" label-class-name="my-label">{{ chooseTender.agentPerson +
37
+                chooseTender.agentPhone
38
+              }}</el-descriptions-item>
39
+            </el-descriptions>
14 40
           </el-form-item>
15
-          <el-form-item label="合同id" prop="contractId">
16
-            <el-input v-model="form.contractId" placeholder="请输入合同id" />
17
-          </el-form-item>
18
-          <el-form-item label="预计退还日期" prop="returnTime">
19
-            <el-date-picker clearable v-model="form.returnTime" type="date" value-format="yyyy-MM-dd"
20
-              placeholder="请选择预计退还日期">
21
-            </el-date-picker>
22
-          </el-form-item>
23
-          <el-form-item label="开户名称" prop="accountName">
24
-            <el-input v-model="form.accountName" placeholder="请输入开户名称" />
25
-          </el-form-item>
26
-          <el-form-item label="开户银行" prop="accountBank">
27
-            <el-input v-model="form.accountBank" placeholder="请输入开户银行" />
28
-          </el-form-item>
29
-          <el-form-item label="银行卡号" prop="cardNumber">
30
-            <el-input v-model="form.cardNumber" placeholder="请输入银行卡号" />
31
-          </el-form-item>
32
-          <el-form-item label="保证金形式" prop="depositWay">
33
-            <el-input v-model="form.depositWay" placeholder="请输入保证金形式" />
34
-          </el-form-item>
35
-          <el-form-item label="申请人" prop="applier">
36
-            <el-input v-model="form.applier" placeholder="请输入申请人" />
37
-          </el-form-item>
38
-          <el-form-item label="申请日期" prop="applyTime">
39
-            <el-date-picker clearable v-model="form.applyTime" type="date" value-format="yyyy-MM-dd"
40
-              placeholder="请选择申请日期">
41
-            </el-date-picker>
41
+          <el-form-item label="合同名称" prop="contractId" v-if="contractOpen">
42
+            <el-select v-model="form.contractId" filterable placeholder="请选择" @change="handleSelectContract"
43
+              :disabled="taskName != '保证金申请'" clearable>
44
+              <el-option v-for="item in contractList" :key="item.value" :label="item.tender.projectName"
45
+                :value="item.contractId">
46
+              </el-option>
47
+            </el-select>
48
+            <el-descriptions border v-if="isContractSelect" style="margin-top: 10px;" :column="1">
49
+              <el-descriptions-item label="履约保证金" label-class-name="my-label">{{ chooseContract.deposit
50
+              }}</el-descriptions-item>
51
+              <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseContract.tender.aPerson
52
+              }}</el-descriptions-item>
53
+              <el-descriptions-item label="联系人及电话" label-class-name="my-label">{{ chooseContract.tender.aPerson +
54
+                chooseContract.tender.aPhone
55
+              }}</el-descriptions-item>
56
+            </el-descriptions>
42 57
           </el-form-item>
58
+          <el-row>
59
+            <el-col :span="12" :xs="24">
60
+              <el-form-item label="开户名称" prop="accountName">
61
+                <el-input v-model="form.accountName" placeholder="请输入开户名称" :disabled="taskName != '保证金申请'" />
62
+              </el-form-item>
63
+            </el-col>
64
+            <el-col :span="12" :xs="24">
65
+              <el-form-item label="开户银行" prop="accountBank">
66
+                <el-input v-model="form.accountBank" placeholder="请输入开户银行" :disabled="taskName != '保证金申请'" />
67
+              </el-form-item>
68
+            </el-col>
69
+          </el-row>
70
+          <el-row>
71
+            <el-col :span="12" :xs="24">
72
+              <el-form-item label="银行卡号" prop="cardNumber">
73
+                <el-input v-model="form.cardNumber" placeholder="请输入银行卡号" :disabled="taskName != '保证金申请'" />
74
+              </el-form-item>
75
+            </el-col>
76
+            <el-col :span="12" :xs="24">
77
+              <el-form-item label="保证金形式" prop="depositWay">
78
+                <el-select v-model="form.depositWay" filterable placeholder="请选择" :disabled="taskName != '保证金申请'"
79
+                  clearable>
80
+                  <el-option v-for="item in depositWayList" :key="item.value" :label="item.name" :value="item.id">
81
+                  </el-option>
82
+                </el-select>
83
+              </el-form-item>
84
+            </el-col>
85
+          </el-row>
43 86
           <el-form-item label="申请说明" prop="applyReason">
44
-            <el-input v-model="form.applyReason" placeholder="请输入申请说明" />
87
+            <el-input v-model="form.applyReason" placeholder="请输入申请说明" :disabled="taskName != '保证金申请'" />
45 88
           </el-form-item>
46 89
           <el-form-item label="相关附件" prop="applyDocument">
47
-            <el-input v-model="form.applyDocument" placeholder="请输入相关附件" />
48
-          </el-form-item>
49
-          <el-form-item label="分管审批时间" prop="managerTime">
50
-            <el-date-picker clearable v-model="form.managerTime" type="date" value-format="yyyy-MM-dd"
51
-              placeholder="请选择分管审批时间">
52
-            </el-date-picker>
53
-          </el-form-item>
54
-          <el-form-item label="分管审批人" prop="managerUserId">
55
-            <el-input v-model="form.managerUserId" placeholder="请输入分管审批人" />
56
-          </el-form-item>
57
-          <el-form-item label="汇款日期" prop="remitTime">
58
-            <el-date-picker clearable v-model="form.remitTime" type="date" value-format="yyyy-MM-dd"
59
-              placeholder="请选择汇款日期">
60
-            </el-date-picker>
61
-          </el-form-item>
62
-          <el-form-item label="财务处理时间" prop="cwTime">
63
-            <el-date-picker clearable v-model="form.cwTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择财务处理时间">
64
-            </el-date-picker>
90
+            <el-input v-model="form.applyDocument" placeholder="请输入相关附件" :disabled="taskName != '保证金申请'" />
65 91
           </el-form-item>
66
-          <el-form-item label="退还时间" prop="backTime">
67
-            <el-date-picker clearable v-model="form.backTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择退还时间">
68
-            </el-date-picker>
92
+          <el-row :gutter="20">
93
+            <el-col :span="6" :offset="12" :xs="24">
94
+              <el-form-item label="申请人" label-width="120px">
95
+                <span class="auditor"> {{ form.applierUser ? form.applierUser.nickName : applierUser }} </span>
96
+              </el-form-item>
97
+            </el-col>
98
+            <el-col :span="6" :xs="24">
99
+              <el-form-item label="申请日期" label-width="120px">
100
+                <span> {{ form.applyTime ? form.applyTime : applyTime }} </span>
101
+              </el-form-item>
102
+            </el-col>
103
+          </el-row>
104
+          <el-divider></el-divider>
105
+          <el-form-item label="分管审批意见" prop="managerComment">
106
+            <el-input v-model="form.managerComment" placeholder="请输入分管审批意见" :disabled="taskName != '分管审批'" />
69 107
           </el-form-item>
108
+          <el-row :gutter="20">
109
+            <el-col :span="6" :offset="12" :xs="24">
110
+              <el-form-item label="签名" label-width="120px" v-if="taskName != '保证金申请'">
111
+                <span class="auditor"> {{ form.managerUser ? form.managerUser.nickName : managerUser }} </span>
112
+              </el-form-item>
113
+            </el-col>
114
+            <el-col :span="6" :xs="24">
115
+              <el-form-item label="日期" label-width="120px" v-if="taskName != '保证金申请'">
116
+                <span> {{ form.managerTime ? form.managerTime : managerTime }} </span>
117
+              </el-form-item>
118
+            </el-col>
119
+          </el-row>
120
+          <el-divider></el-divider>
70 121
           <el-form-item label="财务打款备注" prop="cwComment">
71
-            <el-input v-model="form.cwComment" placeholder="请输入财务打款备注" />
72
-          </el-form-item>
73
-          <el-form-item label="财务处理人" prop="cwUserId">
74
-            <el-input v-model="form.cwUserId" placeholder="请输入财务处理人" />
122
+            <el-input v-model="form.cwComment" placeholder="请输入财务打款备注" :disabled="taskName != '财务处理'" />
75 123
           </el-form-item>
124
+          <el-row>
125
+            <el-col :span="12" :xs="24">
126
+              <el-form-item label="汇款日期" prop="remitTime">
127
+                <el-date-picker clearable v-model="form.remitTime" type="date" value-format="yyyy-MM-dd"
128
+                  placeholder="请选择汇款日期" :disabled="taskName != '财务处理'">
129
+                </el-date-picker>
130
+              </el-form-item>
131
+            </el-col>
132
+            <el-col :span="12" :xs="24">
133
+              <el-form-item label="退还时间" prop="backTime">
134
+                <el-date-picker clearable v-model="form.backTime" type="date" value-format="yyyy-MM-dd"
135
+                  placeholder="请选择退还时间" :disabled="taskName != '财务处理'">
136
+                </el-date-picker>
137
+              </el-form-item>
138
+            </el-col>
139
+          </el-row>
140
+          <el-row :gutter="20">
141
+            <el-col :span="6" :offset="12" :xs="24">
142
+              <el-form-item label="签名" label-width="120px" v-if="taskName == '财务处理'">
143
+                <span class="auditor"> {{ form.cwUser ? form.cwUser.nickName : cwUser }} </span>
144
+              </el-form-item>
145
+            </el-col>
146
+            <el-col :span="6" :xs="24">
147
+              <el-form-item label="日期" label-width="120px" v-if="taskName == '财务处理'">
148
+                <span> {{ form.cwTime ? form.cwTime : cwTime }} </span>
149
+              </el-form-item>
150
+            </el-col>
151
+          </el-row>
76 152
         </el-form>
77 153
         <div style="text-align: center;">
78
-          <el-button type="primary" @click="submitForm">确 定</el-button>
79
-          <el-button @click="cancel">取 消</el-button>
154
+          <el-button type="primary" @click="submitForm" v-if="taskName != '财务处理'">确 定</el-button>
155
+          <el-button @click="cancel" v-if="taskName != '财务处理'">取 消</el-button>
156
+          <el-button @click="submitForm" type="warning" v-if="taskName == '财务处理'">保 存</el-button>
157
+          <el-button @click="submitForm" type="danger" v-if="taskName == '财务处理'">保存并结束</el-button>
80 158
         </div>
81 159
       </el-col>
82 160
       <el-col :span="6" :xs="24">
@@ -93,8 +171,10 @@
93 171
 
94 172
 <script>
95 173
 import { parseTime } from "@/utils/ruoyi";
174
+import { listContract, getContract } from "@/api/oa/contract/contract";
96 175
 import { listTender, getTender } from "@/api/oa/tender/tender";
97 176
 import { listDeposit, getDeposit, delDeposit, addDeposit, updateDeposit } from "@/api/oa/deposit/deposit";
177
+import { getUsersManageLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept } from '@/api/system/post.js'
98 178
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
99 179
 import flow from '@/views/flowable/task/todo/detail/flow'
100 180
 import { flowXmlAndNode } from "@/api/flowable/definition";
@@ -116,6 +196,12 @@ export default {
116 196
   name: "Deposit",
117 197
   data() {
118 198
     return {
199
+      applierUser: '',
200
+      applyTime: undefined,
201
+      managerUser: '',
202
+      managerTime: undefined,
203
+      cwUser: '',
204
+      cwTime: undefined,
119 205
       // 遮罩层
120 206
       loading: true,
121 207
       // 选中数组
@@ -150,6 +236,7 @@ export default {
150 236
         applyTime: null,
151 237
         applyReason: null,
152 238
         applyDocument: null,
239
+        managerComment: null,
153 240
         managerTime: null,
154 241
         managerUserId: null,
155 242
         remitTime: null,
@@ -162,19 +249,56 @@ export default {
162 249
       form: {},
163 250
       // 表单校验
164 251
       rules: {
252
+        accountName: [
253
+          { required: true, message: '请输入开户名称', trigger: 'blur' },
254
+        ],
255
+        accountBank: [
256
+          { required: true, message: '请输入开户银行', trigger: 'blur' },
257
+        ],
258
+        cardNumber: [
259
+          { required: true, message: '请输入银行卡号', trigger: 'blur' },
260
+        ],
261
+        depositWay: [
262
+          { required: true, message: '请选择保证金形式', trigger: 'blur' },
263
+        ],
264
+        // remitTime: [
265
+        //   { required: true, message: '请输入汇款时间', trigger: 'blur' },
266
+        // ],
267
+        // backTime: [
268
+        //   { required: true, message: '请输入退还时间(如暂未退还,请点保存;待退还后,结束流程)', trigger: 'blur' },
269
+        // ],
165 270
       },
271
+      tenderOpen: false,
272
+      contractOpen: false,
166 273
       chooseTender: {},
167
-      isSelect: false,
274
+      chooseContract: {},
275
+      isTenderSelect: false,
276
+      isContractSelect: false,
168 277
       formTotal: 0,
169 278
       flowData: {},
170 279
       tenderList: [],
280
+      contractList: [],
281
+      depositWayList: [{ id: '1', name: '电汇' }, { id: '2', name: '现金' }, { id: '3', name: '汇票' }],
171 282
     };
172 283
   },
173 284
   mounted() {
174 285
     this.initForm();
175 286
   },
176 287
   created() {
288
+    if (this.taskName == '保证金申请') {
289
+      this.applierUser = this.$store.getters.name;
290
+      this.applyTime = parseTime(new Date(), '{y}-{m}-{d}')
291
+    }
292
+    if (this.taskName == '分管审批') {
293
+      this.managerUser = this.$store.getters.name;
294
+      this.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
295
+    }
296
+    if (this.taskName == '财务处理') {
297
+      this.cwUser = this.$store.getters.name;
298
+      this.cwTime = parseTime(new Date(), '{y}-{m}-{d}')
299
+    }
177 300
     this.getTenderList();
301
+    this.getContractList();
178 302
     this.getList();
179 303
     flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
180 304
       this.flowData = res.data;
@@ -193,9 +317,19 @@ export default {
193 317
           this.formTotal = 1;
194 318
           this.form = res.data;
195 319
           if (res.data.tenderId) {
196
-            getTender(data.tenderId).then(response => {
320
+            getTender(res.data.tenderId).then(response => {
197 321
               this.chooseTender = response.data;
198
-              this.isSelect = true
322
+              this.isTenderSelect = true;
323
+              this.form.depositType = '0';
324
+              this.tenderOpen = true;
325
+            })
326
+          }
327
+          if (res.data.contractId) {
328
+            getContract(res.data.contractId).then(response => {
329
+              this.chooseContract = response.data;
330
+              this.isContractSelect = true;
331
+              this.form.depositType = '1';
332
+              this.contractOpen = true;
199 333
             })
200 334
           }
201 335
           this.loading = false
@@ -226,15 +360,36 @@ export default {
226 360
         this.tenderList = response.rows;
227 361
       })
228 362
     },
363
+    // 查询合同列表
364
+    getContractList() {
365
+      this.loading = true
366
+      listContract({
367
+        pageNum: 1,
368
+        pageSize: 99999999
369
+      }).then(response => {
370
+        this.contractList = response.rows;
371
+      })
372
+    },
229 373
     // 选择项目
230 374
     handleSelectTender(val) {
231 375
       if (val != "" && val != undefined && val != null) {
232 376
         getTender(val).then(res => {
233 377
           this.chooseTender = res.data;
234
-          this.isSelect = true;
378
+          this.isTenderSelect = true;
379
+        })
380
+      } else {
381
+        this.isTenderSelect = false
382
+      }
383
+    },
384
+    // 选择合同
385
+    handleSelectContract(val) {
386
+      if (val != "" && val != undefined && val != null) {
387
+        getContract(val).then(res => {
388
+          this.chooseContract = res.data;
389
+          this.isContractSelect = true;
235 390
         })
236 391
       } else {
237
-        this.isSelect = false
392
+        this.isContractSelect = false
238 393
       }
239 394
     },
240 395
     isEmptyObject(obj) {
@@ -245,6 +400,16 @@ export default {
245 400
       }
246 401
       return true;
247 402
     },
403
+    changeDepositType(val) {
404
+      if (val == '0') {
405
+        this.tenderOpen = true;
406
+        this.contractOpen = false;
407
+      }
408
+      else if (val == '1') {
409
+        this.tenderOpen = false;
410
+        this.contractOpen = true;
411
+      }
412
+    },
248 413
     // 表单重置
249 414
     reset() {
250 415
       this.form = {
@@ -261,6 +426,7 @@ export default {
261 426
         applyTime: null,
262 427
         applyReason: null,
263 428
         applyDocument: null,
429
+        managerComment: null,
264 430
         managerTime: null,
265 431
         managerUserId: null,
266 432
         remitTime: null,
@@ -313,12 +479,49 @@ export default {
313 479
               this.open = false;
314 480
               this.getList();
315 481
             });
482
+            const params = { taskId: this.taskForm.taskId };
483
+            getNextFlowNode(params).then(res => {
484
+              if (this.taskName == '分管审批') {
485
+                let approvalList = [];
486
+                getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
487
+                  approvalList.push(res.data.userId);
488
+                  getUsersViceDeptLeaderByDept({ deptId: 106 }).then(res1 => {
489
+                    approvalList.push(res1.data.userId);
490
+                    this.$set(this.taskForm.variables, "approvalList", approvalList);
491
+                    complete(this.taskForm).then(response => {
492
+                      this.$modal.msgSuccess(response.msg);
493
+                      this.$emit('goBack')
494
+                    })
495
+                  })
496
+                });
497
+              }
498
+              else if (this.taskName == '财务处理') {
499
+                if (this.form.backTime != undefined) {
500
+                  complete(this.taskForm).then(response => {
501
+                    this.$modal.msgSuccess(response.msg);
502
+                    this.$emit('goBack')
503
+                  })
504
+                }                  
505
+              }
506
+            })
316 507
           } else {
508
+            this.form.depositId = this.taskForm.formId;
317 509
             addDeposit(this.form).then(response => {
318 510
               this.$modal.msgSuccess("新增成功");
319 511
               this.open = false;
320 512
               this.getList();
321 513
             });
514
+            const params = { taskId: this.taskForm.taskId };
515
+            getNextFlowNode(params).then(res => {
516
+              getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
517
+                let userId = res.data.userId;
518
+                this.$set(this.taskForm.variables, "approval", userId);
519
+                complete(this.taskForm).then(response => {
520
+                  this.$modal.msgSuccess(response.msg);
521
+                  this.$emit('goBack')
522
+                })
523
+              })
524
+            })
322 525
           }
323 526
         }
324 527
       });

+ 1
- 0
oa-ui/src/views/flowable/form/safeForm.vue View File

@@ -278,6 +278,7 @@ export default {
278 278
             })
279 279
           } else {
280 280
             this.form.safeId = this.taskForm.formId;
281
+            this.form.projectId = this.taskForm.formId;
281 282
             addSafe(this.form).then(response => {
282 283
               this.$modal.msgSuccess("新增成功");
283 284
               this.open = false;

+ 0
- 1
oa-ui/src/views/flowable/form/subContract.vue View File

@@ -839,7 +839,6 @@ export default {
839 839
             });
840 840
             const params = { taskId: this.taskForm.taskId };
841 841
             getNextFlowNode(params).then(res => {
842
-              updateSubContract(this.form);
843 842
               if (this.taskName == '分管审核') {
844 843
                 complete(this.taskForm).then(response => {
845 844
                   this.$modal.msgSuccess(response.msg);

+ 1
- 0
oa-ui/src/views/flowable/form/technicalForm.vue View File

@@ -403,6 +403,7 @@ export default {
403 403
           } else {
404 404
             this.form.qualityInspector = '';
405 405
             this.form.technicalId = this.taskForm.formId;
406
+            this.form.projectId = this.taskForm.formId;
406 407
             addTechnical(this.form).then(response => {
407 408
               this.$modal.msgSuccess("新增成功");
408 409
               this.open = false;

Loading…
Cancel
Save