//根据JQuery选择器获取想要从前端传过去的数值
var uid = $("#form_81470FFF96C54B1897AC79F559C31B69").find("#uid").attr("emp_uid");//当前登陆人UID
var scx_uid = $("#form_81470FFF96C54B1897AC79F559C31B69").find("#scx_uid").val();
var rwd_uid = $("#form_81470FFF96C54B1897AC79F559C31B69").find("#rwd_uid").val();
var pm = $('#form_81470FFF96C54B1897AC79F559C31B69').find("span[name = 'pm']").text();//品名
var ph = $('#form_81470FFF96C54B1897AC79F559C31B69').find("span[name = 'ph']").text();//品号
var gg = $('#form_81470FFF96C54B1897AC79F559C31B69').find("span[name = 'gg']").text();//规格
var sl = $('#form_81470FFF96C54B1897AC79F559C31B69').find("input[name ='sl']").val();//更改后数据
var lzkbh = $("#form_81470FFF96C54B1897AC79F559C31B69").find("#stk_bs_tiaoxingma_main").val();//流转卡编号
var zs = $("#form_81470FFF96C54B1897AC79F559C31B69").find("#zs").val();
//把数值放入数组
var jsonarr = new Array;;
String jsonstr = '{' +
'"objuid":' + '"' + abp.common.json2string($.trim(objuid)) + '",' +
'"scx_uid":' + '"' + abp.common.json2string($.trim(scx_uid)) + '",' +
'"ph":' + '"' + abp.common.json2string($.trim(ph)) + '",' +
'"pm":' + '"' + abp.common.json2string($.trim(pm)) + '",' +
'"gg":' + '"' + abp.common.json2string($.trim(gg)) + '",' +
'"zt":' + '' + abp.common.json2string($.trim(JSON.stringify(gx))) + ',' +
'"ts":' + '' + abp.common.json2string($.trim(JSON.stringify(gx))) + ',' +
"}";
jsonarr.push(jsonstr);
//以键值对的方式将json传过去
var jsparams = new abp.common.JSParams();
jsparams.push("jsons", "[" + jsonarr.join(",") + "]");
var url = "/"+globalURL+"/servicecontroller?";
$.ajax({
type: "post",//传递方式
url: url,
data:"userDefineClass=com.anolesoft.mes.stk.action.TouLiaoAction&callType=ao"+"&"+jsparams.paramsToString(),//目标类和传递过去的数据
dataType:"text",//返回值类型
success: function(data){
if($.trim(data) == "success"){
alert("保存成功!");
}else if($.trim(data) == "error"){
alert("保存失败!");
}else{
alert($.trim(data));
}
},error:function(data){
alert("发生错误.");
//$("#button_4028818251dc9f220151dcb3ca8c017b").closeOpenPane();
}
});