Преглед на файлове

台账修订,台账对比2.0

MaiXinRong преди 4 години
родител
ревизия
4857490bfd
променени са 6 файла, в които са добавени 254 реда и са изтрити 75 реда
  1. 58 14
      app/public/css/main.css
  2. 25 7
      app/public/css/main_s.css
  3. 5 6
      app/public/js/path_tree.js
  4. 94 16
      app/public/js/revise_compare.js
  5. 3 3
      app/public/js/spreadjs_rela/spreadjs_zh.js
  6. 69 29
      app/view/revise/compare.ejs

+ 58 - 14
app/public/css/main.css

@@ -90,6 +90,51 @@ font-size: .875rem;
 .group-tab .btn-light.active{
   cursor: default;
 }
+.text-info-50{
+  color: #bee5eb;
+}
+.text-danger-50{
+  color: #ed969e;
+}
+.text-success-50{
+  color: #c3e6cb;
+}
+.text-primary-50{
+  color: #cce5ff;
+}
+.text-secondary-50{
+  color: #dcdcdc;
+}
+.bg-info-50{
+  background-color: #d0f6fd;
+}
+.bg-danger-50{
+  background-color: #f8d7da;
+}
+.bg-success-50{
+  background-color: #d4edda;
+}
+.bg-primary-50{
+  background-color: #cce5ff;
+}
+.bg-secondary-50{
+  background-color: #dcdcdc;
+}
+.border-info-50{
+  border:1px solid #9be6f4;
+}
+.border-danger-50{
+  border:1px solid #f5c6cb;
+}
+.border-success-50{
+  border:1px solid #c3e6cb;
+}
+.border-primary-50{
+  border:1px solid #b8daff;
+}
+.border-secondary-50{
+  border:1px solid #ccc;
+}
 /*在谷歌下移除input[number]的上下箭头*/
 input.nospin[type='number']::-webkit-outer-spin-button,
 input.nospin[type='number']::-webkit-inner-spin-button{
@@ -108,23 +153,23 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
 /*滚动条*/
 /* 滚动条 */
 /*水平滚动条的样式*/
-/*::-webkit-scrollbar-thumb:horizontal {
+/*::-webkit-scrollbar-thumb:horizontal { 
 	width: 5px;
 	background-color: #e9ecef;
 	-webkit-border-radius: 0;
 }*/
 /*滚动条的背景颜色,滚动条的圆角宽度*/
 /*::-webkit-scrollbar-track-piece {
-	background-color: #efefef;
-	-webkit-border-radius: 0;
+	background-color: #efefef; 
+	-webkit-border-radius: 0; 
 }*/
 /*滚动条的宽度,滚动条的高度*/
 /*::-webkit-scrollbar {
-	width: 14px;
-	height: 14px;
+	width: 14px; 
+	height: 14px; 
 }*/
 /*垂直滚动条的样式*/
-/*::-webkit-scrollbar-thumb:vertical {
+/*::-webkit-scrollbar-thumb:vertical { 
 	height: 50px;
 	background-color: #e9ecef;
 	-webkit-border-radius: 0;
@@ -133,7 +178,7 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
 	border: 1px solid #ced4da;
 }*/
 /*滚动条的hover样式*/
-/*::-webkit-scrollbar-thumb:hover {
+/*::-webkit-scrollbar-thumb:hover { 
 	height: 50px;
 	background-color: #ced4da;
 	-webkit-border-radius: 0;
@@ -156,7 +201,7 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
   margin-top:-3px;
 }
 .sjs-bottom{
-  height:400px;
+  height:250px;
 }
 .sjs-bottom-2{
   height:360px;
@@ -705,7 +750,7 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
   font-size: 14px
 }
 .bd-toc {
-
+  
     position: sticky;
     top:3rem;
     height: calc(100vh - 10rem);
@@ -860,7 +905,7 @@ body{
   line-height: 30px;
 }
 .panel-title > .title-main .btn.pull-right {
-    margin: 5px 0 0 0
+    margin: 5px 0 0 0 
 }
 .panel-content{
   padding-top:35px;
@@ -1083,7 +1128,7 @@ a.maintain-icon .fa{
     }
 }
 
-a.maintain-icon:hover .fa{
+a.maintain-icon:hover .fa{ 
     animation-iteration-count:0
 }
 /*审批列表*/
@@ -1150,6 +1195,5 @@ overflow-y: auto;
   display: none;
 }
 .list-table tr:hover .att-file-btn{
-  display: block;
-}
-
+  display: inline-block;
+}

