Browse Source

bug修复

laiguoran 4 năm trước cách đây
mục cha
commit
e1b9358d49

+ 3 - 0
app/controller/tender_controller.js

@@ -742,6 +742,9 @@ module.exports = app => {
         }
 
         async shenpiSet(ctx) {
+            if (ctx.session.sessionUser.is_admin === 0) {
+                ctx.request.headers.referer ? ctx.redirect(ctx.request.headers.referer) : ctx.redirect('/list');
+            }
             // 获取所有项目参与者
             const accountList = await ctx.service.projectAccount.getAllDataByCondition({
                 where: { project_id: ctx.session.sessionProject.id, enable: 1 },

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

@@ -88,7 +88,7 @@ $(document).ready(function () {
                 for (const [index,data] of datas.entries()) {
                     if (index !== 0) {
                         html.push('<li class="list-group-item" auditorId="'+ data.aid +'">');
-                        if (is_gdzs && index+1 !== datas.length) {
+                        if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
                             html.push('<a href="javascript: void(0)" class="text-danger pull-right">移除</a>');
                         }
                         html.push('<span>');

+ 2 - 1
app/view/material/audit_modal.ejs

@@ -684,7 +684,8 @@
     <script>
         const accountGroup = JSON.parse('<%- JSON.stringify(accountGroup) %>');
         const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
-        const is_gdzs = <% if (ctx.tender.info.shenpi.material === shenpiConst.sp_status.gdzs) { %>1<% } else { %>0<% } %>;
+        const shenpi_status = <%- ctx.tender.info.shenpi.material %>;
+        const shenpiConst =  JSON.parse('<%- JSON.stringify(shenpiConst) %>');
     </script>
 <% } %>
 <script>const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');</script>