浏览代码

清单对比,汇总显示调整

MaiXinRong 1 年之前
父节点
当前提交
0c81ba0ea0
共有 1 个文件被更改,包括 10 次插入7 次删除
  1. 10 7
      app/public/js/ledger_gather.js

+ 10 - 7
app/public/js/ledger_gather.js

@@ -107,14 +107,12 @@ $(document).ready(() => {
     const gatherLeafXmjSpread = SpreadJsObj.createNewSpread($('#leaf-xmj-gather-spread')[0]);
     const gatherLeafXmjSpreadSetting = {
         cols: [
-            {title: '项目节编号', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 120, formatter: '@'},
-            {title: '台账数量', colSpan: '1', rowSpan: '1', field: 'quantity', hAlign: 2, width: 80, type: 'Number'},
-            {title: '单位工程', colSpan: '1', rowSpan: '1', field: 'dwgc', hAlign: 0, width: 100, formatter: '@'},
-            {title: '分部工程', colSpan: '1', rowSpan: '1', field: 'fbgc', hAlign: 0, width: 100, formatter: '@'},
-            {title: '分项工程', colSpan: '1', rowSpan: '1', field: 'fxgc', hAlign: 0, width: 100, formatter: '@'},
-            {title: '细目', colSpan: '1', rowSpan: '1', field: 'jldy', hAlign: 0, width: 100, formatter: '@'},
+            {title: '单位工程', colSpan: '1', rowSpan: '1', field: 'dwgc', hAlign: 0, width: 100, formatter: '@', visible: false},
+            {title: '分部工程', colSpan: '1', rowSpan: '1', field: 'fbgc', hAlign: 0, width: 100, formatter: '@', visible: false},
+            {title: '分项工程', colSpan: '1', rowSpan: '1', field: 'fxgc', hAlign: 0, width: 100, formatter: '@', visible: false},
+            {title: '细目', colSpan: '1', rowSpan: '1', field: 'jldy', hAlign: 0, width: 100, formatter: '@', visible: false},
             {title: '计量单元', colSpan: '1', rowSpan: '1', field: 'bwmx', hAlign: 0, width: 100, formatter: '@'},
-            {title: '图册号', colSpan: '1', rowSpan: '1', field: 'drawing_code', hAlign: 0, width: 120, formatter: '@'},
+            {title: '台账数量', colSpan: '1', rowSpan: '1', field: 'quantity', hAlign: 2, width: 80, type: 'Number'},
         ],
         emptyRows: 0,
         headRows: 1,
@@ -295,6 +293,7 @@ $(document).ready(() => {
         }
         gclSpread.refresh();
         leafXmjSpread.refresh();
+        gatherLeafXmjSpread.refresh();
     });
 
     $('[name=gather-xmj]').change(function() {
@@ -308,7 +307,11 @@ $(document).ready(() => {
         for (const co of checkOption) {
             fields.push(co.value);
         }
+        for (const col of gatherLeafXmjSpreadSetting.cols) {
+            col.visible = col.type === 'Number' || fields.indexOf(col.field) >= 0;
+        }
         gclGatherModel.reGatherLeafXmj(fields);
+        SpreadJsObj.refreshColumnVisible(gatherLeafXmjSheet);
         loadGatherLeafXmjData();
     });