No Description

orderListHeader.js 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. var sourceareaObj,exportParam,typeObj,infopropertyObj
  2. $(function() {
  3. laydate.skin('blue');
  4. laydate({
  5. elem: '#starttime',
  6. event: 'focus',
  7. istime: true,
  8. format: 'YYYY-MM-DD hh:mm:ss'
  9. });
  10. laydate({
  11. elem: '#endtime',
  12. event: 'focus',
  13. istime: true,
  14. format: 'YYYY-MM-DD hh:mm:ss'
  15. });
  16. laydate({
  17. elem: '#dealstarttime',
  18. event: 'focus',
  19. istime: true,
  20. format: 'YYYY-MM-DD hh:mm:ss'
  21. });
  22. laydate({
  23. elem: '#dealstrendtime',
  24. event: 'focus',
  25. istime: true,
  26. format: 'YYYY-MM-DD hh:mm:ss'
  27. });
  28. sourceareaObj = {
  29. ele:"#sourceAreas",
  30. apiUrl:"Area/GetAreaListById",
  31. data:{
  32. textKey:'F_AreaName',
  33. valueKey:'F_AreaId'
  34. }
  35. }
  36. sourceObj = {
  37. ele:"#source",
  38. id: 1
  39. }
  40. typeObj = {
  41. ele:"#type",
  42. id: 2
  43. }
  44. //工单来源
  45. selectCommonFn(getDicObjFn(sourceObj))
  46. //受话坐席
  47. personSelect($("#ZX"),"ZXLD,MTDD","UserAccount/GetSeatList");
  48. //审核员
  49. personSelect($("#yardman"),"ZXLD,MTDD","UserAccount/GetUsersList");
  50. //精准地域
  51. selectCommonFn(sourceareaObj)
  52. tree();
  53. //舆情类型
  54. selectCommonFn(getDicObjFn(typeObj))
  55. $(".Seach").click(function() {
  56. load(getParam);
  57. })
  58. // 导出文件
  59. $(".exportFile").click(function() {
  60. exportParam.isdc = 1;
  61. console.log(exportParam)
  62. exportFileFun(getLoadParams(urlState).apiUrl, exportParam)
  63. })
  64. })
  65. $('.ul_tab li').click(function () {
  66. $(this).addClass("active").siblings().removeClass("active");
  67. var index = $(this).index();
  68. if (index === 0) {
  69. db = 0;
  70. } else if (index === 1) {
  71. db = 1
  72. }
  73. load();
  74. })
  75. function Close() {
  76. $(".lyxz").removeClass("cx");
  77. if ($("audio").length > 0) {
  78. $("audio")[0].pause();
  79. }
  80. }
  81. //承办单位下拉事件开始
  82. $(".inps").focus(function() {
  83. $(".xlAdd").css("display", "block");
  84. });
  85. $(".xl").click(function() {
  86. if($(".xlAdd").css("display") == "block") {
  87. $(".xlAdd").css("display", "none");
  88. } else {
  89. $(".xlAdd").css("display", "block");
  90. }
  91. });
  92. $(".addTree").mouseleave(function() {
  93. $(this).css("display", "none");
  94. });
  95. //清除
  96. $(".Cleans ").click(function() {
  97. $(".inps").val("");
  98. $("#PID").val("");
  99. $("#Dpment").val("");
  100. });
  101. //承办单位下拉事件结束
  102. //树形下拉开始
  103. function tree() {
  104. $.get(
  105. huayi.config.callcenter_url + "Department/GetDeptList", {
  106. token: $.cookie("token"),
  107. },
  108. function(result) {
  109. result = $.parseJSON(result);
  110. $.fn.zTree.init( $("#addTreeDemo"),setting1, result.data); //实例化树形图
  111. }
  112. );
  113. }
  114. var setting1 = {
  115. data: {
  116. key: {
  117. name: "F_DeptName",
  118. },
  119. simpleData: {
  120. enable: true,
  121. idKey: "F_DeptId",
  122. pIdKey: "F_PartentId",
  123. rootPId: 0,
  124. },
  125. },
  126. callback: {
  127. onClick: zTreeOnClick,
  128. },
  129. };
  130. function zTreeOnClick(event, treeId, treeNode) {
  131. if(treeNode.level >= 1) {
  132. $(".inps").val(treeNode.F_DeptName);
  133. $("#PID").val(treeNode.F_DeptId);
  134. $(".Cleans").show();
  135. }
  136. }
  137. //树形下拉结束
  138. // 导出列表
  139. function exportFileFun(api, params) {
  140. var url = huayi.config.callcenter_url + api;
  141. if(typeof(params) !== "object") {
  142. return
  143. }
  144. delete params.page
  145. delete params.pagesize
  146. delete params.pageindex
  147. Object.keys(params).forEach(function(key, index) {
  148. if(!params[key]){
  149. if (params[key] != 0) {
  150. params[key] = ""
  151. }
  152. }
  153. if (index === 0) {
  154. url += `?${key}=${params[key]}`
  155. } else {
  156. url += `&${key}=${params[key]}`
  157. }
  158. })
  159. console.log(url)
  160. window.location.href = url;
  161. }