Procházet zdrojové kódy

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

MaiXinRong před 5 roky
rodič
revize
c4012ebbcb

+ 25 - 0
app/controller/change_controller.js

@@ -419,6 +419,31 @@ module.exports = app => {
                         auditList3[i].max_sort = auditList2.length - 1;
                     }
                     renderData.auditList3 = auditList3;
+
+                    // 展示页右侧审批流程列表
+                    const auditList5 = await ctx.service.changeAudit.getListByBack(change.cid, change.times);
+                    const auditList4 = [];
+                    for (let time = 1; time <= change.times; time++) {
+                        const auditTimeList = [];
+                        let max_sort = 1;
+                        for (const al of auditList5) {
+                            if (al.times === time) {
+                                auditTimeList.push(al);
+                                if (al.usite > max_sort) {
+                                    max_sort = al.usite;
+                                }
+                            }
+                        }
+                        for (const i in auditTimeList) {
+                            auditTimeList[i].max_sort = max_sort;
+                        }
+                        if (auditTimeList.length > 0) {
+                            auditList4.push(auditTimeList);
+                        }
+                    }
+                    renderData.auditList4 = auditList4;
+                    console.log(auditList4)
+
                     changeList = JSON.parse(JSON.stringify(changeList.sort())).sort().sort();
                     renderData.changeList = changeList;
                     let ototalCost = 0;

+ 1 - 1
app/controller/setting_controller.js

