12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationNorm/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgEvaluationNormList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationNormList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgEvaluationNormList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.EvaluationNormID);
- });
- return d;
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?evaluationNormID=" + rowdata.EvaluationNormID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('评分标准信息', redirectTo, 750, 500, null, null);
- }
- //新增
- function EvaluationNorm_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('评分标准复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationNorm/CopyAdd?evaluationNormID=' + d[0] + '&MNU=' + mnu, 750, 500, null, null);
- }
- else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('评分标准新增', redirectTo, 750, 500, null, null);
- }
- }
- //修改
- function EvaluationNorm_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?evaluationNormID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('评分标准修改', redirectTo, 750, 500, null, null);
- }
- //删除
- function EvaluationNorm_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationNorm/Delete', { evaluationNormIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationNormList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //导出Excel
- function EvaluationNorm_Export() {
- $("#formQuery").submit();
- }
|