- 注册时间
- 2022-8-6
- 最后登录
- 2022-11-25
- 阅读权限
- 10
- 积分
- 18
- 精华
- 0
- 帖子
- 4
|
代码如下:
//判断数据是否保存
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);
}
});
}
}
|
|