@@ -137,7 +137,7 @@ module.exports = app => {
          * @return {Promise<void>}
          */
         async userUnbind(ctx) {
-            const projectData = ctx.session.sessionProjectData;
+            const projectData = ctx.session.sessionProject;
 
             try {
                 if (projectData.id === undefined) {

+ 6 - 6
app/public/js/tender_list.js

@@ -273,7 +273,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td style="width: 45%" class="in-' + node.level + '">');
     if (node.cid) {
         html.push('<span onselectstart="return false" style="{-moz-user-select:none}" class="fold-switch mr-1" title="收起" cid="'+ node.sort_id +'"><i class="fa fa-minus-square-o"></i></span> <i class="fa fa-folder-o"></i> ', node.name);
     } else {
@@ -285,9 +285,9 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 创建人
-    html.push('<td class="text-center">', node.user_name ? node.user_name : '', '</td>');
+    html.push('<td style="width: 10%" class="text-center">', node.user_name ? node.user_name : '', '</td>');
     // 创建时间
-    html.push('<td>', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
+    html.push('<td style="width: 15%">', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
     // 计量模式
     // html.push('<td>');
     // if (node.measure_type) {
@@ -295,13 +295,13 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     // }
     // html.push('</td>');
     // 计量期数
-    html.push('<td  class="text-center">');
+    html.push('<td style="width: 10%" class="text-center">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
     }
     html.push('</td>');
     // 审批状态
-    html.push('<td>');
+    html.push('<td style="width: 20%">');
     html.push(node.lastStage ? auditConst.stage.statusString[node.lastStage.status] : auditConst.ledger.statusString[node.ledger_status]);
     html.push(node.status_users ? '(' + node.status_users + ')' : '');
     html.push('</td>');
@@ -318,7 +318,7 @@ function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th class="text-center" style="width: 45%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 10%">', '创建人', '</th>');
         html.push('<th class="text-center" style="width: 15%">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');

+ 13 - 13
app/public/js/tender_list_info.js

@@ -296,7 +296,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td style="width: 23%" class="in-' + node.level + '">');
     if (node.cid) {
         html.push('<span onselectstart="return false" style="{-moz-user-select:none}" class="fold-switch mr-1" title="收起" cid="'+ node.sort_id +'"><i class="fa fa-minus-square-o"></i></span> <i class="fa fa-folder-o"></i> ', node.name);
     } else {
@@ -308,51 +308,51 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 计量模式
-    html.push('<td class="text-center">');
+    html.push('<td style="width: 7%" class="text-center">');
     if (node.measure_type) {
         html.push(node.measure_type === measureType.tz.value ? '0号台账' : '工程量清单');
     }
     html.push('</td>');
     // 计量期数
-    html.push('<td class="text-center">');
+    html.push('<td style="width: 7%" class="text-center">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
     }
     html.push('</td>');
     // 审批状态
-    html.push('<td>');
+    html.push('<td style="width: 7%">');
     html.push(node.lastStage ? auditConst.stage.statusString[node.lastStage.status] : auditConst.ledger.statusString[node.ledger_status]);
     html.push('</td>');
     // 0号台账合同
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.total_price);
     html.push('</td>');
     // 本期完成
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.gather_tp);
     html.push('</td>');
     // 截止本期合同
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_contract_tp);
     html.push('</td>');
     // 截止本期变更
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_qc_tp);
     html.push('</td>');
     // 截止本期完成
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_gather_tp);
     html.push('</td>');
     // 截止上期完成
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.pre_gather_tp);
     html.push('</td>');
     // 本期应付
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.yf_tp);
     html.push('</td>');
     // 截止本期应付
-    html.push('<td class="text-right">');
+    html.push('<td style="width: 7%" class="text-right">');
     html.push(node.end_yf_tp);
     html.push('</td>');
     html.push('</tr>');
@@ -368,7 +368,7 @@ function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th class="text-center" style="width: 23%">', '标段名称', '</th>');
         html.push('<th class="text-center" style="width: 7%">', '计量模式', '</th>');
         html.push('<th class="text-center" style="width: 7%">', '计量期数', '</th>');

+ 6 - 6
app/public/js/tender_list_manage.js

@@ -260,7 +260,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     const html = [];
     html.push('<tr pid="' + pid + '">');
     // 名称
-    html.push('<td class="in-' + node.level + '">');
+    html.push('<td style="width: 45%" class="in-' + node.level + '">');
     if (node.cid) {
         html.push('<span onselectstart="return false" style="{-moz-user-select:none}" class="fold-switch mr-1" title="收起" cid="'+ node.sort_id +'"><i class="fa fa-minus-square-o"></i></span> <i class="fa fa-folder-o"></i> ', node.name);
     } else {
@@ -271,17 +271,17 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
     }
     html.push('</td>');
     // 创建人
-    html.push('<td class="text-center">', node.user_name, '</td>');
+    html.push('<td style="width: 10%" class="text-center">', node.user_name, '</td>');
     // 创建时间
-    html.push('<td>', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
+    html.push('<td style="width: 15%">', node.create_time ? moment(node.create_time).format('YYYY-MM-DD HH:mm:ss') : '', '</td>');
     // 完成期数
-    html.push('<td class="text-center">');
+    html.push('<td style="width: 10%" class="text-center">');
     if (!node.cid) {
         html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '第0期');
     }
     html.push('</td>');
     // 管理
-    html.push('<td tid="' + node.id + '">');
+    html.push('<td style="width: 20%" tid="' + node.id + '">');
     if (!node.cid) {
         html.push('<a href="javascript: void(0)" name="edit" class="btn btn-outline-primary btn-sm">编辑</a>');
         if (node.lastStage === null || node.lastStage === undefined) {
@@ -302,7 +302,7 @@ function recursiveGetTenderNodeHtml (node, arr, pid) {
 function getTenderTreeHeaderHtml() {
     const html = [];
     html.push('<table class="table table-hover table-bordered">');
-    html.push('<thead>', '<tr>');
+    html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
     html.push('<th class="text-center" style="width: 45%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
     html.push('<th class="text-center" style="width: 10%">', '创建人', '</th>');
     html.push('<th class="text-center" style="width: 15%">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');

+ 1 - 1
app/public/js/tender_list_progress.js

@@ -351,7 +351,7 @@ function getTenderTreeHtml () {
     if (tenderTree.length > 0) {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead>', '<tr>');
+        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
         html.push('<th style="width: 35%" class="text-center">', '标段名称', '</th>');
         html.push('<th style="width: 10%" class="text-center">', '计量期数', '</th>');
         html.push('<th style="width: 10%" class="text-center">', '总价 <i class="fa fa-question-circle text-primary"  data-placement="bottom" data-toggle="tooltip" data-original-title="0号台账+截止本期数量变更"></i>', '</th>');

+ 5 - 5
app/public/js/tender_showhide.js

@@ -54,11 +54,11 @@ function localHideList() {
 $(window).resize(setTopTr);
 // 设置表头固定并动态调整宽度高度
 function setTopTr() {
-    // for(let item = 0; item < $(".c-body table>thead>tr>th").length; item ++) {
-    //     $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:first").children('td').eq(item).outerWidth());
-    // }
-    //$('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
-    $('.c-body table').css('margin-top', -2);
+    for(let item = 0; item < $(".c-body table>thead>tr>th").length; item ++) {
+        $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:first").children('td').eq(item).outerWidth());
+    }
+    $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
+    // $('.c-body table').css('margin-top', -2);
 }
 
 function doTrStatus(node, status, all = '') {

+ 100 - 0
app/view/change/info_modal.ejs

@@ -472,6 +472,56 @@
                             </div>
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
+                            <% for (const time in auditList4) { %>
+                                <div class="card mt-3">
+                                    <ul class="list-group list-group-flush">
+                                        <% for (const [aindex,al] of auditList4[time].entries()) { %>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <% if (al.usite === 0 && al.status === 2 ) { %>
+                                                        <i class="fa fa-play-circle fa-rotate-90"></i>
+                                                    <% } else if (al.usite === 0 && al.status === 3 ) { %>
+                                                        <i class="fa fa-play-circle fa-rotate-90 text-success"></i>
+                                                    <% } else if (al.status === 1 || al.status === 2) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> "></i>
+                                                    <% } else if (al.status === 3) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-success"></i>
+                                                    <% } else if (al.status === 4) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-danger"></i>
+                                                    <% } else if (al.status === 5 || al.status === 6) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-warning"></i>
+                                                    <% } else if (al.status === 7) { %>
+                                                        <i class="fa fa-chevron-circle-down text-warning"></i>
+                                                    <% } %>
+                                                    <%= al.name %>&nbsp;<small class="text-muted"><%= al.jobs %></small><span class="pull-right"><%= al.usite === 0 ? '原报' : (al.max_sort === al.usite ? '终审' : ctx.helper.transFormToChinese(al.usite) + '审')  %></span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (al.usite === 0 && al.status === 2) { %>
+                                                        <span>重新上报中</span>
+                                                    <% } else if (al.usite === 0 && al.status === 3 && al.times === 1) { %>
+                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>上报</span>
+                                                    <% } else if (al.usite === 0 && al.status === 3 && al.times !== 1) { %>
+                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新上报</span>
+                                                    <% } else if (al.usite !== 0 && al.status === 2) { %>
+                                                        <span>审批中</span>
+                                                    <% } else if (al.usite !== 0 && al.status === 3) { %>
+                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批通过</span>
+                                                    <% } else if (al.usite !== 0 && al.status === 4) { %>
+                                                        <span class="text-danger"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批终止</span>
+                                                    <% } else if (al.usite !== 0 && (al.status === 5 || al.status === 6)) { %>
+                                                        <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批退回 <% if (al.status === 5) {%><%= auditList4[time][0].name %><% } %></span>
+                                                    <% } else if (al.usite !== 0 && al.status === 7) { %>
+                                                        <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新审批</span>
+                                                    <% } %>
+                                                    <% if (al.sdesc !== '' && al.sdesc !== null) { %>
+                                                        <p class="card-text"><%- al.sdesc %></p>
+                                                    <% } %>
+                                                </div>
+                                            </li>
+                                        <% } %>
+                                    </ul>
+                                </div>
+                            <% } %>
                             <div class="card mt-3">
                                 <ul class="list-group list-group-flush">
                                     <% for (const [index,a] of auditList3.entries()) { %>
@@ -569,6 +619,56 @@
                             </div>
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
+                            <% for (const time in auditList4) { %>
+                                <div class="card mt-3">
+                                    <ul class="list-group list-group-flush">
+                                        <% for (const [aindex,al] of auditList4[time].entries()) { %>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <% if (al.usite === 0 && al.status === 2 ) { %>
+                                                        <i class="fa fa-play-circle fa-rotate-90"></i>
+                                                    <% } else if (al.usite === 0 && al.status === 3 ) { %>
+                                                        <i class="fa fa-play-circle fa-rotate-90 text-success"></i>
+                                                    <% } else if (al.status === 1 || al.status === 2) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> "></i>
+                                                    <% } else if (al.status === 3) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-success"></i>
+                                                    <% } else if (al.status === 4) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-danger"></i>
+                                                    <% } else if (al.status === 5 || al.status === 6) { %>
+                                                        <i class="fa <% if (aindex+1 === auditList4[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-warning"></i>
+                                                    <% } else if (al.status === 7) { %>
+                                                        <i class="fa fa-chevron-circle-down text-warning"></i>
+                                                    <% } %>
+                                                    <%= al.name %>&nbsp;<small class="text-muted"><%= al.jobs %></small><span class="pull-right"><%= al.usite === 0 ? '原报' : (al.max_sort === al.usite ? '终审' : ctx.helper.transFormToChinese(al.usite) + '审')  %></span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (al.usite === 0 && al.status === 2) { %>
+                                                        <span>重新上报中</span>
+                                                    <% } else if (al.usite === 0 && al.status === 3 && al.times === 1) { %>
+                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>上报</span>
+                                                    <% } else if (al.usite === 0 && al.status === 3 && al.times !== 1) { %>
+                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新上报</span>
+                                                    <% } else if (al.usite !== 0 && al.status === 2) { %>
+                                                        <span>审批中</span>
+                                                    <% } else if (al.usite !== 0 && al.status === 3) { %>
+                                                        <span class="text-success"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批通过</span>
+                                                    <% } else if (al.usite !== 0 && al.status === 4) { %>
+                                                        <span class="text-danger"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批终止</span>
+                                                    <% } else if (al.usite !== 0 && (al.status === 5 || al.status === 6)) { %>
+                                                        <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>审批退回 <% if (al.status === 5) {%><%= auditList4[time][0].name %><% } %></span>
+                                                    <% } else if (al.usite !== 0 && al.status === 7) { %>
+                                                        <span class="text-warning"><% if (al.sin_time !== null) { %><small><%= moment(al.sin_time).format('YYYY-MM-DD') %></small> <% } %>重新审批</span>
+                                                    <% } %>
+                                                    <% if (al.sdesc !== '' && al.sdesc !== null) { %>
+                                                        <p class="card-text"><%- al.sdesc %></p>
+                                                    <% } %>
+                                                </div>
+                                            </li>
+                                        <% } %>
+                                    </ul>
+                                </div>
+                            <% } %>
                             <div class="card mt-3">
                                 <ul class="list-group list-group-flush">
                                     <% for (const [index,a] of auditList3.entries()) { %>

+ 106 - 0
app/view/ledger/audit_modal.ejs

@@ -27,6 +27,59 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
+                        <% for (const ah of 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">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                </div>
+                                            </li>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else if (iA === ah.length - 1) { %>
+                                            <li class="list-group-item">
+                                                <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><span class="pull-right">终审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else { %>
+                                            <li class="list-group-item">
+                                                <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><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } %>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        <% } %>
                         <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
                             <div class="card mt-3">
                                 <ul class="list-group list-group-flush">
@@ -114,6 +167,59 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
+                        <% for (const ah of 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">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                </div>
+                                            </li>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else if (iA === ah.length - 1) { %>
+                                            <li class="list-group-item">
+                                                <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><span class="pull-right">终审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else { %>
+                                            <li class="list-group-item">
+                                                <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><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } %>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        <% } %>
                         <% if (tender.ledger_status === auditConst.status.checking || tender.ledger_status === auditConst.status.checked) {%>
                             <div class="card mt-3">
                                 <ul class="list-group list-group-flush">

+ 106 - 0
app/view/material/audit_modal.ejs

@@ -82,6 +82,59 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
+                        <% for (const ah of ctx.material.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">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                </div>
+                                            </li>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else if (iA === ah.length - 1) { %>
+                                            <li class="list-group-item">
+                                                <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><span class="pull-right">终审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else { %>
+                                        <li class="list-group-item">
+                                            <h5 class="card-title">
+                                                <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                            </h5>
+                                            <div class="ml-3">
+                                                <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                    <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
+                                                <% } %>
+                                                <p class="card-text"><%- ah[iA].opinion %></p>
+                                            </div>
+                                        </li>
+                                        <% } %>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        <% } %>
                         <div class="card mt-3">
                             <ul class="list-group list-group-flush">
                                 <li class="list-group-item">
@@ -170,6 +223,59 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
+                        <% for (const ah of ctx.material.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">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <span class="text-success"><small><%- ah[iA].begin_time.toLocaleDateString() %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                </div>
+                                            </li>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else if (iA === ah.length - 1) { %>
+                                            <li class="list-group-item">
+                                                <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><span class="pull-right">终审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                        <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else { %>
+                                        <li class="list-group-item">
+                                            <h5 class="card-title">
+                                                <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                            </h5>
+                                            <div class="ml-3">
+                                                <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                    <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
+                                                <% } %>
+                                                <p class="card-text"><%- ah[iA].opinion %></p>
+                                            </div>
+                                        </li>
+                                        <% } %>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        <% } %>
                         <div class="card mt-3">
                             <ul class="list-group list-group-flush">
                                 <li class="list-group-item">

+ 82 - 0
app/view/revise/info_modal.ejs

@@ -229,6 +229,47 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
+                        <% for (const ah of auditHistory) { %>
+                            <div class="card mt-3">
+                                <ul class="list-group list-group-flush">
+                                    <li class="list-group-item">
+                                        <h5 class="card-title">
+                                            <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
+                                        </h5>
+                                        <div class="ml-3">
+                                            <span class="text-success"><%- ah[0].begin_time.toLocaleDateString() %> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                        </div>
+                                    </li>
+                                    <% for (let iA = 0; iA < ah.length; iA++) { %>
+                                        <% if (iA === ah.length - 1) { %>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-stop-circle <%- audit.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== audit.status.uncheck) { %>
+                                                        <span class="<%- audit.statusClass[ah[iA].status] %>"><% if (ah[iA].status === audit.status.checked || ah[iA].status === audit.status.checkNo) { %><%- ah[iA].end_time.toLocaleDateString() %> <% } %><%- audit.statusString[ah[iA].status]%><% if (ah[iA].status === audit.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else { %>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-chevron-circle-down <%- audit.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(iA+1) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== audit.status.uncheck) { %>
+                                                        <span class="<%- audit.statusClass[ah[iA].status] %>"><% if (ah[iA].status === audit.status.checked || ah[iA].status === audit.status.checkNo) { %><%- ah[iA].end_time.toLocaleDateString() %> <% } %><%- audit.statusString[ah[iA].status]%><% if (ah[iA].status === audit.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } %>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        <% } %>
                         <div class="card mt-3">
                             <ul class="list-group list-group-flush">
                                 <li class="list-group-item">
@@ -309,6 +350,47 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
+                        <% for (const ah of auditHistory) { %>
+                            <div class="card mt-3">
+                                <ul class="list-group list-group-flush">
+                                    <li class="list-group-item">
+                                        <h5 class="card-title">
+                                            <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- user.name %> <small class="text-muted"><%- user.role %></small><span class="pull-right">原报</span>
+                                        </h5>
+                                        <div class="ml-3">
+                                            <span class="text-success"><%- ah[0].begin_time.toLocaleDateString() %> <% if (auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                        </div>
+                                    </li>
+                                    <% for (let iA = 0; iA < ah.length; iA++) { %>
+                                        <% if (iA === ah.length - 1) { %>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-stop-circle <%- audit.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== audit.status.uncheck) { %>
+                                                        <span class="<%- audit.statusClass[ah[iA].status] %>"><% if (ah[iA].status === audit.status.checked || ah[iA].status === audit.status.checkNo) { %><%- ah[iA].end_time.toLocaleDateString() %> <% } %><%- audit.statusString[ah[iA].status]%><% if (ah[iA].status === audit.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } else { %>
+                                            <li class="list-group-item">
+                                                <h5 class="card-title">
+                                                    <i class="fa fa-chevron-circle-down <%- audit.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(iA+1) %>审</span>
+                                                </h5>
+                                                <div class="ml-3">
+                                                    <% if (ah[iA].status !== audit.status.uncheck) { %>
+                                                        <span class="<%- audit.statusClass[ah[iA].status] %>"><% if (ah[iA].status === audit.status.checked || ah[iA].status === audit.status.checkNo) { %><%- ah[iA].end_time.toLocaleDateString() %> <% } %><%- audit.statusString[ah[iA].status]%><% if (ah[iA].status === audit.status.checkNo) { %> <%- user.name %><% } %></span>
+                                                    <% } %>
+                                                    <p class="card-text"><%- ah[iA].opinion %></p>
+                                                </div>
+                                            </li>
+                                        <% } %>
+                                    <% } %>
+                                </ul>
+                            </div>
+                        <% } %>
                         <div class="card mt-3">
                             <ul class="list-group list-group-flush">
                                 <li class="list-group-item">

+ 1 - 1
app/view/setting/user_modal.ejs

@@ -169,7 +169,7 @@
                 <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
                 <input type="hidden" name="id" id="account_id" value="">
                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
-                <button type="button" class="btn btn-sm btn-sm btn-primary">确定解绑</button>
+                <button type="submit" class="btn btn-sm btn-sm btn-primary">确定解绑</button>
             </form>
         </div>
     </div>

+ 228 - 0
app/view/stage/audit_modal.ejs

@@ -105,6 +105,63 @@
                                 </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">
+                                                        <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><span class="pull-right">原报</span></h5>
+                                                        <div class="ml-3">
+                                                            <span class="text-success"><%- ah[iA].begin_time.toLocaleDateString() %> <% if (ctx.stage.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                        </div>
+                                                    </li>
+                                                    <li class="list-group-item">
+                                                        <h5 class="card-title">
+                                                            <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else if (iA === ah.length - 1) { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right">终审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } %>
+                                            <% } %>
+                                        </ul>
+                                    </div>
+                                <% } %>
                                 <div class="card mt-3">
                                     <ul class="list-group list-group-flush">
                                         <li class="list-group-item">
@@ -206,6 +263,63 @@
                                 </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">
+                                                        <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><span class="pull-right">原报</span></h5>
+                                                        <div class="ml-3">
+                                                            <span class="text-success"><%- ah[iA].begin_time.toLocaleDateString() %> <% if (ctx.stage.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                        </div>
+                                                    </li>
+                                                    <li class="list-group-item">
+                                                        <h5 class="card-title">
+                                                            <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else if (iA === ah.length - 1) { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right">终审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } %>
+                                            <% } %>
+                                        </ul>
+                                    </div>
+                                <% } %>
                                 <div class="card mt-3">
                                     <ul class="list-group list-group-flush">
                                         <li class="list-group-item">
@@ -1014,6 +1128,63 @@
                                 </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">
+                                                        <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><span class="pull-right">原报</span></h5>
+                                                        <div class="ml-3">
+                                                            <span class="text-success"><%- ah[iA].begin_time.toLocaleDateString() %> <% if (ctx.stage.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                        </div>
+                                                    </li>
+                                                    <li class="list-group-item">
+                                                        <h5 class="card-title">
+                                                            <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else if (iA === ah.length - 1) { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right">终审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } %>
+                                            <% } %>
+                                        </ul>
+                                    </div>
+                                <% } %>
                                 <div class="card mt-3">
                                     <ul class="list-group list-group-flush">
                                         <li class="list-group-item">
@@ -1115,6 +1286,63 @@
                                 </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">
+                                                        <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><span class="pull-right">原报</span></h5>
+                                                        <div class="ml-3">
+                                                            <span class="text-success"><%- ah[iA].begin_time.toLocaleDateString() %> <% if (ctx.stage.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
+                                                        </div>
+                                                    </li>
+                                                    <li class="list-group-item">
+                                                        <h5 class="card-title">
+                                                            <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else if (iA === ah.length - 1) { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right">终审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } else { %>
+                                                    <li class="list-group-item">
+                                                        <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><span class="pull-right"><%= parseInt(ah[iA].sort) === parseInt(ah[iA].max_sort) ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
+                                                        </h5>
+                                                        <div class="ml-3">
+                                                            <% if (ah[iA].status !== auditConst.status.uncheck) { %>
+                                                                <span class="<%- auditConst.statusClass[ah[iA].status] %>">
+                                                                    <% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo || ah[iA].status === auditConst.status.checkNoPre || ah[iA].status === auditConst.status.checkAgain) { %><small><%- ah[iA].end_time.toLocaleDateString() %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.stage.user.name %><% } %>
+                                                                </span>
+                                                            <% } %>
+                                                            <p class="card-text"><%- ah[iA].opinion %></p>
+                                                        </div>
+                                                    </li>
+                                                <% } %>
+                                            <% } %>
+                                        </ul>
+                                    </div>
+                                <% } %>
                                 <div class="card mt-3">
                                     <ul class="list-group list-group-flush">
                                         <li class="list-group-item">

+ 1 - 0
sql/update.sql

@@ -0,0 +1 @@
+ALTER TABLE `zh_tender` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称';