123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/AuditProcess/Edit?a=1";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- function reload() {
- $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- showDialog([ rowdata ]);
- }
- //修改按钮
- function AuditProcess_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要审核的信息!");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行审核。");
- return;
- }
- showDialog(d);
- }
- //Excel导出
- function AuditProcess_Excel() {
- $("#formQuery").submit();
- }
- function AuditProcess_ShowBatchApprove() {
- $("#batchAuditDiv").css("display", "inline-block");
- }
- function AuditProcess_CloseBatchApprove() {
- $("#batchAuditDiv").css("display", "none");
- }
- function AuditProcess_BatchApprove() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要审核的信息!");
- return;
- }
- if ($.grep(d, function (x) { return x.RecordStatus != notSubmitStatus; }).length > 0) {
- $.messager.alert("系统提示", "只能对待处理的记录进行审核!");
- return;
- }
- var approveIDs = $.map(d, function (x) { return x.StudentContrastID }).join(",");
- var statusID = $("#Status").combobox("getValue");
- $.post(CMS_SystemConfig.VirtualDirectoryPath + "/AuditProcess/BatchAudit", { approveIDs: approveIDs, statusID: statusID }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- AuditProcess_CloseBatchApprove();
- reload();
- }
- });
- }
- function showDialog(id) {
- var redirectTo = url;
- if (id) {
- redirectTo = redirectTo + '&id=' + id[0].StudentContrastID;
- }
- redirectTo = redirectTo + '&MNU=' + mnu;
- $.popupTopWindow('校对信息', redirectTo, 800, 500, null, null);
- }
- function QueryCampusDropdownList(data) {
- $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
- reload();
- }
- function QueryCollegeDropdownList(data) {
- reload();
- }
- //联动查询
- function queryStandard(data) {
- queryClass();
- reload();
- }
- function queryCollege(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
- jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- // if (campusID != nonSelect) {
- // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- // }
- queryClass();
- reload();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- var schoolyearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- if (schoolyearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolyearID + "|@|";
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- } else {
- $("#ClassmajorDropdown").combogridX("reload");
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- reload();
- }
|