Преглед на файлове

计量审批流程修改和重新上报功能

laiguoran преди 6 години
родител
ревизия
1978443008

+ 3 - 3
app/controller/ledger_controller.js

@@ -101,7 +101,7 @@ module.exports = app => {
                 const [ledgerSpread, posSpread] = this._getSpreadSetting();
 
                 const curAuditor = await ctx.service.ledgerAudit.getCurAuditor(tender.id, tender.data.ledger_times);
-                const times = tender.data.ledger_status === auditConst.status.checkNo && tender.data.user_id !== ctx.session.sessionUser.accountId ? tender.data.ledger_times - 1 : tender.data.ledger_times;
+                const times = tender.data.ledger_status === auditConst.status.checkNo ? tender.data.ledger_times - 1 : tender.data.ledger_times;
                 const auditors = await ctx.service.ledgerAudit.getAuditors(tender.id, times);
                 const content = auditors.length > 0 ? await ctx.service.ledgerAuditContent.getAllDataByCondition({
                     where: { tender_id: tender.id, times, audit_id: auditors[0].audit_id },
@@ -114,7 +114,6 @@ module.exports = app => {
                         auditHistory.push(await ctx.service.ledgerAudit.getAuditors(ctx.tender.id, i));
                     }
                 }
-                console.log(auditHistory);
                 const renderData = {
                     tender: tender.data,
                     tenderInfo: tender.info,
@@ -132,7 +131,7 @@ module.exports = app => {
                     measureType,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.ledger.explode),
                 };
-                if (tender.data.ledger_status === auditConst.status.uncheck || tender.data.ledger_status === auditConst.status.checkNo) {
+                if ((tender.data.ledger_status === auditConst.status.uncheck || tender.data.ledger_status === auditConst.status.checkNo) && tender.data.user_id === ctx.session.sessionUser.accountId) {
                     renderData.accountGroup = accountGroup;
                     // 获取所有项目参与者
                     const accountList = await ctx.service.projectAccount.getAllDataByCondition({
@@ -140,6 +139,7 @@ module.exports = app => {
                         columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group'],
                     });
                     renderData.accountList = accountList;
+                    renderData.auditorList = await ctx.service.ledgerAudit.getAuditors(tender.id, tender.data.ledger_times);
                 }
 
                 await this.layout('ledger/explode.ejs', renderData, 'ledger/explode_modal.ejs');

+ 13 - 7
app/controller/stage_controller.js

@@ -49,7 +49,7 @@ module.exports = app => {
                 preUrl: '/tender/' + ctx.tender.id + '/measure/stage/' + ctx.params.order,
                 stage: ctx.stage,
             };
-            if (ctx.stage.status === auditConst.status.uncheck && ctx.session.sessionUser.accountId === ctx.stage.user_id) {
+            if ((ctx.stage.status === auditConst.status.uncheck || ctx.stage.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ctx.stage.user_id) {
                 data.accountGroup = accountGroup;
                 // 获取所有项目参与者
                 const accountList = await ctx.service.projectAccount.getAllDataByCondition({
@@ -122,8 +122,9 @@ module.exports = app => {
             if (ctx.stage.status === auditConst.status.uncheck && ctx.stage.user_id !== ctx.session.sessionUser.accountId) {
                 throw '数据错误';
             }
-            ctx.stage.auditors = await ctx.service.stageAudit.getAuditors(ctx.stage.id, ctx.stage.times);
-            ctx.stage.curAuditor = await ctx.service.stageAudit.getCurAuditor(ctx.stage.id, ctx.stage.times);
+            const times = ctx.stage.status === auditConst.status.checkNo ? ctx.stage.times - 1 : ctx.stage.times;
+            ctx.stage.auditors = await ctx.service.stageAudit.getAuditors(ctx.stage.id, times);
+            ctx.stage.curAuditor = await ctx.service.stageAudit.getCurAuditor(ctx.stage.id, times);
             ctx.stage.user = await ctx.service.projectAccount.getAccountInfoById(ctx.stage.user_id);
             ctx.stage.auditHistory = [];
             if (ctx.stage.times > 1) {
@@ -131,6 +132,11 @@ module.exports = app => {
                     ctx.stage.auditHistory.push(await ctx.service.stageAudit.getAuditors(ctx.stage.id, i));
                 }
             }
+            // 获取审批流程中左边列表
+            ctx.stage.auditors2 = await ctx.service.stageAudit.getAuditGroupByList(ctx.stage.id, times);
+            if (ctx.stage.status === auditConst.status.uncheck || ctx.stage.status === auditConst.status.checkNo) {
+                ctx.stage.auditorList = await ctx.service.stageAudit.getAuditors(ctx.stage.id, ctx.stage.times);
+            }
         }
 
         /**
@@ -634,17 +640,17 @@ module.exports = app => {
                     throw '当前不允许添加审核人';
                 }
                 // 检查审核人是否已存在
-                const exist = this.app._.find(ctx.stage.auditors, {aid: id});
+                const exist = this.app._.find(ctx.stage.auditorList, {aid: id});
                 if (exist) {
                     throw '该审核人已存在,请勿重复添加';
                 }
 
-                const result = await ctx.service.stageAudit.addAuditor(ctx.stage.id, id);
+                const result = await ctx.service.stageAudit.addAuditor(ctx.stage.id, id, ctx.stage.times);
                 if (!result) {
                     throw '添加审核人失败';
                 }
 
-                const audit = await ctx.service.stageAudit.getAuditor(ctx.stage.id, id);
+                const audit = await ctx.service.stageAudit.getAuditor(ctx.stage.id, id, ctx.stage.times);
                 ctx.body = {err: 0, msg: '', data: audit};
             } catch (err) {
                 this.log(err);
@@ -670,7 +676,7 @@ module.exports = app => {
                     throw '移除审核人失败';
                 }
 
-                const auditors = await ctx.service.stageAudit.getAuditors(ctx.stage.id);
+                const auditors = await ctx.service.stageAudit.getAuditors(ctx.stage.id, ctx.stage.times);
                 ctx.body = {err: 0, msg: '', data: auditors};
             } catch (err) {
                 ctx.body = {err: 1, msg: err.toString(), data: null};

+ 38 - 0
app/public/js/stage_audit.js

@@ -79,6 +79,27 @@ $(document).ready(function () {
                 html.push(data.role);
                 html.push('</small></li>');
                 $('#auditors').append(html.join(''));
+
+                // 如果是重新上报,添加到重新上报列表中
+                const auditorshtml = [];
+                // 重新上报时。令其它的审批人流程图标转换
+                $('#auditors-list li i').removeClass('fa-stop-circle').addClass('fa-chevron-circle-down');
+                // 添加新审批人
+                auditorshtml.push('<li class="list-group-item" data-auditid="' + data.aid + '">');
+                auditorshtml.push('<i class="fa fa-stop-circle"></i> ');
+                auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
+                auditorshtml.push('</li>');
+                $('#auditors-list').append(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></h5>');
+                auditorshtml2.push('</li>');
+                $('#auditors-list2').append(auditorshtml2.join(''));
             });
         }
     });
@@ -94,6 +115,23 @@ $(document).ready(function () {
                 const aLi = $('li[auditorId=' + rst.aid + ']');
                 $('span', aLi).text(rst.order + ' ' + rst.name + ' ');
             }
+
+            // 如果是重新上报
+            // 令最后一个图标转换
+            $('#auditors-list li[data-auditid="' + data.auditorId + '"]').remove();
+            if ($('#auditors-list li').length !== 0 && !$('#auditors-list li i').hasClass('fa-stop-circle')) {
+                $('#auditors-list li').eq($('#auditors-list li').length-1).children('i')
+                    .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
+            }
+            $('#auditors-list2 li[data-auditid="' + data.auditorId + '"]').remove();
+            if ($('#auditors-list2 li').length !== 0 && !$('#auditors-list2 li i').hasClass('fa-stop-circle')) {
+                $('#auditors-list2 li').eq($('#auditors-list2 li').length-1).children('i')
+                    .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
+            }
         });
     });
+    // 退回选择修改审批人流程
+    $('#hideSp').click(function () {
+        $('#sp-list2').modal('hide');
+    });
 });

+ 27 - 6
app/service/stage_audit.js

@@ -256,19 +256,23 @@ module.exports = app => {
                             qc_tp: tpData.qc_tp,
                         });
                     }
-                } else if (checkData.checkType === auditConst.status.checkNo) { // 审批退回 原报
+                } else if (checkData.checkType === auditConst.status.checkNo) { // 审批退回 原报, times+1
                     // 同步 期信息
                     const tpData = await this.ctx.service.stageBills.getSumTotalPrice(this.ctx.stage);
                     await transaction.update(this.ctx.service.stage.tableName, {
                         id: stageId, status: checkData.checkType,
                         contract_tp: tpData.contract_tp,
                         qc_tp: tpData.qc_tp,
+                        times: times + 1,
                     });
                     // 拷贝新一次审核流程列表
-                    const auditors = await this.getAllDataByCondition({
-                        where: {sid: stageId, times: times},
-                        columns: ['tid', 'sid', 'aid', 'order']
-                    });
+                    // const auditors = await this.getAllDataByCondition({
+                    //     where: {sid: stageId, times: times},
+                    //     columns: ['tid', 'sid', 'aid', 'order']
+                    // });
+                    const sql = 'SELECT `tid`, `sid`, `aid`, `order` FROM ?? WHERE `sid` = ? and `times` = ? GROUP BY `aid`';
+                    const sqlParam = [this.tableName, stageId, times];
+                    const auditors = await this.db.query(sql, sqlParam);
                     for (const a of auditors) {
                         a.times = times + 1;
                         a.status = auditConst.status.uncheck;
@@ -339,7 +343,7 @@ module.exports = app => {
                         '    s.`order` As `sorder`, s.`status` As `sstatus`,' +
                         '    t.`name`, t.`project_id`, t.`type`, t.`user_id` ' +
                         '  FROM ?? AS sa, ?? AS s, ?? As t ' +
-                        '  WHERE ((sa.`aid` = ? and sa.`status` = ?) OR (s.`user_id` = ? and sa.`status` = ? and s.`status` = ? and sa.`times` = s.`times`))' +
+                        '  WHERE ((sa.`aid` = ? and sa.`status` = ?) OR (s.`user_id` = ? and sa.`status` = ? and s.`status` = ? and sa.`times` = (s.`times`-1)))' +
                         '    and sa.`sid` = s.`id` and sa.`tid` = t.`id`';
             const sqlParam = [this.tableName, this.ctx.service.stage.tableName, this.ctx.service.tender.tableName, auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
             return await this.db.query(sql, sqlParam);
@@ -368,6 +372,23 @@ module.exports = app => {
                 this.ctx.service.projectAccount.tableName, uid, time, pid];
             return await this.db.query(sql, sqlParam);
         }
+
+        /**
+         * 获取审核人流程列表
+         *
+         * @param auditorId
+         * @returns {Promise<*>}
+         */
+        async getAuditGroupByList(stageId, times) {
+            const sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, la.`times`, la.`sid`, la.`aid`, la.`order` ' +
+                'FROM ?? AS la, ?? AS pa ' +
+                'WHERE la.`sid` = ? and la.`times` = ? and la.`aid` = pa.`id` GROUP BY la.`aid`';
+            const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, times];
+            return await this.db.query(sql, sqlParam);
+            // const sql = 'SELECT `tid`, `sid`, `aid`, `order` FROM ?? WHERE `sid` = ? and `times` = ? GROUP BY `aid`';
+            // const sqlParam = [this.tableName, stageId, times];
+            // return await this.db.query(sql, sqlParam);
+        }
     }
 
     return StageAudit;

+ 15 - 54
app/view/ledger/explode_modal.ejs

@@ -111,11 +111,11 @@
                         审批流程
                     </div>
                     <ul class="list-group list-group-flush" id="auditors">
-                        <% for (let i = 0, iLen = auditors.length; i < iLen; i++) { %>
-                        <li class="list-group-item" auditorId="<%- auditors[i].audit_id %>">
+                        <% for (let i = 0, iLen = auditorList.length; i < iLen; i++) { %>
+                        <li class="list-group-item" auditorId="<%- auditorList[i].audit_id %>">
                             <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
-                            <%- auditors[i].audit_order %> <%- auditors[i].name %>
-                            <small class="text-muted"><%- auditors[i].role %></small>
+                            <%- auditorList[i].audit_order %> <%- auditorList[i].name %>
+                            <small class="text-muted"><%- auditorList[i].role %></small>
                         </li>
                         <% } %>
                     </ul>
@@ -149,12 +149,12 @@
                                 </li>
                             </ul>
                             <ul class="list-group list-group-flush" id="auditors-list">
-                                <% for (let i = 0; i < auditors.length; i++) { %>
-                                    <li class="list-group-item" data-auditid="<%- auditors[i].audit_id %>">
-                                        <% if (i < auditors.length - 1) { %>
-                                            <i class="fa fa-chevron-circle-down"></i> <%- auditors[i].name %>  <small class="text-muted"><%- auditors[i].role %></small>
+                                <% for (let i = 0; i < auditorList.length; i++) { %>
+                                    <li class="list-group-item" data-auditid="<%- auditorList[i].audit_id %>">
+                                        <% if (i < auditorList.length - 1) { %>
+                                            <i class="fa fa-chevron-circle-down"></i> <%- auditorList[i].name %>  <small class="text-muted"><%- auditorList[i].role %></small>
                                         <% } else {%>
-                                            <i class="fa fa fa-stop-circle"></i> <%- auditors[i].name %>  <small class="text-muted"><%- auditors[i].role %></small>
+                                            <i class="fa fa fa-stop-circle"></i> <%- auditorList[i].name %>  <small class="text-muted"><%- auditorList[i].role %></small>
                                         <% } %>
                                     </li>
                                 <% } %>
@@ -219,14 +219,14 @@
                                     </li>
                                 </ul>
                                 <ul class="list-group list-group-flush" id="auditors-list2">
-                                    <% for (let iA = 0; iA < auditors.length; iA++) { %>
-                                        <% if (iA === auditors.length - 1) { %>
-                                            <li class="list-group-item" data-auditid="<%- auditors[iA].audit_id %>">
-                                                <h5 class="card-title"><i class="fa fa-stop-circle"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
+                                    <% for (let iA = 0; iA < auditorList.length; iA++) { %>
+                                        <% if (iA === auditorList.length - 1) { %>
+                                            <li class="list-group-item" data-auditid="<%- auditorList[iA].audit_id %>">
+                                                <h5 class="card-title"><i class="fa fa-stop-circle"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small></h5>
                                             </li>
                                         <% } else { %>
-                                            <li class="list-group-item" data-auditid="<%- auditors[iA].audit_id %>">
-                                                <h5 class="card-title"><i class="fa fa-chevron-circle-down"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
+                                            <li class="list-group-item" data-auditid="<%- auditorList[iA].audit_id %>">
+                                                <h5 class="card-title"><i class="fa fa-chevron-circle-down"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small></h5>
                                             </li>
                                         <% } %>
                                     <% } %>
@@ -244,45 +244,6 @@
         </div>
     </div>
 </div>
-<!--重新审批-->
-<div class="modal fade" id="sub-sp2" data-backdrop="static">
-    <div class="modal-dialog" role="document">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h5 class="modal-title">重新上报</h5>
-            </div>
-            <div class="modal-body">
-                <div class="alert alert-primary" role="alert">
-                    重新上报后,将由 <%- auditors[0].name %> 继续审批
-                </div>
-                <div class="card mt-3">
-                    <div class="card-header">
-                        审批流程
-                    </div>
-                    <ul class="list-group list-group-flush">
-                        <% for (let i = 0, iLen = auditors.length; i < iLen; i++) { %>
-                        <li class="list-group-item" auditorId="<%- auditors[i].audit_id %>">
-                            <% if (auditors[i].status !== auditConst.status.uncheck) { %>
-                            <span class="<%- auditConst.statusClass[auditors[i].status] %> pull-right"><%- auditConst.statusString[auditors[i].status] %></span>
-                            <% } %>
-                            <h5 class="card-title"><%- auditors[i].audit_order %> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small></h5>
-                            <p class="card-text mb-1"><%- auditors[i].opinion %></p>
-                            <% if (auditors[i].end_time) { %>
-                            <p class="card-text"><small class="text-muted"><%- auditors[i].end_time.toLocaleString() %></small></p>
-                            <% } %>
-                        </li>
-                        <% } %>
-                    </ul>
-                </div>
-            </div>
-            <form class="modal-footer" action="/tender/<%- tender.id %>/ledger/audit/start" method="post">
-                <button type="submit" class="btn btn-primary">确认上报</button>
-                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
-                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
-            </form>
-        </div>
-    </div>
-</div>
 <% } %>
 <% if ((tender.ledger_status !== auditConst.status.unCheck) || (tender.ledger_times > 1)) { %>
 <!--审批流程/结果-->

+ 2 - 2
app/view/stage/audit_btn.ejs

@@ -15,7 +15,7 @@
     <% } else if (ctx.stage.status === auditConst.status.checkNo) { %>
         <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm pull-right text-muted">审批退回</a>
         <% if (ctx.session.sessionUser.accountId === ctx.stage.user_id) { %>
-            <a href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" class="btn btn-primary btn-sm pull-right">重新上报</a>
+            <a href="#sp-list2" data-toggle="modal" data-target="#sp-list2" class="btn btn-primary btn-sm pull-right">重新上报</a>
         <% } %>
     <% } else if (ctx.stage.status === auditConst.status.checkNoPre) { %>
         <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm pull-right text-muted">审批退回</a>
@@ -24,4 +24,4 @@
             <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm pull-right">审批退回</a>
         <% } %>
     <% } %>
-</div>
+</div>

+ 162 - 135
app/view/stage/audit_modal.ejs

@@ -1,5 +1,5 @@
-<% if (ctx.stage.status === auditConst.status.uncheck) { %>
-    <% if (ctx.session.sessionUser.accountId === ctx.stage.user_id) {%>
+<% if (ctx.stage.status === auditConst.status.uncheck || ctx.stage.status === auditConst.status.checkNo) { %>
+<% if (ctx.session.sessionUser.accountId === ctx.stage.user_id) {%>
         <!--上报审批-->
         <div class="modal fade" id="sub-sp" data-backdrop="static">
     <div class="modal-dialog" role="document">
@@ -51,11 +51,11 @@
                         审批流程
                     </div>
                     <ul class="list-group list-group-flush" id="auditors">
-                        <% for (let i = 0, iLen = stage.auditors.length; i < iLen; i++) { %>
-                        <li class="list-group-item" auditorId="<%- stage.auditors[i].aid %>">
+                        <% for (let i = 0, iLen = ctx.stage.auditorList.length; i < iLen; i++) { %>
+                        <li class="list-group-item" auditorId="<%- ctx.stage.auditorList[i].aid %>">
                             <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
-                            <%- stage.auditors[i].order %> <%- stage.auditors[i].name %>
-                            <small class="text-muted"><%- stage.auditors[i].role %></small>
+                            <%- ctx.stage.auditorList[i].order %> <%- ctx.stage.auditorList[i].name %>
+                            <small class="text-muted"><%- ctx.stage.auditorList[i].role %></small>
                         </li>
                         <% } %>
                     </ul>
@@ -69,8 +69,9 @@
         </div>
     </div>
 </div>
-    <% } %>
-<% } else if (ctx.stage.status === auditConst.status.checking) { %>
+<% } %>
+<% } %>
+<% if (ctx.stage.status === auditConst.status.checking) { %>
     <% if (ctx.stage.curAuditor && ctx.stage.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
         <!--审批通过-->
         <div class="modal fade" id="sp-done" data-backdrop="static">
@@ -87,12 +88,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -158,12 +159,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -199,12 +200,12 @@
                                     </div>
                                     <div class="alert alert-warning">
                                         <div class="form-check form-check-inline">
-                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
+                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>" <% if (auditors[iA].order === 1 || auditors[iA].aid === auditors[0].aid) { %>checked<% } %>>
                                             <label class="form-check-label" for="inlineRadio1">退回上报 <%- ctx.stage.user.name %></label>
                                         </div>
                                         <% if (auditors[iA].order > 1 && auditors[iA].aid !== auditors[0].aid) { %>
                                         <div class="form-check form-check-inline">
-                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>">
+                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>" checked>
                                             <label class="form-check-label" for="inlineRadio2">退回上一审批人 <%- auditors[iA-1].name %></label>
                                         </div>
                                         <% } %>
@@ -241,12 +242,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -329,7 +330,7 @@
                                     <% } %>
                                     <h5 class="card-title"><i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
                                     <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
+                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
                                     <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
                                     <% } %>
                                 </li>
@@ -340,7 +341,7 @@
                                     <% } %>
                                     <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
                                     <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
+                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
                                     <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
                                     <% } %>
                                 </li>
@@ -375,12 +376,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -463,7 +464,7 @@
                                     <% } %>
                                     <h5 class="card-title"><i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
                                     <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
+                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
                                     <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
                                     <% } %>
                                 </li>
@@ -474,7 +475,7 @@
                                     <% } %>
                                     <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
                                     <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
+                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
                                     <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
                                     <% } %>
                                 </li>
@@ -508,12 +509,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -568,54 +569,6 @@
                             </ul>
                         </div>
                         <% } %>
-                        <% if (ctx.stage.status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
-                        <div class="card mt-3">
-                            <ul class="list-group list-group-flush">
-                                <% const auditors = ctx.stage.auditors; %>
-                                <% for (let iA = 0; iA < auditors.length; iA++) { %>
-                                <% if (iA === 0) { %>
-                                <li class="list-group-item">
-                                    <span class="text-success pull-right"><% if (ctx.stage.times > 1) { %>重新<% } %>上报</span>
-                                    <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.stage.user.name %> <small class="text-muted"><%- ctx.stage.user.role %></small></h5>
-                                    <p class="card-text"><small class="text-muted"><%- auditors[iA].begin_time.toLocaleDateString() %></small></p>
-                                </li>
-                                <li class="list-group-item">
-                                    <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
-                                    <span class="<%- auditConst.statusClass[auditors[iA].status] %> pull-right"><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %></span>
-                                    <% } %>
-                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
-                                    <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
-                                    <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
-                                    <% } %>
-                                </li>
-                                <% } else if (iA === auditors.length - 1) { %>
-                                <li class="list-group-item">
-                                    <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
-                                    <span class="<%- auditConst.statusClass[auditors[iA].status] %> pull-right"><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %></span>
-                                    <% } %>
-                                    <h5 class="card-title"><i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
-                                    <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
-                                    <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
-                                    <% } %>
-                                </li>
-                                <% } else { %>
-                                <li class="list-group-item">
-                                    <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
-                                    <span class="<%- auditConst.statusClass[auditors[iA].status] %> pull-right"><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %></span>
-                                    <% } %>
-                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
-                                    <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
-                                    <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
-                                    <% } %>
-                                </li>
-                                <% } %>
-                                <% } %>
-                            </ul>
-                        </div>
-                        <% } %>
                     </div>
                 </div>
             </div>
