如何在oracle apex中访问表格数据。我需要根据表格形式的访问数据插入数据。请任何人帮我解决我的问题
问问题
424 次
1 回答
0
(function($) {
function update(model) {
var salKey = model.getFieldKey("SAL"),
total = 0;
model.forEach(function(record, index, id) {
var sal = parseInt(record[salKey], 10),
meta = model.getRecordMetadata(id);
if (!isNaN(sal) && !meta.deleted && !meta.agg) {
total += sal;
}
});
$s("P1_TOTAL_AMOUNT", total);
}
$(function() {
$("#emp").on("interactivegridviewmodelcreate", function(event, ui) {
var sid,
model = ui.model;
if ( ui.viewId === "grid" ) {
sid = model.subscribe( {
onChange: function(type, change) {
if ( type === "set" ) {
if (change.field === "SAL" ) {
update( model );
}
} else if (type !== "move" && type !== "metaChange") {
update( model );
}
},
progressView: $("#P1_TOTAL_AMOUNT")
} );
update( model );
model.fetchAll(function() {});
}
});
});
})(apex.jQuery);
于 2019-02-08T11:00:37.470 回答