+ 25 - 7
app/public/css/main_s.css

@@ -94,28 +94,46 @@ font-size: .875rem;
   color: #bee5eb;
 }
 .text-danger-50{
-  color: #f5c6cb;
+  color: #ed969e;
 }
 .text-success-50{
   color: #c3e6cb;
 }
+.text-primary-50{
+  color: #cce5ff;
+}
+.text-secondary-50{
+  color: #dcdcdc;
+}
 .bg-info-50{
-  background-color: #bee5eb;
+  background-color: #d0f6fd;
 }
 .bg-danger-50{
-  background-color: #f5c6cb;
+  background-color: #f8d7da;
 }
 .bg-success-50{
-  background-color: #c3e6cb;
+  background-color: #d4edda;
+}
+.bg-primary-50{
+  background-color: #cce5ff;
+}
+.bg-secondary-50{
+  background-color: #dcdcdc;
 }
 .border-info-50{
-  border:1px solid #86cfda;
+  border:1px solid #9be6f4;
 }
 .border-danger-50{
-  border:1px solid #ed969e;
+  border:1px solid #f5c6cb;
 }
 .border-success-50{
-  border:1px solid #8fd19e;
+  border:1px solid #c3e6cb;
+}
+.border-primary-50{
+  border:1px solid #b8daff;
+}
+.border-secondary-50{
+  border:1px solid #ccc;
 }
 /*在谷歌下移除input[number]的上下箭头*/
 input.nospin[type='number']::-webkit-outer-spin-button,

+ 5 - 6
app/public/js/path_tree.js

@@ -1473,13 +1473,13 @@ const createNewPathTree = function (type, setting) {
             }
         }
 
