|
管理员您好,我使用updateWithJob修改数据时提示 json request err 是修改数据中有数字和日期字段就不行 如果都是字符串就可以,这怎么办?
var items= this.data;
var action= this.Actions.load("x_processplatform_assemble_surface");
var workid =items.gongzid;
var data;
action.DataAction.getWithJob( //平台封装好的方法
workid, //uri的参数
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
data = json.data; //为变量data赋值
console.log('修改前数据'+data.xqrs1);
}.bind(this),
function( json ){ //服务调用失败的回调函数, json为服务传回的数据
data = json.data; //为变量data赋值
}.bind(this),
false
)
data.xqrs1 =(items.xqrs1);// 数字字段
data.qwdg1 =items.qwdg1.toString();//日期字段
console.log('修改后数据'+data.xqrs1);
//JSON.stringify(data);
action.DataAction.updateWithJob(
workid, //uri的参数
data, //保存的数据
function(){ //服务调用成功的回调函数
o2.xDesktop.notice("success", {"y":"top", "x": "right"}, "保存成功"); //提示,{"y":"top", "x": "right"}指提示框在顶部右边
}.bind(this),
function( json ){ //服务调用失败的回调函数, json为服务传回的数据
data = json.data; //为变量data赋值
}.bind(this)
);
|
|