|
@@ -110,9 +110,9 @@ let feeItemObj = {
|
|
deleteType: 'feeItem',
|
|
deleteType: 'feeItem',
|
|
setting: {
|
|
setting: {
|
|
header:[
|
|
header:[
|
|
- {headerName:"费用项",headerWidth:300,dataCode:"feeItem", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
|
- {headerName:"费用类型",headerWidth:150,dataCode:"feeType", dataType: "String", hAlign: "center", vAlign: "center"},
|
|
|
|
- {headerName:"记取位置",headerWidth:150,dataCode:"position", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
|
|
|
|
+ {headerName:"费用项",headerWidth:200,dataCode:"feeItem", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
|
+ {headerName:"费用类型",headerWidth:80,dataCode:"feeType", dataType: "String", hAlign: "center", vAlign: "center"},
|
|
|
|
+ {headerName:"记取位置",headerWidth:100,dataCode:"position", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
],
|
|
],
|
|
view: {lockColumns: []},
|
|
view: {lockColumns: []},
|
|
comboItems: {feeType: ['子目费用', '分项费用', '措施费用']},
|
|
comboItems: {feeType: ['子目费用', '分项费用', '措施费用']},
|
|
@@ -376,7 +376,7 @@ let sectionObj = {
|
|
deleteType: 'section',
|
|
deleteType: 'section',
|
|
setting: {
|
|
setting: {
|
|
header:[
|
|
header:[
|
|
- {headerName:"分册章节",headerWidth:600,dataCode:"name", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
|
|
|
|
+ {headerName:"分册章节",headerWidth:330,dataCode:"name", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"}
|
|
],
|
|
],
|
|
view: {lockColumns: []},
|
|
view: {lockColumns: []},
|
|
options: {
|
|
options: {
|
|
@@ -607,13 +607,13 @@ let feeRuleObj = {
|
|
base: {RCJ: '分别按人材机乘系数', RG: '人工', CL: '材料', JX: '机械'},
|
|
base: {RCJ: '分别按人材机乘系数', RG: '人工', CL: '材料', JX: '机械'},
|
|
setting: {
|
|
setting: {
|
|
header:[
|
|
header:[
|
|
- {headerName:"编码",headerWidth:120,dataCode:"code", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
|
- {headerName:"费用规则",headerWidth:400,dataCode:"rule", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
|
- {headerName:"基数",headerWidth:160,dataCode:"base", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
|
|
|
|
- {headerName:"费率(%)",headerWidth:120,dataCode:"feeRate", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"},
|
|
|
|
- {headerName:"其中人工(%)",headerWidth:120,dataCode:"labour", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"},
|
|
|
|
- {headerName:"其中材料(%)",headerWidth:120,dataCode:"material", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"},
|
|
|
|
- {headerName:"其中机械(%)",headerWidth:120,dataCode:"machine", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center"}
|
|
|
|
|
|
+ {headerName:"编码",headerWidth:80,dataCode:"code", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center", span:{row: 0, rowCount: 2, colCount: 1}},
|
|
|
|
+ {headerName:"费用规则",headerWidth:280,dataCode:"rule", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center", span:{row: 0, rowCount: 2, colCount: 1}},
|
|
|
|
+ {headerName:"基数",headerWidth:140,dataCode:"base", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center", span:{row: 0, rowCount: 2, colCount: 1}},
|
|
|
|
+ {headerName:"费率(%)",headerWidth:70,dataCode:"feeRate", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center", span:{row: 0, rowCount: 2, colCount: 1}},
|
|
|
|
+ {headerName:"人工(%)",headerWidth:70,dataCode:"labour", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center", span:{row: 1, rowCount: 1, colCount: 1}},
|
|
|
|
+ {headerName:"材料(%)",headerWidth:70,dataCode:"material", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center", span:{row: 1, rowCount: 1, colCount: 1}},
|
|
|
|
+ {headerName:"机械(%)",headerWidth:70,dataCode:"machine", dataType: "String", formatter: "@", hAlign: "center", vAlign: "center", span:{row: 1, rowCount: 1, colCount: 1}}
|
|
],
|
|
],
|
|
view: {lockColumns: []},
|
|
view: {lockColumns: []},
|
|
comboItems: {base: ['分别按人材机乘系数', '人工', '材料', '机械']},
|
|
comboItems: {base: ['分别按人材机乘系数', '人工', '材料', '机械']},
|
|
@@ -635,20 +635,35 @@ let feeRuleObj = {
|
|
workbook.options[opt] = opts[opt];
|
|
workbook.options[opt] = opts[opt];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- renderFunc: function (sheet, func) {
|
|
|
|
- sheet.suspendPaint();
|
|
|
|
- sheet.suspendEvent();
|
|
|
|
- if(this.isFunc(func)){
|
|
|
|
- func();
|
|
|
|
|
|
+ buildHeader: function () {
|
|
|
|
+ if(!this.sheet){
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- sheet.resumePaint();
|
|
|
|
- sheet.resumeEvent();
|
|
|
|
|
|
+ this.sheet.suspendPaint();
|
|
|
|
+ this.sheet.suspendEvent();
|
|
|
|
+ let ch = GC.Spread.Sheets.SheetArea.colHeader;
|
|
|
|
+ this.sheet.setRowCount(2, ch);
|
|
|
|
+ for(let i = 0; i < this.setting.header.length; i++){
|
|
|
|
+ let header = this.setting.header[i];
|
|
|
|
+ this.sheet.addSpan(header.span.row, i, header.span.rowCount, header.span.colCount, ch);
|
|
|
|
+ this.sheet.setValue(header.span.row, i, header.headerName, ch);
|
|
|
|
+ if(header.dataCode === 'feeRate'){
|
|
|
|
+ this.sheet.addSpan(header.span.row, i + 1, 1, 3, ch);
|
|
|
|
+ this.sheet.setValue(header.span.row, i + 1, '其中', ch);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.sheet.resumePaint();
|
|
|
|
+ this.sheet.resumeEvent();
|
|
},
|
|
},
|
|
buildSheet: function () {
|
|
buildSheet: function () {
|
|
let fi = feeItemObj;
|
|
let fi = feeItemObj;
|
|
if(!this.isDef(this.workBook)){
|
|
if(!this.isDef(this.workBook)){
|
|
this.workBook = sheetCommonObj.buildSheet($('#instFeeRuleSpread')[0], this.setting, 10);
|
|
this.workBook = sheetCommonObj.buildSheet($('#instFeeRuleSpread')[0], this.setting, 10);
|
|
this.sheet = this.workBook.getActiveSheet();
|
|
this.sheet = this.workBook.getActiveSheet();
|
|
|
|
+ this.buildHeader();
|
|
|
|
+ this.sheet.setRowCount();
|
|
|
|
+
|
|
|
|
+
|
|
sheetCommonObj.bindEscKey(this.workBook, [{sheet: this.sheet, editStarting: this.onEditStarting, editEnded: this.onEditEnded}])
|
|
sheetCommonObj.bindEscKey(this.workBook, [{sheet: this.sheet, editStarting: this.onEditStarting, editEnded: this.onEditEnded}])
|
|
this.setOptions(this.workBook, this.setting.options);
|
|
this.setOptions(this.workBook, this.setting.options);
|
|
this.sheet.options.clipBoardOptions = GC.Spread.Sheets.ClipboardPasteOptions.values;
|
|
this.sheet.options.clipBoardOptions = GC.Spread.Sheets.ClipboardPasteOptions.values;
|