-        loadCompareNode(node, parent, loadFun) {
+        loadCompareNode(source, node, parent, loadFun) {
             let cur = this.findCompareNode(node, parent);
             if (!cur) {
                 const siblings = parent ? parent.children : this.children;
                 const id = this.newId;
                 cur = {
-                    children: [],
+                    children: [], pos: [],
                     code: node.code, b_code: node.b_code, name: node.name,
                     unit: node.unit, unit_price: node.unit_price,
                 };
@@ -1491,9 +1491,9 @@ const createNewPathTree = function (type, setting) {
                 siblings.push(cur);
                 this.datas.push(cur);
             }
-            loadFun(cur, node);
+            loadFun(cur, node, source);
             for (const c of node.children) {
-                this.loadCompareNode(c, cur, loadFun);
+                this.loadCompareNode(source, c, cur, loadFun);
             }
         }
     
@@ -1513,9 +1513,8 @@ const createNewPathTree = function (type, setting) {
     
         loadCompareTree(data, loadFun) {
             for (const c of data.billsTree.children) {
-                this.loadCompareNode(c, null, loadFun);
+                this.loadCompareNode(data, c, null, loadFun);
             }
-            // todo load Pos Data;
         }
     
         calculateDiffer() {

+ 94 - 16
app/public/js/revise_compare.js

@@ -36,8 +36,8 @@ $(document).ready(() => {
         // 结构变动
         if (data.differ.indexOf('tree') >= 0) return '#d0f6fd';
         // 修改计算或文字
-        if (data.differ.indexOf('calc') >= 0) return '#f8d7da';
-        if (data.differ.indexOf('info') >= 0) return '#d4edda';
+        if (data.differ.indexOf('calc') >= 0 || data.differ.indexOf('pos-add') >= 0 || data.differ.indexOf('pos-del') >= 0 || data.differ.indexOf('pos-calc') >= 0) return '#f8d7da';
+        if (data.differ.indexOf('info') >= 0 || data.differ.indexOf('pos-info') >= 0) return '#d4edda';
         // 层次结构
         if (data.level === 2) {
             return '#C4CAFB';
@@ -53,6 +53,15 @@ $(document).ready(() => {
     const posSheet = posSpread.getActiveSheet();
     sjsSettingObj.setGridSelectStyle(posSpreadSetting);
     if (thousandth) sjsSettingObj.setTpThousandthFormat(posSpreadSetting);
+    posSpreadSetting.getColor = function (sheet, data, row, col, defaultColor) {
+        // 增
+        if (data.differ.indexOf('add') >= 0) return '#cce5ff';
+        // 删
+        if (data.differ.indexOf('del') >= 0) return '#DCDCDC';
+        // 修改计算或文字
+        if (data.differ.indexOf('calc') >= 0) return '#f8d7da';
+        if (data.differ.indexOf('info') >= 0) return '#d4edda';
+    };
     SpreadJsObj.initSheet(posSheet, posSpreadSetting);
 
     const posSearch = $.posSearch({selector: '#pos-search', searchSpread: posSpread});
@@ -70,9 +79,10 @@ $(document).ready(() => {
         findNode: function (tree, node, parent) {
             const sameId = tree.datas.find(x => {return x.id === node.id});
             if (sameId) {
-                sameId.org_pid = parent ? parent[tree.setting.id] : tree.setting.rootId;
-                if (sameId[tree.setting.pid] !== sameId.org_pid) {
+                const pid = parent ? parent[tree.setting.id] : tree.setting.rootId;
+                if (sameId[tree.setting.pid] !== pid) {
                     sameId.changeParent = true;
+                    sameId.org_parent = parent;
                 }
                 return sameId;
             } else {
@@ -84,18 +94,48 @@ $(document).ready(() => {
                 });
             }
         },
-        loadInfo1: function (node, source) {
+        loadInfo1: function (node, sourceNode, source) {
             for (const f of billsCompareField) {
-                node['new_' + f] = source[f];
+                node['new_' + f] = sourceNode[f];
             }
-            node.id = source.id;
+            node.id = sourceNode.id;
             node.isNew = true;
+            const posRange = source.pos.getLedgerPos(sourceNode.id);
+            if (posRange && posRange.length > 0) {
+                if (!node.pos) node.pos = [];
+                for (const p of posRange) {
+                    let nP = _.find(node.pos, {id: p.id});
+                    if (!nP) {
+                        nP = {id: p.id};
+                        node.pos.push(nP);
+                    }
+                    for (const f of posCompareField) {
+                        nP['new_' + f] = p[f];
+                    }
+                    nP.isNew = true;
+                }
+            }
         },
-        loadInfo2: function (node, source) {
+        loadInfo2: function (node, sourceNode, source) {
             for (const f of billsCompareField) {
-                node['org_' + f] = source[f];
+                node['org_' + f] = sourceNode[f];
             }
             node.isOrg = true;
+            const posRange = source.pos.getLedgerPos(sourceNode.id);
+            if (posRange && posRange.length > 0) {
+                if (!node.pos) node.pos = [];
+                for (const p of posRange) {
+                    let nP = _.find(node.pos, {id: p.id});
+                    if (!nP) {
+                        nP = {id: p.id};
+                        node.pos.push(nP);
+                    }
+                    for (const f of posCompareField) {
+                        nP['org_' + f] = p[f];
+                    }
+                    nP.isOrg = true;
+                }
+            }
         },
         afterLoad: function (tree) {
             for (const data of tree.datas) {
@@ -121,6 +161,35 @@ $(document).ready(() => {
                     const orgInfo = getCompare(data, compareFields.info, 'org_', '');
                     const newInfo = getCompare(data, compareFields.info, 'new_', '');
                     if (!_.isMatch(newInfo, orgInfo)) data.differ.push('info');
+
+                    for (const p of data.pos) {
+                        p.differ = [];
+                        p.differ_str = [];
+                        if (p.isNew && !p.isOrg) {
+                            p.differ.push('add');
+                            if (data.differ.indexOf('pos-add') === -1) data.differ.push('pos-add');
+                            p.differ_str.push('增');
+                        } else if (!p.isNew && p.isOrg) {
+                            p.differ.push('del');
+                            if (data.differ.indexOf('pos-del') === -1) data.differ.push('pos-del');
+                            p.differ_str.push('删');
+                        } else {
+                            const orgPosCalc = getCompare(p, compareFields.posCalc, 'org_', 0);
+                            const newPosCalc = getCompare(p, compareFields.posCalc, 'new_', 0);
+                            if (!_.isMatch(orgPosCalc, newPosCalc)) {
+                                p.differ.push('calc');
+                                if (data.differ.indexOf('pos-calc') === -1) data.differ.push('pos-calc');
+                                p.differ_str.push('量改');
+                            }
+                            const orgPosInfo = getCompare(p, compareFields.posInfo, 'org_', 0);
+                            const newPosInfo = getCompare(p, compareFields.posInfo, 'new_', 0);
+                            if (!_.isMatch(orgPosInfo, newPosInfo)) {
+                                p.differ.push('info');
+                                if (data.differ.indexOf('pos-info') === -1) data.differ.push('pos-info');
+                                p.differ_str.push('文改');
+                            }
+                        }
+                    }
                     if (data.differ.length > 0) data.differ_str.push('改');
                 }
             }
@@ -133,8 +202,6 @@ $(document).ready(() => {
         node.dgn_price = ZhCalc.round(ZhCalc.div(node.total_price, node.dgn_qty1), 2);
     };
     const billsTree = createNewPathTree('compare', treeSetting);
-    // 初始化 计量单元
-    const pos = new PosData({ id: 'id', ledgerId: 'lid' });
 
     // 清单 相关方法&绑定spreadjs事件
     const billsTreeSpreadObj = {
@@ -157,8 +224,7 @@ $(document).ready(() => {
         loadCurPosData: function () {
             const node = SpreadJsObj.getSelectObject(billsSheet);
             if (node) {
-                const posData = pos.getLedgerPos(node.id) || [];
-                SpreadJsObj.loadSheetData(posSheet, 'data', posData);
+                SpreadJsObj.loadSheetData(posSheet, 'data', node.pos || []);
             } else {
                 SpreadJsObj.loadSheetData(posSheet, 'data', []);
             }
@@ -178,18 +244,20 @@ $(document).ready(() => {
         };
         const reviseLedger = {
             billsTree: createNewPathTree('ledger', tenderTreeSetting),
+            pos: new PosData({ id: 'id', ledgerId: 'lid', }),
         };
         reviseLedger.billsTree.loadDatas(result.reviseBills);
+        reviseLedger.pos.loadDatas(result.revisePos);
         const orgLedger = {
             billsTree: createNewPathTree('ledger', tenderTreeSetting),
+            pos: new PosData({ id: 'id', ledgerId: 'lid', }),
         };
-        202-orgLedger.billsTree.loadDatas(result.bills);
+        orgLedger.billsTree.loadDatas(result.bills);
+        orgLedger.pos.loadDatas(result.pos);
 
         billsTree.loadCompareData(reviseLedger, orgLedger);
-        console.log(billsTree.nodes);
         SpreadJsObj.loadSheetData(billsSheet, SpreadJsObj.DataType.Tree, billsTree);
 
-        pos.loadDatas(result.pos);
         posSpreadObj.loadCurPosData();
     }, null);
     $.divResizer({
@@ -313,6 +381,16 @@ $(document).ready(() => {
                     tree.expandToLeafXmj();
                     SpreadJsObj.refreshTreeRowVisible(sheet);
                     break;
+                case "differ":
+                    tree.expandByCustom(function (x) {
+                        const posterity = tree.getPosterity(x);
+                        if (posterity.length === 0) return x.differ.length > 0;
+                        for (const p of posterity) {
+                            if (p.differ.length > 0) return true;
+                        }
+                        return false;
+                    });
+                    SpreadJsObj.refreshTreeRowVisible(sheet);
             }
         });
     })('a[name=showLevel]', billsSheet);

+ 3 - 3
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -1368,11 +1368,11 @@ const SpreadJsObj = {
                         const validWidth = $(window).width() - (pos.x + hitinfo.x + indent) - borderIndent;
                         const textWidth = this.getTextDisplayWidth(hitinfo, text, "9pt Arial");
                         if (validWidth >= maxHintWidth || textWidth <= validWidth) {
-                            $(div).text(text).css("top", pos.y + hitinfo.y + indent).css("left", pos.x + hitinfo.x + indent);
+                            $(div).html(text).css("top", pos.y + hitinfo.y + indent).css("left", pos.x + hitinfo.x + indent);
                         } else if (textWidth > maxHintWidth) {
-                            $(div).text(text).css("top", pos.y + hitinfo.y + indent).css("left", pos.x + hitinfo.x - indent - maxHintWidth);
+                            $(div).html(text).css("top", pos.y + hitinfo.y + indent).css("left", pos.x + hitinfo.x - indent - maxHintWidth);
                         } else {
-                            $(div).text(text).css("top", pos.y + hitinfo.y + indent).css("left", pos.x + hitinfo.x - indent - textWidth);
+                            $(div).html(text).css("top", pos.y + hitinfo.y + indent).css("left", pos.x + hitinfo.x - indent - textWidth);
                         }
                         this._toolTipElement = div;
                         $(div).show("fast");

+ 69 - 29
app/view/revise/compare.ejs

@@ -16,9 +16,17 @@
                         <a class="dropdown-item" name="showLevel" tag="5" href="javascirpt: void(0);">第五层</a>
                         <a class="dropdown-item" name="showLevel" tag="last" href="javascirpt: void(0);">最底层</a>
                         <a class="dropdown-item" name="showLevel" tag="leafXmj" href="javascirpt: void(0);">只显示项目节</a>
+                        <a class="dropdown-item" name="showLevel" tag="differ" href="javascirpt: void(0);">只显示修订项</a>
                     </div>
                 </div>
             </div>
+            <div class="d-inline-block">
+                <span class=""><i class="fa fa-stop text-primary-50 border-primary-50 bg-primary-50"></i> 新增</span>
+                <span class="ml-2"><i class="fa fa-stop text-secondary-50 border-secondary-50 bg-secondary-50"></i> 删除</span>
+                <span class="ml-2"><i class="fa fa-stop text-info-50 border-info-50 bg-info-50"></i> 结构调整</span>
+                <span class="ml-2"><i class="fa fa-stop text-danger-50 border-danger-50 bg-danger-50"></i> 计算项修改</span>
+                <span class="ml-2"><i class="fa fa-stop text-success-50 border-success-50 bg-success-50"></i> 文字修改</span>
+            </div>
         </div>
     </div>
     <div class="content-wrap row pr-46">
@@ -38,6 +46,14 @@
                             <li class="nav-item">
                                 <a class="nav-link active" href="javascript:void(0)">计量单元</a>
                             </li>
+                            <li>
+                                <div class="d-inline-block ml-2 mt-1">
+                                    <span class=""><i class="fa fa-stop text-primary-50 border-primary-50 bg-primary-50"></i> 新增</span>
+                                    <span class="ml-2"><i class="fa fa-stop text-secondary-50 border-secondary-50 bg-secondary-50"></i> 删除</span>
+                                    <span class="ml-2"><i class="fa fa-stop text-danger-50 border-danger-50 bg-danger-50"></i> 数量修改</span>
+                                    <span class="ml-2"><i class="fa fa-stop text-success-50 border-success-50 bg-success-50"></i> 文字修改</span>
+                                </div>
+                            </li>
                             <li class="nav-item" id="pos-search">
                             </li>
                         </ul>
@@ -76,6 +92,8 @@
         info: ['code', 'b_code', 'name', 'unit'],
         leafCalc: ['unit_price', 'sgfh_qty', 'sgfh_tp', 'qtcl_qty', 'qtcl_tp', 'sjcl_qty', 'sjcl_tp', 'deal_qty', 'deal_tp', 'quantity', 'total_price'],
         parentCalc: ['dgn_qty1', 'dgn_qty2',],
+        posInfo: ['name', 'position'],
+        posCalc: ['sgfh_qty', 'qtcl_qty', 'sjcl_qty'],
     }
     const getCompare = function (node, field, prefix, defaultValue) {
         const result = {};
@@ -86,39 +104,60 @@
     };
     const billsSpreadSetting = {
         cols: [
-            {title: '', colSpan: '1', rowSpan: '3', field: 'differ_str', hAlign: 1, width: 20, formatter: '@'},
+            {title: '', colSpan: '1', rowSpan: '3', field: 'differ_str', hAlign: 1, width: 20, formatter: '@', cellType: 'tip', getTip: function (x) {
+                if (x.differ_str.indexOf('改') >= 0) {
+                    const differ_hint = [];
+                    if (x.differ.indexOf('tree') >= 0)
+                        differ_hint.push('结构调整(原父项:' + (x.org_parent.code || '') + (x.org_parent.b_code || 0) + ')');
+                    if (x.differ.indexOf('calc') >= 0) differ_hint.push('计算项修改');
+                    if (x.differ.indexOf('info') >= 0) differ_hint.push('文字修改');
+                    const pos_hint = [];
+                    if (x.differ.indexOf('pos-add') >= 0) pos_hint.push('增');
+                    if (x.differ.indexOf('pos-del') >= 0) pos_hint.push('删');
+                    if (x.differ.indexOf('pos-info') >= 0) pos_hint.push('文改');
+                    if (x.differ.indexOf('pos-calc') >= 0) pos_hint.push('量改');
+                    if (pos_hint.length > 0) differ_hint.push('计量单元: ' + pos_hint.join(','))
+                    return differ_hint.join('<br>');
+                } else {
+                    return '';
+                }
+                }},
             {title: '修订台账|项目节编号', colSpan: '16|1', rowSpan: '1|2', field: 'new_code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
             {title: '|清单编号', colSpan: '|1', rowSpan: '|2', field: 'new_b_code', hAlign: 0, width: 70, formatter: '@'},
             {title: '|名称', colSpan: '|1', rowSpan: '|2', field: 'new_name', hAlign: 0, width: 185, formatter: '@'},
             {title: '|单位', colSpan: '|1', rowSpan: '|2', field: 'new_unit', hAlign: 1, width: 50, formatter: '@'},
             {title: '|单价', colSpan: '|1', rowSpan: '|2', field: 'new_unit_price', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|项目节数量|数量1',  colSpan: '|2|1', rowSpan: '|1|1', field: 'new_dgn_qty1', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||数量2',  colSpan: '||1', rowSpan: '||1', field: 'new_dgn_qty2', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|经济指标',  colSpan: '|1', rowSpan: '|2', field: 'new_dgn_price', hAlign: 2, width: 60, type: 'Number'},
+            {title: '|项目节数量|数量1',  colSpan: '|2|1', rowSpan: '|1|1', field: 'new_dgn_qty1', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.dgnQty%>},
+            {title: '||数量2',  colSpan: '||1', rowSpan: '||1', field: 'new_dgn_qty2', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.dgnQty%>},
+            {title: '|经济指标',  colSpan: '|1', rowSpan: '|2', field: 'new_dgn_price', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.dgnQty%>},
+            {title: '|签约|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_deal_qty', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.data.measure_type === measureType.gcl.value%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_deal_tp', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.data.measure_type === measureType.gcl.value%>},
             {title: '|设计量|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_sgfh_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_sgfh_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|设计错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_sjcl_qty', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_sjcl_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|其他错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_qtcl_qty', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_qtcl_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|台账小计|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_quantity', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_total_price', hAlign: 2, width: 60, type: 'Number'},
+            {title: '|设计错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_sjcl_qty', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_sjcl_tp', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '|其他错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_qtcl_qty', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_qtcl_tp', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '|台账小计|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'new_quantity', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'new_total_price', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
             {title: '原台账|项目节编号', colSpan: '16|1', rowSpan: '1|2', field: 'org_code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
             {title: '|清单编号', colSpan: '|1', rowSpan: '|2', field: 'org_b_code', hAlign: 0, width: 70, formatter: '@'},
             {title: '|名称', colSpan: '|1', rowSpan: '|2', field: 'org_name', hAlign: 0, width: 185, formatter: '@'},
             {title: '|单位', colSpan: '|1', rowSpan: '|2', field: 'org_unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
             {title: '|单价', colSpan: '|1', rowSpan: '|2', field: 'org_unit_price', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|项目节数量|数量1',  colSpan: '|2|1', rowSpan: '|1|1', field: 'org_dgn_qty1', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||数量2',  colSpan: '||1', rowSpan: '||1', field: 'org_dgn_qty2', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|经济指标',  colSpan: '|1', rowSpan: '|2', field: 'org_dgn_price', hAlign: 2, width: 60, type: 'Number'},
+            {title: '|项目节数量|数量1',  colSpan: '|2|1', rowSpan: '|1|1', field: 'org_dgn_qty1', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.dgnQty%>},
+            {title: '||数量2',  colSpan: '||1', rowSpan: '||1', field: 'org_dgn_qty2', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.dgnQty%>},
+            {title: '|经济指标',  colSpan: '|1', rowSpan: '|2', field: 'org_dgn_price', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.dgnQty%>},
+            {title: '|签约|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_deal_qty', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.data.measure_type === measureType.gcl.value%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_deal_tp', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.data.measure_type === measureType.gcl.value%>},
             {title: '|设计量|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_sgfh_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_sgfh_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|设计错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_sjcl_qty', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_sjcl_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|其他错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_qtcl_qty', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_qtcl_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|台账小计|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_quantity', hAlign: 2, width: 60, type: 'Number'},
-            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_total_price', hAlign: 2, width: 60, type: 'Number'},
+            {title: '|设计错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_sjcl_qty', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_sjcl_tp', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '|其他错漏增减|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_qtcl_qty', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_qtcl_tp', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '|台账小计|数量', colSpan: '|2|1', rowSpan: '|1|1', field: 'org_quantity', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||金额', colSpan: '||1', rowSpan: '||1', field: 'org_total_price', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
         ],
         emptyRows: 3,
         headRows: 3,
@@ -130,18 +169,19 @@
     };
     const posSpreadSetting = {
         cols: [
-            {title: '修订台账|计量单元', colSpan: '6|1', rowSpan: '1|2', field: 'org_name', hAlign: 0, width: 230, formatter: '@'},
-            {title: '|位置', colSpan: '|1', rowSpan: '|2', field: 'org_position', hAlign: 0, width: 60, formatter: '@'},
-            {title: '|台账数量|设计量', colSpan: '|4|1', rowSpan: '|1|1', field: 'org_sgfh_qty', hAlign: 2, width: 100, type: 'Number'},
-            {title: '||设计错漏增减', colSpan: '||1', rowSpan: '||1', field: 'org_sjcl_qty', hAlign: 2, width: 100, type: 'Number'},
-            {title: '||其他错漏增减', colSpan: '||1', rowSpan: '||1', field: 'org_qtcl_qty', hAlign: 2, width: 100, type: 'Number'},
-            {title: '||小计', colSpan: '||1', rowSpan: '||1', field: 'org_quantity', hAlign: 2, width: 60, type: 'Number'},
-            {title: '原台账|计量单元', colSpan: '6|1', rowSpan: '1|2', field: 'new_name', hAlign: 0, width: 230, formatter: '@'},
+            {title: '', colSpan: '1', rowSpan: '3', field: 'differ_str', hAlign: 1, width: 60, formatter: '@'},
+            {title: '修改台账|计量单元', colSpan: '6|1', rowSpan: '1|2', field: 'new_name', hAlign: 0, width: 230, formatter: '@'},
             {title: '|位置', colSpan: '|1', rowSpan: '|2', field: 'new_position', hAlign: 0, width: 60, formatter: '@'},
             {title: '|台账数量|设计量', colSpan: '|4|1', rowSpan: '|1|1', field: 'new_sgfh_qty', hAlign: 2, width: 100, type: 'Number'},
-            {title: '||设计错漏增减', colSpan: '||1', rowSpan: '||1', field: 'new_sjcl_qty', hAlign: 2, width: 100, type: 'Number'},
-            {title: '||其他错漏增减', colSpan: '||1', rowSpan: '||1', field: 'new_qtcl_qty', hAlign: 2, width: 100, type: 'Number'},
-            {title: '||小计', colSpan: '||1', rowSpan: '||1', field: 'new_quantity', hAlign: 2, width: 60, type: 'Number'},
+            {title: '||设计错漏增减', colSpan: '||1', rowSpan: '||1', field: 'new_sjcl_qty', hAlign: 2, width: 100, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||其他错漏增减', colSpan: '||1', rowSpan: '||1', field: 'new_qtcl_qty', hAlign: 2, width: 100, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||小计', colSpan: '||1', rowSpan: '||1', field: 'new_quantity', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '原台账|计量单元', colSpan: '6|1', rowSpan: '1|2', field: 'org_name', hAlign: 0, width: 230, formatter: '@'},
+            {title: '|位置', colSpan: '|1', rowSpan: '|2', field: 'org_position', hAlign: 0, width: 60, formatter: '@'},
+            {title: '|台账数量|设计量', colSpan: '|4|1', rowSpan: '|1|1', field: 'org_sgfh_qty', hAlign: 2, width: 100, type: 'Number'},
+            {title: '||设计错漏增减', colSpan: '||1', rowSpan: '||1', field: 'org_sjcl_qty', hAlign: 2, width: 100, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||其他错漏增减', colSpan: '||1', rowSpan: '||1', field: 'org_qtcl_qty', hAlign: 2, width: 100, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
+            {title: '||小计', colSpan: '||1', rowSpan: '||1', field: 'org_quantity', hAlign: 2, width: 60, type: 'Number', visible: <%- ctx.tender.info.display.ledger.clQty%>},
         ],
         emptyRows: 3,
         headRows: 3,