扩展需求-修改web端报销单的费用类型只显示名称原创
10人赞赏了该文章
48次浏览
编辑于2024年09月03日 15:01:30
一、扩展需求
web端报销单的费用类型只显示名称,目前是限制的编码+(长)名称。
二、扩展步骤
扩展费用报销单对应编辑或查看或审核或核定页面后,将bizCollBillBase.js的expenseF7格式化函数给复制过来;
然后在扩展方案的脚本处重写费用类型F7的格式化函数expenseF7,修改其中费用类型显示格式
waf.defineCustomeClass("cellformatter.expenseF7", cellformatter.f7, { format: function(cellval, rwd) { if (!rwd || typeof(cellval) == "string") return cellval; if (bizCollBillBase.isShowExpenseLongName()) { this.opts.colModel.formatoptions = {displayFormat: "{displayName}"}; } else { this.opts.colModel.formatoptions = {displayFormat: "{name}"}; } return cellformatter.f7.prototype.format.call(this, cellval, rwd); } });
推荐阅读