浏览代码

计量台账,计量单元空白行,点击数量变更,不应弹出调用变更令窗口

MaiXinRong 5 年之前
父节点
当前提交
231640c05f
共有 3 个文件被更改,包括 8 次插入3 次删除
  1. 6 2
      app/controller/tender_controller.js
  2. 1 0
      app/public/js/stage.js
  3. 1 1
      app/view/layout/menu.ejs

+ 6 - 2
app/controller/tender_controller.js

@@ -35,7 +35,8 @@ module.exports = app => {
             try {
                 // 获取用户新建标段权利
                 const accountInfo = await this.ctx.service.projectAccount.getDataById(this.ctx.session.sessionUser.accountId);
-                const userPermission = accountInfo !== undefined && accountInfo.permission !== '' ? JSON.parse(accountInfo.permission) : null;
+                const userPermission = accountInfo !== undefined && accountInfo.permission !== ''
+                    ? JSON.parse(accountInfo.permission) : null;
 
                 const tenderList = await this.ctx.service.tender.getList('', userPermission);
 
@@ -50,7 +51,10 @@ module.exports = app => {
                         t.lastStage = await this.ctx.service.stage.getLastestStage(t.id, true);
 
                         if (!t.lastStage) continue;
-                        if (t.lastStage.status === auditConst.stage.status.uncheck && t.lastStage.user_id !== this.ctx.session.sessionUser.accountId) { t.lastStage = await this.ctx.service.stage.getLastestStage(t.id); }
+                        if (t.lastStage.status === auditConst.stage.status.uncheck &&
+                            t.lastStage.user_id !== this.ctx.session.sessionUser.accountId) {
+                            t.lastStage = await this.ctx.service.stage.getLastestStage(t.id);
+                        }
 
                         if (!t.lastStage) continue;
                         await this.ctx.service.stage.checkStageGatherData(t.lastStage);

+ 1 - 0
app/public/js/stage.js

@@ -511,6 +511,7 @@ $(document).ready(() => {
         return data !== undefined && data !== null;
     };
     posSpreadSetting.imageClick = function (data) {
+        if (!data) return;
         const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
         changesObj.loadChanges({bills: node, pos: data});
     };

+ 1 - 1
app/view/layout/menu.ejs

@@ -12,7 +12,7 @@
             <% for (const index in ctx.menuList) { %>
             <% if (ctx.menuList[index].display === undefined || !ctx.menuList[index].display) { continue } %>
             <li <% if(ctx.controllerName === index || (ctx.controllerName === 'list' && index === 'tender')) { %>class="active"<% } %>>
-                <a href="<%- index === 'tender' ? ctx.curListUrl : ctx.menuList[index].url %>" id="<%- 'nav_' + index%>" data-toggle="tooltip" data-placement="right" title="" data-original-title="<%- ctx.menuList[index].name %>">
+                <a href="<%- (index === 'tender' && !ctx.app.config.is_debug ? ctx.curListUrl : ctx.menuList[index].url) %>" id="<%- 'nav_' + index%>" data-toggle="tooltip" data-placement="right" title="" data-original-title="<%- ctx.menuList[index].name %>">
                     <i class="fa <%- ctx.menuList[index].icon %>"></i>
                     <% if (ctx.menuList[index].caption) { %>
                     <span><%- ctx.menuList[index].caption %></span>