Commit f993934f by anxiaohe

bug修改

parent 2fe09a28
......@@ -137,7 +137,6 @@
});
});
function save() {
debugger
var isValidate = jp.validateForm('#inputForm');//校验表单
if(!isValidate){
return false;
......@@ -148,29 +147,29 @@
return;
}
/**处理明细隐藏input元素*/
// jp.loading();
// getTableData().forEach(function(item,index){
// $("#inputForm").append("<div class='inputForm-hide-content'>" + Mustache.render($("#hideTpl").html(),{
// row: item,
// idx: index
// }) + "</div>")
// })
// try {
// jp.post($("#inputForm").attr('action'),$('#inputForm').serialize(),function(data){
// if(data.success){
// jp.getParent().refresh();
// var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
// parent.layer.close(dialogIndex);
// jp.success(data.msg)
//
// }else{
// jp.error(data.msg);
// $(".inputForm-hide-content").remove();
// }
// })
// } catch (e) {
// $(".inputForm-hide-content").remove();
// }
jp.loading();
getTableData().forEach(function(item,index){
$("#inputForm").append("<div class='inputForm-hide-content'>" + Mustache.render($("#hideTpl").html(),{
row: item,
idx: index
}) + "</div>")
})
try {
jp.post($("#inputForm").attr('action'),$('#inputForm').serialize(),function(data){
if(data.success){
jp.getParent().refresh();
var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(dialogIndex);
jp.success(data.msg)
}else{
jp.error(data.msg);
$(".inputForm-hide-content").remove();
}
})
} catch (e) {
$(".inputForm-hide-content").remove();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment