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.
 
 
 
 
 
 

100 line
4.0 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. $('#Formula').lrDataSourceSelect({ code: 'FormulaMain', value: 'id', text: 'name' });
  19. $('#Formula').lrGirdSelect({
  20. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain',
  21. selectWord: 'name',
  22. value: 'id',
  23. text: 'name',
  24. headData:
  25. [
  26. { label: "公式", name: "result", width: 300, align: "left" },
  27. { label: "公式名称", name: "name", width: 300, align: "left" }
  28. ],
  29. select: function (item) {
  30. }
  31. });
  32. $('#lrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
  33. $('#lrPeople').val(learun.clientdata.get(['userinfo']).realName);
  34. $('#lrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
  35. $('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
  36. $('#FillingCycle').lrDataItemSelect({
  37. code: 'ThisCycle',
  38. select: function (item) {
  39. var Cycles = $("#FillingCycle").lrselectGet();
  40. if (Cycles == 3) {
  41. $('#TimeHide').show();
  42. $('#FillingTime1').show();
  43. $('#FillingTime2').hide();
  44. $('#FillingTime1').lrDataItemSelect({
  45. code: 'CycleTime'
  46. });
  47. } else if (Cycles == 2) {
  48. $('#TimeHide').show();
  49. $('#FillingTime1').hide();
  50. $('#FillingTime2').show();
  51. } else if (Cycles == 1) {
  52. //$('#FillingTime1').hide();
  53. //$('#FillingTime2').hide();
  54. //$('#FillingTime1').lrDataItemSelect({ code: 'undefined' });
  55. $('#TimeHide').hide();
  56. }
  57. }
  58. });
  59. $('#FillingTime1').lrselect();
  60. $('#FillingTime2').lrDataItemSelect({
  61. type: 'multiple',
  62. code: 'CycleTime'
  63. });
  64. $('#FillingTime2').hide();
  65. },
  66. initData: function () {
  67. if (!!keyValue) {
  68. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetFormData?keyValue=' + keyValue, function (data) {
  69. for (var id in data) {
  70. if (!!data[id].length && data[id].length > 0) {
  71. $('#' + id).jfGridSet('refreshdata', data[id]);
  72. }
  73. else {
  74. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  75. }
  76. }
  77. });
  78. }
  79. $('#State').val('0');
  80. $('#IsFlag').val('0');
  81. }
  82. };
  83. // 保存数据
  84. acceptClick = function (callBack) {
  85. if (!$('body').lrValidform()) {
  86. return false;
  87. }
  88. var postData = {
  89. strEntity: JSON.stringify($('body').lrGetFormData())
  90. };
  91. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/SaveForm?keyValue=' + keyValue, postData, function (res) {
  92. // 保存成功后才回调
  93. if (!!callBack) {
  94. callBack();
  95. }
  96. });
  97. };
  98. page.init();
  99. }