StudentChargePaymenEdit.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //保存
  2. function StudentChargePaymen_Save() {
  3. $(document.forms[0]).submit();
  4. }
  5. //获取收费标准应收金额
  6. function queryStudentChargeAmount(data) {
  7. var userID = $("#UserID").combogridX("getValue");
  8. if (userID == "" || userID == "-1" || userID == null) {
  9. $("#StandardAmount").val("");
  10. $("#ChargeAmount").val("");
  11. $("#ChargeTag").combobox("setValue", "-1");
  12. $("#ActualAmount").val("");
  13. $("#PaidAmount").val("");
  14. return;
  15. }
  16. var chargeYearID = $("#ChargeYear").combogrid("getValue");
  17. if (chargeYearID == "" || chargeYearID == "-1" || chargeYearID == null) {
  18. $("#StandardAmount").val("");
  19. $("#ChargeAmount").val("");
  20. $("#ChargeTag").combobox("setValue", "-1");
  21. $("#ActualAmount").val("");
  22. $("#PaidAmount").val("");
  23. return;
  24. }
  25. var chargeProjectID = $("#ChargeProjectID").combogridX("getValue");
  26. if (chargeProjectID == "" || chargeProjectID == "-1" || chargeProjectID == null) {
  27. $("#StandardAmount").val("");
  28. $("#ChargeAmount").val("");
  29. $("#ChargeTag").combobox("setValue", "-1");
  30. $("#ActualAmount").val("");
  31. $("#PaidAmount").val("");
  32. return;
  33. }
  34. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentChargePaymen/StudentChargeStandard', { userID: userID, chargeYearID: chargeYearID, chargeProjectID: chargeProjectID }, function (data) {
  35. if (data.IsSuccess == true) {
  36. if (data.Data != null) {
  37. $("#StandardAmount").val(data.Data.Amount);
  38. $("#ChargeAmount").val(data.Data.ChargeAmount);
  39. $("#ChargeTag").combobox("setValue", data.Data.ChargeTag);
  40. $("#ActualAmount").val(data.Data.ActualAmount);
  41. $("#PaidAmount").val(data.Data.PaidAmount);
  42. }
  43. else {
  44. $("#StandardAmount").val("");
  45. $("#ChargeAmount").val("");
  46. $("#ChargeTag").combobox("setValue", "-1");
  47. $("#ActualAmount").val("");
  48. $("#PaidAmount").val("");
  49. $.messager.alert("系统提示", "对应的应收名单不存在,请核查。");
  50. }
  51. }
  52. else {
  53. $("#StandardAmount").val("");
  54. $("#ChargeAmount").val("");
  55. $("#ChargeTag").combobox("setValue", "-1");
  56. $("#ActualAmount").val("");
  57. $("#PaidAmount").val("");
  58. $.messager.alert("系统提示", data.Message);
  59. }
  60. });
  61. }