- 注册时间
- 2014-6-5
- 最后登录
- 2015-7-17
- 阅读权限
- 10
- 积分
- 200
- 精华
- 0
- 帖子
- 59
|
function saveData(){
// 工程条目表单数据
var o = form.getData();
form.validate();
if (form.isValid() == false) return;
//json
var json = mini.encode (o);
var detailGrid = grid.getData();
for(var i = 0; i < detailGrid.length; i++)
{
delete detailGrid[i]._id;
delete detailGrid[i]._uid;
}
// var array = new Array();
// array.push(o);
// array.push(detailGrid);
var jsonGrid = mini.encode(detailGrid);
json.push(jsonGrid);
alert(json);
$.ajax({
url: basePath+"mems/dm/saveNotice",
type: 'POST',
cache: false,
data : json,
beforeSend: function(x) {
x.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
},
success: function (text) {
//closeWindow("save");
},
error: function (jqXHR, textStatus, errorThrown) {
//mini.alert(jqXHR.responseText);
//closeWindow();
}
});
}
|
|