|
@@ -361,11 +361,11 @@ var projectObj = {
|
|
|
TREE_SHEET_HELPER.initSetting($('#billsSpread')[0], that.project.projSetting.mainGridSetting);
|
|
|
that.project.projSetting.mainGridSetting.cols.forEach(function (col) {
|
|
|
// for test. 后端没有绑定,暂时写死用于测试。
|
|
|
- if (col.data.field == '' && col.head.titleNames[0] == "取费专业") {
|
|
|
+/* if (col.data.field == '' && col.head.titleNames[0] == "取费专业") {
|
|
|
col.data.field = 'programID';
|
|
|
col.data.getText = 'getText.calcProgramName';
|
|
|
col.data.cellType = 'cellType.calcProgramName';
|
|
|
- };
|
|
|
+ };*/
|
|
|
|
|
|
col.data.splitFields = col.data.field.split('.');
|
|
|
if (col.data.getText && Object.prototype.toString.apply(col.data.getText) === "[object String]") {
|
|
@@ -378,13 +378,21 @@ var projectObj = {
|
|
|
let getCellType = MainTreeCol.getEvent(col.data.cellType);
|
|
|
col.data.cellType = getCellType;
|
|
|
}
|
|
|
- if (col.data.digit && Object.prototype.toString.apply(col.data.digit) === "[object String]") {
|
|
|
- col.data.decimal = that.project.getDecimal(col.data.digit);
|
|
|
- col.data.formatter = MainTreeCol.getNumberFormatter(col.data.decimal);
|
|
|
- }
|
|
|
+ // if (col.data.digit && Object.prototype.toString.apply(col.data.digit) === "[object String]") {
|
|
|
+ // col.data.decimal = that.project.getDecimal(col.data.digit);
|
|
|
+ // col.data.formatter = MainTreeCol.getNumberFormatter(col.data.decimal);
|
|
|
+ // }
|
|
|
if (col.data.field === 'code') {
|
|
|
col.data.formatter = '@';
|
|
|
}
|
|
|
+
|
|
|
+ // for test digit. CSLAAAAA
|
|
|
+ if (col.data.field.indexOf("totalFee") > -1 || col.data.field.indexOf("TotalFee") > -1)
|
|
|
+ col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.totalPrice, true)
|
|
|
+ else if (col.data.field.indexOf("unitFee") > -1 || col.data.field.indexOf("UnitFee") > -1)
|
|
|
+ col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.unitPrice, true)
|
|
|
+ else if (col.data.field == "quantity")
|
|
|
+ col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.quantity, true);
|
|
|
});
|
|
|
|
|
|
that.mainController = TREE_SHEET_CONTROLLER.createNew(that.project.mainTree, that.mainSpread.getActiveSheet(), that.project.projSetting.mainGridSetting);
|