13
« on: July 30, 2020, 08:16:21 pm »
my formulas is under.
formulas: [['rchRate04', function (rd) {
var total;
if (rd.Cur04Sum != 0) {
total = rd.Cur04Sum / rd.Cur04Sum;//预算实绩比
} else {
total = 0;
}
return isNaN(total) ? "" : total;
}],
['CurYearRate04', function (rd) {
var total;
if (rd.Last04Sum != 0) {
total = rd.Cur04Sum / rd.Last04Sum;//前年比
} else {
total = 0;
}
return isNaN(total) ? "" : total;
}],
and the under is my colModel:
{
title: '第三半期(4-6月)', width: 130, align: "center", collapsible: { last: true, on: true },
colModel:
[{ title: "预算", align: "center", dataIndx: "YuSum4_6", dataType: "float", format: '$##,###.00', width: 120 },
{ title: "实绩", align: "center", dataIndx: "ShiSum4_6", dataType: "float", format: '$##,###.00', width: 120 },
{
title: "达成率", align: "center", format: '###.00%', width: 120, dataIndx: "rchRate4_6"
},
{ title: "前年", align: "center", dataIndx: "LastShiSum4_6", dataType: "float", format: '$##,###.00', width: 120 },
{ title: "前年比", align: "center", format: '#####.00%', width: 120, dataIndx: "CurYearRate4_6" }
]
}
whatever i try,i cann't see the result of the formula.