jQuery MiniUI
标题:
求解答,求方案
[打印本页]
作者:
mazj
时间:
2022-11-24 16:16:24
标题:
求解答,求方案
[attach]13737[/attach]
代码如下:
//判断数据是否保存
function btnimportdata(Fentry) {
debugger;
var gridData = null;
for (var i = 0; i < formStruct.Fentrys.length; i++) {
var tempFentry = formStruct.Fentrys
;
if (tempFentry.FentryField == Fentry) {
var grid = esform.getField(Fentry);
//添加行,一行是由多个字段组合成的formStruct.Fentrys
.moverow
if (formStruct.Fentrys
.moverow || Es.queryString("CopyMessageID") != "") {
//gridData = grid.getData();
gridData = grid.getDataView();//获取当前顺序结构的数据
} else {
gridData = grid.getChanges();
}
}
}
var value = Es.queryString("value");
if ((gridData != null && gridData.length == 0) && value != "") {
//esform.openCimportexport("", value, formStruct.formid, Fentry);
} else {
var name = "";
if (value == "") {
name = Es.GetLanguage("数据未保存,请先保存");
} else if (gridData != null && gridData.length != 0) {
name = Es.GetLanguage("数据已修改,请先保存");
}
layer.confirm(name, {
time: 0, //不自动关闭
icon: id,
title: Es.GetLanguage('温馨提示'),
area: '300px',
btn: [Es.GetLanguage('确认'), Es.GetLanguage('取消')], //按钮
yes: function (index) {
layer.close(index);
esform.saveForm(null, 1);
},
btn2: function (index) {
layer.close(index);
}
});
}
}
[attach]13739[/attach]
作者:
felt
时间:
2022-11-25 09:43:37
grid.getChanges("modifeid",true);可以只获取修改的字段,遍历判断是否有你需要判断的字段
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2