123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeProject/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgChargeProjectList").cmsXDataTable("load", $.getDataGridParams("dgChargeProjectList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgChargeProjectList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ChargeProjectID);
- });
- return d;
- }
- //查看明细
- function edit(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeProject/Details" + "?chargeProjectID=" + rowdata.ChargeProjectID + "&MNU=" + mnu;
- $.popupTopWindow('收费项目信息', redirectTo, 450, 240, null, null);
- }
- //新增
- function ChargeProject_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('收费项目新增', redirectTo, 450, 240, null, null);
- }
- //修改按钮
- function ChargeProject_Update(){
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?chargeProjectID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('收费项目修改', redirectTo, 450, 240, null, null);
- }
- //删除
- function ChargeProject_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
-
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeProject/Delete', { chargeProjectIDs: d }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", "删除成功。");
- $("#dgChargeProjectList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //Excel导出
- function ChargeProject_Export() {
- $("#formQuery").submit();
- }
|