You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
2.8 KiB

  1. (function () {
  2. var page = {
  3. isScroll: false,
  4. init: function ($page) {
  5. //数据绑定
  6. learun.layer.loading(true, '获取数据中');
  7. learun.httpget(config.webapi + "StuInfoFresh/stuInfoFresh", {}, (data) => {
  8. if (data) {
  9. for (var id in data) {
  10. if (id == "StuInfoFreshEntity") {
  11. $page.find("#ID").val(data[id].ID);
  12. $page.find("#StudentLoanBLStatus").lrpickerSet(data[id].StudentLoanBLStatus);
  13. //$page.find("#StudentLoan").val(data[id].StudentLoan);
  14. if (data[id].StudentLoanStatus == "1") {
  15. learun.layer.loading(false);
  16. learun.layer.confirm('新生助学贷款已审核!', function (_index) {
  17. learun.nav.closeCurrent();
  18. }, '智慧校园提示', ['确定']);
  19. return false;
  20. }
  21. }
  22. }
  23. page.bind($page);
  24. learun.layer.loading(false);
  25. }
  26. });
  27. //保存
  28. $page.find('#saveBtn').on('tap', function () {
  29. var postdata = {
  30. ID: $('#ID').val(),
  31. // StudentLoan: $('#StudentLoan').val(),
  32. StudentLoan: '',
  33. StudentLoanStatus: "0",
  34. StudentLoanBLStatus:$("#StudentLoanBLStatus").lrpickerGet()
  35. };
  36. // if ($('#StudentLoan').val().trim() != null && $('#StudentLoan').val().trim() != "" && $('#StudentLoan').val().trim() != undefined) {
  37. // postdata.StudentLoanStatus = "1";
  38. // }
  39. if ($('#StudentLoanBLStatus').lrpickerGet().trim() != null && $('#StudentLoanBLStatus').lrpickerGet().trim() != "" && $('#StudentLoanBLStatus').lrpickerGet().trim() != undefined) {
  40. postdata.StudentLoanBLStatus = "2";
  41. }
  42. learun.httpget(config.webapi + "StuInfoFresh/saveLoan", postdata, (data) => {
  43. if (data) {
  44. learun.layer.toast('保存成功');
  45. setTimeout(function () {
  46. learun.nav.closeCurrent();
  47. learun.nav.go({ path: '/EducationalAdministration/StuInfoFresh/RegisterQRCode', title: '生成报到二维码', isBack: true, isHead: true, param: {}, type: 'right' });
  48. }, 2000);
  49. }
  50. });
  51. });
  52. },
  53. bind: function ($page) {
  54. $page.find('#StudentLoanBLStatus').lrpickerex({
  55. code: 'StudentLoanBLStatus',
  56. type:'dataItem'
  57. });
  58. }
  59. };
  60. return page;
  61. })();