Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

208 Zeilen
8.8 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 上海力软信息技术有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-09-24 15:37
  5. * 描 述:质量目标管理计划
  6. */
  7. var refreshGirdData;
  8. var isUser = request('isUser');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 220, 400);
  20. //学年
  21. $('#MPAcademicYearNo').lrselect({
  22. placeholder: "请选择学年",
  23. allowSearch: true,
  24. url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear',
  25. value: 'value',
  26. text: 'text'
  27. });
  28. //学期
  29. $('#MPSemester').lrselect({
  30. placeholder: "请选择学期",
  31. allowSearch: true,
  32. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  33. value: 'value',
  34. text: 'text'
  35. });
  36. // 刷新
  37. $('#lr_refresh').on('click', function () {
  38. location.reload();
  39. });
  40. // 新增
  41. $('#lr_add').on('click', function () {
  42. learun.layerForm({
  43. id: 'form',
  44. title: '新增',
  45. url: top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/Form',
  46. width: 600,
  47. height: 400,
  48. callBack: function (id) {
  49. return top[id].acceptClick(refreshGirdData);
  50. }
  51. });
  52. });
  53. // 编辑
  54. $('#lr_edit').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('MPId');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerForm({
  58. id: 'form',
  59. title: '编辑',
  60. url: top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/Form?keyValue=' + keyValue,
  61. width: 600,
  62. height: 400,
  63. callBack: function (id) {
  64. return top[id].acceptClick(refreshGirdData);
  65. }
  66. });
  67. }
  68. });
  69. // 删除
  70. $('#lr_delete').on('click', function () {
  71. var keyValue = $('#gridtable').jfGridValue('MPId');
  72. if (learun.checkrow(keyValue)) {
  73. learun.layerConfirm('是否确认删除该项!', function (res) {
  74. if (res) {
  75. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/DeleteForm', { keyValue: keyValue }, function () {
  76. refreshGirdData();
  77. });
  78. }
  79. });
  80. }
  81. });
  82. // 查看提交材料
  83. $('#lr_uploadView').on('click', function () {
  84. var keyValue = $('#gridtable').jfGridValue('MPId');
  85. if (learun.checkrow(keyValue)) {
  86. learun.layerFormForPercent({
  87. id: 'form',
  88. title: '提交材料',
  89. url: top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/IndexChildren?ParentId=' + keyValue,
  90. width: '80%',
  91. height: '80%',
  92. callBack: function (id) {
  93. return top[id].acceptClick(refreshGirdData);
  94. }
  95. });
  96. }
  97. });
  98. //访问情况统计
  99. $("#lr_statistics").on('click', function () {
  100. var keyValue = $('#gridtable').jfGridValue('MPId');
  101. if (learun.checkrow(keyValue)) {
  102. learun.layerFormForPercent({
  103. id: 'form',
  104. title: '访问情况统计',
  105. url: top.$.rootUrl + '/PersonnelManagement/MP_BrowseRecord/Index?keyValue=' + keyValue,
  106. width: '70%',
  107. height: '70%',
  108. btn: null
  109. });
  110. }
  111. });
  112. // 打印
  113. $('#lr_print').on('click', function () {
  114. $('#gridtable').jqprintTable();
  115. });
  116. },
  117. // 初始化列表
  118. initGird: function () {
  119. $('#gridtable').lrAuthorizeJfGrid({
  120. url: top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/GetPageList',
  121. headData: [
  122. { label: "学年", name: "MPAcademicYearNo", width: 100, align: "left" },
  123. { label: "学期", name: "MPSemester", width: 100, align: "left" },
  124. {
  125. label: "月份", name: "MPMonth", width: 100, align: "left",
  126. formatterAsync: function (callback, value, row, op, $cell) {
  127. learun.clientdata.getAsync('dataItem',
  128. {
  129. key: value,
  130. code: 'MPMonth',
  131. callback: function (_data) {
  132. callback(_data.text);
  133. }
  134. });
  135. }
  136. },
  137. {
  138. label: "部门", name: "MPDepartment", width: 250, align: "left",
  139. formatterAsync: function (callback, value, row, op, $cell) {
  140. learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/Department/GetDepartmentList?listId=' + value, function (res) {
  141. console.log(res);
  142. if (res.code == learun.httpCode.success) {
  143. callback(res.data);
  144. }
  145. });
  146. }
  147. },
  148. {
  149. label: "模板材料", name: "MPFile", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  150. $.ajax({
  151. url: '/LR_SystemModule/Annexes/GetAnnexesFileList',
  152. data: { folderId: value },
  153. type: 'GET',
  154. dataType: "json",
  155. async: false,
  156. cache: false,
  157. success: function (res) {
  158. console.log(res);
  159. var bb = '';
  160. $.each(res.data, function (i, item) {
  161. bb += '<span onclick="downLoad(\'' +
  162. item.F_Id +
  163. '\')" style="color:blue">' +
  164. item.F_FileName +
  165. '</span>,&nbsp;&nbsp;&nbsp;';
  166. })
  167. callback(bb);
  168. }
  169. });
  170. }
  171. },
  172. { label: "材料名称", name: "MPProjectName", width: 100, align: "left" },
  173. { label: "截止时间", name: "MPOverTime", width: 100, align: "left" },
  174. { label: "说明", name: "MPRemark", width: 200, align: "left" },
  175. ],
  176. mainId: 'ID',
  177. isPage: true
  178. });
  179. page.search();
  180. },
  181. search: function (param) {
  182. param = param || {};
  183. if (isUser) {
  184. param.isUser = 'true';
  185. }
  186. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  187. }
  188. };
  189. refreshGirdData = function () {
  190. page.search();
  191. };
  192. page.init();
  193. }
  194. function downLoad(fileId, fileTwo) {
  195. if (fileTwo) {
  196. top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {
  197. });
  198. }
  199. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
  200. }