日志抛出错误 严重:16:00:36 http-nio-8075-exec-7 ERROR [standard] 错误代码:11201000 JS抛错 具体错误:Cannot read property 'getValue' of null 错误堆栈:TypeError: Cannot read property 'getValue' of null at FR.WLGP.stopCellEditing (http://localhost:8075/webroot/decision/view/report?viewlet=11111111.cpt&op=write:358:22) at FR.WLGP.selectTDCell (http://localhost:8075/webroot/decision/view/report?viewlet=11111111.cpt&op=write:342:487) at sb.eval (eval at at sb. at eval (eval at at sb.eval (eval at jsonDecode (http://localhost:8075/webroot/decision/view/report?op=emb&resource=finereport.js&inter=zh_CN&__fr_locale__=&__v__=2020.11.13.20.06.57.429&jsVersion=1606357053392:533:290), at Object.tc (http://localhost:8075/webroot/decision/view/report?op=emb&resource=finereport.js&inter=zh_CN&__fr_locale__=&__v__=2020.11.13.20.06.57.429&jsVersion=1606357053392:501:111) at sb.action (eval at jsonDecode (http://localhost:8075/webroot/decision/view/report?op=emb&resource=finereport.js&inter=zh_CN&__fr_locale__=&__v__=2020.11.13.20.06.57.429&jsVersion=1606357053392:533:290), at sb. var endrate = this.getValue(); var cell = contentPane.curLGP.getTDCell(1, 1); contentPane.curLGP.selectTDCell(cell); var a = this.getValue(); var location = this.options.location; //获取当前控件的位置 var cr = FR.cellStr2ColumnRow(location); var col = cr.col; //列号 var ro = cr.row; //行号 //这里是正则表达式在js里的判断用法 if (/^\d+(\.\d{1,2})?$/.test(endrate)) {} else { alert("课消请输入精度为两位小数以内的正数!"); contentPane.setCellValue(col, ro, "0.00"); } 原始的需求是这个文本框输入小数过后超过2位小数就弹出提示
|