Pārlūkot izejas kodu

标段管理,金额概况、计量进度页面调整

MaiXinRong 6 gadi atpakaļ
vecāks
revīzija
5148b32d39

+ 2 - 0
app/controller/stage_controller.js

@@ -101,6 +101,8 @@ module.exports = app => {
             if (tender.data.measure_type === measureType.tz.value) {
                 removeFieldCols(ledger, spreadConst.filterCols.tzWithoutCols);
                 removeFieldCols(pos, spreadConst.filterCols.posTzWithoutCols);
+                const col = this.app._.find(pos.cols, {field: 'quantity'});
+                col.readOnly = true;
             }
             if (!tender.info.display.ledger.dgnQty) {
                 removeFieldCols(ledger, spreadConst.filterCols.dgnCols);

+ 19 - 15
app/public/js/stage_detail.js

@@ -40,16 +40,18 @@ $(document).ready(() => {
 
     function loadPosData() {
         const data = getSelectDetailData();
-        const rowIndex = parseInt($('#leaf-xmj-list').attr('rowIndex'));
-        const leafXmj = data.leafXmjs[rowIndex];
         const html = [];
-        if (leafXmj) {
-            for (const p of leafXmj.pos) {
-                html.push('<tr>');
-                html.push('<td>', p.name, '</td>');
-                html.push('<td>', p.quantity, '</td>');
-                html.push('<td>', p.jl, '</td>');
-                html.push('</tr>');
+        if (data) {
+            const rowIndex = parseInt($('#leaf-xmj-list').attr('rowIndex'));
+            const leafXmj = data.leafXmjs[rowIndex];
+            if (leafXmj) {
+                for (const p of leafXmj.pos) {
+                    html.push('<tr>');
+                    html.push('<td>', p.name, '</td>');
+                    html.push('<td>', p.quantity, '</td>');
+                    html.push('<td>', p.jl, '</td>');
+                    html.push('</tr>');
+                }
             }
         }
         $('#pos-list').html(html.join(''));
@@ -58,12 +60,14 @@ $(document).ready(() => {
     function loadLeafXmjsData() {
         const data = getSelectDetailData();
         const html = [];
-        for (const lx of data.leafXmjs) {
-            html.push('<tr>');
-            html.push('<td>', lx.code , '</td>');
-            html.push('<td>', lx.name , '</td>');
-            html.push('<td>', lx.jl , '</td>');
-            html.push('</tr>');
+        if (data && data.leafXmjs) {
+            for (const lx of data.leafXmjs) {
+                html.push('<tr>');
+                html.push('<td>', lx.code , '</td>');
+                html.push('<td>', lx.name , '</td>');
+                html.push('<td>', lx.jl , '</td>');
+                html.push('</tr>');
+            }
         }
         $('#leaf-xmj-list').html(html.join(''));
         $('#leaf-xmj-list').attr('rowIndex', 0);

+ 20 - 7
app/public/js/tender_list.js

@@ -244,14 +244,19 @@ function recursiveGetTenderNodeHtml (node, arr) {
         html.push('</span>');
         //html.push('<a href="/tender/' + node.id + '">', node[c.field], '</a>');
         html.push('<a href="javascript: void(0)" id="' + node.id + '">', node.name, '</a>');
-        if (node.measure_type) {
-            html.push('<span class="small">', ' (', node.measure_type === measureType.tz.value ? '台账' : '清单', ')', '</span>');
-        }
+    }
+    html.push('</td>');
+    // 计量模式
+    html.push('<td>');
+    if (node.measure_type) {
+        html.push(node.measure_type === measureType.tz.value ? '0号台账' : '工程量清单');
     }
     html.push('</td>');
     // 计量期数
     html.push('<td>');
-    html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
+    if (!node.cid) {
+        html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
+    }
     html.push('</td>');
     // 审批状态
     html.push('<td>');
@@ -299,9 +304,17 @@ function getTenderTreeHtml () {
         const html = [];
         html.push('<table class="table table-bordered">');
         html.push('<thead>', '<tr>');
-        for (const c of TenderTableCol) {
-            html.push('<th>', c.title, '</th>');
-        }
+        html.push('<th>', '名称', '</th>');
+        html.push('<th>', '计量模式', '</th>');
+        html.push('<th>', '计量期数', '</th>');
+        html.push('<th>', '审批状态', '</th>');
+        html.push('<th>', '0号台帐', '</th>');
+        html.push('<th>', '本期完成', '</th>');
+        html.push('<th>', '截止本期合同', '</th>');
+        html.push('<th>', '截止本期变更', '</th>');
+        html.push('<th>', '截止本期完成', '</th>');
+        html.push('<th>', '截止上期完成', '</th>');
+        html.push('<th>', '本期应付', '</th>');
         html.push('</tr>', '</thead>');
         for (const t of tenderTree) {
             html.push(recursiveGetTenderNodeHtml(t, tenderTree));

+ 12 - 5
app/public/js/tender_list_progress.js

@@ -246,10 +246,16 @@ function recursiveGetTenderNodeHtml (node, arr) {
         html.push('<a href="javascript: void(0)" id="' + node.id + '">', node.name, '</a>');
     }
     html.push('</td>');
-    // 完成期数
+    // 计量期数
     html.push('<td>');
-    html.push(node.completeStage ? '第' + node.completeStage.order + '期' : '');
+    if (!node.cid) {
+        html.push(node.lastStage ? '第' + node.lastStage.order + '期' : '台账');
+    }
     html.push('</td>');
+    // 完成期数
+    // html.push('<td>');
+    // html.push(node.completeStage ? '第' + node.completeStage.order + '期' : '');
+    // html.push('</td>');
     // 累计合同计量
     html.push('<td>');
     //html.push(node[c.field] ? node[c.field] : '');
@@ -272,9 +278,10 @@ function getTenderTreeHtml () {
         const html = [];
         html.push('<table class="table table-bordered">');
         html.push('<thead>', '<tr>');
-        for (const c of TenderTableCol) {
-            html.push('<th>', c.title, '</th>');
-        }
+        html.push('<th>', '名称', '</th>');
+        html.push('<th>', '计量期数', '</th>');
+        html.push('<th>', '累计合同计量', '</th>');
+        html.push('<th>', '截止本期累计完成/本期完成/未完成', '</th>');
         html.push('</tr>', '</thead>');
         for (const t of tenderTree) {
             html.push(recursiveGetTenderNodeHtml(t, tenderTree));