123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationTarget/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgEvaluationTargetList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationTargetList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgEvaluationTargetList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.EvaluationTargetID);
- });
- return d;
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?evaluationTargetID=" + rowdata.EvaluationTargetID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('评价指标信息', redirectTo, 680, 320, null, null);
- }
- //评价指标对应的项目明细
- function editProject(rowindex, rowdata) {
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationTarget/ProjectList?evaluationTargetID=" + rowdata.EvaluationTargetID + "&MNU=" + mnu;
- $.popupTopWindow('评价项目明细', redirectTo, 850, 500, null, null);
- }
- //新增
- function EvaluationTarget_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('评价指标复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationTarget/CopyAdd?evaluationTargetID=' + d[0] + '&MNU=' + mnu, 680, 320, null, null);
- }
- else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('评价指标新增', redirectTo, 680, 320, null, null);
- }
- }
- //修改
- function EvaluationTarget_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?evaluationTargetID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('评价指标修改', redirectTo, 680, 320, null, null);
- }
- //删除
- function EvaluationTarget_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationTarget/Delete', { evaluationTargetIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationTargetList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //导出Excel
- function EvaluationTarget_Export() {
- $("#formQuery").submit();
- }
- //联动
- function queryEvaluationParticipateType() {
- var evaluationParticipateTypeID = $("#EvaluationParticipateTypeDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'EvaluationParticipateTypeDropdown|*|" + evaluationParticipateTypeID + "|@|'})";
- $("#EvaluationTableDropdown").combogridX("reload", eval(jsonString));
- reload();
- }
- function queryEvaluationType() {
- var evaluationIntTypeID = $("#EvaluationTypeDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'EvaluationTypeDropdown|*|" + evaluationIntTypeID + "|@|'})";
- $("#EvaluationTableDropdown").combogridX("reload", eval(jsonString));
- reload();
- }
|