laiguoran 5 rokov pred
rodič
commit
98a52812c1

+ 0 - 20
app/controller/change_controller.js

@@ -414,26 +414,6 @@ module.exports = app => {
                     // 展示页左侧审批流程列表和清单审批列表数据
                     const auditList2 = await ctx.service.changeAudit.getListGroupByTimes(change.cid, change.times);
                     renderData.auditList2 = auditList2;
-                    const auditList4 = await ctx.service.changeAudit.getListByStatus(change, 7);
-                    // 展示页右侧审批流程列表
-                    const auditList3 = [];
-                    for (let time = 1; time < change.times; time++) {
-                        const auditTimeList = [];
-                        let max_sort = 1;
-                        for (const al of auditList4) {
-                            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;
-                        }
-                        auditList3.push(auditTimeList);
-                    }
-                    renderData.auditList3 = auditList3;
                     for (const i in auditList) {
                         auditList[i].max_sort = auditList2.length - 1;
                     }

+ 5 - 0
app/service/stage_audit.js

@@ -432,6 +432,11 @@ module.exports = app => {
                 // 复制一份最新数据给下一人
                 await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times, audit.order + 1, transaction);
 
+                // 同步 期信息
+                await transaction.update(this.ctx.service.stage.tableName, {
+                    id: stageId, status: checkData.checkType,
+                });
+
                 // 添加短信通知-需要审批提醒功能
                 const smsUser = await this.ctx.service.projectAccount.getDataById(preAuditor.aid);
                 if (smsUser.auth_mobile !== '' && smsUser.auth_mobile !== undefined && smsUser.sms_type !== '' && smsUser.sms_type !== null) {

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

@@ -469,56 +469,6 @@
                             </div>
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
-                            <% for (const time in auditList3) { %>
-                                <% if (auditList3[time].length > 0) { %>
-                                    <div class="card mt-3">
-                                        <ul class="list-group list-group-flush">
-                                            <% for (const [aindex,al] of auditList3[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 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> "></i>
-                                                        <% } else if (al.status === 3) { %>
-                                                            <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-success"></i>
-                                                        <% } else if (al.status === 4) { %>
-                                                            <i class="fa <% if (aindex+1 === auditList3[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 === auditList3[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) { %>
-                                                            <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) {%><%= auditList3[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 auditList.entries()) { %>
@@ -616,56 +566,6 @@
                             </div>
                         </div>
                         <div class="col-8 modal-height-500" style="overflow: auto">
-                            <% for (const time in auditList3) { %>
-                                <% if (auditList3[time].length > 0) { %>
-                                    <div class="card mt-3">
-                                        <ul class="list-group list-group-flush">
-                                            <% for (const [aindex,al] of auditList3[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 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> "></i>
-                                                        <% } else if (al.status === 3) { %>
-                                                            <i class="fa <% if (aindex+1 === auditList3[time].length) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> text-success"></i>
-                                                        <% } else if (al.status === 4) { %>
-                                                            <i class="fa <% if (aindex+1 === auditList3[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 === auditList3[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) { %>
-                                                            <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) {%><%= auditList3[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 auditList.entries()) { %>

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

@@ -27,59 +27,6 @@
                         </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">
@@ -167,59 +114,6 @@
                         </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">