|
利用event.row.val("FSAMPLEALYMONEY", "");这个方法改变这一列的值,实际值是改变了,可是页面上显示的还是之前给赋的值。这是什么原因?
详细代码如下:
if (event.col == 'FNUMBER' || event.col == 'DELIVERYPRICE') {
var sl = event.row.val("FNUMBER") * 1 / 1;
var fhj = event.row.val("DELIVERYPRICE") * 1 / 1;
if (sl && fhj) {
var total = sl * fhj;
// event.row.val("FSAMPLEALYMONEY", total);
detailData.setValue("FSAMPLEALYMONEY", total);
} else {
// event.row.val("FSAMPLEALYMONEY", 0);
detailData.setValue("FSAMPLEALYMONEY", 0);
}
}
if (event.col == 'FSAMPLEALYMONEY') {
var money = 0;
detailData.each(function(pragram) {
if (pragram.row.val("FSAMPLEALYMONEY")) {
money = money + pragram.row.val("FSAMPLEALYMONEY") * 1 / 1;
}
});
if (!mainData.getValue("fSYTBZE") || mainData.getValue("fSYTBZE") < 0 || money > mainData.getValue("fSYTBZE")) {
event.row.val("FNUMBER", "");//已成功
event.row.val("DELIVERYPRICE", "");//已成功
event.row.val("FSAMPLEALYMONEY", "");//未成功
justep.Util.hint("xxxxxxxxxx");
} else {
mainData.setValue("fBCTBZE", money);
}
}
|
|