在NetSuite记录列表视图中增加进度条
在项目实施过程中,经常会碰到要显示比例或进度的需求,为了美观,一般会显示为进度条progress bar,甚至根据进度显示不同的颜色。如下图:
NetSuite自定义视图时,支持添加自定义的字段,format(text)等,在对应的formular列中,写入html和css的代码即可。
'<div style="overflow:hidden; height:18px; background-color:#ccc;">'
|| '<div style="float:left; width:0; height:100%; font-size:11px; line-height:18px; color:fff; text-align:center; background-color:#428bca; width:'
|| {percenttimecomplete}*100
|| '%;">'
|| {percenttimecomplete}*100
|| '%'
|| '</div>'
|| '</div>'
插入位置,自定义视图->结果->添加自定义字段Format(Text),在FORMULA列下,补充代码。
查看效果: