PaymentStandard.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function PaymentStandard_Add() {
  7. $.popupTopWindow('标准课酬', CMS_SystemConfig.VirtualDirectoryPath + '/PaymentStandard/Edit?MNU=' + mnu, 600, 210);
  8. }
  9. function PaymentStandard_Update() {
  10. var d = validChoose();
  11. if (d.length == 0) {
  12. $.messager.alert("系统信息", "请选择您要修改的标准课酬。");
  13. return;
  14. }
  15. if (d.length > 1) {
  16. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  17. return;
  18. }
  19. $.popupTopWindow('标准课酬', CMS_SystemConfig.VirtualDirectoryPath + '/PaymentStandard/Edit?MNU=' + mnu + "&PaymentStandardID=" + d[0], 600, 210);
  20. }
  21. //删除
  22. function PaymentStandard_Delete() {
  23. var d = validChoose();
  24. if (d.length == 0) {
  25. $.messager.alert("系统提示", "请选择您要删除的标准课酬。");
  26. return;
  27. }
  28. $.messager.confirm("系统提示", "您确定要删除该标准课酬?", function (r) {
  29. if (r) {
  30. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/PaymentStandard/Delete', { paymentStandardIDs: d.join(',') }, function (data) {
  31. if (data.IsSuccess) {
  32. $.messager.alert("系统提示", "删除成功!");
  33. $("#dgPaymentStandardList").cmsXDataTable('load');
  34. } else {
  35. $.messager.alert("系统提示", data.Message);
  36. }
  37. });
  38. }
  39. });
  40. }
  41. function reload() {
  42. $("#dgPaymentStandardList").cmsXDataTable("load", $.getDataGridParams("dgPaymentStandardList"));
  43. }
  44. //获取选中的数据
  45. function validChoose() {
  46. var d = [];
  47. $.each($("#dgPaymentStandardList").cmsXDataTable("getSelections"), function (index) {
  48. d.push(this.PaymentStandardID);
  49. });
  50. return d;
  51. }