12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationProject/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //新增
- function EvaluationProject_Add() {
- redirectTo = url + '?MNU=' + mnu;
- $.popupTopWindow('评价项目新增', redirectTo, 700, 300, null, null);
- }
- function reload() {
- $("#dgEvaluationProjectList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationProjectList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgEvaluationProjectList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ProjectID);
- });
- return d;
- }
- //查看
- function edit(rowindex, rowdata) {
- redirectTo = url + "?projectID=" + rowdata.ProjectID + "&MNU=" + mnu + "&isView=1";
- $.popupTopWindow('评价项目信息', redirectTo, 700, 300, null, null);
- }
- //修改按钮
- function EvaluationProject_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- redirectTo = url + "?projectID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('评价项目修改', redirectTo, 700, 300, null, null);
- }
- //删除
- function EvaluationProject_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationProject/Delete', { projectIDs: d }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgEvaluationProjectList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //Excel导出
- function EvaluationProject_Export() {
- $("#formQuery").submit();
- }
- function QueryEvaluationTableDropdownList(data) {
- if (data && $("#EvaluationTargetDropdown").length > 0 && $.data($("#EvaluationTargetDropdown")[0], "combobox")) {
- $("#EvaluationTargetDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationProject/EvaluationTargetDropdownBanid?bindType=0&tableID=" + $("#EvaluationTableDropdown").combobox("getValue") + "");
- }
- }
- function QueryEvaluationNormDropdownList(data) {
- reload();
- }
- function QueryEvaluationTargetDropdownList(data) {
- if ($("#dgEvaluationProjectList").length > 0 && $.data($("#dgEvaluationProjectList")[0], "cmsXDataTable")) {
- reload();
- }
- }
|