@@ -626,47 +579,121 @@
     </div>
 </div>
     <% if (ctx.session.sessionUser.accountId === ctx.stage.user_id) { %>
-        <!--重新上报-->
-        <div class="modal fade" id="sub-sp2" data-backdrop="static">
-    <div class="modal-dialog" role="document">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h5 class="modal-title">重新上报</h5>
-            </div>
-            <div class="modal-body">
-                <!--显示上次退回意见-->
-                <div class="card mt-3">
-                    <ul class="list-group list-group-flush">
-                        <li class="list-group-item">
-                            <span class="text-success pull-right">上报</span>
-                            <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> 布尔 <small class="text-muted">施工</small></h5>
-                            <p class="card-text">2017-11-25</p>
-                        </li>
-                        <li class="list-group-item">
-                            <span class="text-success pull-right">审批通过</span>
-                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 张三 <small class="text-muted">监理</small></h5>
-                            <p class="card-text">审批意见。2017-11-25</p>
-                        </li>
-                        <li class="list-group-item">
-                            <span class="text-success pull-right">审批通过</span>
-                            <h5 class="card-title"><i class="fa fa-chevron-circle-down text-success"></i> 王五 <small class="text-muted">监理</small></h5>
-                            <p class="card-text">审批通过。2017-11-26</p>
-                        </li>
-                        <li class="list-group-item">
-                            <span class="text-warning pull-right">审批退回</span>
-                            <h5 class="card-title"><i class="fa fa-stop-circle text-warning"></i> 李四 <small class="text-muted">监理</small></h5>
-                            <p class="card-text">审批退回,审批意见文本。2017-11-27</p>
-                        </li>
-                    </ul>
+    <!--重新上报-->
+    <div class="modal fade" id="sp-list2" data-backdrop="static">
+        <div class="modal-dialog modal-lg" role="document">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <h5 class="modal-title">重新上报</h5>
                 </div>
-            </div>
-            <div class="modal-footer">
-                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
-                <button type="submit" class="btn btn-primary">确认上报</button>
+                <div class="modal-body">
+                    <div class="row">
+                        <div class="col-4">
+                            <a href="#sub-sp" data-toggle="modal" data-target="#sub-sp" id="hideSp">修改审批流程</a>
+                            <div class="card mt-3">
+                                <ul class="list-group list-group-flush">
+                                    <li class="list-group-item">
+                                        <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
+                                    </li>
+                                </ul>
+                                <ul class="list-group list-group-flush" id="auditors-list">
+                                    <% const auditorList = ctx.stage.auditorList; %>
+                                    <% for (let i = 0; i < auditorList.length; i++) { %>
+                                        <li class="list-group-item" data-auditid="<%- auditorList[i].aid %>">
+                                            <% if (i < auditorList.length - 1) { %>
+                                                <i class="fa fa-chevron-circle-down"></i> <%- auditorList[i].name %>  <small class="text-muted"><%- auditorList[i].role %></small>
+                                            <% } else { %>
+                                                <i class="fa fa fa-stop-circle"></i> <%- auditorList[i].name %>  <small class="text-muted"><%- auditorList[i].role %></small>
+                                            <% } %>
+                                        </li>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        </div>
+                        <div class="col-8 modal-height-500" style="overflow: auto">
+                            <% for (const ah of ctx.stage.auditHistory) { %>
+                                <div class="card mt-3">
+                                    <ul class="list-group list-group-flush">
+                                        <% for (let iA = 0; iA < ah.length; iA++) { %>
+                                            <% if (iA === 0) { %>
+                                                <li class="list-group-item">
+                                                    <span class="text-success pull-right"><% if (ctx.stage.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                    <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.stage.user.name %> <small class="text-muted"><%- ctx.stage.user.role %></small></h5>
+                                                    <p class="card-text"><small class="text-muted"><%- ah[iA].begin_time.toLocaleDateString() %></small></p>
+                                                </li>
+                                                <li class="list-group-item">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small></h5>
+                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) { %>
+                                                        <p class="card-text mb-1"><%- ah[iA].opinion %></p>
+                                                        <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
+                                                    <% } %>
+                                                </li>
+                                            <% } else if (iA === ah.length - 1) { %>
+                                                <li class="list-group-item">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <h5 class="card-title"><i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small></h5>
+                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) { %>
+                                                        <p class="card-text mb-1"><%- ah[iA].opinion %></p>
+                                                        <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
+                                                    <% } %>
+                                                </li>
+                                            <% } else { %>
+                                                <li class="list-group-item">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %> pull-right"><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small></h5>
+                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre) { %>
+                                                        <p class="card-text mb-1"><%- ah[iA].opinion %></p>
+                                                        <p class="card-text"><small class="text-muted"><%- ah[iA].end_time.toLocaleDateString() %></small></p>
+                                                    <% } %>
+                                                </li>
+                                            <% } %>
+                                        <% } %>
+                                    </ul>
+                                </div>
+                            <% } %>
+                            <% if (ctx.stage.status === auditConst.status.checkNo) {%>
+                                <div class="card mt-3">
+                                    <ul class="list-group list-group-flush">
+                                        <li class="list-group-item">
+                                            <span class="pull-right">重新上报中</span>
+                                            <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %> <small class="text-muted"><%- ctx.stage.user.role %></small></h5>
+                                            <p class="card-text"><small class="text-muted"></small></p>
+                                        </li>
+                                    </ul>
+                                    <ul class="list-group list-group-flush" id="auditors-list2">
+                                        <% const auditorList = ctx.stage.auditorList; %>
+                                        <% for (let iA = 0; iA < auditorList.length; iA++) { %>
+                                            <% if (iA === auditorList.length - 1) { %>
+                                                <li class="list-group-item" data-auditid="<%- auditorList[iA].aid %>">
+                                                    <h5 class="card-title"><i class="fa fa-stop-circle"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small></h5>
+                                                </li>
+                                            <% } else { %>
+                                                <li class="list-group-item" data-auditid="<%- auditorList[iA].aid %>">
+                                                    <h5 class="card-title"><i class="fa fa-chevron-circle-down"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small></h5>
+                                                </li>
+                                            <% } %>
+                                        <% } %>
+                                    </ul>
+                                </div>
+                            <% } %>
+                        </div>
+                    </div>
+                </div>
+                <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start">
+                    <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
+                    <button class="btn btn-primary" type="submit">确认上报</button>
+                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
+                </form>
             </div>
         </div>
     </div>
