Aucune description

index.js 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. var start;
  2. var end;
  3. $(function() {
  4. var mySwiper = new Swiper('.swiper-container', {
  5. pagination: { /* 分页器*/
  6. el: '.swiper-pagination',
  7. clickable: true,
  8. },
  9. navigation: {
  10. nextEl: '.swiper-button-next',
  11. prevEl: '.swiper-button-prev',
  12. },
  13. on: {
  14. init: function() {
  15. swiperAnimateCache(this); //隐藏动画元素
  16. swiperAnimate(this); //初始化完成开始动画
  17. },
  18. transitionEnd: function() {
  19. swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
  20. },
  21. }
  22. })
  23. laydate.render({
  24. elem: '#time3',
  25. range: '~',
  26. format: 'yyyy-MM-dd',
  27. theme: '#114a97',
  28. done: function(value) {
  29. //threeScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaTwo").val())
  30. oneSel(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
  31. }
  32. });
  33. laydate.render({
  34. elem: '#time2',
  35. range: '~',
  36. format: 'yyyy-MM-dd',
  37. theme: '#114a97',
  38. done: function(value, date) {
  39. keyWordDetail(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaTwo").val())
  40. }
  41. });
  42. laydate.render({
  43. elem: '#time1',
  44. range: '~',
  45. format: 'yyyy-MM-dd',
  46. theme: '#114a97',
  47. done: function(value, date) {
  48. partpaat(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
  49. // oneSel(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
  50. }
  51. });
  52. setTimeout('swiper()', 2000);
  53. })
  54. function swiper() {
  55. $("swiper-pagination .swiper-pagination-bullet").css({
  56. "width": 48 * getHeightScale + "px",
  57. "height": 48 * getHeightScale + "px"
  58. });
  59. $("swiper-pagination .swiper-pagination-bullet-active").css({
  60. "width": 73 * getHeightScale + "px",
  61. "height": 73 * getHeightScale + "px"
  62. });
  63. }
  64. //第一屏
  65. // 第一屏 发光外框 定时
  66. (function() {
  67. var i = 0;
  68. var length = $(".orderState_ul >li").length;
  69. var j = 0;
  70. var length_1 = $(".orderTtype_Con li").length;
  71. setInterval(function() {
  72. if(i == length) {
  73. i = 0;
  74. $(".orderState_ul >li").removeClass('active');
  75. }
  76. $(".orderState_ul >li").eq(i).addClass('active').siblings().removeClass('active');
  77. if(i == 5) {
  78. $(".orderState_ul >li").eq(4).removeClass('active');
  79. }
  80. i++;
  81. if(j == length_1) {
  82. j = 0;
  83. }
  84. $(".orderTtype_Con li").eq(j).addClass('active').siblings().removeClass('active');
  85. j++;
  86. }, 2000);
  87. })();
  88. function oneSel(sd, ed) {
  89. $.ajax({
  90. type: "get",
  91. url: huayi.config.callcenter_url + 'WOReport/GetFeedbacklList',
  92. async: true,
  93. dataType: 'json',
  94. data: {
  95. stime: sd,
  96. endtime: ed
  97. },
  98. success: function(data) {
  99. if(data.state == "success") {
  100. var sorceData = data.rows;
  101. // 咨询
  102. $(".order_widt").html(sorceData[0].daynumber);
  103. $(".order_catiy").html(sorceData[0].mounthnumber);
  104. $(".order_catypa").html(sorceData[0].Totalnumber);
  105. $(".persent_lex").html(sorceData[0].Proportion);
  106. // 投诉
  107. $(".caluy1").html(sorceData[1].daynumber);
  108. $(".caluy2").html(sorceData[1].mounthnumber);
  109. $(".caluy3").html(sorceData[1].Totalnumber);
  110. $(".caluy4").html(sorceData[1].Proportion);
  111. // 抽检
  112. $(".cico1").html(sorceData[2].daynumber);
  113. $(".cico2").html(sorceData[2].mounthnumber);
  114. $(".cico3").html(sorceData[2].Totalnumber);
  115. $(".cico4").html(sorceData[2].Proportion);
  116. // 建议 pity4
  117. $(".outit1").html(sorceData[3].daynumber);
  118. $(".outit2").html(sorceData[3].mounthnumber);
  119. $(".outit3").html(sorceData[3].Totalnumber);
  120. $(".outit4").html(sorceData[3].Proportion);
  121. // 总计 pity4
  122. $(".pity1").html(sorceData[4].daynumber);
  123. $(".pity2").html(sorceData[4].mounthnumber);
  124. $(".pity3").html(sorceData[4].Totalnumber);
  125. $(".pity4").html(sorceData[4].Proportion);
  126. }
  127. }
  128. })
  129. }
  130. //第二屏
  131. banner1()
  132. function banner1() {
  133. var i = 0;
  134. var Timer;
  135. $(function() {
  136. $(".picImg").eq(0).show().siblings().hide(); //默认第一个div片显示,其他的隐藏
  137. //自动轮播
  138. TimerBanner();
  139. //点击红圈
  140. $(".picImg").hover(function() { //鼠标移动上去
  141. clearInterval(Timer); //让计时器暂时停止 清除计时器
  142. i = $(this).index(); //获取该圈的索引
  143. showPic(); //调用显示图片的方法,显示该索引对应的图片
  144. }, function() { //鼠标离开
  145. //TimerBanner(); //继续轮播 计时器开始
  146. });
  147. $(".tabs .aaa").hover(function() { //鼠标移动上去
  148. clearInterval(Timer); //让计时器暂时停止 清除计时器
  149. i = $(this).index(); //获取该圈的索引
  150. showPic(); //调用显示图片的方法,显示该索引对应的图片
  151. }, function() { //鼠标离开
  152. //TimerBanner(); //继续轮播 计时器开始
  153. });
  154. });
  155. //轮播部分
  156. function TimerBanner() {
  157. Timer = setInterval(function() {
  158. i++;
  159. if(i == 6) {
  160. i = 0;
  161. }
  162. showPic()
  163. }, 5000);
  164. }
  165. //显示div
  166. function showPic() {
  167. $(".picImg").eq(i).show().siblings().hide();
  168. $(".bg").hide();
  169. $(".tabs .aaa").eq(i).children(".bg").show();
  170. }
  171. }
  172. //第三屏
  173. keyWordDetail();
  174. quesTypeSel();
  175. var Yname;
  176. $(".scroll_table tbody").on("click","tr",function(){
  177. $(".scroll_table tbody tr").removeClass("backg_cor");
  178. $(this).addClass("backg_cor");
  179. $(this).children("td").eq(0).addClass("bacg");
  180. Yname =$(this).children("td").eq(0).attr("index");
  181. $('.tagcloud').html('');
  182. textCon();
  183. });
  184. $(".tagcloud").on("click","div",function(){
  185. $(".tagcloud div").addClass("tagcloud_bj");
  186. $(".tagcloud div").removeClass("tagcloud_bjShine");
  187. $(this).removeClass("tagcloud_bj");
  188. $(this).addClass("tagcloud_bjShine");
  189. //keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
  190. });
  191. quesTypeSel();
  192. $("#Product_Category").change(function() {
  193. partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],$(".areaFive").val());
  194. })
  195. $("#customer_taxPointDes").change(function() {
  196. partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],$(".areaFive").val());
  197. })
  198. $("#customer_exceed").change(function() {
  199. keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1],$(".areaFive").val());
  200. })
  201. $("#styqu").change(function() {
  202. partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],$(".areaFive").val());
  203. })
  204. $("#customer_legalName").change(function() {
  205. partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],$(".areaFive").val());
  206. })
  207. $("#customer_comaddress").change(function() {
  208. partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],$(".areaFive").val());
  209. })
  210. $("#xiaoshou").change(function() {
  211. partpaat($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],$(".areaFive").val());
  212. })
  213. $("#time3").change(function() {
  214. oneSel(sd,ed);
  215. })
  216. $(".quesType").change(function() {
  217. keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1],$(".areaFive").val());
  218. })
  219. $("#product_name").change(function() {
  220. keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1],$(".areaFive").val());
  221. })
  222. $("#category").change(function() {
  223. keyWordDetail($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1],$(".areaFive").val());
  224. })
  225. //部门下拉框
  226. function quesTypeSel() {
  227. $.getJSON( huayi.config.callcenter_url +"WorkOrder/GetQuestionName",
  228. {
  229. branchcode: $(".areaFive").val()
  230. },
  231. function(result) {
  232. if(result.state.toLowerCase() == "success") {
  233. goodslist = result.data;
  234. $(".depart").empty();
  235. $('<option value="">问题类别</option>').appendTo($(".quesType"));
  236. $(goodslist).each(function(i, n) {
  237. $('<option value="' + n.F_Id
  238. + '">' + n.F_QuestionName
  239. + '</option>').appendTo($(".quesType"));
  240. })
  241. }
  242. });
  243. }
  244. function textCon() {
  245. $.ajax({
  246. type: "get",
  247. url: huayi.config.callcenter_url + "WOReport/GetComplainthandlList",
  248. async: true,
  249. dataType: 'json',
  250. data: {
  251. stime: $('#time2').val() && $('#time2').val().split(' ~ ')[0],
  252. endtime: $('#time2').val() && $('#time2').val().split(' ~ ')[1],
  253. questionName:Yname,
  254. isEnd:$('#customer_exceed').val(),
  255. product:$("#product_name").val(),//产品
  256. salesBase:$("#category").val()//基地
  257. },
  258. success: function(data) {
  259. if(data.state.toLowerCase() == 'success') {
  260. var con = data.rows;
  261. var arr;
  262. $.each(con, function(index, ele) {
  263. arr = con[index].worker; //console.log(allData);
  264. console.log(JSON.stringify(arr))
  265. console.log(arr.overtime)
  266. });
  267. if (arr) {
  268. $(arr).each(function(k, j) {
  269. var strs = '<div index="" class="tagcloud_bj">' +
  270. '<p class="tag_title" style="margin-top:7px">'+
  271. '<span class="danhao">'+"工单编号" + '</span>'+
  272. '<span class="">'+j.F_WorkOrderCode + '</span>'+
  273. '<span class="Yichin">'+j.F_State + '</span>'+
  274. '</p>' +
  275. '<p class="tag_title">'+
  276. '<span class="danhao">'+"超期时间" + '</span>'+
  277. '<span class="">'+j.overtime + '</span>'+
  278. '</p>' +
  279. '<p class="tag_title tag_title1 tag_titleWt" style="width:100%;height:95px;">'+
  280. '<span class="danhao washpa" style="float: left;">'+"问题描述" + '</span>'+
  281. '<span class="Wentimo" style="text-align: justify !important;float: left;">'+j.F_Description + '</span>'+
  282. '</p>' +
  283. '<p class="tag_title aacdu" style="margin-top:50px">'+
  284. '<span class="danhao">'+"责任科室" + '</span>'+
  285. '<span class="">'+j.F_Responsibility + '</span>'+
  286. '<span class="danhao" style="margin-left:0px;">'+"销售基地" + '</span>'+
  287. '<span class="">'+j.F_SalesBase + '</span>'+
  288. '</p>' +
  289. '</div>'
  290. $('.tagcloud').append(strs);
  291. })
  292. $(".tag_title").css({
  293. "font-size": 16*getHeightScale+"px",
  294. "line-height": 23*getHeightScale+"px",
  295. "height": 23*getHeightScale+"px"
  296. });
  297. $(".tag_title").css({
  298. "height": "auto"
  299. });
  300. $(".aacdu").css({
  301. "color": "#FFFFFF",
  302. "font-size": 16*getHeightScale+"px",
  303. "line-height": 23*getHeightScale+"px",
  304. "height": 23*getHeightScale+"px",
  305. "margin": 10*getHeightScale+"px"
  306. });
  307. $(".tagcloud_bj").css({
  308. "margin": 10*getHeightScale+"px",
  309. "height": 267*getHeightScale+"px"
  310. });
  311. $(".tag_titleWt").css({
  312. "margin": 10*getHeightScale+"px",
  313. "width":"90%",
  314. "height": 117*getHeightScale+"px"
  315. });
  316. $(".Yichin").css({
  317. "position": "absolute",
  318. "right": 10*getHeightScale+"px",
  319. "top": 2*getHeightScale+"px"
  320. });
  321. }else{
  322. $('.tagcloud').html('');
  323. }
  324. }
  325. }
  326. });
  327. }
  328. function keyWordDetail(start,end) {
  329. $.ajax({
  330. type: "get",
  331. url: huayi.config.callcenter_url + "WOReport/GetComplainthandlList",
  332. async: true,
  333. dataType: 'json',
  334. data: {
  335. stime: start,
  336. endtime: end,
  337. questionName:$(".quesType").val(),
  338. isEnd:$('#customer_exceed').val(),
  339. product:$("#product_name").val(),//产品
  340. salesBase:$("#category").val(),//基地
  341. },
  342. success: function(data) {
  343. if(data.state.toLowerCase() == 'success') {
  344. $('.scroll_table tbody').html('');
  345. var con = data.rows;
  346. //alert(con.length)
  347. if(con.length==0){
  348. $('.tagcloud').html('');
  349. }else{
  350. $('.tagcloud').html('');
  351. $(con[0].worker).each(function (k, j) {
  352. var strs = '<div index="" class="tagcloud_bj">' +
  353. '<p class="tag_title" style="margin-top:7px">'+
  354. '<span class="danhao">'+"工单编号" + '</span>'+
  355. '<span class="">'+j.F_WorkOrderCode + '</span>'+
  356. '<span class="Yichin">'+j.F_State + '</span>'+
  357. '</p>' +
  358. '<p class="tag_title">'+
  359. '<span class="danhao">'+"超期时间" + '</span>'+
  360. '<span class="">'+j.overtime + '</span>'+
  361. '</p>' +
  362. '<p class="tag_title tag_titleWt">'+
  363. '<span class="danhao washpa" style="float: left;">'+"问题描述" + '</span>'+
  364. '<span class="Wentimo" style="text-align: justify !important;float: left;">'+j.F_Description + '</span>'+
  365. '</p>' +
  366. '<p class="tag_title aacdu">'+
  367. '<span class="danhao">'+"责任科室" + '</span>'+
  368. '<span class="">'+j.F_Responsibility + '</span>'+
  369. '<span class="danhao" style="margin-left:0px;">'+"销售基地" + '</span>'+
  370. '<span class="">'+j.F_SalesBase + '</span>'+
  371. '</p>' +
  372. '</div>'
  373. $('.tagcloud').append(strs);
  374. });
  375. $(".tag_title").css({
  376. "font-size": 16*getHeightScale+"px",
  377. "line-height": 23*getHeightScale+"px",
  378. "height": 23*getHeightScale+"px"
  379. });
  380. $(".aacdu").css({
  381. "color": "#FFFFFF",
  382. "font-size": 16*getHeightScale+"px",
  383. "line-height": 23*getHeightScale+"px",
  384. "height": 23*getHeightScale+"px",
  385. "margin": 10*getHeightScale+"px"
  386. });
  387. $(".tagcloud_bj").css({
  388. "margin": 10*getHeightScale+"px",
  389. "height": 267*getHeightScale+"px"
  390. });
  391. $(".tag_titleWt").css({
  392. "width":"90%",
  393. "margin": 10*getHeightScale+"px",
  394. "height": 117*getHeightScale+"px"
  395. });
  396. $(".Yichin").css({
  397. "position": "absolute",
  398. "right": 10*getHeightScale+"px",
  399. "top": 2*getHeightScale+"px"
  400. });
  401. }
  402. $(con).each(function (j, n) {
  403. var rate = '';
  404. if (n.rate) { rate = n.rate;}
  405. var str = '<tr><td class="tableW1" index="'+n.typeid+'">'
  406. + n.name + '</td><td class="tableW2">'
  407. + n.number + '</td><td class="tableW3">'
  408. + n.ongesttime + '</td><td class="tableW4">'
  409. + n.minimumtime + '</td><td class="tableW7">'
  410. + n.averageTime + '</td><td class="tableW7">'
  411. + n.median + '</td><td class="tableW6">'
  412. + n.Overdue + '</td><td class="tableW7">'
  413. + n.EndOverdue + '</td><td class="tableW8">'
  414. + n.efficiency + '</td></tr>'
  415. $('.scroll_table tbody').append(str);
  416. });
  417. $(".scroll_table").css({
  418. "width": "100%",
  419. "height": 460*getHeightScale+"px"
  420. });
  421. $(".table>tbody>tr>td").css({
  422. "padding": 8*getHeightScale+"px"
  423. });
  424. $(".tableW1").css({"width": 140*getHeightScale+"px",});
  425. $(".tableW2").css({"width": 60*getHeightScale+"px",});
  426. $(".tableW3").css({"width": 90*getHeightScale+"px",});
  427. $(".tableW4").css({"width": 90*getHeightScale+"px",});
  428. $(".tableW5").css({"width": 80*getHeightScale+"px",});
  429. $(".tableW6").css({"width": 110*getHeightScale+"px",});
  430. $(".tableW7").css({"width": 90*getHeightScale+"px",});
  431. $(".tableW8").css({"width": 110*getHeightScale+"px",});
  432. $(".table_box_key table tbody tr td").css({
  433. "font-size": 13*getHeightScale+"px"
  434. });
  435. $(".scroll_table").Scroll({
  436. line: 1,
  437. speed: 500,
  438. timer: 2000
  439. });
  440. }
  441. }
  442. });
  443. }