控件编辑后时事件,再加一个if条件判断一下,
JS获取填报单元格值或给单元格赋值
https://help.fanruan.com/finereport/doc-view-1207.html
js代码如下
var cell = contentPane.curLGP.getTDCell(1, 1);
contentPane.curLGP.selectTDCell(cell);
var location = this.options.location; //获取当前控件的位置
var cr = FR.cellStr2ColumnRow(location);
var col = cr.col; //列号
var ro = cr.row; //行号
var c = FR.columnRow2CellStr({col: col, row: ro});
$("td[id^="+c+"]").css("border","solid red");//边框变色
$("td[id^="+c+"]").css('background','yellow');//背景变色
---------------------------------------------------------------------------------------------------
if (单元格获取值 == "通过") {
var cell = contentPane.curLGP.getTDCell(1, 1);
contentPane.curLGP.selectTDCell(cell);
var location = this.options.location; //获取当前控件的位置
var cr = FR.cellStr2ColumnRow(location);
var col = cr.col; //列号
var ro = cr.row; //行号
var c = FR.columnRow2CellStr({col: col, row: ro});
$("td[id^="+c+"]").css("border","solid red");//边框变色
$("td[id^="+c+"]").css('background','yellow');//背景变色
}