Give a button to execute the method
JSON pass-through value
$ ("Body"). On ("click", "#btnsure", function () {
var cblinfo = $.asgetvaluesofctrlname ("gridform_mytable", "Gridsel", "|");
if (Cblinfo.length < 1) {
Alert ("Please select a record");
return false;
}
var usercode = "@sysLoginInfo. User.usercode";
var Surlparam = "&select=1;
var Dlgparam = {
Title: "Select Employee",
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 = {};
Submit
$.asappexecute (SP, function (Retdata) {
if (Retdata.retstatus = = 108) {
alert (Retdata.retvalue);
$.astablereloaddata (Gconfig.id, queryparams);
}
}, function () {
Alert ("abnormal program");
});
}
}
};
$.asappmodaldialog ("Employee", Surlparam, Dlgparam);
});
Pop-up List page Add button, module Add button action, page Add method
Box selection selling products (preparing for sales contracts)
$ ("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 ();
}
});
Frame-Popup selection box (jquery pass JSON array)