瀏覽代碼

删除本期按钮位置更改

laiguoran 5 年之前
父節點
當前提交
130083db55

+ 0 - 2
app/public/js/change_set.js

@@ -543,14 +543,12 @@ function tableDataRemake(changeListData) {
         for (const cl of changeList) {
             const clinfo = cl.split(';');
             const listinfo = changeListData[clinfo[8] - 1];
-            console.log(listinfo);
             $('#table-list-select tr[data-index="'+ clinfo[8] +'"]').addClass('table-success');
             let pushbwmx = '0;0';
             if (listinfo.leafXmjs !== undefined) {
                 const leafInfo = listinfo.leafXmjs.find(function (item) {
                     return (item.bwmx === undefined || item.bwmx === clinfo[2]) && item.quantity === parseFloat(clinfo[5]);
                 });
-                console.log(leafInfo);
                 pushbwmx = leafInfo.code + '_' + (leafInfo.bwmx !== undefined ? leafInfo.bwmx : '') + ';' + leafInfo.quantity;
             } else {
                 pushbwmx = '0;' + (listinfo.quantity !== null ? listinfo.quantity : 0);

+ 0 - 3
app/view/measure/stage.ejs

@@ -64,9 +64,6 @@
                             <% } else { %>
                             <span class="<%- auditConst.auditStringClass[s.status] %>"><%- auditConst.auditString[s.status] %></span>
                             <% } %>
-                            <% if (s.user_id === ctx.session.sessionUser.accountId && s.order === stages.length) { %>
-                            <a href="#del-qi" class="btn btn-outline-danger btn-sm ml-1" data-toggle="modal" data-target="#del-qi">删除</a>
-                            <% } %>
                         </td>
                     </tr>
                     <% } %>

+ 0 - 22
app/view/measure/stage_modal.ejs

@@ -30,28 +30,6 @@
     </div>
 </div>
 <% } %>
-<% if (stages && stages.length >= 1) { %>
-<!--删除期-->
-<div class="modal fade" id="del-qi" data-backdrop="static">
-    <div class="modal-dialog" role="document">
-        <form class="modal-content" action="<%- preUrl + '/measure/stage/delete' %>" method="post">
-            <div class="modal-header">
-                <h5 class="modal-title">删除期</h5>
-            </div>
-            <div class="modal-body">
-                <h5>确认删除「第<%= stages.length %>期」?</h5>
-                <h5>删除后,数据无法恢复,请谨慎操作。</h5>
-            </div>
-            <div class="modal-footer">
-                <input type="hidden" name="stage_id" value="<%= stages[0].id %>">
-                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
-                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
-                <button type="submit" class="btn btn-danger btn-sm">确定删除</button>
-            </div>
-        </form>
-    </div>
-</div>
-<% } %>
 <!--审批流程/结果-->
 <div class="modal fade" id="sp-list" data-backdrop="static">
     <div class="modal-dialog modal-lg" role="document">

+ 3 - 0
app/view/stage/audit_btn.ejs

@@ -25,4 +25,7 @@
     <% if (ctx.stage.auditors !== undefined && ctx.stage.auditors.length !== 0 && ctx.stage.auditors[ctx.stage.auditors.length-1].aid === ctx.session.sessionUser.accountId && ctx.stage.status === auditConst.status.checked && ctx.stage.order === ctx.stage.highOrder) { %>
         <a href="javascript: void(0);" data-toggle="modal" data-target="#sp-down-back" class="btn btn-warning btn-sm btn-block">重新审批</a>
     <% } %>
+    <% if (ctx.stage.user_id === ctx.session.sessionUser.accountId && ctx.stage.order === ctx.stage.highOrder) { %>
+        <a href="#del-qi" data-toggle="modal" data-target="#del-qi" class="btn btn-outline-danger btn-sm btn-block mt-5">删除本期</a>
+    <% } %>
 </div>

+ 22 - 0
app/view/stage/audit_modal.ejs

@@ -1220,3 +1220,25 @@
         </div>
     </div>
 <% } %>
+<% if (ctx.stage.user_id === ctx.session.sessionUser.accountId && ctx.stage.order === ctx.stage.highOrder) { %>
+<!--删除期-->
+<div class="modal fade" id="del-qi" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <form class="modal-content" action='/tender/<%= ctx.tender.id %>/measure/stage/delete' method="post">
+            <div class="modal-header">
+                <h5 class="modal-title">删除期</h5>
+            </div>
+            <div class="modal-body">
+                <h5>确认删除「第<%= ctx.stage.order %>期」?</h5>
+                <h5>删除后,数据无法恢复,请谨慎操作。</h5>
+            </div>
+            <div class="modal-footer">
+                <input type="hidden" name="stage_id" value="<%= ctx.stage.id %>">
+                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
+                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
+                <button type="submit" class="btn btn-danger btn-sm">确定删除</button>
+            </div>
+        </form>
+    </div>
+</div>
+<% } %>