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.
 
 
 
 
 
 

83 lines
3.0 KiB

  1. /*
  2. * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  3. * Copyright (c) 2013-2017
  4. * 创建人:陈彬彬
  5. * 日 期:2017.04.17
  6. * 描 述:公司管理
  7. */
  8. var refreshGirdData; // 更新数据
  9. var selectedRow;
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. page.initGrid();
  15. page.bind();
  16. },
  17. bind: function () {
  18. // 查询
  19. $('#btn_Search').on('click', function () {
  20. var keyword = $('#txt_Keyword').val();
  21. page.search({ keyword: keyword });
  22. });
  23. // 刷新
  24. $('#lr_refresh').on('click', function () {
  25. location.reload();
  26. });
  27. // 同步
  28. $('#lr_synchro').on('click', function () {
  29. learun.layerConfirm('是否确认同步数据!', function (res) {
  30. if (res) {
  31. learun.deleteForm(top.$.rootUrl + '/LR_WebChatModule/Organize/Sync', function (res) {
  32. refreshGirdData();
  33. });
  34. }
  35. });
  36. });
  37. },
  38. initGrid: function () {
  39. $('#gridtable').lrAuthorizeJfGrid({
  40. url: top.$.rootUrl + '/LR_WebChatModule/Organize/GetTreeList',
  41. headData: [
  42. { label: "名称", name: "F_FullName", width: 260, align: "left" },
  43. { label: "编号", name: "F_EnCode", width: 150, align: "left" },
  44. { label: "性质", name: "F_Nature", width: 80, align: "center" },
  45. {
  46. label: "时间", name: "F_FoundedTime", width: 80, align: "center",
  47. formatter: function (value) {
  48. return learun.formatDate(value, 'yyyy-MM-dd');
  49. }
  50. },
  51. { label: "负责人", name: "F_Manager", width: 80, align: "center" },
  52. {
  53. label: "同步状态", name: "F_Fax", width: 100, align: "center",
  54. formatter: function (cellvalue) {
  55. if (cellvalue == "未同步") {
  56. return '<span class=\"label label-default\" style=\"cursor: pointer;\">未同步</span>';
  57. }
  58. else return '<span class=\"label label-info\" style=\"cursor: pointer;\">已同步</span>';
  59. }
  60. },
  61. { label: "同步信息", name: "F_Description", width: 200, align: "left" }
  62. ],
  63. isTree: true,
  64. mainId: 'F_CompanyId',
  65. parentId: 'F_ParentId'
  66. });
  67. page.search();
  68. },
  69. search: function (param) {
  70. $('#gridtable').jfGridSet('reload', param);
  71. }
  72. };
  73. // 保存数据后回调刷新
  74. refreshGirdData = function () {
  75. page.search();
  76. }
  77. page.init();
  78. }