1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationNeed/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgEvaluationNeedList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationNeedList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgEvaluationNeedList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.EvaluationNeedID);
- });
- return d;
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?evaluationNeedID=" + rowdata.EvaluationNeedID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('评价需知信息', redirectTo, 720, 350, null, null);
- }
- //新增
- function EvaluationNeed_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('评价需知复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationNeed/CopyAdd?evaluationNeedID=' + d[0] + '&MNU=' + mnu, 720, 350, null, null);
- }
- else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('评价需知新增', redirectTo, 720, 350, null, null);
- }
- }
- //修改
- function EvaluationNeed_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?evaluationNeedID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('评价需知修改', redirectTo, 720, 350, null, null);
- }
- //删除
- function EvaluationNeed_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationNeed/Delete', { evaluationNeedIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationNeedList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //设置相应的行颜色为红色
- function SetRedGrid(rowIndex, rowData) {
- if (rowData.IsEnabled != true) {
- return "color: red;";
- }
- else {
- return "";
- }
- }
- //导出Excel
- function EvaluationNeed_Export() {
- $("#formQuery").submit();
- }
|