-</div>
     <% } %>
 <% } else if (ctx.stage.status === auditConst.status.checkNoPre) { %>
     <!--审批流程/结果-->
@@ -684,12 +711,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -772,7 +799,7 @@
                                     <% } %>
                                     <h5 class="card-title"><i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
                                     <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
+                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
                                     <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
                                     <% } %>
                                 </li>
@@ -783,7 +810,7 @@
                                     <% } %>
                                     <h5 class="card-title"><i class="fa fa-chevron-circle-down <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small></h5>
                                     <% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo || auditors[iA].status === auditConst.status.checkNoPre) { %>
-                                    <p class="card-text"><%- auditors[iA].opinion %></p>
+                                    <p class="card-text mb-1"><%- auditors[iA].opinion %></p>
                                     <p class="card-text"><small class="text-muted"><%- auditors[iA].end_time.toLocaleDateString() %></small></p>
                                     <% } %>
                                 </li>
@@ -817,12 +844,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -888,12 +915,12 @@
                                 <li class="list-group-item">
                                     <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.stage.user.name %>  <small class="text-muted"><%- ctx.stage.user.role %></small>
                                 </li>
-                                <% for (let i = 0; i < ctx.stage.auditors.length; i++) { %>
+                                <% for (let i = 0; i < ctx.stage.auditors2.length; i++) { %>
                                 <li class="list-group-item">
-                                    <% if (i < ctx.stage.auditors.length - 1) { %>
-                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <% if (i < ctx.stage.auditors2.length - 1) { %>
+                                    <i class="fa fa-chevron-circle-down"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } else { %>
-                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors[i].name %>  <small class="text-muted"><%- ctx.stage.auditors[i].role %></small>
+                                    <i class="fa fa fa-stop-circle"></i> <%- ctx.stage.auditors2[i].name %>  <small class="text-muted"><%- ctx.stage.auditors2[i].role %></small>
                                     <% } %>
                                 </li>
                                 <% } %>
@@ -929,12 +956,12 @@
                                     </div>
                                     <div class="alert alert-warning">
                                         <div class="form-check form-check-inline">
-                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
+                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>" <% if (auditors[iA].order === 1 || auditors[iA].aid === auditors[0].aid) { %>checked<% } %>>
                                             <label class="form-check-label" for="inlineRadio1">退回上报 <%- ctx.stage.user.name %></label>
                                         </div>
                                         <% if (auditors[iA].order > 1 && auditors[iA].aid !== auditors[0].aid) { %>
                                         <div class="form-check form-check-inline">
-                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>">
+                                            <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>" checked>
                                             <label class="form-check-label" for="inlineRadio2">退回上一审批人 <%- auditors[iA-1].name %></label>
                                         </div>
                                         <% } %>