|
@@ -4,197 +4,6 @@
|
|
|
* 整合清单、定额的计算程序,代码合并、类合并、剔除多余单元。
|
|
|
*/
|
|
|
|
|
|
-
|
|
|
-let calcProgramSetting ={
|
|
|
- "emptyRows":0,
|
|
|
- "headRows":1,
|
|
|
- "headRowHeight":[
|
|
|
- 35
|
|
|
- ],
|
|
|
- "cols":[
|
|
|
- {
|
|
|
- "width":75,
|
|
|
- "readOnly": true,
|
|
|
- "head":{
|
|
|
- "titleNames":["序号"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"serialNo",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":1,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":75,
|
|
|
- "readOnly": false,
|
|
|
- "head":{
|
|
|
- "titleNames":["费用代号"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"code",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":0,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":200,
|
|
|
- "readOnly":false,
|
|
|
- "head":{
|
|
|
- "titleNames":["名称"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"name",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":0,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":280,
|
|
|
- "readOnly":false,
|
|
|
- "head":{
|
|
|
- "titleNames":["计算基数"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"dispExpr",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":0,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":220,
|
|
|
- "readOnly":false,
|
|
|
- "head":{
|
|
|
- "titleNames":["基数说明"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"statement",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":0,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":80,
|
|
|
- "readOnly": false,
|
|
|
- "head":{
|
|
|
- "titleNames":["费率"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"feeRate",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":2,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width": 100,
|
|
|
- "readOnly":true,
|
|
|
- "head":{
|
|
|
- "titleNames":["单价"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"unitFee",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":2,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":100,
|
|
|
- "readOnly":true,
|
|
|
- "head":{
|
|
|
- "titleNames":["合价"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"totalFee",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":2,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":80,
|
|
|
- "readOnly": true,
|
|
|
- "head":{
|
|
|
- "titleNames":["费用类别"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"type",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":0,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "width":120,
|
|
|
- "readOnly":false,
|
|
|
- "head":{
|
|
|
- "titleNames":["备注"],
|
|
|
- "spanCols":[1],
|
|
|
- "spanRows":[1],
|
|
|
- "vAlign":[1],
|
|
|
- "hAlign":[1],
|
|
|
- "font":["Arial"]
|
|
|
- },
|
|
|
- "data":{
|
|
|
- "field":"memo",
|
|
|
- "vAlign":1,
|
|
|
- "hAlign":0,
|
|
|
- "font":"Arial"
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
-};
|
|
|
-
|
|
|
let calcProgramObj = {
|
|
|
sheet: null,
|
|
|
treeNode: null,
|
|
@@ -204,8 +13,8 @@ let calcProgramObj = {
|
|
|
{headerName: "费用代号", headerWidth: CP_Col_Width.code, dataCode: "code", dataType: "String", hAlign: "left"},
|
|
|
{headerName: "费用名称", headerWidth: CP_Col_Width.name, dataCode: "name", dataType: "String"},
|
|
|
{headerName: "计算基数", headerWidth: CP_Col_Width.dispExprUser, dataCode: "dispExprUser", dataType: "String"},
|
|
|
- {headerName: "费率", headerWidth: CP_Col_Width.feeRate, dataCode: "feeRate", dataType: "Number"}, // precision: 3
|
|
|
- {headerName: "单价", headerWidth: CP_Col_Width.unitFee, dataCode: "unitFee", dataType: "Number"}, // execRst
|
|
|
+ {headerName: "费率", headerWidth: CP_Col_Width.feeRate, dataCode: "feeRate", dataType: "Number"},
|
|
|
+ {headerName: "单价", headerWidth: CP_Col_Width.unitFee, dataCode: "unitFee", dataType: "Number"},
|
|
|
{headerName: "合价", headerWidth: CP_Col_Width.totalFee, dataCode: "totalFee", dataType: "Number"},
|
|
|
{headerName:"费用类别", headerWidth:CP_Col_Width.displayFieldName, dataCode:"displayFieldName", dataType: "String", hAlign: "center"},
|
|
|
{headerName: "基数说明", headerWidth: CP_Col_Width.statement, dataCode: "statement", dataType: "String"},
|
|
@@ -222,6 +31,11 @@ let calcProgramObj = {
|
|
|
initSheet: function (sheet) {
|
|
|
var me = this;
|
|
|
me.sheet = sheet;
|
|
|
+ for (let col of me.setting.header){
|
|
|
+ if (col.headerName == '费率') col.tofix = decimalObj.feeRate;
|
|
|
+ if (col.headerName == '单价') col.tofix = decimalObj.ration.unitPrice;
|
|
|
+ if (col.headerName == '合价') col.tofix = decimalObj.ration.totalPrice;
|
|
|
+ };
|
|
|
sheetCommonObj.initSheet(me.sheet, me.setting, 1);
|
|
|
},
|
|
|
|
|
@@ -235,9 +49,6 @@ let calcProgramObj = {
|
|
|
me.datas = treeNode.data.calcTemplate ? treeNode.data.calcTemplate.calcItems : [];
|
|
|
sheetCommonObj.initSheet(me.sheet, me.setting, me.datas.length);
|
|
|
sheetCommonObj.showData(me.sheet, me.setting, me.datas);
|
|
|
-
|
|
|
- // SheetDataHelper.loadSheetHeader(calcProgramSetting, me.sheet);
|
|
|
- // SheetDataHelper.loadSheetData(calcProgramSetting, me.sheet, baseCalcField);
|
|
|
},
|
|
|
|
|
|
clearData: function (){
|