Pārlūkot izejas kodu

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 2 gadi atpakaļ
vecāks
revīzija
fc880285f4

+ 83 - 11
app/controller/payment_controller.js

@@ -305,6 +305,55 @@ module.exports = app => {
         async detail(ctx) {
             try {
                 await this._getDetailAuditViewData(ctx);
+                // 报表信息实时更新
+                if (ctx.trInfo.uid === ctx.session.sessionUser.accountId && ctx.trInfo.is_del === 0 && ctx.trInfo.rpt_id &&
+                    (ctx.detail.status === auditConst.status.uncheck || ctx.detail.status === auditConst.status.checkNo)) {
+                    const rptTpl = await ctx.service.rptTpl.getDataById(ctx.trInfo.rpt_id);
+                    if (rptTpl) {
+                        const pageRst = await ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
+                        const rptMsg = pageRst.items[0];
+                        // 判断与原有的报表审批人列表是否有区别
+                        let difference = false;
+                        let auditDifference = false;
+                        let needChange = false;
+                        if (ctx.trInfo.report_items_json) {
+                            const report_items_json = JSON.parse(ctx.trInfo.report_items_json);
+                            const items = ['cells', 'signature_audit_cells', 'signature_cells', 'signature_date_cells', 'interact_cells'];
+                            for (const item of items) {
+                                if (report_items_json[item] &&
+                                    !ctx.helper._.isEmpty(ctx.helper._.differenceWith(JSON.parse(JSON.stringify(rptMsg[item])), report_items_json[item], ctx.helper._.isEqual))) {
+                                    // 因为interact_cells里存在undefind值,必须先用JSON.parse和JSON.stringify转义才能对比
+                                    difference = true;
+                                    needChange = true;
+                                    if (item === 'signature_cells') {
+                                        auditDifference = true;
+                                    }
+                                    // break;
+                                }
+                            }
+                        } else {
+                            difference = true;
+                        }
+                        if (difference) {
+                            // 删除rpt_audit重新配置
+                            const updateData = {
+                                id: ctx.trInfo.id,
+                                report_items_json: JSON.stringify(ctx.helper._.cloneDeep(rptMsg)),
+                            };
+                            // 删除rpt_audit重新配置
+                            if (auditDifference) {
+                                updateData.rpt_audit = null;
+                                ctx.trInfo.rpt_audit = null;
+                            }
+                            if (needChange) {
+                                updateData.is_change = 1;
+                                ctx.trInfo.is_change = 1;
+                            }
+                            await ctx.service.paymentTenderRpt.defaultUpdate(updateData);
+                            ctx.trInfo.report_items_json = rptMsg;
+                        }
+                    }
+                }
                 const renderData = {
                     trInfo: ctx.trInfo,
                     paymentConst,
@@ -376,7 +425,6 @@ module.exports = app => {
                         return { groupName: item, groupList };
                     });
                 }
-                renderData.rptAuditList = await ctx.service.paymentRptAudit.getListByDetail(ctx.detail.id);
                 await this.layout('payment/detail.ejs', renderData, 'payment/detail_modal.ejs');
             } catch (err) {
                 console.log(err);
@@ -399,7 +447,7 @@ module.exports = app => {
                 if (ctx.detail.uid !== ctx.session.sessionUser.accountId && data.type !== 'update_sign') {
                     throw '您无权操作';
                 }
-                if (data.type !== 'update_sign' && (ctx.detail.status === auditConst.status.checking || ctx.detail.status === auditConst.status.checked)) {
+                if (data.type !== 'update_sign' && ctx.detail.status !== auditConst.status.uncheck && ctx.detail.status !== auditConst.status.checkNo) {
                     throw '您无权操作';
                 }
                 const responseData = {
@@ -451,6 +499,16 @@ module.exports = app => {
                         }
                         responseData.data = await ctx.service.paymentDetailAudit.getAuditors(ctx.detail.id, ctx.detail.times);
                         break;
+                    case 'follow_rpt_audit':
+                        if (ctx.trInfo.shenpi_status === shenpiConst.sp_status.gdspl) {
+                            throw '当前表单已设置为固定审批流,无法同步';
+                        }
+                        const result3 = await ctx.service.paymentDetailAudit.followAuditByRptAudit(ctx.detail);
+                        if (!result3) {
+                            throw '同步表单角色失败';
+                        }
+                        responseData.data = await ctx.service.paymentDetailAudit.getAuditorsWithOwner(ctx.detail.id, ctx.detail.times);
+                        break;
                     default: throw '参数有误';
                 }
                 ctx.body = responseData;
@@ -529,7 +587,7 @@ module.exports = app => {
                 await this.getNewRptProjectList(ctx, newRptList, rptProjectList, 1);
                 const tenderRptList = await ctx.service.paymentTenderRpt.getProcessList(ctx.tender.id);
                 if (tenderRptList === -1) {
-                    throw '未配置审批模块,请联系管理员处理';
+                    throw '未配置表单设置,请联系管理员处理';
                 }
                 return await ctx.service.paymentTenderRpt.checkAndUpdateList(tenderRptList, rptProjectList, formProcess);
             }
@@ -636,7 +694,7 @@ module.exports = app => {
             try {
                 const tenderRptList = await this._returnRptProjectList(ctx);
                 if (tenderRptList === -1) {
-                    throw '未配置审批模块,请联系管理员处理';
+                    throw '未配置表单设置,请联系管理员处理';
                 }
                 if (tenderRptList.length === 0) {
                     throw '未配置表单设置,请联系管理员处理';
@@ -684,6 +742,8 @@ module.exports = app => {
                         renderData.rptMsg = pageRst.items[0];
                         // 判断与原有的报表审批人列表是否有区别
                         let difference = false;
+                        let auditDifference = false;
+                        let needChange = false;
                         if (trInfo.report_items_json) {
                             const report_items_json = JSON.parse(trInfo.report_items_json);
                             const items = ['cells', 'signature_audit_cells', 'signature_cells', 'signature_date_cells', 'interact_cells'];
@@ -692,20 +752,32 @@ module.exports = app => {
                                     !ctx.helper._.isEmpty(ctx.helper._.differenceWith(JSON.parse(JSON.stringify(renderData.rptMsg[item])), report_items_json[item], ctx.helper._.isEqual))) {
                                     // 因为interact_cells里存在undefind值,必须先用JSON.parse和JSON.stringify转义才能对比
                                     difference = true;
-                                    break;
+                                    needChange = true;
+                                    if (item === 'signature_cells') {
+                                        auditDifference = true;
+                                    }
+                                    // break;
                                 }
                             }
+                        } else {
+                            difference = true;
                         }
                         if (difference) {
                             // 删除rpt_audit重新配置
-                            await ctx.service.paymentTenderRpt.defaultUpdate({
+                            const updateData = {
                                 id: trInfo.id,
                                 report_items_json: JSON.stringify(ctx.helper._.cloneDeep(renderData.rptMsg)),
-                                rpt_audit: null,
-                                is_change: 1,
-                            });
-                            trInfo.rpt_audit = null;
-                            trInfo.is_change = 1;
+                            };
+                            // 删除rpt_audit重新配置
+                            if (auditDifference) {
+                                updateData.rpt_audit = null;
+                                trInfo.rpt_audit = null;
+                            }
+                            if (needChange) {
+                                updateData.is_change = 1;
+                                trInfo.is_change = 1;
+                            }
+                            await ctx.service.paymentTenderRpt.defaultUpdate(updateData);
                             trInfo.report_items_json = renderData.rptMsg;
                         }
                         if (trInfo.rpt_audit) {

+ 2 - 2
app/middleware/payment_detail_check.js

@@ -37,11 +37,11 @@ module.exports = options => {
             // 读取原报、审核人数据
             detail.auditors = yield this.service.paymentDetailAudit.getAuditors(detail.id, detail.times);
             detail.curAuditor = yield this.service.paymentDetailAudit.getCurAuditor(detail.id, detail.times);
-            const rptAudits = yield this.service.paymentRptAudit.getAllDataByCondition({ where: { td_id: detail.id } });
+            detail.rptAudits = yield this.service.paymentRptAudit.getListByDetail(detail.id);
 
             const accountId = this.session.sessionUser.accountId,
                 auditorIds = _.map(detail.auditors, 'aid'),
-                rptAuditIds = _.map(rptAudits, 'uid');
+                rptAuditIds = _.map(detail.rptAudits, 'uid');
             if (accountId === detail.uid) { // 原报
                 detail.curTimes = detail.times;
                 if (detail.status === status.uncheck || detail.status === status.checkNo) {

+ 48 - 56
app/public/js/payment_detail_audit.js

@@ -69,68 +69,52 @@ $(document).ready(function () {
             })
         }
         return false
-    })
+    });
+
+    function remakeShenpiHtml(datas) {
+        const html = [];
+        // 如果是重新上报,添加到重新上报列表中
+        const auditorshtml = [];
+        for (const [index,data] of datas.entries()) {
+            if (index !== 0) {
+                html.push('<li class="list-group-item" auditorId="'+ data.aid +'">');
+                if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
+                    html.push('<a href="javascript: void(0)" class="text-danger pull-right">移除</a>');
+                }
+                html.push('<span>');
+                html.push(data.order + ' ');
+                html.push(data.name + ' ');
+                html.push('</span>');
+                if (_.findIndex(rptAuditList, { uid: data.aid }) !== -1) {
+                    html.push('&nbsp;(' + _.find(rptAuditList, { uid: data.aid }).signature_name + ')');
+                }
+                html.push('<small class="text-muted">');
+                html.push(data.role);
+                html.push('</small></li>');
+            }
+            // 添加新审批人流程修改
+            auditorshtml.push('<li class="list-group-item" data-auditorid="' + data.aid + '">');
+            auditorshtml.push('<i class="fa ' + (index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i> ');
+            auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
+            if (index === 0) {
+                auditorshtml.push('<span class="pull-right">原报</span>');
+            } else if (index+1 === datas.length) {
+                auditorshtml.push('<span class="pull-right">终审</span>');
+            } else {
+                auditorshtml.push('<span class="pull-right">'+ transFormToChinese(index) +'审</span>');
+            }
+            auditorshtml.push('</li>');
+        }
+        $('#auditors').html(html.join(''));
+        $('#auditors-list').html(auditorshtml.join(''));
+    }
 
     // 添加到审批流程中
     $('dl').on('click', 'dd', function () {
         const id = parseInt($(this).data('id'));
         if (id) {
             postData('/payment/' + tenderId + '/detail/' + detailId + '/save', { type: 'add_audit', auditorId: id }, (datas) => {
-                const html = [];
-                // 如果是重新上报,添加到重新上报列表中
-                const auditorshtml = [];
-                for (const [index,data] of datas.entries()) {
-                    if (index !== 0) {
-                        html.push('<li class="list-group-item" auditorId="'+ data.aid +'">');
-                        if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
-                            html.push('<a href="javascript: void(0)" class="text-danger pull-right">移除</a>');
-                        }
-                        html.push('<span>');
-                        html.push(data.order + ' ');
-                        html.push(data.name + ' ');
-                        html.push('</span>');
-                        if (_.findIndex(rptAuditList, { uid: data.aid }) !== -1) {
-                            html.push('&nbsp;(' + _.find(rptAuditList, { uid: data.aid }).signature_name + ')');
-                        }
-                        html.push('<small class="text-muted">');
-                        html.push(data.role);
-                        html.push('</small></li>');
-                    }
-                    // 添加新审批人流程修改
-                    auditorshtml.push('<li class="list-group-item" data-auditorid="' + data.aid + '">');
-                    auditorshtml.push('<i class="fa ' + (index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i> ');
-                    auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
-                    if (index === 0) {
-                        auditorshtml.push('<span class="pull-right">原报</span>');
-                    } else if (index+1 === datas.length) {
-                        auditorshtml.push('<span class="pull-right">终审</span>');
-                    } else {
-                        auditorshtml.push('<span class="pull-right">'+ transFormToChinese(index) +'审</span>');
-                    }
-                    auditorshtml.push('</li>');
-                }
-                $('#auditors').html(html.join(''));
-
-
-                // 重新上报时。令其它的审批人流程图标转换
-                // $('#auditors-list li i').removeClass('fa-stop-circle').addClass('fa-chevron-circle-down');
-                // for (let i = 0; i < $('#auditors-list li').length; i++) {
-                //     $('#auditors-list li').eq(i).find('.pull-right').text(transFormToChinese(i+1) + '审');
-                //     $('#auditors-list2 li').eq(i).find('.pull-right').text(transFormToChinese(i+1) + '审');
-                // }
-
-                $('#auditors-list').html(auditorshtml.join(''));
-
-                // const auditorshtml2 = [];
-                // // 重新上报时。令其它的审批人流程图标转换
-                // $('#auditors-list2 li i').removeClass('fa-stop-circle').addClass('fa-chevron-circle-down');
-                // // 添加新审批人
-                // auditorshtml2.push('<li class="list-group-item" data-auditid="' + data.aid + '">');
-                // auditorshtml2.push('<h5 class="card-title"><i class="fa fa-stop-circle"></i> ');
-                // auditorshtml2.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
-                // auditorshtml2.push('<span class="pull-right">终审</span>');
-                // auditorshtml2.push('</h5></li>');
-                // $('#auditors-list2').append(auditorshtml2.join(''));
+                remakeShenpiHtml(datas);
             });
         }
     });
@@ -207,6 +191,14 @@ $(document).ready(function () {
             }
         });
     });
+
+    // 同步报表角色
+    $('#follow_rpt_audit_btn').click(function () {
+        postData('/payment/' + tenderId + '/detail/' + detailId + '/save', { type: 'follow_rpt_audit' }, (datas) => {
+            toastr.success('同步成功');
+            remakeShenpiHtml(datas);
+        });
+    });
 });
 // 检查上报情况
 function checkAuditorFrom () {

+ 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>${data.uid ? _.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());

+ 52 - 0
app/service/payment_detail_audit.js

@@ -450,6 +450,14 @@ module.exports = app => {
                     times: times + 1,
                     report_json: JSON.stringify(report_json),
                 });
+                // 清空签名
+                await transaction.update(this.ctx.service.paymentRptAudit.tableName, {
+                    signature_msg: null,
+                }, {
+                    where: {
+                        td_id: detailId,
+                    },
+                });
                 // 拷贝新一次审核流程列表
                 await transaction.insert(this.tableName, auditors);
 
@@ -529,6 +537,50 @@ module.exports = app => {
                     throw '无效审批操作';
             }
         }
+
+        async followAuditByRptAudit(detail) {
+            const transaction = await this.db.beginTransaction();
+            try {
+                const newAuditIds = this._.map(detail.rptAudits, 'uid');
+                // 去除上报人
+                if (this._.includes(newAuditIds, detail.uid)) {
+                    this._.pull(newAuditIds, detail.uid);
+                }
+                // 如果存在固定终审,判断它是否在报表人员里,存在则把该id移到最后,不存在则插入newAuditIds最后;
+                if (this.ctx.trInfo.sp_status === shenpiConst.sp_status.gdzs) {
+                    const gdzsInfo = await this.ctx.service.paymentShenpiAudit.getAudit(detail.tender_id, detail.tr_id, shenpiConst.sp_status.gdzs);
+                    if (gdzsInfo && gdzsInfo.audit_id !== newAuditIds[newAuditIds.length - 1]) {
+                        if (this._.includes(newAuditIds, gdzsInfo.audit_id)) {
+                            this._.pull(newAuditIds, gdzsInfo.audit_id);
+                        }
+                        newAuditIds.push(gdzsInfo.audit_id);
+                    }
+                }
+                // 删除原审批流
+                await transaction.delete(this.tableName, { td_id: detail.id, times: detail.times });
+                // 添加新审批流
+                const insertDatas = [];
+                let order = 1;
+                for (const id of newAuditIds) {
+                    insertDatas.push({
+                        tender_id: detail.tender_id,
+                        tr_id: detail.tr_id,
+                        td_id: detail.id,
+                        aid: id,
+                        order,
+                        times: detail.times,
+                        status: auditConst.status.uncheck,
+                    });
+                    order = order + 1;
+                }
+                if (insertDatas.length > 0) await transaction.insert(this.tableName, insertDatas);
+                await transaction.commit();
+                return true;
+            } catch (error) {
+                await transaction.rollback();
+                throw error;
+            }
+        }
     }
 
     return PaymentDetailAudit;

+ 11 - 3
app/service/payment_folder.js

@@ -130,6 +130,7 @@ module.exports = app => {
                 if (folderList.length > 0) {
                     const leafFolderList = this._.filter(folderList, { is_leaf: 1 });
                     const parentFolderIdList = this._.map(this._.filter(folderList, { is_leaf: 0 }), 'id');
+                    const allNotExistFolderIds = [];
                     for (const lf of leafFolderList) {
                         let parentPathArray = lf.parent_path !== '' ? lf.parent_path.split('-') : [];
                         if (parentPathArray.length > 0) {
@@ -139,14 +140,21 @@ module.exports = app => {
                         }
                         const notExistFolderIds = this._.difference(parentPathArray, parentFolderIdList);
                         if (notExistFolderIds.length > 0) {
-                            const newFolderList = await this.getAllDataByCondition({ where: { id: notExistFolderIds } });
-                            console.log(newFolderList);
-                            folderList = [...folderList, ...newFolderList];
+                            for (const id of notExistFolderIds) {
+                                if (!this._.includes(allNotExistFolderIds, id)) {
+                                    allNotExistFolderIds.push(id);
+                                }
+                            }
                         }
                     }
+                    if (allNotExistFolderIds.length > 0) {
+                        const newFolderList = await this.getAllDataByCondition({ where: { id: allNotExistFolderIds } });
+                        folderList = [...folderList, ...newFolderList];
+                    }
                 }
             }
             if (folderList.length > 0) {
+                // folderList = this._.uniqBy(folderList, 'id');
                 for (const f of folderList) {
                     const userInfo = this._.find(accountList, { id: f.uid });
                     f.user_name = userInfo ? userInfo.name : '';

+ 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 - 4
app/view/payment/audit_modal.ejs

@@ -17,7 +17,7 @@
                                     报表表单角色
                                 </div>
                                 <ul class="list-group list-group-flush">
-                                    <% for (const [index, ra] of rptAuditList.entries()) { %>
+                                    <% for (const [index, ra] of ctx.detail.rptAudits.entries()) { %>
                                         <li class="list-group-item">
                                             <div class="row">
                                                 <span class="col-2"><%- index+1 %></span>
@@ -32,6 +32,7 @@
                         <div class="col-7" style="overflow: auto">
                             <div class="dropdown text-right">
                                 <% if (trInfo.sp_status !== shenpiConst.sp_status.gdspl && ctx.session.sessionUser.accountId === ctx.detail.uid) { %>
+                                    <button class="btn btn-sm btn-primary mr-2" id="follow_rpt_audit_btn">同步表单角色</button>
                                     <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
                                             id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
                                             aria-expanded="false">
@@ -48,7 +49,7 @@
                                                     <% group.groupList.forEach(item => { %>
                                                         <% if (item.id !== ctx.session.sessionUser.accountId) { %>
                                                             <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
-                                                                <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span> <% if (ctx.helper._.findIndex(rptAuditList, { uid: item.id }) !== -1) { %>&nbsp;(<%- ctx.helper._.find(rptAuditList, { uid: item.id }).signature_name %>)<% } %><span
+                                                                <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span> <% if (ctx.helper._.findIndex(ctx.detail.rptAudits, { uid: item.id }) !== -1) { %>&nbsp;(<%- ctx.helper._.find(ctx.detail.rptAudits, { uid: item.id }).signature_name %>)<% } %><span
                                                                             class="ml-auto"><%- item.mobile %></span></p>
                                                                 <span class="text-muted"><%- item.role %></span>
                                                             </dd>
@@ -73,7 +74,7 @@
                                                     <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
                                                 <% } %>
                                                 <span><%- ctx.detail.auditorList[i].order %> <%- ctx.detail.auditorList[i].name %></span>
-                                                <% if (ctx.helper._.findIndex(rptAuditList, { uid: ctx.detail.auditorList[i].aid }) !== -1) { %>&nbsp;(<%- ctx.helper._.find(rptAuditList, { uid: ctx.detail.auditorList[i].aid }).signature_name %>)<% } %>
+                                                <% if (ctx.helper._.findIndex(ctx.detail.rptAudits, { uid: ctx.detail.auditorList[i].aid }) !== -1) { %>&nbsp;(<%- ctx.helper._.find(ctx.detail.rptAudits, { uid: ctx.detail.auditorList[i].aid }).signature_name %>)<% } %>
                                                 <small class="text-muted"><%- ctx.detail.auditorList[i].role %></small>
                                             </li>
                                         <% } %>
@@ -776,7 +777,7 @@
         const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
         const shenpi_status = <%- trInfo.sp_status %>;
         const shenpiConst =  JSON.parse('<%- JSON.stringify(shenpiConst) %>');
-        const rptAuditList = JSON.parse(unescape('<%- escape(JSON.stringify(rptAuditList)) %>'));
+        const rptAuditList = JSON.parse(unescape('<%- escape(JSON.stringify(ctx.detail.rptAudits)) %>'));
     </script>
 <% } %>
 <script>const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');</script>

+ 1 - 1
app/view/payment/detail_modal.ejs

@@ -119,7 +119,7 @@
                     </tr>
                     </thead>
                     <tbody>
-                    <% for (const [index, ra] of rptAuditList.entries()) { %>
+                    <% for (const [index, ra] of ctx.detail.rptAudits.entries()) { %>
                     <tr class="text-center" <% if (rptAudit && rptAudit.id === ra.id) { %>id="rpt_audit_sign"<% } %>>
                         <td><%- index+1 %></td>
                         <td><%- ra.signature_name %></td>

+ 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"><%- tr.uid ? ctx.helper._.find(accountList, { id: tr.uid }).name : '' %></td>
                                         </tr>
                                         <% } %>
                                         </tbody>