Quellcode durchsuchen

借款申请表

lamphua vor 1 Jahr
Ursprung
Commit
058e01c71d

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBorrowController.java Datei anzeigen

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcBorrow;
19
+import com.ruoyi.oa.service.ICmcBorrowService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * cmc借款申请Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2024-04-07
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/borrow")
31
+public class CmcBorrowController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcBorrowService cmcBorrowService;
35
+
36
+    /**
37
+     * 查询cmc借款申请列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcBorrow cmcBorrow)
41
+    {
42
+        startPage();
43
+        List<CmcBorrow> list = cmcBorrowService.selectCmcBorrowList(cmcBorrow);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出cmc借款申请列表
49
+     */
50
+    @Log(title = "cmc借款申请", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcBorrow cmcBorrow)
53
+    {
54
+        List<CmcBorrow> list = cmcBorrowService.selectCmcBorrowList(cmcBorrow);
55
+        ExcelUtil<CmcBorrow> util = new ExcelUtil<CmcBorrow>(CmcBorrow.class);
56
+        util.exportExcel(response, list, "cmc借款申请数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc借款申请详细信息
61
+     */
62
+    @GetMapping(value = "/{borrowJd}")
63
+    public AjaxResult getInfo(@PathVariable("borrowJd") String borrowJd)
64
+    {
65
+        return success(cmcBorrowService.selectCmcBorrowByBorrowJd(borrowJd));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc借款申请
70
+     */
71
+    @Log(title = "cmc借款申请", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcBorrow cmcBorrow)
74
+    {
75
+        return toAjax(cmcBorrowService.insertCmcBorrow(cmcBorrow));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc借款申请
80
+     */
81
+    @Log(title = "cmc借款申请", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcBorrow cmcBorrow)
84
+    {
85
+        return toAjax(cmcBorrowService.updateCmcBorrow(cmcBorrow));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc借款申请
90
+     */
91
+    @Log(title = "cmc借款申请", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{borrowJds}")
93
+    public AjaxResult remove(@PathVariable String[] borrowJds)
94
+    {
95
+        return toAjax(cmcBorrowService.deleteCmcBorrowByBorrowJds(borrowJds));
96
+    }
97
+}

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBorrowDetailController.java Datei anzeigen

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcBorrowDetail;
19
+import com.ruoyi.oa.service.ICmcBorrowDetailService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * cmc借款明细Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2024-04-07
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/borrowDetail")
31
+public class CmcBorrowDetailController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcBorrowDetailService cmcBorrowDetailService;
35
+
36
+    /**
37
+     * 查询cmc借款明细列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcBorrowDetail cmcBorrowDetail)
41
+    {
42
+        startPage();
43
+        List<CmcBorrowDetail> list = cmcBorrowDetailService.selectCmcBorrowDetailList(cmcBorrowDetail);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出cmc借款明细列表
49
+     */
50
+    @Log(title = "cmc借款明细", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcBorrowDetail cmcBorrowDetail)
53
+    {
54
+        List<CmcBorrowDetail> list = cmcBorrowDetailService.selectCmcBorrowDetailList(cmcBorrowDetail);
55
+        ExcelUtil<CmcBorrowDetail> util = new ExcelUtil<CmcBorrowDetail>(CmcBorrowDetail.class);
56
+        util.exportExcel(response, list, "cmc借款明细数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc借款明细详细信息
61
+     */
62
+    @GetMapping(value = "/{borrowDetailId}")
63
+    public AjaxResult getInfo(@PathVariable("borrowDetailId") String borrowDetailId)
64
+    {
65
+        return success(cmcBorrowDetailService.selectCmcBorrowDetailByBorrowDetailId(borrowDetailId));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc借款明细
70
+     */
71
+    @Log(title = "cmc借款明细", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcBorrowDetail cmcBorrowDetail)
74
+    {
75
+        return toAjax(cmcBorrowDetailService.insertCmcBorrowDetail(cmcBorrowDetail));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc借款明细
80
+     */
81
+    @Log(title = "cmc借款明细", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcBorrowDetail cmcBorrowDetail)
84
+    {
85
+        return toAjax(cmcBorrowDetailService.updateCmcBorrowDetail(cmcBorrowDetail));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc借款明细
90
+     */
91
+    @Log(title = "cmc借款明细", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{borrowDetailIds}")
93
+    public AjaxResult remove(@PathVariable String[] borrowDetailIds)
94
+    {
95
+        return toAjax(cmcBorrowDetailService.deleteCmcBorrowDetailByBorrowDetailIds(borrowDetailIds));
96
+    }
97
+}

+ 1
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Datei anzeigen

@@ -107,6 +107,7 @@ public class CmcProjectController extends BaseController
107 107
     {
108 108
         JSONObject formDataJson = JSONObject.parse(formData);
109 109
         CmcProject cmcProject = new CmcProject();
110
+        cmcProject.setProjectId(formDataJson.getString("formId"));
110 111
         cmcProject.setProjectName(formDataJson.getString("projectName"));
111 112
         cmcProject.setProjectNumber(formDataJson.getString("projectNumber"));
112 113
         cmcProject.setProjectLeader(formDataJson.getLong("projectLeader"));

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

@@ -0,0 +1,354 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+import com.fasterxml.jackson.annotation.JsonFormat;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.ruoyi.common.annotation.Excel;
9
+import com.ruoyi.common.core.domain.BaseEntity;
10
+
11
+/**
12
+ * cmc借款申请对象 cmc_borrow
13
+ * 
14
+ * @author cmc
15
+ * @date 2024-04-07
16
+ */
17
+public class CmcBorrow extends BaseEntity
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 借款申请id */
22
+    private String borrowJd;
23
+
24
+    /** 项目id */
25
+    @Excel(name = "项目id")
26
+    private String projectId;
27
+
28
+    /** 借款类型 */
29
+    @Excel(name = "借款类型")
30
+    private String borrowType;
31
+
32
+    /** 借款事由 */
33
+    @Excel(name = "借款事由")
34
+    private String applyReason;
35
+
36
+    /** 借款人 */
37
+    @Excel(name = "借款人")
38
+    private Long applier;
39
+
40
+    /** 借款日期 */
41
+    @JsonFormat(pattern = "yyyy-MM-dd")
42
+    @Excel(name = "借款日期", width = 30, dateFormat = "yyyy-MM-dd")
43
+    private Date applyDate;
44
+
45
+    /** 申请金额 */
46
+    @Excel(name = "申请金额")
47
+    private BigDecimal applyAmount;
48
+
49
+    /** 核准金额 */
50
+    @Excel(name = "核准金额")
51
+    private BigDecimal managerAmount;
52
+
53
+    /** 部门意见 */
54
+    @Excel(name = "部门意见")
55
+    private String deptComment;
56
+
57
+    /** 部门审批人 */
58
+    @Excel(name = "部门审批人")
59
+    private Long deptUserId;
60
+
61
+    /** 项目部审批人 */
62
+    @Excel(name = "项目部审批人")
63
+    private Long xmUserId;
64
+
65
+    /** 项目部审批意见 */
66
+    @Excel(name = "项目部审批意见")
67
+    private String xmComment;
68
+
69
+    /** 分管审批意见 */
70
+    @Excel(name = "分管审批意见")
71
+    private String managerComment;
72
+
73
+    /** 分管审批人 */
74
+    @Excel(name = "分管审批人")
75
+    private Long managerUserId;
76
+
77
+    /** 总经理审批人 */
78
+    @Excel(name = "总经理审批人")
79
+    private Long zjlUserId;
80
+
81
+    /** 总经理审批意见 */
82
+    @Excel(name = "总经理审批意见")
83
+    private String zjlComment;
84
+
85
+    /** 财务部经办人 */
86
+    @Excel(name = "财务部经办人")
87
+    private Long cwUserId;
88
+
89
+    /** 财务部支付备注 */
90
+    @Excel(name = "财务部支付备注")
91
+    private String cwComment;
92
+
93
+    /** 部门审批时间 */
94
+    @JsonFormat(pattern = "yyyy-MM-dd")
95
+    @Excel(name = "部门审批时间", width = 30, dateFormat = "yyyy-MM-dd")
96
+    private Date deptTime;
97
+
98
+    /** 项目部审批时间 */
99
+    @JsonFormat(pattern = "yyyy-MM-dd")
100
+    @Excel(name = "项目部审批时间", width = 30, dateFormat = "yyyy-MM-dd")
101
+    private Date xmTime;
102
+
103
+    /** 分管审批时间 */
104
+    @JsonFormat(pattern = "yyyy-MM-dd")
105
+    @Excel(name = "分管审批时间", width = 30, dateFormat = "yyyy-MM-dd")
106
+    private Date managerTime;
107
+
108
+    /** 总经理审批时间 */
109
+    @JsonFormat(pattern = "yyyy-MM-dd")
110
+    @Excel(name = "总经理审批时间", width = 30, dateFormat = "yyyy-MM-dd")
111
+    private Date zjlTime;
112
+
113
+    /** 借款支付时间 */
114
+    @JsonFormat(pattern = "yyyy-MM-dd")
115
+    @Excel(name = "借款支付时间", width = 30, dateFormat = "yyyy-MM-dd")
116
+    private Date lendTime;
117
+
118
+    public void setBorrowJd(String borrowJd) 
119
+    {
120
+        this.borrowJd = borrowJd;
121
+    }
122
+
123
+    public String getBorrowJd() 
124
+    {
125
+        return borrowJd;
126
+    }
127
+    public void setProjectId(String projectId) 
128
+    {
129
+        this.projectId = projectId;
130
+    }
131
+
132
+    public String getProjectId() 
133
+    {
134
+        return projectId;
135
+    }
136
+    public void setBorrowType(String borrowType) 
137
+    {
138
+        this.borrowType = borrowType;
139
+    }
140
+
141
+    public String getBorrowType() 
142
+    {
143
+        return borrowType;
144
+    }
145
+    public void setApplyReason(String applyReason) 
146
+    {
147
+        this.applyReason = applyReason;
148
+    }
149
+
150
+    public String getApplyReason() 
151
+    {
152
+        return applyReason;
153
+    }
154
+    public void setApplier(Long applier) 
155
+    {
156
+        this.applier = applier;
157
+    }
158
+
159
+    public Long getApplier() 
160
+    {
161
+        return applier;
162
+    }
163
+    public void setApplyDate(Date applyDate) 
164
+    {
165
+        this.applyDate = applyDate;
166
+    }
167
+
168
+    public Date getApplyDate() 
169
+    {
170
+        return applyDate;
171
+    }
172
+    public void setApplyAmount(BigDecimal applyAmount) 
173
+    {
174
+        this.applyAmount = applyAmount;
175
+    }
176
+
177
+    public BigDecimal getApplyAmount() 
178
+    {
179
+        return applyAmount;
180
+    }
181
+    public void setManagerAmount(BigDecimal managerAmount) 
182
+    {
183
+        this.managerAmount = managerAmount;
184
+    }
185
+
186
+    public BigDecimal getManagerAmount() 
187
+    {
188
+        return managerAmount;
189
+    }
190
+    public void setDeptComment(String deptComment) 
191
+    {
192
+        this.deptComment = deptComment;
193
+    }
194
+
195
+    public String getDeptComment() 
196
+    {
197
+        return deptComment;
198
+    }
199
+    public void setDeptUserId(Long deptUserId) 
200
+    {
201
+        this.deptUserId = deptUserId;
202
+    }
203
+
204
+    public Long getDeptUserId() 
205
+    {
206
+        return deptUserId;
207
+    }
208
+    public void setXmUserId(Long xmUserId) 
209
+    {
210
+        this.xmUserId = xmUserId;
211
+    }
212
+
213
+    public Long getXmUserId() 
214
+    {
215
+        return xmUserId;
216
+    }
217
+    public void setXmComment(String xmComment) 
218
+    {
219
+        this.xmComment = xmComment;
220
+    }
221
+
222
+    public String getXmComment() 
223
+    {
224
+        return xmComment;
225
+    }
226
+    public void setManagerComment(String managerComment) 
227
+    {
228
+        this.managerComment = managerComment;
229
+    }
230
+
231
+    public String getManagerComment() 
232
+    {
233
+        return managerComment;
234
+    }
235
+    public void setManagerUserId(Long managerUserId) 
236
+    {
237
+        this.managerUserId = managerUserId;
238
+    }
239
+
240
+    public Long getManagerUserId() 
241
+    {
242
+        return managerUserId;
243
+    }
244
+    public void setZjlUserId(Long zjlUserId) 
245
+    {
246
+        this.zjlUserId = zjlUserId;
247
+    }
248
+
249
+    public Long getZjlUserId() 
250
+    {
251
+        return zjlUserId;
252
+    }
253
+    public void setZjlComment(String zjlComment) 
254
+    {
255
+        this.zjlComment = zjlComment;
256
+    }
257
+
258
+    public String getZjlComment() 
259
+    {
260
+        return zjlComment;
261
+    }
262
+    public void setCwUserId(Long cwUserId) 
263
+    {
264
+        this.cwUserId = cwUserId;
265
+    }
266
+
267
+    public Long getCwUserId() 
268
+    {
269
+        return cwUserId;
270
+    }
271
+    public void setCwComment(String cwComment) 
272
+    {
273
+        this.cwComment = cwComment;
274
+    }
275
+
276
+    public String getCwComment() 
277
+    {
278
+        return cwComment;
279
+    }
280
+    public void setDeptTime(Date deptTime) 
281
+    {
282
+        this.deptTime = deptTime;
283
+    }
284
+
285
+    public Date getDeptTime() 
286
+    {
287
+        return deptTime;
288
+    }
289
+    public void setXmTime(Date xmTime) 
290
+    {
291
+        this.xmTime = xmTime;
292
+    }
293
+
294
+    public Date getXmTime() 
295
+    {
296
+        return xmTime;
297
+    }
298
+    public void setManagerTime(Date managerTime) 
299
+    {
300
+        this.managerTime = managerTime;
301
+    }
302
+
303
+    public Date getManagerTime() 
304
+    {
305
+        return managerTime;
306
+    }
307
+    public void setZjlTime(Date zjlTime) 
308
+    {
309
+        this.zjlTime = zjlTime;
310
+    }
311
+
312
+    public Date getZjlTime() 
313
+    {
314
+        return zjlTime;
315
+    }
316
+    public void setLendTime(Date lendTime) 
317
+    {
318
+        this.lendTime = lendTime;
319
+    }
320
+
321
+    public Date getLendTime() 
322
+    {
323
+        return lendTime;
324
+    }
325
+
326
+    @Override
327
+    public String toString() {
328
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
329
+            .append("borrowJd", getBorrowJd())
330
+            .append("projectId", getProjectId())
331
+            .append("borrowType", getBorrowType())
332
+            .append("applyReason", getApplyReason())
333
+            .append("applier", getApplier())
334
+            .append("applyDate", getApplyDate())
335
+            .append("applyAmount", getApplyAmount())
336
+            .append("managerAmount", getManagerAmount())
337
+            .append("deptComment", getDeptComment())
338
+            .append("deptUserId", getDeptUserId())
339
+            .append("xmUserId", getXmUserId())
340
+            .append("xmComment", getXmComment())
341
+            .append("managerComment", getManagerComment())
342
+            .append("managerUserId", getManagerUserId())
343
+            .append("zjlUserId", getZjlUserId())
344
+            .append("zjlComment", getZjlComment())
345
+            .append("cwUserId", getCwUserId())
346
+            .append("cwComment", getCwComment())
347
+            .append("deptTime", getDeptTime())
348
+            .append("xmTime", getXmTime())
349
+            .append("managerTime", getManagerTime())
350
+            .append("zjlTime", getZjlTime())
351
+            .append("lendTime", getLendTime())
352
+            .toString();
353
+    }
354
+}

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

@@ -0,0 +1,150 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.math.BigDecimal;
4
+import org.apache.commons.lang3.builder.ToStringBuilder;
5
+import org.apache.commons.lang3.builder.ToStringStyle;
6
+import com.ruoyi.common.annotation.Excel;
7
+import com.ruoyi.common.core.domain.BaseEntity;
8
+
9
+/**
10
+ * cmc借款明细对象 cmc_borrow_detail
11
+ * 
12
+ * @author cmc
13
+ * @date 2024-04-07
14
+ */
15
+public class CmcBorrowDetail extends BaseEntity
16
+{
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    /** 借款明细id */
20
+    private String borrowDetailId;
21
+
22
+    /** 借款id */
23
+    @Excel(name = "借款id")
24
+    private String borrowId;
25
+
26
+    /** 开支项 */
27
+    @Excel(name = "开支项")
28
+    private String borrowItem;
29
+
30
+    /** 单位 */
31
+    @Excel(name = "单位")
32
+    private String unit;
33
+
34
+    /** 单价 */
35
+    @Excel(name = "单价")
36
+    private BigDecimal price;
37
+
38
+    /** 数量 */
39
+    @Excel(name = "数量")
40
+    private Integer quantity;
41
+
42
+    /** 申请金额 */
43
+    @Excel(name = "申请金额")
44
+    private BigDecimal applyAmount;
45
+
46
+    /** 项目部校核金额 */
47
+    @Excel(name = "项目部校核金额")
48
+    private BigDecimal xmAmount;
49
+
50
+    /** 分管审核金额 */
51
+    @Excel(name = "分管审核金额")
52
+    private BigDecimal managerAmount;
53
+
54
+    public void setBorrowDetailId(String borrowDetailId) 
55
+    {
56
+        this.borrowDetailId = borrowDetailId;
57
+    }
58
+
59
+    public String getBorrowDetailId() 
60
+    {
61
+        return borrowDetailId;
62
+    }
63
+    public void setBorrowId(String borrowId) 
64
+    {
65
+        this.borrowId = borrowId;
66
+    }
67
+
68
+    public String getBorrowId() 
69
+    {
70
+        return borrowId;
71
+    }
72
+    public void setBorrowItem(String borrowItem) 
73
+    {
74
+        this.borrowItem = borrowItem;
75
+    }
76
+
77
+    public String getBorrowItem() 
78
+    {
79
+        return borrowItem;
80
+    }
81
+    public void setUnit(String unit) 
82
+    {
83
+        this.unit = unit;
84
+    }
85
+
86
+    public String getUnit() 
87
+    {
88
+        return unit;
89
+    }
90
+    public void setPrice(BigDecimal price) 
91
+    {
92
+        this.price = price;
93
+    }
94
+
95
+    public BigDecimal getPrice() 
96
+    {
97
+        return price;
98
+    }
99
+    public void setQuantity(Integer quantity) 
100
+    {
101
+        this.quantity = quantity;
102
+    }
103
+
104
+    public Integer getQuantity() 
105
+    {
106
+        return quantity;
107
+    }
108
+    public void setApplyAmount(BigDecimal applyAmount) 
109
+    {
110
+        this.applyAmount = applyAmount;
111
+    }
112
+
113
+    public BigDecimal getApplyAmount() 
114
+    {
115
+        return applyAmount;
116
+    }
117
+    public void setXmAmount(BigDecimal xmAmount) 
118
+    {
119
+        this.xmAmount = xmAmount;
120
+    }
121
+
122
+    public BigDecimal getXmAmount() 
123
+    {
124
+        return xmAmount;
125
+    }
126
+    public void setManagerAmount(BigDecimal managerAmount) 
127
+    {
128
+        this.managerAmount = managerAmount;
129
+    }
130
+
131
+    public BigDecimal getManagerAmount() 
132
+    {
133
+        return managerAmount;
134
+    }
135
+
136
+    @Override
137
+    public String toString() {
138
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
139
+            .append("borrowDetailId", getBorrowDetailId())
140
+            .append("borrowId", getBorrowId())
141
+            .append("borrowItem", getBorrowItem())
142
+            .append("unit", getUnit())
143
+            .append("price", getPrice())
144
+            .append("quantity", getQuantity())
145
+            .append("applyAmount", getApplyAmount())
146
+            .append("xmAmount", getXmAmount())
147
+            .append("managerAmount", getManagerAmount())
148
+            .toString();
149
+    }
150
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBorrowDetailMapper.java Datei anzeigen

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcBorrowDetail;
5
+
6
+/**
7
+ * cmc借款明细Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-04-07
11
+ */
12
+public interface CmcBorrowDetailMapper 
13
+{
14
+    /**
15
+     * 查询cmc借款明细
16
+     * 
17
+     * @param borrowDetailId cmc借款明细主键
18
+     * @return cmc借款明细
19
+     */
20
+    public CmcBorrowDetail selectCmcBorrowDetailByBorrowDetailId(String borrowDetailId);
21
+
22
+    /**
23
+     * 查询cmc借款明细列表
24
+     * 
25
+     * @param cmcBorrowDetail cmc借款明细
26
+     * @return cmc借款明细集合
27
+     */
28
+    public List<CmcBorrowDetail> selectCmcBorrowDetailList(CmcBorrowDetail cmcBorrowDetail);
29
+
30
+    /**
31
+     * 新增cmc借款明细
32
+     * 
33
+     * @param cmcBorrowDetail cmc借款明细
34
+     * @return 结果
35
+     */
36
+    public int insertCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail);
37
+
38
+    /**
39
+     * 修改cmc借款明细
40
+     * 
41
+     * @param cmcBorrowDetail cmc借款明细
42
+     * @return 结果
43
+     */
44
+    public int updateCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail);
45
+
46
+    /**
47
+     * 删除cmc借款明细
48
+     * 
49
+     * @param borrowDetailId cmc借款明细主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcBorrowDetailByBorrowDetailId(String borrowDetailId);
53
+
54
+    /**
55
+     * 批量删除cmc借款明细
56
+     * 
57
+     * @param borrowDetailIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcBorrowDetailByBorrowDetailIds(String[] borrowDetailIds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBorrowMapper.java Datei anzeigen

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcBorrow;
5
+
6
+/**
7
+ * cmc借款申请Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-04-07
11
+ */
12
+public interface CmcBorrowMapper 
13
+{
14
+    /**
15
+     * 查询cmc借款申请
16
+     * 
17
+     * @param borrowJd cmc借款申请主键
18
+     * @return cmc借款申请
19
+     */
20
+    public CmcBorrow selectCmcBorrowByBorrowJd(String borrowJd);
21
+
22
+    /**
23
+     * 查询cmc借款申请列表
24
+     * 
25
+     * @param cmcBorrow cmc借款申请
26
+     * @return cmc借款申请集合
27
+     */
28
+    public List<CmcBorrow> selectCmcBorrowList(CmcBorrow cmcBorrow);
29
+
30
+    /**
31
+     * 新增cmc借款申请
32
+     * 
33
+     * @param cmcBorrow cmc借款申请
34
+     * @return 结果
35
+     */
36
+    public int insertCmcBorrow(CmcBorrow cmcBorrow);
37
+
38
+    /**
39
+     * 修改cmc借款申请
40
+     * 
41
+     * @param cmcBorrow cmc借款申请
42
+     * @return 结果
43
+     */
44
+    public int updateCmcBorrow(CmcBorrow cmcBorrow);
45
+
46
+    /**
47
+     * 删除cmc借款申请
48
+     * 
49
+     * @param borrowJd cmc借款申请主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcBorrowByBorrowJd(String borrowJd);
53
+
54
+    /**
55
+     * 批量删除cmc借款申请
56
+     * 
57
+     * @param borrowJds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcBorrowByBorrowJds(String[] borrowJds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBorrowDetailService.java Datei anzeigen

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcBorrowDetail;
5
+
6
+/**
7
+ * cmc借款明细Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-04-07
11
+ */
12
+public interface ICmcBorrowDetailService 
13
+{
14
+    /**
15
+     * 查询cmc借款明细
16
+     * 
17
+     * @param borrowDetailId cmc借款明细主键
18
+     * @return cmc借款明细
19
+     */
20
+    public CmcBorrowDetail selectCmcBorrowDetailByBorrowDetailId(String borrowDetailId);
21
+
22
+    /**
23
+     * 查询cmc借款明细列表
24
+     * 
25
+     * @param cmcBorrowDetail cmc借款明细
26
+     * @return cmc借款明细集合
27
+     */
28
+    public List<CmcBorrowDetail> selectCmcBorrowDetailList(CmcBorrowDetail cmcBorrowDetail);
29
+
30
+    /**
31
+     * 新增cmc借款明细
32
+     * 
33
+     * @param cmcBorrowDetail cmc借款明细
34
+     * @return 结果
35
+     */
36
+    public int insertCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail);
37
+
38
+    /**
39
+     * 修改cmc借款明细
40
+     * 
41
+     * @param cmcBorrowDetail cmc借款明细
42
+     * @return 结果
43
+     */
44
+    public int updateCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail);
45
+
46
+    /**
47
+     * 批量删除cmc借款明细
48
+     * 
49
+     * @param borrowDetailIds 需要删除的cmc借款明细主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcBorrowDetailByBorrowDetailIds(String[] borrowDetailIds);
53
+
54
+    /**
55
+     * 删除cmc借款明细信息
56
+     * 
57
+     * @param borrowDetailId cmc借款明细主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcBorrowDetailByBorrowDetailId(String borrowDetailId);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBorrowService.java Datei anzeigen

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcBorrow;
5
+
6
+/**
7
+ * cmc借款申请Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-04-07
11
+ */
12
+public interface ICmcBorrowService 
13
+{
14
+    /**
15
+     * 查询cmc借款申请
16
+     * 
17
+     * @param borrowJd cmc借款申请主键
18
+     * @return cmc借款申请
19
+     */
20
+    public CmcBorrow selectCmcBorrowByBorrowJd(String borrowJd);
21
+
22
+    /**
23
+     * 查询cmc借款申请列表
24
+     * 
25
+     * @param cmcBorrow cmc借款申请
26
+     * @return cmc借款申请集合
27
+     */
28
+    public List<CmcBorrow> selectCmcBorrowList(CmcBorrow cmcBorrow);
29
+
30
+    /**
31
+     * 新增cmc借款申请
32
+     * 
33
+     * @param cmcBorrow cmc借款申请
34
+     * @return 结果
35
+     */
36
+    public int insertCmcBorrow(CmcBorrow cmcBorrow);
37
+
38
+    /**
39
+     * 修改cmc借款申请
40
+     * 
41
+     * @param cmcBorrow cmc借款申请
42
+     * @return 结果
43
+     */
44
+    public int updateCmcBorrow(CmcBorrow cmcBorrow);
45
+
46
+    /**
47
+     * 批量删除cmc借款申请
48
+     * 
49
+     * @param borrowJds 需要删除的cmc借款申请主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcBorrowByBorrowJds(String[] borrowJds);
53
+
54
+    /**
55
+     * 删除cmc借款申请信息
56
+     * 
57
+     * @param borrowJd cmc借款申请主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcBorrowByBorrowJd(String borrowJd);
61
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBorrowDetailServiceImpl.java Datei anzeigen

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcBorrowDetailMapper;
7
+import com.ruoyi.oa.domain.CmcBorrowDetail;
8
+import com.ruoyi.oa.service.ICmcBorrowDetailService;
9
+
10
+/**
11
+ * cmc借款明细Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-04-07
15
+ */
16
+@Service
17
+public class CmcBorrowDetailServiceImpl implements ICmcBorrowDetailService 
18
+{
19
+    @Autowired
20
+    private CmcBorrowDetailMapper cmcBorrowDetailMapper;
21
+
22
+    /**
23
+     * 查询cmc借款明细
24
+     * 
25
+     * @param borrowDetailId cmc借款明细主键
26
+     * @return cmc借款明细
27
+     */
28
+    @Override
29
+    public CmcBorrowDetail selectCmcBorrowDetailByBorrowDetailId(String borrowDetailId)
30
+    {
31
+        return cmcBorrowDetailMapper.selectCmcBorrowDetailByBorrowDetailId(borrowDetailId);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc借款明细列表
36
+     * 
37
+     * @param cmcBorrowDetail cmc借款明细
38
+     * @return cmc借款明细
39
+     */
40
+    @Override
41
+    public List<CmcBorrowDetail> selectCmcBorrowDetailList(CmcBorrowDetail cmcBorrowDetail)
42
+    {
43
+        return cmcBorrowDetailMapper.selectCmcBorrowDetailList(cmcBorrowDetail);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc借款明细
48
+     * 
49
+     * @param cmcBorrowDetail cmc借款明细
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail)
54
+    {
55
+        return cmcBorrowDetailMapper.insertCmcBorrowDetail(cmcBorrowDetail);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc借款明细
60
+     * 
61
+     * @param cmcBorrowDetail cmc借款明细
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcBorrowDetail(CmcBorrowDetail cmcBorrowDetail)
66
+    {
67
+        return cmcBorrowDetailMapper.updateCmcBorrowDetail(cmcBorrowDetail);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc借款明细
72
+     * 
73
+     * @param borrowDetailIds 需要删除的cmc借款明细主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcBorrowDetailByBorrowDetailIds(String[] borrowDetailIds)
78
+    {
79
+        return cmcBorrowDetailMapper.deleteCmcBorrowDetailByBorrowDetailIds(borrowDetailIds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc借款明细信息
84
+     * 
85
+     * @param borrowDetailId cmc借款明细主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcBorrowDetailByBorrowDetailId(String borrowDetailId)
90
+    {
91
+        return cmcBorrowDetailMapper.deleteCmcBorrowDetailByBorrowDetailId(borrowDetailId);
92
+    }
93
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBorrowServiceImpl.java Datei anzeigen

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcBorrowMapper;
7
+import com.ruoyi.oa.domain.CmcBorrow;
8
+import com.ruoyi.oa.service.ICmcBorrowService;
9
+
10
+/**
11
+ * cmc借款申请Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-04-07
15
+ */
16
+@Service
17
+public class CmcBorrowServiceImpl implements ICmcBorrowService 
18
+{
19
+    @Autowired
20
+    private CmcBorrowMapper cmcBorrowMapper;
21
+
22
+    /**
23
+     * 查询cmc借款申请
24
+     * 
25
+     * @param borrowJd cmc借款申请主键
26
+     * @return cmc借款申请
27
+     */
28
+    @Override
29
+    public CmcBorrow selectCmcBorrowByBorrowJd(String borrowJd)
30
+    {
31
+        return cmcBorrowMapper.selectCmcBorrowByBorrowJd(borrowJd);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc借款申请列表
36
+     * 
37
+     * @param cmcBorrow cmc借款申请
38
+     * @return cmc借款申请
39
+     */
40
+    @Override
41
+    public List<CmcBorrow> selectCmcBorrowList(CmcBorrow cmcBorrow)
42
+    {
43
+        return cmcBorrowMapper.selectCmcBorrowList(cmcBorrow);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc借款申请
48
+     * 
49
+     * @param cmcBorrow cmc借款申请
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcBorrow(CmcBorrow cmcBorrow)
54
+    {
55
+        return cmcBorrowMapper.insertCmcBorrow(cmcBorrow);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc借款申请
60
+     * 
61
+     * @param cmcBorrow cmc借款申请
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcBorrow(CmcBorrow cmcBorrow)
66
+    {
67
+        return cmcBorrowMapper.updateCmcBorrow(cmcBorrow);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc借款申请
72
+     * 
73
+     * @param borrowJds 需要删除的cmc借款申请主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcBorrowByBorrowJds(String[] borrowJds)
78
+    {
79
+        return cmcBorrowMapper.deleteCmcBorrowByBorrowJds(borrowJds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc借款申请信息
84
+     * 
85
+     * @param borrowJd cmc借款申请主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcBorrowByBorrowJd(String borrowJd)
90
+    {
91
+        return cmcBorrowMapper.deleteCmcBorrowByBorrowJd(borrowJd);
92
+    }
93
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBorrowDetailMapper.xml Datei anzeigen

@@ -0,0 +1,93 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.oa.mapper.CmcBorrowDetailMapper">
6
+    
7
+    <resultMap type="CmcBorrowDetail" id="CmcBorrowDetailResult">
8
+        <result property="borrowDetailId"    column="borrow_detail_id"    />
9
+        <result property="borrowId"    column="borrow_id"    />
10
+        <result property="borrowItem"    column="borrow_item"    />
11
+        <result property="unit"    column="unit"    />
12
+        <result property="price"    column="price"    />
13
+        <result property="quantity"    column="quantity"    />
14
+        <result property="applyAmount"    column="apply_amount"    />
15
+        <result property="xmAmount"    column="xm_amount"    />
16
+        <result property="managerAmount"    column="manager_amount"    />
17
+    </resultMap>
18
+
19
+    <sql id="selectCmcBorrowDetailVo">
20
+        select borrow_detail_id, borrow_id, borrow_item, unit, price, quantity, apply_amount, xm_amount, manager_amount from cmc_borrow_detail
21
+    </sql>
22
+
23
+    <select id="selectCmcBorrowDetailList" parameterType="CmcBorrowDetail" resultMap="CmcBorrowDetailResult">
24
+        <include refid="selectCmcBorrowDetailVo"/>
25
+        <where>  
26
+            <if test="borrowId != null  and borrowId != ''"> and borrow_id = #{borrowId}</if>
27
+            <if test="borrowItem != null  and borrowItem != ''"> and borrow_item = #{borrowItem}</if>
28
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
29
+            <if test="price != null "> and price = #{price}</if>
30
+            <if test="quantity != null "> and quantity = #{quantity}</if>
31
+            <if test="applyAmount != null "> and apply_amount = #{applyAmount}</if>
32
+            <if test="xmAmount != null "> and xm_amount = #{xmAmount}</if>
33
+            <if test="managerAmount != null "> and manager_amount = #{managerAmount}</if>
34
+        </where>
35
+    </select>
36
+    
37
+    <select id="selectCmcBorrowDetailByBorrowDetailId" parameterType="String" resultMap="CmcBorrowDetailResult">
38
+        <include refid="selectCmcBorrowDetailVo"/>
39
+        where borrow_detail_id = #{borrowDetailId}
40
+    </select>
41
+        
42
+    <insert id="insertCmcBorrowDetail" parameterType="CmcBorrowDetail">
43
+        insert into cmc_borrow_detail
44
+        <trim prefix="(" suffix=")" suffixOverrides=",">
45
+            <if test="borrowDetailId != null">borrow_detail_id,</if>
46
+            <if test="borrowId != null">borrow_id,</if>
47
+            <if test="borrowItem != null">borrow_item,</if>
48
+            <if test="unit != null">unit,</if>
49
+            <if test="price != null">price,</if>
50
+            <if test="quantity != null">quantity,</if>
51
+            <if test="applyAmount != null">apply_amount,</if>
52
+            <if test="xmAmount != null">xm_amount,</if>
53
+            <if test="managerAmount != null">manager_amount,</if>
54
+         </trim>
55
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
56
+            <if test="borrowDetailId != null">#{borrowDetailId},</if>
57
+            <if test="borrowId != null">#{borrowId},</if>
58
+            <if test="borrowItem != null">#{borrowItem},</if>
59
+            <if test="unit != null">#{unit},</if>
60
+            <if test="price != null">#{price},</if>
61
+            <if test="quantity != null">#{quantity},</if>
62
+            <if test="applyAmount != null">#{applyAmount},</if>
63
+            <if test="xmAmount != null">#{xmAmount},</if>
64
+            <if test="managerAmount != null">#{managerAmount},</if>
65
+         </trim>
66
+    </insert>
67
+
68
+    <update id="updateCmcBorrowDetail" parameterType="CmcBorrowDetail">
69
+        update cmc_borrow_detail
70
+        <trim prefix="SET" suffixOverrides=",">
71
+            <if test="borrowId != null">borrow_id = #{borrowId},</if>
72
+            <if test="borrowItem != null">borrow_item = #{borrowItem},</if>
73
+            <if test="unit != null">unit = #{unit},</if>
74
+            <if test="price != null">price = #{price},</if>
75
+            <if test="quantity != null">quantity = #{quantity},</if>
76
+            <if test="applyAmount != null">apply_amount = #{applyAmount},</if>
77
+            <if test="xmAmount != null">xm_amount = #{xmAmount},</if>
78
+            <if test="managerAmount != null">manager_amount = #{managerAmount},</if>
79
+        </trim>
80
+        where borrow_detail_id = #{borrowDetailId}
81
+    </update>
82
+
83
+    <delete id="deleteCmcBorrowDetailByBorrowDetailId" parameterType="String">
84
+        delete from cmc_borrow_detail where borrow_detail_id = #{borrowDetailId}
85
+    </delete>
86
+
87
+    <delete id="deleteCmcBorrowDetailByBorrowDetailIds" parameterType="String">
88
+        delete from cmc_borrow_detail where borrow_detail_id in 
89
+        <foreach item="borrowDetailId" collection="array" open="(" separator="," close=")">
90
+            #{borrowDetailId}
91
+        </foreach>
92
+    </delete>
93
+</mapper>

+ 163
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBorrowMapper.xml Datei anzeigen

@@ -0,0 +1,163 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.oa.mapper.CmcBorrowMapper">
6
+    
7
+    <resultMap type="CmcBorrow" id="CmcBorrowResult">
8
+        <result property="borrowJd"    column="borrow_jd"    />
9
+        <result property="projectId"    column="project_id"    />
10
+        <result property="borrowType"    column="borrow_type"    />
11
+        <result property="applyReason"    column="apply_reason"    />
12
+        <result property="applier"    column="applier"    />
13
+        <result property="applyDate"    column="apply_date"    />
14
+        <result property="applyAmount"    column="apply_amount"    />
15
+        <result property="managerAmount"    column="manager_amount"    />
16
+        <result property="deptComment"    column="dept_comment"    />
17
+        <result property="deptUserId"    column="dept_user_id"    />
18
+        <result property="xmUserId"    column="xm_user_id"    />
19
+        <result property="xmComment"    column="xm_comment"    />
20
+        <result property="managerComment"    column="manager_comment"    />
21
+        <result property="managerUserId"    column="manager_user_id"    />
22
+        <result property="zjlUserId"    column="zjl_user_id"    />
23
+        <result property="zjlComment"    column="zjl_comment"    />
24
+        <result property="cwUserId"    column="cw_user_id"    />
25
+        <result property="cwComment"    column="cw_comment"    />
26
+        <result property="deptTime"    column="dept_time"    />
27
+        <result property="xmTime"    column="xm_time"    />
28
+        <result property="managerTime"    column="manager_time"    />
29
+        <result property="zjlTime"    column="zjl_time"    />
30
+        <result property="lendTime"    column="lend_time"    />
31
+    </resultMap>
32
+
33
+    <sql id="selectCmcBorrowVo">
34
+        select borrow_jd, project_id, borrow_type, apply_reason, applier, apply_date, apply_amount, manager_amount, dept_comment, dept_user_id, xm_user_id, xm_comment, manager_comment, manager_user_id, zjl_user_id, zjl_comment, cw_user_id, cw_comment, dept_time, xm_time, manager_time, zjl_time, lend_time from cmc_borrow
35
+    </sql>
36
+
37
+    <select id="selectCmcBorrowList" parameterType="CmcBorrow" resultMap="CmcBorrowResult">
38
+        <include refid="selectCmcBorrowVo"/>
39
+        <where>  
40
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
41
+            <if test="borrowType != null  and borrowType != ''"> and borrow_type = #{borrowType}</if>
42
+            <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
43
+            <if test="applier != null "> and applier = #{applier}</if>
44
+            <if test="applyDate != null "> and apply_date = #{applyDate}</if>
45
+            <if test="applyAmount != null "> and apply_amount = #{applyAmount}</if>
46
+            <if test="managerAmount != null "> and manager_amount = #{managerAmount}</if>
47
+            <if test="deptComment != null  and deptComment != ''"> and dept_comment = #{deptComment}</if>
48
+            <if test="deptUserId != null "> and dept_user_id = #{deptUserId}</if>
49
+            <if test="xmUserId != null "> and xm_user_id = #{xmUserId}</if>
50
+            <if test="xmComment != null  and xmComment != ''"> and xm_comment = #{xmComment}</if>
51
+            <if test="managerComment != null  and managerComment != ''"> and manager_comment = #{managerComment}</if>
52
+            <if test="managerUserId != null "> and manager_user_id = #{managerUserId}</if>
53
+            <if test="zjlUserId != null "> and zjl_user_id = #{zjlUserId}</if>
54
+            <if test="zjlComment != null  and zjlComment != ''"> and zjl_comment = #{zjlComment}</if>
55
+            <if test="cwUserId != null "> and cw_user_id = #{cwUserId}</if>
56
+            <if test="cwComment != null  and cwComment != ''"> and cw_comment = #{cwComment}</if>
57
+            <if test="deptTime != null "> and dept_time = #{deptTime}</if>
58
+            <if test="xmTime != null "> and xm_time = #{xmTime}</if>
59
+            <if test="managerTime != null "> and manager_time = #{managerTime}</if>
60
+            <if test="zjlTime != null "> and zjl_time = #{zjlTime}</if>
61
+            <if test="lendTime != null "> and lend_time = #{lendTime}</if>
62
+        </where>
63
+    </select>
64
+    
65
+    <select id="selectCmcBorrowByBorrowJd" parameterType="String" resultMap="CmcBorrowResult">
66
+        <include refid="selectCmcBorrowVo"/>
67
+        where borrow_jd = #{borrowJd}
68
+    </select>
69
+        
70
+    <insert id="insertCmcBorrow" parameterType="CmcBorrow">
71
+        insert into cmc_borrow
72
+        <trim prefix="(" suffix=")" suffixOverrides=",">
73
+            <if test="borrowJd != null">borrow_jd,</if>
74
+            <if test="projectId != null">project_id,</if>
75
+            <if test="borrowType != null">borrow_type,</if>
76
+            <if test="applyReason != null">apply_reason,</if>
77
+            <if test="applier != null">applier,</if>
78
+            <if test="applyDate != null">apply_date,</if>
79
+            <if test="applyAmount != null">apply_amount,</if>
80
+            <if test="managerAmount != null">manager_amount,</if>
81
+            <if test="deptComment != null">dept_comment,</if>
82
+            <if test="deptUserId != null">dept_user_id,</if>
83
+            <if test="xmUserId != null">xm_user_id,</if>
84
+            <if test="xmComment != null">xm_comment,</if>
85
+            <if test="managerComment != null">manager_comment,</if>
86
+            <if test="managerUserId != null">manager_user_id,</if>
87
+            <if test="zjlUserId != null">zjl_user_id,</if>
88
+            <if test="zjlComment != null">zjl_comment,</if>
89
+            <if test="cwUserId != null">cw_user_id,</if>
90
+            <if test="cwComment != null">cw_comment,</if>
91
+            <if test="deptTime != null">dept_time,</if>
92
+            <if test="xmTime != null">xm_time,</if>
93
+            <if test="managerTime != null">manager_time,</if>
94
+            <if test="zjlTime != null">zjl_time,</if>
95
+            <if test="lendTime != null">lend_time,</if>
96
+         </trim>
97
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
98
+            <if test="borrowJd != null">#{borrowJd},</if>
99
+            <if test="projectId != null">#{projectId},</if>
100
+            <if test="borrowType != null">#{borrowType},</if>
101
+            <if test="applyReason != null">#{applyReason},</if>
102
+            <if test="applier != null">#{applier},</if>
103
+            <if test="applyDate != null">#{applyDate},</if>
104
+            <if test="applyAmount != null">#{applyAmount},</if>
105
+            <if test="managerAmount != null">#{managerAmount},</if>
106
+            <if test="deptComment != null">#{deptComment},</if>
107
+            <if test="deptUserId != null">#{deptUserId},</if>
108
+            <if test="xmUserId != null">#{xmUserId},</if>
109
+            <if test="xmComment != null">#{xmComment},</if>
110
+            <if test="managerComment != null">#{managerComment},</if>
111
+            <if test="managerUserId != null">#{managerUserId},</if>
112
+            <if test="zjlUserId != null">#{zjlUserId},</if>
113
+            <if test="zjlComment != null">#{zjlComment},</if>
114
+            <if test="cwUserId != null">#{cwUserId},</if>
115
+            <if test="cwComment != null">#{cwComment},</if>
116
+            <if test="deptTime != null">#{deptTime},</if>
117
+            <if test="xmTime != null">#{xmTime},</if>
118
+            <if test="managerTime != null">#{managerTime},</if>
119
+            <if test="zjlTime != null">#{zjlTime},</if>
120
+            <if test="lendTime != null">#{lendTime},</if>
121
+         </trim>
122
+    </insert>
123
+
124
+    <update id="updateCmcBorrow" parameterType="CmcBorrow">
125
+        update cmc_borrow
126
+        <trim prefix="SET" suffixOverrides=",">
127
+            <if test="projectId != null">project_id = #{projectId},</if>
128
+            <if test="borrowType != null">borrow_type = #{borrowType},</if>
129
+            <if test="applyReason != null">apply_reason = #{applyReason},</if>
130
+            <if test="applier != null">applier = #{applier},</if>
131
+            <if test="applyDate != null">apply_date = #{applyDate},</if>
132
+            <if test="applyAmount != null">apply_amount = #{applyAmount},</if>
133
+            <if test="managerAmount != null">manager_amount = #{managerAmount},</if>
134
+            <if test="deptComment != null">dept_comment = #{deptComment},</if>
135
+            <if test="deptUserId != null">dept_user_id = #{deptUserId},</if>
136
+            <if test="xmUserId != null">xm_user_id = #{xmUserId},</if>
137
+            <if test="xmComment != null">xm_comment = #{xmComment},</if>
138
+            <if test="managerComment != null">manager_comment = #{managerComment},</if>
139
+            <if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
140
+            <if test="zjlUserId != null">zjl_user_id = #{zjlUserId},</if>
141
+            <if test="zjlComment != null">zjl_comment = #{zjlComment},</if>
142
+            <if test="cwUserId != null">cw_user_id = #{cwUserId},</if>
143
+            <if test="cwComment != null">cw_comment = #{cwComment},</if>
144
+            <if test="deptTime != null">dept_time = #{deptTime},</if>
145
+            <if test="xmTime != null">xm_time = #{xmTime},</if>
146
+            <if test="managerTime != null">manager_time = #{managerTime},</if>
147
+            <if test="zjlTime != null">zjl_time = #{zjlTime},</if>
148
+            <if test="lendTime != null">lend_time = #{lendTime},</if>
149
+        </trim>
150
+        where borrow_jd = #{borrowJd}
151
+    </update>
152
+
153
+    <delete id="deleteCmcBorrowByBorrowJd" parameterType="String">
154
+        delete from cmc_borrow where borrow_jd = #{borrowJd}
155
+    </delete>
156
+
157
+    <delete id="deleteCmcBorrowByBorrowJds" parameterType="String">
158
+        delete from cmc_borrow where borrow_jd in 
159
+        <foreach item="borrowJd" collection="array" open="(" separator="," close=")">
160
+            #{borrowJd}
161
+        </foreach>
162
+    </delete>
163
+</mapper>

+ 57
- 0
oa-back/sql/sql.sql Datei anzeigen

@@ -3863,6 +3863,63 @@ create table `cmc_safe`  (
3863 3863
 -- 初始化-安全交底表数据
3864 3864
 -- ----------------------------
3865 3865
 
3866
+-- ----------------------------
3867
+-- 45、cmc借款申请表
3868
+-- ----------------------------
3869
+drop table if exists `cmc_borrow`;
3870
+create table `cmc_borrow`  (
3871
+  `borrow_jd` 		char(19)		not null 	comment '借款申请id',
3872
+  `project_id` 		char(19)  		default null comment '项目id',
3873
+  `borrow_type` 	char(1)  		default null comment '借款类型',
3874
+  `apply_reason` 	varchar(255)  	default null comment '借款事由',
3875
+  `applier` 		bigint 			default null comment '借款人',
3876
+  `apply_date` 		datetime 		default null comment '借款日期',
3877
+  `apply_amount` 	decimal(10, 2) 	default null comment '申请金额',
3878
+  `manager_amount` 	decimal(10, 2) 	default null comment '核准金额',
3879
+  `dept_comment` 	varchar(255)  	default null comment '部门意见',
3880
+  `dept_user_id` 	bigint 			default null comment '部门审批人',
3881
+  `xm_user_id` 		bigint 			default null comment '项目部审批人',
3882
+  `xm_comment` 		varchar(255)  	default null comment '项目部审批意见',
3883
+  `manager_comment` varchar(255)  	default null comment '分管审批意见',
3884
+  `manager_user_id` bigint 			default null comment '分管审批人',
3885
+  `zjl_user_id` 	bigint 			default null comment '总经理审批人',
3886
+  `zjl_comment` 	varchar(255)  	default null comment '总经理审批意见',
3887
+  `cw_user_id` 		bigint 			default null comment '财务部经办人',
3888
+  `cw_comment` 		varchar(255)  	default null comment '财务部支付备注',
3889
+  `dept_time` 		datetime 		default null comment '部门审批时间',
3890
+  `xm_time` 		datetime 		default null comment '项目部审批时间',
3891
+  `manager_time` 	datetime 		default null comment '分管审批时间',
3892
+  `zjl_time` 		datetime 		default null comment '总经理审批时间',
3893
+  `lend_time` 		datetime 		default null comment '借款支付时间',
3894
+  primary key (`borrow_jd`)
3895
+) engine = innodb comment = 'cmc借款申请表';
3896
+
3897
+-- ----------------------------
3898
+-- 初始化-借款申请表数据
3899
+-- ----------------------------
3900
+
3901
+-- ----------------------------
3902
+-- 46、cmc借款明细表
3903
+-- ----------------------------
3904
+drop table if exists `cmc_borrow_detail`;
3905
+create table `cmc_borrow_detail`  (
3906
+  `borrow_detail_id`	char(19)  		not null 	comment '借款明细id',
3907
+  `borrow_id` 			char(19)  		default null comment '借款id',
3908
+  `borrow_item` 		varchar(50)  	default null comment '开支项',
3909
+  `unit` 				varchar(10)  	default null comment '单位',
3910
+  `price` 				decimal(10, 2) 	default null comment '单价',
3911
+  `quantity` 			int 			default null comment '数量',
3912
+  `apply_amount` 		decimal(10, 2) 	default null comment '申请金额',
3913
+  `xm_amount` 			decimal(10, 2) 	default null comment '项目部校核金额',
3914
+  `manager_amount` 		decimal(10, 2) 	default null comment '分管审核金额',
3915
+  primary key (`borrow_detail_id`)
3916
+) engine = innodb comment = 'cmc借款明细表';
3917
+
3918
+-- ----------------------------
3919
+-- 初始化-借款明细表数据
3920
+-- ----------------------------
3921
+
3922
+
3866 3923
 SET NAMES utf8mb4;
3867 3924
 SET FOREIGN_KEY_CHECKS = 0;
3868 3925
 

+ 44
- 0
oa-ui/src/api/oa/borrow/borrow.js Datei anzeigen

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc借款申请列表
4
+export function listBorrow(query) {
5
+  return request({
6
+    url: '/oa/borrow/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc借款申请详细
13
+export function getBorrow(borrowJd) {
14
+  return request({
15
+    url: '/oa/borrow/' + borrowJd,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc借款申请
21
+export function addBorrow(data) {
22
+  return request({
23
+    url: '/oa/borrow',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc借款申请
30
+export function updateBorrow(data) {
31
+  return request({
32
+    url: '/oa/borrow',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc借款申请
39
+export function delBorrow(borrowJd) {
40
+  return request({
41
+    url: '/oa/borrow/' + borrowJd,
42
+    method: 'delete'
43
+  })
44
+}

+ 44
- 0
oa-ui/src/api/oa/borrow/borrowDetail.js Datei anzeigen

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc借款明细列表
4
+export function listBorrowDetail(query) {
5
+  return request({
6
+    url: '/oa/borrowDetail/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc借款明细详细
13
+export function getBorrowDetail(borrowDetailId) {
14
+  return request({
15
+    url: '/oa/borrowDetail/' + borrowDetailId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc借款明细
21
+export function addBorrowDetail(data) {
22
+  return request({
23
+    url: '/oa/borrowDetail',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc借款明细
30
+export function updateBorrowDetail(data) {
31
+  return request({
32
+    url: '/oa/borrowDetail',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc借款明细
39
+export function delBorrowDetail(borrowDetailId) {
40
+  return request({
41
+    url: '/oa/borrowDetail/' + borrowDetailId,
42
+    method: 'delete'
43
+  })
44
+}

+ 343
- 0
oa-ui/src/views/oa/borrow/detail.vue Datei anzeigen

@@ -0,0 +1,343 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
+      <el-form-item label="借款id" prop="borrowId">
5
+        <el-input
6
+          v-model="queryParams.borrowId"
7
+          placeholder="请输入借款id"
8
+          clearable
9
+          @keyup.enter.native="handleQuery"
10
+        />
11
+      </el-form-item>
12
+      <el-form-item label="开支项" prop="borrowItem">
13
+        <el-input
14
+          v-model="queryParams.borrowItem"
15
+          placeholder="请输入开支项"
16
+          clearable
17
+          @keyup.enter.native="handleQuery"
18
+        />
19
+      </el-form-item>
20
+      <el-form-item label="单位" prop="unit">
21
+        <el-input
22
+          v-model="queryParams.unit"
23
+          placeholder="请输入单位"
24
+          clearable
25
+          @keyup.enter.native="handleQuery"
26
+        />
27
+      </el-form-item>
28
+      <el-form-item label="单价" prop="price">
29
+        <el-input
30
+          v-model="queryParams.price"
31
+          placeholder="请输入单价"
32
+          clearable
33
+          @keyup.enter.native="handleQuery"
34
+        />
35
+      </el-form-item>
36
+      <el-form-item label="数量" prop="quantity">
37
+        <el-input
38
+          v-model="queryParams.quantity"
39
+          placeholder="请输入数量"
40
+          clearable
41
+          @keyup.enter.native="handleQuery"
42
+        />
43
+      </el-form-item>
44
+      <el-form-item label="申请金额" prop="applyAmount">
45
+        <el-input
46
+          v-model="queryParams.applyAmount"
47
+          placeholder="请输入申请金额"
48
+          clearable
49
+          @keyup.enter.native="handleQuery"
50
+        />
51
+      </el-form-item>
52
+      <el-form-item label="项目部校核金额" prop="xmAmount">
53
+        <el-input
54
+          v-model="queryParams.xmAmount"
55
+          placeholder="请输入项目部校核金额"
56
+          clearable
57
+          @keyup.enter.native="handleQuery"
58
+        />
59
+      </el-form-item>
60
+      <el-form-item label="分管审核金额" prop="managerAmount">
61
+        <el-input
62
+          v-model="queryParams.managerAmount"
63
+          placeholder="请输入分管审核金额"
64
+          clearable
65
+          @keyup.enter.native="handleQuery"
66
+        />
67
+      </el-form-item>
68
+      <el-form-item>
69
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
70
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
71
+      </el-form-item>
72
+    </el-form>
73
+
74
+    <el-row :gutter="10" class="mb8">
75
+      <el-col :span="1.5">
76
+        <el-button
77
+          type="primary"
78
+          plain
79
+          icon="el-icon-plus"
80
+          size="mini"
81
+          @click="handleAdd"
82
+          v-hasPermi="['oa:borrowDetail:add']"
83
+        >新增</el-button>
84
+      </el-col>
85
+      <el-col :span="1.5">
86
+        <el-button
87
+          type="success"
88
+          plain
89
+          icon="el-icon-edit"
90
+          size="mini"
91
+          :disabled="single"
92
+          @click="handleUpdate"
93
+          v-hasPermi="['oa:borrowDetail:edit']"
94
+        >修改</el-button>
95
+      </el-col>
96
+      <el-col :span="1.5">
97
+        <el-button
98
+          type="danger"
99
+          plain
100
+          icon="el-icon-delete"
101
+          size="mini"
102
+          :disabled="multiple"
103
+          @click="handleDelete"
104
+          v-hasPermi="['oa:borrowDetail:remove']"
105
+        >删除</el-button>
106
+      </el-col>
107
+      <el-col :span="1.5">
108
+        <el-button
109
+          type="warning"
110
+          plain
111
+          icon="el-icon-download"
112
+          size="mini"
113
+          @click="handleExport"
114
+          v-hasPermi="['oa:borrowDetail:export']"
115
+        >导出</el-button>
116
+      </el-col>
117
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
118
+    </el-row>
119
+
120
+    <el-table v-loading="loading" :data="borrowDetailList" @selection-change="handleSelectionChange">
121
+      <el-table-column type="selection" width="55" align="center" />
122
+      <el-table-column label="借款明细id" align="center" prop="borrowDetailId" />
123
+      <el-table-column label="借款id" align="center" prop="borrowId" />
124
+      <el-table-column label="开支项" align="center" prop="borrowItem" />
125
+      <el-table-column label="单位" align="center" prop="unit" />
126
+      <el-table-column label="单价" align="center" prop="price" />
127
+      <el-table-column label="数量" align="center" prop="quantity" />
128
+      <el-table-column label="申请金额" align="center" prop="applyAmount" />
129
+      <el-table-column label="项目部校核金额" align="center" prop="xmAmount" />
130
+      <el-table-column label="分管审核金额" align="center" prop="managerAmount" />
131
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
132
+        <template slot-scope="scope">
133
+          <el-button
134
+            size="mini"
135
+            type="text"
136
+            icon="el-icon-edit"
137
+            @click="handleUpdate(scope.row)"
138
+            v-hasPermi="['oa:borrowDetail:edit']"
139
+          >修改</el-button>
140
+          <el-button
141
+            size="mini"
142
+            type="text"
143
+            icon="el-icon-delete"
144
+            @click="handleDelete(scope.row)"
145
+            v-hasPermi="['oa:borrowDetail:remove']"
146
+          >删除</el-button>
147
+        </template>
148
+      </el-table-column>
149
+    </el-table>
150
+    
151
+    <pagination
152
+      v-show="total>0"
153
+      :total="total"
154
+      :page.sync="queryParams.pageNum"
155
+      :limit.sync="queryParams.pageSize"
156
+      @pagination="getList"
157
+    />
158
+
159
+    <!-- 添加或修改cmc借款明细对话框 -->
160
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
161
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
162
+        <el-form-item label="借款id" prop="borrowId">
163
+          <el-input v-model="form.borrowId" placeholder="请输入借款id" />
164
+        </el-form-item>
165
+        <el-form-item label="开支项" prop="borrowItem">
166
+          <el-input v-model="form.borrowItem" placeholder="请输入开支项" />
167
+        </el-form-item>
168
+        <el-form-item label="单位" prop="unit">
169
+          <el-input v-model="form.unit" placeholder="请输入单位" />
170
+        </el-form-item>
171
+        <el-form-item label="单价" prop="price">
172
+          <el-input v-model="form.price" placeholder="请输入单价" />
173
+        </el-form-item>
174
+        <el-form-item label="数量" prop="quantity">
175
+          <el-input v-model="form.quantity" placeholder="请输入数量" />
176
+        </el-form-item>
177
+        <el-form-item label="申请金额" prop="applyAmount">
178
+          <el-input v-model="form.applyAmount" placeholder="请输入申请金额" />
179
+        </el-form-item>
180
+        <el-form-item label="项目部校核金额" prop="xmAmount">
181
+          <el-input v-model="form.xmAmount" placeholder="请输入项目部校核金额" />
182
+        </el-form-item>
183
+        <el-form-item label="分管审核金额" prop="managerAmount">
184
+          <el-input v-model="form.managerAmount" placeholder="请输入分管审核金额" />
185
+        </el-form-item>
186
+      </el-form>
187
+      <div slot="footer" class="dialog-footer">
188
+        <el-button type="primary" @click="submitForm">确 定</el-button>
189
+        <el-button @click="cancel">取 消</el-button>
190
+      </div>
191
+    </el-dialog>
192
+  </div>
193
+</template>
194
+
195
+<script>
196
+import { listBorrowDetail, getBorrowDetail, delBorrowDetail, addBorrowDetail, updateBorrowDetail } from "@/api/oa/borrow/borrowDetail";
197
+
198
+export default {
199
+  name: "BorrowDetail",
200
+  data() {
201
+    return {
202
+      // 遮罩层
203
+      loading: true,
204
+      // 选中数组
205
+      ids: [],
206
+      // 非单个禁用
207
+      single: true,
208
+      // 非多个禁用
209
+      multiple: true,
210
+      // 显示搜索条件
211
+      showSearch: true,
212
+      // 总条数
213
+      total: 0,
214
+      // cmc借款明细表格数据
215
+      borrowDetailList: [],
216
+      // 弹出层标题
217
+      title: "",
218
+      // 是否显示弹出层
219
+      open: false,
220
+      // 查询参数
221
+      queryParams: {
222
+        pageNum: 1,
223
+        pageSize: 10,
224
+        borrowId: null,
225
+        borrowItem: null,
226
+        unit: null,
227
+        price: null,
228
+        quantity: null,
229
+        applyAmount: null,
230
+        xmAmount: null,
231
+        managerAmount: null
232
+      },
233
+      // 表单参数
234
+      form: {},
235
+      // 表单校验
236
+      rules: {
237
+      }
238
+    };
239
+  },
240
+  created() {
241
+    this.getList();
242
+  },
243
+  methods: {
244
+    /** 查询cmc借款明细列表 */
245
+    getList() {
246
+      this.loading = true;
247
+      listBorrowDetail(this.queryParams).then(response => {
248
+        this.borrowDetailList = response.rows;
249
+        this.total = response.total;
250
+        this.loading = false;
251
+      });
252
+    },
253
+    // 取消按钮
254
+    cancel() {
255
+      this.open = false;
256
+      this.reset();
257
+    },
258
+    // 表单重置
259
+    reset() {
260
+      this.form = {
261
+        borrowDetailId: null,
262
+        borrowId: null,
263
+        borrowItem: null,
264
+        unit: null,
265
+        price: null,
266
+        quantity: null,
267
+        applyAmount: null,
268
+        xmAmount: null,
269
+        managerAmount: null
270
+      };
271
+      this.resetForm("form");
272
+    },
273
+    /** 搜索按钮操作 */
274
+    handleQuery() {
275
+      this.queryParams.pageNum = 1;
276
+      this.getList();
277
+    },
278
+    /** 重置按钮操作 */
279
+    resetQuery() {
280
+      this.resetForm("queryForm");
281
+      this.handleQuery();
282
+    },
283
+    // 多选框选中数据
284
+    handleSelectionChange(selection) {
285
+      this.ids = selection.map(item => item.borrowDetailId)
286
+      this.single = selection.length!==1
287
+      this.multiple = !selection.length
288
+    },
289
+    /** 新增按钮操作 */
290
+    handleAdd() {
291
+      this.reset();
292
+      this.open = true;
293
+      this.title = "添加cmc借款明细";
294
+    },
295
+    /** 修改按钮操作 */
296
+    handleUpdate(row) {
297
+      this.reset();
298
+      const borrowDetailId = row.borrowDetailId || this.ids
299
+      getBorrowDetail(borrowDetailId).then(response => {
300
+        this.form = response.data;
301
+        this.open = true;
302
+        this.title = "修改cmc借款明细";
303
+      });
304
+    },
305
+    /** 提交按钮 */
306
+    submitForm() {
307
+      this.$refs["form"].validate(valid => {
308
+        if (valid) {
309
+          if (this.form.borrowDetailId != null) {
310
+            updateBorrowDetail(this.form).then(response => {
311
+              this.$modal.msgSuccess("修改成功");
312
+              this.open = false;
313
+              this.getList();
314
+            });
315
+          } else {
316
+            addBorrowDetail(this.form).then(response => {
317
+              this.$modal.msgSuccess("新增成功");
318
+              this.open = false;
319
+              this.getList();
320
+            });
321
+          }
322
+        }
323
+      });
324
+    },
325
+    /** 删除按钮操作 */
326
+    handleDelete(row) {
327
+      const borrowDetailIds = row.borrowDetailId || this.ids;
328
+      this.$modal.confirm('是否确认删除cmc借款明细编号为"' + borrowDetailIds + '"的数据项?').then(function() {
329
+        return delBorrowDetail(borrowDetailIds);
330
+      }).then(() => {
331
+        this.getList();
332
+        this.$modal.msgSuccess("删除成功");
333
+      }).catch(() => {});
334
+    },
335
+    /** 导出按钮操作 */
336
+    handleExport() {
337
+      this.download('oa/borrowDetail/export', {
338
+        ...this.queryParams
339
+      }, `borrowDetail_${new Date().getTime()}.xlsx`)
340
+    }
341
+  }
342
+};
343
+</script>

+ 582
- 0
oa-ui/src/views/oa/borrow/index.vue Datei anzeigen

@@ -0,0 +1,582 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
+      <el-form-item label="项目id" prop="projectId">
5
+        <el-input
6
+          v-model="queryParams.projectId"
7
+          placeholder="请输入项目id"
8
+          clearable
9
+          @keyup.enter.native="handleQuery"
10
+        />
11
+      </el-form-item>
12
+      <el-form-item label="借款事由" prop="applyReason">
13
+        <el-input
14
+          v-model="queryParams.applyReason"
15
+          placeholder="请输入借款事由"
16
+          clearable
17
+          @keyup.enter.native="handleQuery"
18
+        />
19
+      </el-form-item>
20
+      <el-form-item label="借款人" prop="applier">
21
+        <el-input
22
+          v-model="queryParams.applier"
23
+          placeholder="请输入借款人"
24
+          clearable
25
+          @keyup.enter.native="handleQuery"
26
+        />
27
+      </el-form-item>
28
+      <el-form-item label="借款日期" prop="applyDate">
29
+        <el-date-picker clearable
30
+          v-model="queryParams.applyDate"
31
+          type="date"
32
+          value-format="yyyy-MM-dd"
33
+          placeholder="请选择借款日期">
34
+        </el-date-picker>
35
+      </el-form-item>
36
+      <el-form-item label="申请金额" prop="applyAmount">
37
+        <el-input
38
+          v-model="queryParams.applyAmount"
39
+          placeholder="请输入申请金额"
40
+          clearable
41
+          @keyup.enter.native="handleQuery"
42
+        />
43
+      </el-form-item>
44
+      <el-form-item label="核准金额" prop="managerAmount">
45
+        <el-input
46
+          v-model="queryParams.managerAmount"
47
+          placeholder="请输入核准金额"
48
+          clearable
49
+          @keyup.enter.native="handleQuery"
50
+        />
51
+      </el-form-item>
52
+      <el-form-item label="部门意见" prop="deptComment">
53
+        <el-input
54
+          v-model="queryParams.deptComment"
55
+          placeholder="请输入部门意见"
56
+          clearable
57
+          @keyup.enter.native="handleQuery"
58
+        />
59
+      </el-form-item>
60
+      <el-form-item label="部门审批人" prop="deptUserId">
61
+        <el-input
62
+          v-model="queryParams.deptUserId"
63
+          placeholder="请输入部门审批人"
64
+          clearable
65
+          @keyup.enter.native="handleQuery"
66
+        />
67
+      </el-form-item>
68
+      <el-form-item label="项目部审批人" prop="xmUserId">
69
+        <el-input
70
+          v-model="queryParams.xmUserId"
71
+          placeholder="请输入项目部审批人"
72
+          clearable
73
+          @keyup.enter.native="handleQuery"
74
+        />
75
+      </el-form-item>
76
+      <el-form-item label="项目部审批意见" prop="xmComment">
77
+        <el-input
78
+          v-model="queryParams.xmComment"
79
+          placeholder="请输入项目部审批意见"
80
+          clearable
81
+          @keyup.enter.native="handleQuery"
82
+        />
83
+      </el-form-item>
84
+      <el-form-item label="分管审批意见" prop="managerComment">
85
+        <el-input
86
+          v-model="queryParams.managerComment"
87
+          placeholder="请输入分管审批意见"
88
+          clearable
89
+          @keyup.enter.native="handleQuery"
90
+        />
91
+      </el-form-item>
92
+      <el-form-item label="分管审批人" prop="managerUserId">
93
+        <el-input
94
+          v-model="queryParams.managerUserId"
95
+          placeholder="请输入分管审批人"
96
+          clearable
97
+          @keyup.enter.native="handleQuery"
98
+        />
99
+      </el-form-item>
100
+      <el-form-item label="总经理审批人" prop="zjlUserId">
101
+        <el-input
102
+          v-model="queryParams.zjlUserId"
103
+          placeholder="请输入总经理审批人"
104
+          clearable
105
+          @keyup.enter.native="handleQuery"
106
+        />
107
+      </el-form-item>
108
+      <el-form-item label="总经理审批意见" prop="zjlComment">
109
+        <el-input
110
+          v-model="queryParams.zjlComment"
111
+          placeholder="请输入总经理审批意见"
112
+          clearable
113
+          @keyup.enter.native="handleQuery"
114
+        />
115
+      </el-form-item>
116
+      <el-form-item label="财务部经办人" prop="cwUserId">
117
+        <el-input
118
+          v-model="queryParams.cwUserId"
119
+          placeholder="请输入财务部经办人"
120
+          clearable
121
+          @keyup.enter.native="handleQuery"
122
+        />
123
+      </el-form-item>
124
+      <el-form-item label="财务部支付备注" prop="cwComment">
125
+        <el-input
126
+          v-model="queryParams.cwComment"
127
+          placeholder="请输入财务部支付备注"
128
+          clearable
129
+          @keyup.enter.native="handleQuery"
130
+        />
131
+      </el-form-item>
132
+      <el-form-item label="部门审批时间" prop="deptTime">
133
+        <el-date-picker clearable
134
+          v-model="queryParams.deptTime"
135
+          type="date"
136
+          value-format="yyyy-MM-dd"
137
+          placeholder="请选择部门审批时间">
138
+        </el-date-picker>
139
+      </el-form-item>
140
+      <el-form-item label="项目部审批时间" prop="xmTime">
141
+        <el-date-picker clearable
142
+          v-model="queryParams.xmTime"
143
+          type="date"
144
+          value-format="yyyy-MM-dd"
145
+          placeholder="请选择项目部审批时间">
146
+        </el-date-picker>
147
+      </el-form-item>
148
+      <el-form-item label="分管审批时间" prop="managerTime">
149
+        <el-date-picker clearable
150
+          v-model="queryParams.managerTime"
151
+          type="date"
152
+          value-format="yyyy-MM-dd"
153
+          placeholder="请选择分管审批时间">
154
+        </el-date-picker>
155
+      </el-form-item>
156
+      <el-form-item label="总经理审批时间" prop="zjlTime">
157
+        <el-date-picker clearable
158
+          v-model="queryParams.zjlTime"
159
+          type="date"
160
+          value-format="yyyy-MM-dd"
161
+          placeholder="请选择总经理审批时间">
162
+        </el-date-picker>
163
+      </el-form-item>
164
+      <el-form-item label="借款支付时间" prop="lendTime">
165
+        <el-date-picker clearable
166
+          v-model="queryParams.lendTime"
167
+          type="date"
168
+          value-format="yyyy-MM-dd"
169
+          placeholder="请选择借款支付时间">
170
+        </el-date-picker>
171
+      </el-form-item>
172
+      <el-form-item>
173
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
174
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
175
+      </el-form-item>
176
+    </el-form>
177
+
178
+    <el-row :gutter="10" class="mb8">
179
+      <el-col :span="1.5">
180
+        <el-button
181
+          type="primary"
182
+          plain
183
+          icon="el-icon-plus"
184
+          size="mini"
185
+          @click="handleAdd"
186
+          v-hasPermi="['oa:borrow:add']"
187
+        >新增</el-button>
188
+      </el-col>
189
+      <el-col :span="1.5">
190
+        <el-button
191
+          type="success"
192
+          plain
193
+          icon="el-icon-edit"
194
+          size="mini"
195
+          :disabled="single"
196
+          @click="handleUpdate"
197
+          v-hasPermi="['oa:borrow:edit']"
198
+        >修改</el-button>
199
+      </el-col>
200
+      <el-col :span="1.5">
201
+        <el-button
202
+          type="danger"
203
+          plain
204
+          icon="el-icon-delete"
205
+          size="mini"
206
+          :disabled="multiple"
207
+          @click="handleDelete"
208
+          v-hasPermi="['oa:borrow:remove']"
209
+        >删除</el-button>
210
+      </el-col>
211
+      <el-col :span="1.5">
212
+        <el-button
213
+          type="warning"
214
+          plain
215
+          icon="el-icon-download"
216
+          size="mini"
217
+          @click="handleExport"
218
+          v-hasPermi="['oa:borrow:export']"
219
+        >导出</el-button>
220
+      </el-col>
221
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
222
+    </el-row>
223
+
224
+    <el-table v-loading="loading" :data="borrowList" @selection-change="handleSelectionChange">
225
+      <el-table-column type="selection" width="55" align="center" />
226
+      <el-table-column label="借款申请id" align="center" prop="borrowJd" />
227
+      <el-table-column label="项目id" align="center" prop="projectId" />
228
+      <el-table-column label="借款类型" align="center" prop="borrowType" />
229
+      <el-table-column label="借款事由" align="center" prop="applyReason" />
230
+      <el-table-column label="借款人" align="center" prop="applier" />
231
+      <el-table-column label="借款日期" align="center" prop="applyDate" width="180">
232
+        <template slot-scope="scope">
233
+          <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
234
+        </template>
235
+      </el-table-column>
236
+      <el-table-column label="申请金额" align="center" prop="applyAmount" />
237
+      <el-table-column label="核准金额" align="center" prop="managerAmount" />
238
+      <el-table-column label="部门意见" align="center" prop="deptComment" />
239
+      <el-table-column label="部门审批人" align="center" prop="deptUserId" />
240
+      <el-table-column label="项目部审批人" align="center" prop="xmUserId" />
241
+      <el-table-column label="项目部审批意见" align="center" prop="xmComment" />
242
+      <el-table-column label="分管审批意见" align="center" prop="managerComment" />
243
+      <el-table-column label="分管审批人" align="center" prop="managerUserId" />
244
+      <el-table-column label="总经理审批人" align="center" prop="zjlUserId" />
245
+      <el-table-column label="总经理审批意见" align="center" prop="zjlComment" />
246
+      <el-table-column label="财务部经办人" align="center" prop="cwUserId" />
247
+      <el-table-column label="财务部支付备注" align="center" prop="cwComment" />
248
+      <el-table-column label="部门审批时间" align="center" prop="deptTime" width="180">
249
+        <template slot-scope="scope">
250
+          <span>{{ parseTime(scope.row.deptTime, '{y}-{m}-{d}') }}</span>
251
+        </template>
252
+      </el-table-column>
253
+      <el-table-column label="项目部审批时间" align="center" prop="xmTime" width="180">
254
+        <template slot-scope="scope">
255
+          <span>{{ parseTime(scope.row.xmTime, '{y}-{m}-{d}') }}</span>
256
+        </template>
257
+      </el-table-column>
258
+      <el-table-column label="分管审批时间" align="center" prop="managerTime" width="180">
259
+        <template slot-scope="scope">
260
+          <span>{{ parseTime(scope.row.managerTime, '{y}-{m}-{d}') }}</span>
261
+        </template>
262
+      </el-table-column>
263
+      <el-table-column label="总经理审批时间" align="center" prop="zjlTime" width="180">
264
+        <template slot-scope="scope">
265
+          <span>{{ parseTime(scope.row.zjlTime, '{y}-{m}-{d}') }}</span>
266
+        </template>
267
+      </el-table-column>
268
+      <el-table-column label="借款支付时间" align="center" prop="lendTime" width="180">
269
+        <template slot-scope="scope">
270
+          <span>{{ parseTime(scope.row.lendTime, '{y}-{m}-{d}') }}</span>
271
+        </template>
272
+      </el-table-column>
273
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
274
+        <template slot-scope="scope">
275
+          <el-button
276
+            size="mini"
277
+            type="text"
278
+            icon="el-icon-edit"
279
+            @click="handleUpdate(scope.row)"
280
+            v-hasPermi="['oa:borrow:edit']"
281
+          >修改</el-button>
282
+          <el-button
283
+            size="mini"
284
+            type="text"
285
+            icon="el-icon-delete"
286
+            @click="handleDelete(scope.row)"
287
+            v-hasPermi="['oa:borrow:remove']"
288
+          >删除</el-button>
289
+        </template>
290
+      </el-table-column>
291
+    </el-table>
292
+    
293
+    <pagination
294
+      v-show="total>0"
295
+      :total="total"
296
+      :page.sync="queryParams.pageNum"
297
+      :limit.sync="queryParams.pageSize"
298
+      @pagination="getList"
299
+    />
300
+
301
+    <!-- 添加或修改cmc借款申请对话框 -->
302
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
303
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
304
+        <el-form-item label="项目id" prop="projectId">
305
+          <el-input v-model="form.projectId" placeholder="请输入项目id" />
306
+        </el-form-item>
307
+        <el-form-item label="借款事由" prop="applyReason">
308
+          <el-input v-model="form.applyReason" placeholder="请输入借款事由" />
309
+        </el-form-item>
310
+        <el-form-item label="借款人" prop="applier">
311
+          <el-input v-model="form.applier" placeholder="请输入借款人" />
312
+        </el-form-item>
313
+        <el-form-item label="借款日期" prop="applyDate">
314
+          <el-date-picker clearable
315
+            v-model="form.applyDate"
316
+            type="date"
317
+            value-format="yyyy-MM-dd"
318
+            placeholder="请选择借款日期">
319
+          </el-date-picker>
320
+        </el-form-item>
321
+        <el-form-item label="申请金额" prop="applyAmount">
322
+          <el-input v-model="form.applyAmount" placeholder="请输入申请金额" />
323
+        </el-form-item>
324
+        <el-form-item label="核准金额" prop="managerAmount">
325
+          <el-input v-model="form.managerAmount" placeholder="请输入核准金额" />
326
+        </el-form-item>
327
+        <el-form-item label="部门意见" prop="deptComment">
328
+          <el-input v-model="form.deptComment" placeholder="请输入部门意见" />
329
+        </el-form-item>
330
+        <el-form-item label="部门审批人" prop="deptUserId">
331
+          <el-input v-model="form.deptUserId" placeholder="请输入部门审批人" />
332
+        </el-form-item>
333
+        <el-form-item label="项目部审批人" prop="xmUserId">
334
+          <el-input v-model="form.xmUserId" placeholder="请输入项目部审批人" />
335
+        </el-form-item>
336
+        <el-form-item label="项目部审批意见" prop="xmComment">
337
+          <el-input v-model="form.xmComment" placeholder="请输入项目部审批意见" />
338
+        </el-form-item>
339
+        <el-form-item label="分管审批意见" prop="managerComment">
340
+          <el-input v-model="form.managerComment" placeholder="请输入分管审批意见" />
341
+        </el-form-item>
342
+        <el-form-item label="分管审批人" prop="managerUserId">
343
+          <el-input v-model="form.managerUserId" placeholder="请输入分管审批人" />
344
+        </el-form-item>
345
+        <el-form-item label="总经理审批人" prop="zjlUserId">
346
+          <el-input v-model="form.zjlUserId" placeholder="请输入总经理审批人" />
347
+        </el-form-item>
348
+        <el-form-item label="总经理审批意见" prop="zjlComment">
349
+          <el-input v-model="form.zjlComment" placeholder="请输入总经理审批意见" />
350
+        </el-form-item>
351
+        <el-form-item label="财务部经办人" prop="cwUserId">
352
+          <el-input v-model="form.cwUserId" placeholder="请输入财务部经办人" />
353
+        </el-form-item>
354
+        <el-form-item label="财务部支付备注" prop="cwComment">
355
+          <el-input v-model="form.cwComment" placeholder="请输入财务部支付备注" />
356
+        </el-form-item>
357
+        <el-form-item label="部门审批时间" prop="deptTime">
358
+          <el-date-picker clearable
359
+            v-model="form.deptTime"
360
+            type="date"
361
+            value-format="yyyy-MM-dd"
362
+            placeholder="请选择部门审批时间">
363
+          </el-date-picker>
364
+        </el-form-item>
365
+        <el-form-item label="项目部审批时间" prop="xmTime">
366
+          <el-date-picker clearable
367
+            v-model="form.xmTime"
368
+            type="date"
369
+            value-format="yyyy-MM-dd"
370
+            placeholder="请选择项目部审批时间">
371
+          </el-date-picker>
372
+        </el-form-item>
373
+        <el-form-item label="分管审批时间" prop="managerTime">
374
+          <el-date-picker clearable
375
+            v-model="form.managerTime"
376
+            type="date"
377
+            value-format="yyyy-MM-dd"
378
+            placeholder="请选择分管审批时间">
379
+          </el-date-picker>
380
+        </el-form-item>
381
+        <el-form-item label="总经理审批时间" prop="zjlTime">
382
+          <el-date-picker clearable
383
+            v-model="form.zjlTime"
384
+            type="date"
385
+            value-format="yyyy-MM-dd"
386
+            placeholder="请选择总经理审批时间">
387
+          </el-date-picker>
388
+        </el-form-item>
389
+        <el-form-item label="借款支付时间" prop="lendTime">
390
+          <el-date-picker clearable
391
+            v-model="form.lendTime"
392
+            type="date"
393
+            value-format="yyyy-MM-dd"
394
+            placeholder="请选择借款支付时间">
395
+          </el-date-picker>
396
+        </el-form-item>
397
+      </el-form>
398
+      <div slot="footer" class="dialog-footer">
399
+        <el-button type="primary" @click="submitForm">确 定</el-button>
400
+        <el-button @click="cancel">取 消</el-button>
401
+      </div>
402
+    </el-dialog>
403
+  </div>
404
+</template>
405
+
406
+<script>
407
+import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
408
+
409
+export default {
410
+  name: "Borrow",
411
+  data() {
412
+    return {
413
+      // 遮罩层
414
+      loading: true,
415
+      // 选中数组
416
+      ids: [],
417
+      // 非单个禁用
418
+      single: true,
419
+      // 非多个禁用
420
+      multiple: true,
421
+      // 显示搜索条件
422
+      showSearch: true,
423
+      // 总条数
424
+      total: 0,
425
+      // cmc借款申请表格数据
426
+      borrowList: [],
427
+      // 弹出层标题
428
+      title: "",
429
+      // 是否显示弹出层
430
+      open: false,
431
+      // 查询参数
432
+      queryParams: {
433
+        pageNum: 1,
434
+        pageSize: 10,
435
+        projectId: null,
436
+        borrowType: null,
437
+        applyReason: null,
438
+        applier: null,
439
+        applyDate: null,
440
+        applyAmount: null,
441
+        managerAmount: null,
442
+        deptComment: null,
443
+        deptUserId: null,
444
+        xmUserId: null,
445
+        xmComment: null,
446
+        managerComment: null,
447
+        managerUserId: null,
448
+        zjlUserId: null,
449
+        zjlComment: null,
450
+        cwUserId: null,
451
+        cwComment: null,
452
+        deptTime: null,
453
+        xmTime: null,
454
+        managerTime: null,
455
+        zjlTime: null,
456
+        lendTime: null
457
+      },
458
+      // 表单参数
459
+      form: {},
460
+      // 表单校验
461
+      rules: {
462
+      }
463
+    };
464
+  },
465
+  created() {
466
+    this.getList();
467
+  },
468
+  methods: {
469
+    /** 查询cmc借款申请列表 */
470
+    getList() {
471
+      this.loading = true;
472
+      listBorrow(this.queryParams).then(response => {
473
+        this.borrowList = response.rows;
474
+        this.total = response.total;
475
+        this.loading = false;
476
+      });
477
+    },
478
+    // 取消按钮
479
+    cancel() {
480
+      this.open = false;
481
+      this.reset();
482
+    },
483
+    // 表单重置
484
+    reset() {
485
+      this.form = {
486
+        borrowJd: null,
487
+        projectId: null,
488
+        borrowType: null,
489
+        applyReason: null,
490
+        applier: null,
491
+        applyDate: null,
492
+        applyAmount: null,
493
+        managerAmount: null,
494
+        deptComment: null,
495
+        deptUserId: null,
496
+        xmUserId: null,
497
+        xmComment: null,
498
+        managerComment: null,
499
+        managerUserId: null,
500
+        zjlUserId: null,
501
+        zjlComment: null,
502
+        cwUserId: null,
503
+        cwComment: null,
504
+        deptTime: null,
505
+        xmTime: null,
506
+        managerTime: null,
507
+        zjlTime: null,
508
+        lendTime: null
509
+      };
510
+      this.resetForm("form");
511
+    },
512
+    /** 搜索按钮操作 */
513
+    handleQuery() {
514
+      this.queryParams.pageNum = 1;
515
+      this.getList();
516
+    },
517
+    /** 重置按钮操作 */
518
+    resetQuery() {
519
+      this.resetForm("queryForm");
520
+      this.handleQuery();
521
+    },
522
+    // 多选框选中数据
523
+    handleSelectionChange(selection) {
524
+      this.ids = selection.map(item => item.borrowJd)
525
+      this.single = selection.length!==1
526
+      this.multiple = !selection.length
527
+    },
528
+    /** 新增按钮操作 */
529
+    handleAdd() {
530
+      this.reset();
531
+      this.open = true;
532
+      this.title = "添加cmc借款申请";
533
+    },
534
+    /** 修改按钮操作 */
535
+    handleUpdate(row) {
536
+      this.reset();
537
+      const borrowJd = row.borrowJd || this.ids
538
+      getBorrow(borrowJd).then(response => {
539
+        this.form = response.data;
540
+        this.open = true;
541
+        this.title = "修改cmc借款申请";
542
+      });
543
+    },
544
+    /** 提交按钮 */
545
+    submitForm() {
546
+      this.$refs["form"].validate(valid => {
547
+        if (valid) {
548
+          if (this.form.borrowJd != null) {
549
+            updateBorrow(this.form).then(response => {
550
+              this.$modal.msgSuccess("修改成功");
551
+              this.open = false;
552
+              this.getList();
553
+            });
554
+          } else {
555
+            addBorrow(this.form).then(response => {
556
+              this.$modal.msgSuccess("新增成功");
557
+              this.open = false;
558
+              this.getList();
559
+            });
560
+          }
561
+        }
562
+      });
563
+    },
564
+    /** 删除按钮操作 */
565
+    handleDelete(row) {
566
+      const borrowJds = row.borrowJd || this.ids;
567
+      this.$modal.confirm('是否确认删除cmc借款申请编号为"' + borrowJds + '"的数据项?').then(function() {
568
+        return delBorrow(borrowJds);
569
+      }).then(() => {
570
+        this.getList();
571
+        this.$modal.msgSuccess("删除成功");
572
+      }).catch(() => {});
573
+    },
574
+    /** 导出按钮操作 */
575
+    handleExport() {
576
+      this.download('oa/borrow/export', {
577
+        ...this.queryParams
578
+      }, `borrow_${new Date().getTime()}.xlsx`)
579
+    }
580
+  }
581
+};
582
+</script>

Laden…
Abbrechen
Speichern