框架-弹出选择框(Jquery传递Json数组)
给一个button按钮,执行方法
Json传值
$("body").on("click", "#btnsure", function() {
var cblInfo = $.asGetValuesOfCtrlName("gridform_myTable", "gridSel", "|");
if (cblInfo.length < 1) {
alert("请选择一条记录");
return false;
}
var userCode = "@sysLoginInfo.User.UserCode";
var sUrlParam = "&select=1;
var dlgParam = {
title: "选择员工",
close: function() {
if (art.dialog.data("RetStatus") == 101) {
var sellproduct = "";
var retValue = art.dialog.data("RetValue");//.split("^");
$.each(retValue,function(index, obj) {
sellproduct = obj.SellProductCode;
});
var sp = {};
//提交
$.asAppExecute(sp, function(retData) {
if (retData.RetStatus == 108) {
alert(retData.RetValue);
$.asTableReloadData(gConfig.id, queryParams);
}
}, function() {
alert("程序出现异常");
});
}
}
};
$.asAppModalDialog("Employee", sUrlParam, dlgParam);
});
弹出的列表页增加按钮,模块增加按钮操作,页面增加方法
//弹框选择销售产品(为销售合同做准备)
$("body").on("click", "#btnselect", function() {
var info = $.asGetValuesOfCtrlName("gridform_myTable", "gridSel", "|");
var formData = {};
formData.strCodes = info;
formData.tableName = "TrainErp_vSellProduct";
formData.strWhere = "SellProductCode";
var sysAjaxUrl = "/manage/Popup/GetPopupForDataTable";
var retInfoCheck = sysDoAjaxPost(sysAjaxUrl, formData);
if (retInfoCheck.RetStatus == 400) {
art.dialog.data("RetStatus", "101");
var retValue = eval("("+retInfoCheck.RetValue+")");
art.dialog.data("RetValue",retValue);
art.dialog.close();
} else {
art.dialog.close();
}
});