Explorar el Código

1. 合同支付,取消提示“已完成,请继续完成「上报审批」 解锁编辑”
2. 计量台账、中间计量,审批人提示调整
3. 中间计量,上报审批提示窗口调整

MaiXinRong hace 6 años
padre
commit
e569662fc9
Se han modificado 4 ficheros con 14 adiciones y 12 borrados
  1. 0 4
      app/service/ledger.js
  2. 9 1
      app/view/stage/audit_modal.ejs
  3. 5 1
      app/view/stage/detail.ejs
  4. 0 6
      app/view/stage/pay.ejs

+ 0 - 4
app/service/ledger.js

@@ -1491,7 +1491,6 @@ module.exports = app => {
          * @return {Object} - 提价后的数据(其中新增粘贴数据,只返回第一层)
          */
         async pasteBlock(tenderId, selectId, block) {
-            console.log(1);
             if ((tenderId <= 0) || (selectId <= 0)) {
                 return [];
             }
@@ -1516,7 +1515,6 @@ module.exports = app => {
                 throw '复制数据错误:仅可操作同层节点';
             }
             const orgParentPath = copyNodes[0].full_path.replace(copyNodes[0].ledger_id, '');
-            console.log(2);
 
             const newIds = [];
             this.transaction = await this.db.beginTransaction();
@@ -1579,7 +1577,6 @@ module.exports = app => {
                 await this.transaction.rollback();
                 throw err;
             }
-            console.log(3);
 
             // 查询应返回的结果
             const order = [];
@@ -1593,7 +1590,6 @@ module.exports = app => {
                 ledger: { create: createData, update: updateData },
                 pos: posData,
             };
-            console.log(4);
         }
 
         /**

+ 9 - 1
app/view/stage/audit_modal.ejs

@@ -81,7 +81,9 @@
             </div>
             <div class="modal-footer">
                 <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
+                <% if (ctx.url !== '/tender/' + ctx.tender.id + '/measure/stage/' + ctx.stage.order + '/detail') { %>
                 <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail" class="btn btn-primary">进入中间计量</a>
+                <% } %>
             </div>
         </div>
     </div>
@@ -275,7 +277,9 @@
             </div>
             <div class="modal-footer">
                 <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
+                <% if (ctx.url !== '/tender/' + ctx.tender.id + '/measure/stage/' + ctx.stage.order + '/detail') { %>
                 <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail" class="btn btn-primary">进入中间计量</a>
+                <% } %>
             </div>
         </div>
     </div>
@@ -760,7 +764,9 @@
             </div>
             <div class="modal-footer">
                 <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
-                <a href="/tender/<%- ctx.tender.id %>/measure/stage/<% ctx.stage.order %>/detail" class="btn btn-primary">进入中间计量</a>
+                <% if (ctx.url !== '/tender/' + ctx.tender.id + '/measure/stage/' + ctx.stage.order + '/detail') { %>
+                <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail" class="btn btn-primary">进入中间计量</a>
+                <% } %>
             </div>
         </div>
     </div>
@@ -1085,7 +1091,9 @@
                 </div>
                 <div class="modal-footer">
                     <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
+                    <% if (ctx.url !== '/tender/' + ctx.tender.id + '/measure/stage/' + ctx.stage.order + '/detail') { %>
                     <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail" class="btn btn-primary">进入中间计量</a>
+                    <% } %>
                 </div>
             </div>
         </div>

+ 5 - 1
app/view/stage/detail.ejs

@@ -11,13 +11,17 @@
             </div>
             <div class="ml-auto">
                 <!--完成中间计量-->
-                <% if (!ctx.stage.readOnly) { %>
+                <% if (!ctx.stage.readOnly && ctx.stage.check_detail) { %>
                 <% if (ctx.stage.check_detail) { %>
                 <a href="javascirpt: void(0);" data-toggle="modal" data-target="#done" class="btn btn-success btn-sm pull-right">完成本期中间计量</a>
                 <% } else { %>
+                <% if (ctx.stage.user_id = ctx.session.sessionUser.accountId) {%>
+                <span class="text-success" id="locked-hint">请继续完成上报审批。如需修改计量,点击 <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail/unlock">编辑</a></span>
+                <% } else { %>
                 <span class="text-success" id="locked-hint">已完成,请继续完成「上报审批」 <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail/unlock">解锁编辑</a></span>
                 <% } %>
                 <% } %>
+                <% } %>
             </div>
         </div>
     </div>

+ 0 - 6
app/view/stage/pay.ejs

@@ -18,12 +18,6 @@
                     </div>
                 </div>
             </div>
-            <div class="ml-auto">
-                <!--完成中间计量-->
-                <% if (!ctx.stage.check_detail && !ctx.stage.readOnly) { %>
-                <span class="text-success" id="locked-hint">已完成,请继续完成「上报审批」 <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail/unlock">解锁编辑</a></span>
-                <% } %>
-            </div>
         </div>
     </div>
     <div class="content-wrap">