소스 검색

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

laiguoran 4 년 전
부모
커밋
164d18aa97
3개의 변경된 파일22개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 0
      app/public/js/advance_audit.js
  2. 3 3
      app/view/advance/index.ejs
  3. 16 0
      app/view/advance/modal_audit.ejs

+ 3 - 0
app/public/js/advance_audit.js

@@ -10,6 +10,9 @@
 
 $(document).ready(function () {
     autoFlashHeight()
+    if (!advancePayTotal) {
+        $('#sub-ts').modal('show');
+    }
     let oldVal = null
     let timer = null
     let oldSearchVal = null

+ 3 - 3
app/view/advance/index.ejs

@@ -60,10 +60,10 @@
                             <tr>
                                 <td><a href="/tender/<%- ctx.tender.id %>/advance/<%- item.id %>/detail" data-id="<%- item.id %>">第<%- item.order %>期</a></td>
                                 <% if (item.status === auditConst.status.uncheck || item.status === auditConst.status.checkNo) { %>
-                                    <td><%- item.pay_ratio %>%</td>
-                                    <td class="text-right"><%- ctx.helper.mul(advancePayTotal, ctx.helper.div(item.pay_ratio, 100, decimal), decimal)%></td>
+                                    <td><%- item.pay_ratio || 0%>%</td>
+                                    <td class="text-right"><%- ctx.helper.mul(advancePayTotal, ctx.helper.div(item.pay_ratio, 100, decimal), decimal) %></td>
                                 <% } else {%>
-                                    <td><%- item.cur_amount && ctx.helper.mul(ctx.helper.div(item.cur_amount, advancePayTotal), 100).toFixed(2) || 0%>%</td>
+                                    <td><%- item.cur_amount && ctx.helper.mul(ctx.helper.div(item.cur_amount, advancePayTotal), 100).toFixed(2) || 0 %>%</td>
                                     <td class="text-right"><%- ctx.helper.formatMoney(item.cur_amount, ',', decimal)%></td>
                                 <% } %>
                                 <td class="text-right"><%- ctx.helper.formatMoney(item.prev_amount, ',', decimal)%></td>

+ 16 - 0
app/view/advance/modal_audit.ejs

@@ -1,3 +1,19 @@
+<!-- 初始化 预付款为0的时候提醒 -->
+<div class="modal fade" id="sub-ts" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">温馨提示</h5>
+            </div>
+            <div class="modal-body">
+                <h5 id="tm-fail" class="text-danger">签约<%- advance.type === 0 ? '开工' : '材料' %>预付款为0元,请在“标段概况-合同参数”输入签约<%- advance.type === 0 ? '开工' : '材料' %>预付款金额。</h5>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
 <!--上报审批-->
 <div class="modal fade" id="sub-sp" data-backdrop="static">
     <div class="modal-dialog" role="document">