- 注册时间
- 2015-7-9
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 180
- 精华
- 0
- 帖子
- 42
|
dforce 发表于 2015-8-3 11:18
前后台都用我们的json工具
前台序列化,mini.encode()
var rows = grid.getChanges("modified");
if(rows.length>0){
var messageid = mini.loading("数据提交中 ...", "进度条");
var data = [];
for(var i=0;i<rows.length;i++){
var rowData = {mtaskAccptDtlId:'',applyAmount:'',acceptAmount:'',repairDate:'',isLump:''};
rowData.mtaskAccptDtlId = rows.mtaskAccptDtlId;
rowData.applyAmount=rows.applyAmount;
rowData.acceptAmount = rows.acceptAmount;
rowData.repairDate =rows.repairDate;
rowData.isLump = rows.isLump;
data.push(rowData);
}
$.ajax({
type: 'post',
url: basePath + "mems/dm/saveTaskDetailAmountByDmtask",
data: JSON.stringify(data),
contentType: "application/json",
success: function (text) {
mini.hideMessageBox(messageid);
if(text.status=="true"){
mini.alert("保存成功");
grid.reload();
}else{
mini.alert(text.data);
}
},
error: function (jqXHR, textStatus, errorThrown) {
mini.hideMessageBox(messageid);
mini.alert("保存失败");
}
});
我的js代码,没有加repairDate之前是没问题的,就是这个时间转换出的问题 |
|