|  | @@ -44,6 +44,24 @@ $(document).ready(() => {
 | 
												
													
														
															|  |          font: '12px 微软雅黑',
 |  |          font: '12px 微软雅黑',
 | 
												
													
														
															|  |          readOnly: true,
 |  |          readOnly: true,
 | 
												
													
														
															|  |      };
 |  |      };
 | 
												
													
														
															|  | 
 |  | +    const ledgerXmjSpreadSetting = {
 | 
												
													
														
															|  | 
 |  | +        cols: [
 | 
												
													
														
															|  | 
 |  | +            {title: '项目节编号', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 100, formatter: '@'},
 | 
												
													
														
															|  | 
 |  | +            {title: '单位工程', colSpan: '1', rowSpan: '1', field: 'dwgc', hAlign: 0, width: 80, formatter: '@'},
 | 
												
													
														
															|  | 
 |  | +            {title: '分部工程', colSpan: '1', rowSpan: '1', field: 'fbgc', hAlign: 0, width: 80, formatter: '@'},
 | 
												
													
														
															|  | 
 |  | +            {title: '分项工程', colSpan: '1', rowSpan: '1', field: 'fxgc', hAlign: 0, width: 80, formatter: '@'},
 | 
												
													
														
															|  | 
 |  | +            {title: '细目', colSpan: '1', rowSpan: '1', field: 'jldy', hAlign: 0, width: 80, formatter: '@'},
 | 
												
													
														
															|  | 
 |  | +            {title: '计量单元', colSpan: '1', rowSpan: '1', field: 'bwmx', hAlign: 0, width: 80, formatter: '@'},
 | 
												
													
														
															|  | 
 |  | +        ],
 | 
												
													
														
															|  | 
 |  | +        emptyRows: 0,
 | 
												
													
														
															|  | 
 |  | +        headRows: 1,
 | 
												
													
														
															|  | 
 |  | +        headRowHeight: [32],
 | 
												
													
														
															|  | 
 |  | +        headColWidth: [30],
 | 
												
													
														
															|  | 
 |  | +        defaultRowHeight: 21,
 | 
												
													
														
															|  | 
 |  | +        headerFont: '12px 微软雅黑',
 | 
												
													
														
															|  | 
 |  | +        font: '12px 微软雅黑',
 | 
												
													
														
															|  | 
 |  | +        readOnly: true,
 | 
												
													
														
															|  | 
 |  | +    };
 | 
												
													
														
															|  |      const priceSpreadSetting = {
 |  |      const priceSpreadSetting = {
 | 
												
													
														
															|  |          cols: [
 |  |          cols: [
 | 
												
													
														
															|  |              { title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 100, formatter: '@', readOnly: true },
 |  |              { title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 100, formatter: '@', readOnly: true },
 | 
												
											
												
													
														
															|  | @@ -363,23 +381,42 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              this.spread = SpreadJsObj.createNewSpread($(this.setting.selector)[0]);
 |  |              this.spread = SpreadJsObj.createNewSpread($(this.setting.selector)[0]);
 | 
												
													
														
															|  |              this.sheet = this.spread.getActiveSheet();
 |  |              this.sheet = this.spread.getActiveSheet();
 | 
												
													
														
															|  |              SpreadJsObj.initSheet(this.sheet, this.setting.spreadSetting);
 |  |              SpreadJsObj.initSheet(this.sheet, this.setting.spreadSetting);
 | 
												
													
														
															|  | 
 |  | +            this.xmjSpread = SpreadJsObj.createNewSpread($(this.setting.xmjSelector)[0]);
 | 
												
													
														
															|  | 
 |  | +            this.xmjSheet = this.xmjSpread.getActiveSheet();
 | 
												
													
														
															|  | 
 |  | +            SpreadJsObj.initSheet(this.xmjSheet, this.setting.xmjSpreadSetting);
 | 
												
													
														
															|  |              if (!readOnly) {
 |  |              if (!readOnly) {
 | 
												
													
														
															|  |                  this.spread.bind(spreadNS.Events.CellDoubleClick, function (e, info) {
 |  |                  this.spread.bind(spreadNS.Events.CellDoubleClick, function (e, info) {
 | 
												
													
														
															|  |                      const gcl = SpreadJsObj.getSelectObject(info.sheet);
 |  |                      const gcl = SpreadJsObj.getSelectObject(info.sheet);
 | 
												
													
														
															|  |                      priceOprObj.addRevisePrice(gcl);
 |  |                      priceOprObj.addRevisePrice(gcl);
 | 
												
													
														
															|  |                  });
 |  |                  });
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  | 
 |  | +            const self = this;
 | 
												
													
														
															|  | 
 |  | +            this.spread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
 | 
												
													
														
															|  | 
 |  | +                self.loadLeafXmj();
 | 
												
													
														
															|  | 
 |  | +            });
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |          loadData(bills, pos) {
 |  |          loadData(bills, pos) {
 | 
												
													
														
															|  |              gclGatherModel.loadLedgerData(bills);
 |  |              gclGatherModel.loadLedgerData(bills);
 | 
												
													
														
															|  |              gclGatherModel.loadPosData(pos);
 |  |              gclGatherModel.loadPosData(pos);
 | 
												
													
														
															|  |              this.gcl = gclGatherModel.gatherGclData();
 |  |              this.gcl = gclGatherModel.gatherGclData();
 | 
												
													
														
															|  |              this.sheet && SpreadJsObj.loadSheetData(this.sheet, SpreadJsObj.DataType.Data, this.gcl);
 |  |              this.sheet && SpreadJsObj.loadSheetData(this.sheet, SpreadJsObj.DataType.Data, this.gcl);
 | 
												
													
														
															|  | 
 |  | +            this.loadLeafXmj(0);
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +        loadLeafXmj(iGclRow) {
 | 
												
													
														
															|  | 
 |  | +            const gcl = iGclRow ? this.gcl[iGclRow] : SpreadJsObj.getSelectObject(this.sheet);
 | 
												
													
														
															|  | 
 |  | +            SpreadJsObj.resetTopAndSelect(this.xmjSheet);
 | 
												
													
														
															|  | 
 |  | +            if (gcl) {
 | 
												
													
														
															|  | 
 |  | +                SpreadJsObj.loadSheetData(this.xmjSheet, SpreadJsObj.DataType.Data, gcl.leafXmjs);
 | 
												
													
														
															|  | 
 |  | +            } else {
 | 
												
													
														
															|  | 
 |  | +                SpreadJsObj.loadSheetData(this.xmjSheet, SpreadJsObj.DataType.Data, []);
 | 
												
													
														
															|  | 
 |  | +            }
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |      const ledgerGcl = new LedgerGcl({
 |  |      const ledgerGcl = new LedgerGcl({
 | 
												
													
														
															|  |          selector: '#ledger-gcl-spread',
 |  |          selector: '#ledger-gcl-spread',
 | 
												
													
														
															|  | -        spreadSetting: ledgerGclSpreadSetting
 |  | 
 | 
												
													
														
															|  | 
 |  | +        spreadSetting: ledgerGclSpreadSetting,
 | 
												
													
														
															|  | 
 |  | +        xmjSelector: '#ledger-xmj-spread',
 | 
												
													
														
															|  | 
 |  | +        xmjSpreadSetting: ledgerXmjSpreadSetting,
 | 
												
													
														
															|  |      });
 |  |      });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      $.subMenu({
 |  |      $.subMenu({
 | 
												
											
												
													
														
															|  | @@ -408,6 +445,14 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              ledgerGcl.spread.refresh();
 |  |              ledgerGcl.spread.refresh();
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |      });
 |  |      });
 | 
												
													
														
															|  | 
 |  | +    $.divResizer({
 | 
												
													
														
															|  | 
 |  | +        select: '#gcl-spr',
 | 
												
													
														
															|  | 
 |  | +        callback: function () {
 | 
												
													
														
															|  | 
 |  | +            priceSpread.refresh();
 | 
												
													
														
															|  | 
 |  | +            ledgerGcl.spread.refresh();
 | 
												
													
														
															|  | 
 |  | +            ledgerGcl.xmjSpread.refresh();
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +    });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      postData('load', { filter: 'bills;pos;price' }, result => {
 |  |      postData('load', { filter: 'bills;pos;price' }, result => {
 | 
												
													
														
															|  |          revisePrice.loadDatas(result.price);
 |  |          revisePrice.loadDatas(result.price);
 | 
												
											
												
													
														
															|  | @@ -427,6 +472,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              tabPanel.addClass('active');
 |  |              tabPanel.addClass('active');
 | 
												
													
														
															|  |              showSideTools(tab.hasClass('active'));
 |  |              showSideTools(tab.hasClass('active'));
 | 
												
													
														
															|  |              ledgerGcl.spread.refresh();
 |  |              ledgerGcl.spread.refresh();
 | 
												
													
														
															|  | 
 |  | +            ledgerGcl.xmjSpread.refresh();
 | 
												
													
														
															|  |          } else {// 收起工具栏
 |  |          } else {// 收起工具栏
 | 
												
													
														
															|  |              tab.removeClass('active');
 |  |              tab.removeClass('active');
 | 
												
													
														
															|  |              tabPanel.removeClass('active');
 |  |              tabPanel.removeClass('active');
 |