livingAllowanceInfo_info.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /**
  2. * 初始化硕博人才生活补贴申报详情对话框
  3. */
  4. var LivingAllowanceInfoInfoDlg = {
  5. livingAllowanceInfoInfoData : {}
  6. };
  7. /**
  8. * 清除数据
  9. */
  10. LivingAllowanceInfoInfoDlg.clearData = function() {
  11. this.livingAllowanceInfoInfoData = {};
  12. }
  13. /**
  14. * 设置对话框中的数据
  15. *
  16. * @param key 数据的名称
  17. * @param val 数据的具体值
  18. */
  19. LivingAllowanceInfoInfoDlg.set = function(key, val) {
  20. this.livingAllowanceInfoInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
  21. return this;
  22. }
  23. /**
  24. * 设置对话框中的数据
  25. *
  26. * @param key 数据的名称
  27. * @param val 数据的具体值
  28. */
  29. LivingAllowanceInfoInfoDlg.get = function(key) {
  30. return $("#" + key).val();
  31. }
  32. /**
  33. * 关闭此对话框
  34. */
  35. LivingAllowanceInfoInfoDlg.close = function() {
  36. parent.layer.close(window.parent.LivingAllowanceInfo.layerIndex);
  37. }
  38. /**
  39. * 收集数据
  40. */
  41. LivingAllowanceInfoInfoDlg.collectData = function() {
  42. this
  43. .set('id')
  44. .set('year')
  45. .set('enterpriseId')
  46. .set('enterpriseName')
  47. .set('type')
  48. .set('talentType')
  49. .set('cardType')
  50. .set('idCard')
  51. .set('name')
  52. .set('photo')
  53. .set('sex')
  54. .set('nation')
  55. .set('nationality')
  56. .set('provinceCode')
  57. .set('provinceName')
  58. .set('cityCode')
  59. .set('cityName')
  60. .set('countyCode')
  61. .set('countyName')
  62. .set('birthday')
  63. .set('address')
  64. .set('politics')
  65. .set('highEducation')
  66. .set('graduateSchool')
  67. .set('major')
  68. .set('post')
  69. .set('phone')
  70. .set('email')
  71. .set('bank')
  72. .set('bankNetwork')
  73. .set('bankAccount')
  74. .set('bankNumber')
  75. .set('entryTime')
  76. .set('quitTime')
  77. .set('startTime')
  78. .set('endTime')
  79. .set('educationAndResume')
  80. .set('mainHonours')
  81. .set('firstInJJTime')
  82. .set('isIntroduction')
  83. .set('industryField')
  84. .set('title')
  85. .set('professionalQualifications')
  86. .set('studyAbroad')
  87. .set('studyAbroadCountry')
  88. .set('studyAbroadTime')
  89. .set('introductionMode')
  90. .set('letterTime')
  91. .set('applyCount')
  92. .set('isPublic')
  93. .set('amount')
  94. .set('isPay')
  95. .set('publicBatch')
  96. .set('active')
  97. .set('checkState')
  98. .set('checkMsg')
  99. .set('fields')
  100. .set('files')
  101. .set('firstSubmitTime')
  102. .set('newSubmitTime')
  103. .set('outMsg')
  104. .set('highProcess')
  105. .set('isEffect')
  106. .set('description')
  107. .set('createTime')
  108. .set('createUser')
  109. .set('updateTime')
  110. .set('updateUser');
  111. }
  112. /**
  113. * 提交添加
  114. */
  115. LivingAllowanceInfoInfoDlg.addSubmit = function() {
  116. this.clearData();
  117. this.collectData();
  118. //提交信息
  119. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/add", function(data){
  120. Feng.success("添加成功!");
  121. window.parent.LivingAllowanceInfo.table.refresh();
  122. LivingAllowanceInfoInfoDlg.close();
  123. },function(data){
  124. Feng.error("添加失败!" + data.responseJSON.message + "!");
  125. });
  126. ajax.set(this.livingAllowanceInfoInfoData);
  127. ajax.start();
  128. }
  129. /**
  130. * 提交修改
  131. */
  132. LivingAllowanceInfoInfoDlg.editSubmit = function() {
  133. this.clearData();
  134. this.collectData();
  135. //提交信息
  136. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/update", function(data){
  137. Feng.success("修改成功!");
  138. window.parent.LivingAllowanceInfo.table.refresh();
  139. LivingAllowanceInfoInfoDlg.close();
  140. },function(data){
  141. Feng.error("修改失败!" + data.responseJSON.message + "!");
  142. });
  143. ajax.set(this.livingAllowanceInfoInfoData);
  144. ajax.start();
  145. }
  146. $(function() {
  147. });