Browse Source

需求新增部分

laiguoran 2 years ago
parent
commit
da38d50e8a

+ 3 - 0
app/public/js/payment_process.js

@@ -25,6 +25,7 @@ $(function () {
                 html.push(`<tr data-id="${data.id}">\n`);
                 html.push(`<td>${data.rpt_name}</td>\n`);
                 html.push(`<td>${data.user_name}</td>\n`);
+                html.push(`<td>${_.find(accountList, { id: data.uid }).name}</td>\n`);
                 html.push('</tr>\n');
             }
             tenderRptList = result;
@@ -322,7 +323,9 @@ $(function () {
             if (result.updateRows) {
                 toastr.warning('上报人不能同时作为审批人,审批流已移除 ' + user.name);
             }
+            $('#tender_rpt_table tr[data-id="'+ this_tr_id +'"]').children('td').eq(2).html(user.name);
             makeProcess(this_tr_id);
+
         });
         //
         // const this_status = parseInt($(this).parents('.lc-show').siblings('.form-group').find('input:checked').val());

+ 1 - 0
app/service/payment_tender_rpt.js

@@ -237,6 +237,7 @@ module.exports = app => {
                 const result1 = await this.ctx.service.paymentDetail.updateReport(transaction, tr_id, data.uid);
                 // 判断固定审批流或固定终审是否存在上报人,有则移除
                 const result2 = await this.ctx.service.paymentShenpiAudit.removeAuditByReport(transaction, tr_id, data.uid);
+                await this.ctx.service.paymentPermissionAudit.saveAudits(this.ctx.session.sessionProject.id, [userInfo], transaction);
                 await transaction.commit();
                 let tenderRptList = await this.getProcessList(this.ctx.tender.id);
                 tenderRptList = this._.filter(tenderRptList, { type: 0, is_del: 0 });

+ 5 - 3
app/view/payment/process.ejs

@@ -69,15 +69,17 @@
                                     <table class="table table-bordered">
                                         <thead>
                                         <tr>
-                                            <th>名称</th>
-                                            <th>添加人</th>
+                                            <th class="text-center">名称</th>
+                                            <th class="text-center">添加人</th>
+                                            <th class="text-center">上报人</th>
                                         </tr>
                                         </thead>
                                         <tbody id="tender_rpt_table" style="cursor: pointer">
                                         <% for (const tr of tenderRptList) { %>
                                         <tr data-id="<%- tr.id %>">
                                             <td><%- tr.rpt_name  %></td>
-                                            <td><%- tr.user_name %></td>
+                                            <td class="text-center"><%- tr.user_name %></td>
+                                            <td class="text-center"><%- ctx.helper._.find(accountList, { id: tr.uid }).name %></td>
                                         </tr>
                                         <% } %>
                                         </tbody>