如果参数是已单' 就不能获取到参数,现在用“是可以获取参数的
函数如下:
GET_HFM_DATA('4001509A','HYTD','EUR','1002010231','5070700a','EURO','L17','GX01','PRC','NNNN_NN')+SUM(B3,C3)
函数定义如下:
var GET_HFM_DATA = function () {
};
GET_HFM_DATA.prototype = new GC.Spread.CalcEngine.Functions.AsyncFunction("GET_HFM_DATA", 10, 10,
{
name: "GET_HFM_DATA", description: "取数函数",
parameters: [
{ name: "ENTITY", repeatable: false, optional: false },
{ name: "VIEW", repeatable: false, optional: false },
{ name: "VALUE", repeatable: false, optional: false },
{ name: "ACCOUNT", repeatable: false, optional: false },
{ name: "ICP", repeatable: false, optional: false },
{ name: "CUSTOM1", repeatable: false, optional: false },
{ name: "CUSTOM2", repeatable: false, optional: false },
{ name: "CUSTOM3", repeatable: false, optional: false },
{ name: "CUSTOM4", repeatable: false, optional: false },
{ name: "DATA", repeatable: false, optional: false }
]
});
GET_HFM_DATA.prototype.defaultValue = function () {
return "Loading...";
};
GET_HFM_DATA.prototype.evaluate = function (context) {
var args = arguments;
var result = 0;
that.formulaPickNum.entityLab = args[1]
that.formulaPickNum.viewLab = args[2]
that.formulaPickNum.valueLab = args[3]
that.formulaPickNum.accountLab = args[4]
that.formulaPickNum.icpLab = args[5]
that.formulaPickNum.cus1Lab = args[6]
that.formulaPickNum.cus2Lab = args[7]
that.formulaPickNum.cus3Lab = args[8]
that.formulaPickNum.cus4Lab = args[9]
that.formulaPickNum.data = args[10]
that.formulaPickNum.tableCode = that.reportByObj.tableCode;
that.formulaPickNum.companyCode = that.reportByObj.companyCode;
that.formulaPickNum.reportBody = that.reportByObj.reportCode;
that.formulaPickNum.reportDate = that.reportByObj.period.Format("yyyy-MM");
console.log(that.formulaPickNum);
$.ajax({
});
};
var GET_HFM_DATA = new GET_HFM_DATA();
GC.Spread.CalcEngine.Functions.defineGlobalCustomFunction("GET_HFM_DATA", GET_HFM_DATA);
|