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.
 
 
 
 
 
 

71 lines
2.7 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-06-21 18:39
  5. * 描 述:质量目标管理体系指标模块
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. $('.lr-form-wrap').lrscroll();
  14. page.bind();
  15. page.initData();
  16. },
  17. bind: function () {
  18. $('#lrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
  19. $('#lrPeople').val(learun.clientdata.get(['userinfo']).realName);
  20. $('#lrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
  21. $('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
  22. $('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
  23. $('#FillingCycle').lrDataItemSelect({
  24. code: 'ThisCycle',
  25. select: function (item) {
  26. var Cycles = $("#FillingCycle").lrselectGet();
  27. if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) {
  28. $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' });
  29. } else {
  30. $('#FillingTime').lrDataItemSelect({ code: 'undefined' });
  31. }
  32. }
  33. });
  34. },
  35. initData: function () {
  36. if (!!keyValue) {
  37. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetFormData?keyValue=' + keyValue, function (data) {
  38. for (var id in data) {
  39. if (!!data[id].length && data[id].length > 0) {
  40. $('#' + id).jfGridSet('refreshdata', data[id]);
  41. }
  42. else {
  43. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  44. }
  45. }
  46. });
  47. }
  48. $('#State').val('0');
  49. $('#IsFlag').val('0');
  50. }
  51. };
  52. // 保存数据
  53. acceptClick = function (callBack) {
  54. if (!$('body').lrValidform()) {
  55. return false;
  56. }
  57. var postData = {
  58. strEntity: JSON.stringify($('body').lrGetFormData())
  59. };
  60. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/SaveForm?keyValue=' + keyValue, postData, function (res) {
  61. // 保存成功后才回调
  62. if (!!callBack) {
  63. callBack();
  64. }
  65. });
  66. };
  67. page.init();
  68. }