瀏覽代碼

1. 期列表,本期补差相关
2. 清单汇总-章节合计,本期补差相关

MaiXinRong 2 年之前
父節點
當前提交
d2553fa9dc
共有 4 個文件被更改,包括 36 次插入19 次删除
  1. 11 11
      app/public/js/measure_stage.js
  2. 2 0
      app/public/js/stage_gather.js
  3. 16 7
      app/view/measure/stage.ejs
  4. 7 1
      app/view/stage/gather_modal.ejs

+ 11 - 11
app/public/js/measure_stage.js

@@ -198,18 +198,18 @@ function checkValidForm() {
 }
 $(window).resize(checkTableWidth);
 function checkTableWidth() {
-    if($('table th').eq(3).outerWidth() < 107) {
-        $('table th').eq(3).html('本期<br>合同计量');
-        $('table th').eq(4).html('本期数量<br>变更计量');
-        $('table th').eq(5).html('本期<br>完成计量');
-        $('table th').eq(6).html('截止上期<br>完成计量');
-        $('table th').eq(7).html('截止本期<br>完成计量');
+    if($('table th[name=contract_tp]').outerWidth() < 107) {
+        $('table th[name=contract_tp]').html('本期<br>合同计量');
+        $('table th[name=qc_tp]').html('本期数量<br>变更计量');
+        $('table th[name=tp]').html('本期<br>完成计量');
+        $('table th[name=pre_tp]').html('截止上期<br>完成计量');
+        $('table th[name=end_tp]').html('截止本期<br>完成计量');
     } else {
-        $('table th').eq(3).html('本期合同计量');
-        $('table th').eq(4).html('本期数量变更计量');
-        $('table th').eq(5).html('本期完成计量');
-        $('table th').eq(6).html('截止上期完成计量');
-        $('table th').eq(7).html('截止本期完成计量');
+        $('table th[name=contract_tp]').html('本期合同计量');
+        $('table th[name=qc_tp]').html('本期数量变更计量');
+        $('table th[name=tp]').html('本期完成计量');
+        $('table th[name=pre_tp]').html('截止上期完成计量');
+        $('table th[name=end_tp]').html('截止本期完成计量');
     }
 }
 

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

@@ -10,6 +10,7 @@
 
 function generateChapterHtml(data) {
     const html = [];
+    const hasPriceDiff = $('th[name=pc_tp]').length > 0;
     if (data) {
         for (const d of data) {
             if (['1000', '1100', '1200', '1300'].indexOf(d.code) >= 0) {
@@ -30,6 +31,7 @@ function generateChapterHtml(data) {
             html.push('<td class="text-right">', d.total_price ? d.total_price : '', '</td>');
             html.push('<td class="text-right">', d.contract_tp ? d.contract_tp : '', '</td>');
             html.push('<td class="text-right">', d.qc_tp ? d.qc_tp : '', '</td>');
+            if (hasPriceDiff) html.push('<td class="text-right">', d.pc_tp ? d.pc_tp : '', '</td>');
             html.push('<td class="text-right">', d.gather_tp ? d.gather_tp : '', '</td>');
             html.push('<td class="text-right">', d.end_contract_tp ? d.end_contract_tp : '', '</td>');
             html.push('<td class="text-right">', d.end_qc_tp ? d.end_qc_tp : '', '</td>');

+ 16 - 7
app/view/measure/stage.ejs

@@ -27,13 +27,16 @@
                         <th class="text-center" width="70px">计量期数</th>
                         <th class="text-center" width="70px">计量月份</th>
                         <th class="text-center" width="70px">截止日期</th>
-                        <th class="text-center" width="100px">本期合同计量</th>
-                        <th class="text-center" width="100px">本期数量变更计量</th>
-                        <th class="text-center" width="100px">本期完成计量</th>
-                        <th class="text-center" width="100px">截止上期完成计量</th>
-                        <th class="text-center" width="100px">截止本期完成计量</th>
-                        <th class="text-center" width="100px">本期应付</th>
-                        <th class="text-center" width="100px">本期实付</th>
+                        <th class="text-center" width="100px" name="contract_tp">本期合同计量</th>
+                        <th class="text-center" width="100px" name="qc_tp">本期数量变更计量</th>
+                        <% if (ctx.tender.info.display.stage.priceDiff) { %>
+                        <th class="text-center" width="100px" name="pc_tp">本期补差</th>
+                        <% } %>
+                        <th class="text-center" width="100px" name="tp">本期完成计量</th>
+                        <th class="text-center" width="100px" name="pre_tp">截止上期完成计量</th>
+                        <th class="text-center" width="100px" name="end_tp">截止本期完成计量</th>
+                        <th class="text-center" width="100px" name="yf">本期应付</th>
+                        <th class="text-center" width="100px" name="sf">本期实付</th>
                         <th class="text-center" width="200px">审批进度</th>
                         <th class="text-center" width="90px">操作</th>
                     </tr>
@@ -56,6 +59,9 @@
                         <% if (ctx.tender.info.display.thousandth) { %>
                         <td class="text-right"><%- (s.contract_tp ? ctx.helper.formatNum(s.contract_tp, '#,##0.######') : '')%></td>
                         <td class="text-right"><%- (s.qc_tp ? ctx.helper.formatNum(s.qc_tp, '#,##0.######') : '')%></td>
+                        <% if (ctx.tender.info.display.stage.priceDiff) { %>
+                        <td class="text-right"><%- (s.pc_tp ? ctx.helper.formatNum(s.pc_tp, '#,##0.######') : '')%></td>
+                        <% } %>
                         <td class="text-right"><%- (s.tp ? ctx.helper.formatNum(s.tp, '#,##0.######') : '')%></td>
                         <td class="text-right"><%- (s.pre_tp ? ctx.helper.formatNum(s.pre_tp, '#,##0.######') : '')%></td>
                         <td class="text-right"><%- (s.end_tp ? ctx.helper.formatNum(s.end_tp, '#,##0.######') : '')%></td>
@@ -64,6 +70,9 @@
                         <% } else { %>
                         <td class="text-right"><%- (s.contract_tp ? s.contract_tp : '')%></td>
                         <td class="text-right"><%- (s.qc_tp ? s.qc_tp : '')%></td>
+                        <% if (ctx.tender.info.display.stage.priceDiff) { %>
+                        <td class="text-right"><%- (s.pc_tp ? s.pc_tp : '')%></td>
+                        <% } %>
                         <td class="text-right"><%- (s.tp ? s.tp : '')%></td>
                         <td class="text-right"><%- (s.pre_tp ? s.pre_tp : '')%></td>
                         <td class="text-right"><%- (s.end_tp ? s.end_tp : '')%></td>

+ 7 - 1
app/view/stage/gather_modal.ejs

@@ -8,7 +8,13 @@
             </div>
             <div class="modal-body">
                 <table class="table table-bordered table-sm">
-                    <thead class="text-center"><tr><th>章节</th><th>章节名称</th><th>签约金额</th><th>台账金额</th><th>本期合同计量金额</th><th>本期数量变更金额</th><th>本期完成计量金额</th><th>截止本期合同计量金额</th><th>截止本期数量变更金额</th><th>截止本期完成计量金额</th><th>完成率(%)</th></tr></thead>
+                    <thead class="text-center"><tr>
+                        <th>章节</th><th>章节名称</th><th>签约金额</th><th>台账金额</th><th>本期合同计量金额</th><th>本期数量变更金额</th>
+                        <% if (ctx.tender.info.display.stage.priceDiff) { %>
+                        <th name="pc_tp">本期补差</th>
+                        <% } %>
+                        <th>本期完成计量金额</th><th>截止本期合同计量金额</th><th>截止本期数量变更金额</th><th>截止本期完成计量金额</th><th>完成率(%)</th>
+                    </tr></thead>
                     <tbody id="chapter-list"></tbody>
                 </table>
             </div>