123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function WorktimeAdjustment_Add() {
- $.popupTopWindow('工作量调整', CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAdjustment/Edit?MNU=' + mnu, 600, 300);
- }
- function WorktimeAdjustment_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的工作量调整记录。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- $.popupTopWindow('工作量调整', CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAdjustment/Edit?MNU=' + mnu + "&WorktimeAdjustmentID=" + d[0], 600, 300);
- }
- //删除
- function WorktimeAdjustment_Delete() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的工作量调整记录。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该工作量调整记录?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAdjustment/Delete', { worktimeAdjustmentIDs: d.join(',') }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgWorktimeAdjustmentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function WorktimeAdjustment_GenerateChargeAgainst() {
- $.popupTopWindow('生成被冲学时', CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAdjustment/GenerateChargeAgainst?MNU=' + mnu, 400, 200);
- }
- function reload() {
- $("#dgWorktimeAdjustmentList").cmsXDataTable("load", $.getDataGridParams("dgWorktimeAdjustmentList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgWorktimeAdjustmentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.WorktimeAdjustmentID);
- });
- return d;
- }
- function WorktimeAdjustment_Excel() {
- $(document.forms[0]).submit();
- }
|