Procházet zdrojové kódy

修改待办页支付审批开关权限控制

ellisran před 1 rokem
rodič
revize
8684d5e8ce

+ 1 - 1
app/controller/dashboard_controller.js

@@ -33,7 +33,7 @@ module.exports = app => {
             const auditChangeProject = ctx.session.sessionProject.page_show.openChangeProject ? await ctx.service.changeProjectAudit.getAuditChangeProject(ctx.session.sessionUser.accountId) : [];
             const auditChangeApply = ctx.session.sessionProject.page_show.openChangeApply ? await ctx.service.changeApplyAudit.getAuditChangeApply(ctx.session.sessionUser.accountId) : [];
             const auditChangePlan = ctx.session.sessionProject.page_show.openChangePlan ? await ctx.service.changePlanAudit.getAuditChangePlan(ctx.session.sessionUser.accountId) : [];
-            const auditPayments = await ctx.service.paymentDetailAudit.getAuditPayment(ctx.session.sessionUser.accountId);
+            const auditPayments = ctx.session.sessionProject.page_show.openPayment ? await ctx.service.paymentDetailAudit.getAuditPayment(ctx.session.sessionUser.accountId) : [];
             const pa = await ctx.service.projectAccount.getDataById(ctx.session.sessionUser.accountId);
             const noticeList = await ctx.service.noticePush.getNotice(ctx.session.sessionProject.id, pa.id);
             const projectData = await ctx.service.project.getDataById(ctx.session.sessionProject.id);

+ 1 - 1
app/view/dashboard/index.ejs

@@ -66,7 +66,7 @@
                                     <% if (auditMaterial.length !== 0) { %>
                                     <option value="1">材料调差(<%- auditMaterial.length %>)</option>
                                     <% } %>
-                                    <% if (auditPayments.length !== 0) { %>
+                                    <% if (ctx.session.sessionProject.page_show.openPayment && auditPayments.length !== 0) { %>
                                         <option value="10">支付审批(<%- auditPayments.length %>)</option>
                                     <% } %>
                                 </select>