暫無描述

liuzhangtu.js 36KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415
  1. $("#save_ssss").click(function() {
  2. partpaat()
  3. })
  4. var bigdataList = null;
  5. setTimeout(function() {
  6. partpaat();
  7. }, 3000);
  8. function partpaat(sd, ed) {
  9. var myCha = echarts.init(document.getElementById('cha'));
  10. var myChart = echarts.init(document.getElementById('chart'));
  11. var myChaaaa = echarts.init(document.getElementById('dback1'));
  12. var myChartaaa = echarts.init(document.getElementById('dback'));
  13. var myChaccc = echarts.init(document.getElementById('mold1'));
  14. var myChartbbb = echarts.init(document.getElementById('mold'));
  15. var myCharrr = echarts.init(document.getElementById('genre1'));
  16. var myCharteee = echarts.init(document.getElementById('genre'));
  17. var myChaqqq = echarts.init(document.getElementById('other1'));
  18. var myChartwww = echarts.init(document.getElementById('other'));
  19. var myChalll = echarts.init(document.getElementById('uction1'));
  20. var myChartppp = echarts.init(document.getElementById('uction'));
  21. var myChreti = echarts.init(document.getElementById('sippu1'));
  22. var myChreti1 = echarts.init(document.getElementById('sippu'));
  23. var myKouc = echarts.init(document.getElementById('siupi1'));
  24. var myKouc1 = echarts.init(document.getElementById('siupi'));
  25. var myKucot = echarts.init(document.getElementById('siupiac1'));
  26. var myKucot1 = echarts.init(document.getElementById('siupiac'));
  27. var myTou = echarts.init(document.getElementById('siyi1'));
  28. var myTou1 = echarts.init(document.getElementById('siyi'));
  29. var myRi = echarts.init(document.getElementById('siout1'));
  30. var myRi1 = echarts.init(document.getElementById('siout'));
  31. var myEkit = echarts.init(document.getElementById('seytio1'));
  32. var myEkit1 = echarts.init(document.getElementById('seytio'));
  33. $.ajax({
  34. type: "get",
  35. url: huayi.config.callcenter_url + "WOReport/GetBigdataList",
  36. async: true,
  37. dataType: "json",
  38. data: {
  39. stime: sd,
  40. endtime: ed,
  41. salesBase: $('#xiaoshou').val(), //销售基地
  42. product: $('#Product_Category').val(), //产品
  43. channel: $('#customer_taxPointDes').val(), //渠道类型
  44. area: $('#customer_comaddress').val(), //大区
  45. branch: $('#customer_legalName').val(), //分公司
  46. isEnd: $('#customer_exceed').val(),
  47. type: $('#styqu').val(), //反馈类型
  48. },
  49. success: function(data) {
  50. if(data.state.toLowerCase() == "success") {
  51. //bigdataList = data.rows;
  52. var con = data.rows;
  53. $('.my_numet').html(con.salesBase[0].number); //基地反馈统计
  54. $('.my_yer').html(con.salesBase[0].Lastyear);
  55. $('.my_moye').html(con.salesBase[0].Lastmonth);
  56. $('.ch_numet').html(con.product[0].number); //产品反馈统计
  57. $('.ch_yer').html(con.product[0].Lastyear);
  58. $('.ch_moye').html(con.product[0].Lastmonth);
  59. $('.qd_numet').html(con.channel[0].number); //渠道反馈统计
  60. $('.qd_yer').html(con.channel[0].Lastyear);
  61. $('.qd_moye').html(con.channel[0].Lastmonth);
  62. $('.gdz_numet').html(con.state[0].number); //工单统计
  63. $('.gdz_yer').html(con.state[0].Lastyear);
  64. $('.gdz_moye').html(con.state[0].Lastmonth);
  65. $('.cq_numet').html(con.overdue[0].number); //超期部门统计
  66. $('.cq_yer').html(con.overdue[0].Lastyear);
  67. $('.cq_moye').html(con.overdue[0].Lastmonth);
  68. $('.myd_numet').html(con.satisfaction[0].number); //满意度统计
  69. $('.myd_yer').html(con.satisfaction[0].Lastyear);
  70. $('.myd_moye').html(con.satisfaction[0].Lastmonth);
  71. var channel = con.channel.slice(1);
  72. var overdue = con.overdue.slice(1);
  73. var product = con.product.slice(1);
  74. var stateaa = con.state.slice(1);
  75. var satisfaction = con.satisfaction.slice(1);
  76. var type_data = con.salesBase.slice(1);
  77. // 聚到类型
  78. var type_data_ccc = [];
  79. var type_data_name_arry2 = [];
  80. $(channel).each(function(i, n) {
  81. //type_data_arry.push(n.name)
  82. //数据
  83. var type_data_obj2 = {};
  84. type_data_obj2.name = n.name;
  85. type_data_obj2.value = n.number;
  86. if(n.number!=0){
  87. type_data_ccc.push(type_data_obj2);
  88. }
  89. // type_data_ccc.push(type_data_obj2);
  90. //名称
  91. var type_data_name_obj2 = {};
  92. type_data_name_obj2 = n.name;
  93. type_data_name_arry2.push(type_data_name_obj2);
  94. })
  95. // 基地反馈
  96. var type_data_arry = [];
  97. var data_arr = type_data_arry.shift(0);
  98. var type_data_name_arry = [];
  99. $(type_data).each(function(i, n) {
  100. //type_data_arry.push(n.name)
  101. //数据
  102. var type_data_obj = {};
  103. type_data_obj.name = n.name;
  104. type_data_obj.value = n.number;
  105. if(n.number!=0){
  106. type_data_arry.push(type_data_obj);
  107. }
  108. // type_data_arry.push(type_data_obj);
  109. //名称
  110. var type_data_name_obj = {};
  111. type_data_name_obj = n.name;
  112. type_data_name_arry.push(type_data_name_obj);
  113. })
  114. // 产品类型
  115. var type_data_aaa = [];
  116. var type_data_name_arry1 = [];
  117. $(product).each(function(i, n) {
  118. //type_data_arry.push(n.name)
  119. //数据
  120. var type_data_obj1 = {};
  121. type_data_obj1.name = n.name;
  122. type_data_obj1.value = n.number;
  123. if(n.number!=0){
  124. type_data_aaa.push(type_data_obj1);
  125. }
  126. // type_data_aaa.push(type_data_obj1);
  127. //名称
  128. var type_data_name_obj1 = {};
  129. type_data_name_obj1 = n.name;
  130. type_data_name_arry1.push(type_data_name_obj1);
  131. })
  132. // 超期部门
  133. var type_data_bbb = [];
  134. var type_data_name_arry3 = [];
  135. $(overdue).each(function(i, n) {
  136. //type_data_arry.push(n.name)
  137. //数据
  138. var type_data_obj3 = {};
  139. type_data_obj3.name = n.name;
  140. type_data_obj3.value = n.number;
  141. if(n.number!=0){
  142. type_data_bbb.push(type_data_obj3);
  143. }
  144. // type_data_bbb.push(type_data_obj3);
  145. //名称
  146. var type_data_name_obj3 = {};
  147. type_data_name_obj3 = n.name;
  148. type_data_name_arry3.push(type_data_name_obj3);
  149. })
  150. // 满意度
  151. var type_data_nnn = [];
  152. var type_data_name_arry4 = [];
  153. $(satisfaction).each(function(i, n) {
  154. //type_data_arry.push(n.name)
  155. //数据
  156. var type_data_obj4 = {};
  157. type_data_obj4.name = n.name;
  158. type_data_obj4.value = n.number;
  159. if(n.number!=0){
  160. type_data_nnn.push(type_data_obj4);
  161. }
  162. // type_data_nnn.push(type_data_obj4);
  163. //名称
  164. var type_data_name_obj4 = {};
  165. type_data_name_obj4 = n.name;
  166. type_data_name_arry4.push(type_data_name_obj4);
  167. })
  168. // 工单
  169. var type_data_uuu = [];
  170. var type_data_name_arry5 = [];
  171. $(stateaa).each(function(i, n) {
  172. //type_data_arry.push(n.name)
  173. //数据
  174. var type_data_obj5 = {};
  175. type_data_obj5.name = n.name;
  176. type_data_obj5.value = n.number;
  177. if(n.number!=0){
  178. type_data_uuu.push(type_data_obj5);
  179. }
  180. // type_data_uuu.push(type_data_obj5);
  181. //名称
  182. var type_data_name_obj5 = {};
  183. type_data_name_obj5 = n.name;
  184. type_data_name_arry5.push(type_data_name_obj5);
  185. })
  186. myChart.setOption({
  187. color: ['#1852B5'],
  188. textStyle: {
  189. fontSize: 16 * getHeightScale,
  190. },
  191. tooltip: {
  192. "textStyle": {
  193. "fontSize": 16 * getHeightScale,
  194. }
  195. },
  196. xAxis: {
  197. data: type_data_name_arry, //["合计", "咨询", "投诉", "抽检", "建议及其他", ""], ["咨询", "投诉", "抽检", "建议", "合计"]
  198. axisLine: { //这是x轴文字颜色
  199. lineStyle: {
  200. color: "#FFFFFF",
  201. }
  202. },
  203. axisLabel: { //调整x轴的lable
  204. textStyle: {
  205. fontSize: 16 * getHeightScale // 让字体变大
  206. }
  207. }
  208. },
  209. yAxis: {
  210. splitLine: {    
  211. show: false  
  212. },
  213. axisLine: { //这是x轴文字颜色
  214. lineStyle: {
  215. color: "#000946",
  216. }
  217. },
  218. axisLabel: { //调整x轴的lable
  219. textStyle: {
  220. fontSize: 16 * getHeightScale // 让字体变大
  221. }
  222. }
  223. },
  224. series: [{
  225. name: '反馈类型统计',
  226. type: 'bar',
  227. x: 'center',
  228. // barGap:'2%', //两个柱子距离
  229. barWidth: 20 * getHeightScale,
  230. data: type_data_arry
  231. }]
  232. });
  233. myCha.setOption({
  234. textStyle: {
  235. fontSize: 16 * getHeightScale,
  236. },
  237. tooltip: {
  238. trigger: 'item',
  239. formatter: "{a} <br/>{b} : {c} ({d}%)"
  240. },
  241. series: [{
  242. name: '访问来源',
  243. type: 'pie',
  244. radius: '55%',
  245. center: ['50%', '60%'],
  246. data: type_data_arry,
  247. type_data_name_arry,
  248. label: {
  249. normal: {
  250. position: 'inner',
  251. show: false
  252. }
  253. },
  254. itemStyle: {
  255. emphasis: {
  256. shadowBlur: 10 * getHeightScale,
  257. shadowOffsetX: 0,
  258. shadowColor: 'rgba(0, 0, 0, 0.5)'
  259. },
  260. normal: {
  261. color: function(params) {
  262. //自定义颜色
  263. var colorList = [
  264. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  265. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  266. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  267. ];
  268. return colorList[params.dataIndex]
  269. }
  270. }
  271. }
  272. }]
  273. });
  274. myChartaaa.setOption({
  275. color: ['#1852B5'],
  276. textStyle: {
  277. fontSize: 16 * getHeightScale,
  278. },
  279. tooltip: {},
  280. xAxis: {
  281. splitNumber: 5,
  282. data: type_data_name_arry1, //["合计", "尿素", "复合肥", "水溶肥", "车用尿素", "三聚氰胺", "甲醇", "糖醇", "腐殖酸", "二甲醚", "糖醛", "液氨", "其他", ""],
  283. axisLine: { //这是x轴文字颜色
  284. lineStyle: {
  285. color: "#FFFFFF",
  286. }
  287. },
  288. axisLabel: { //调整x轴的lable
  289. textStyle: {
  290. fontSize: 16 * getHeightScale // 让字体变大
  291. }
  292. }
  293. },
  294. yAxis: {
  295. splitLine: {    
  296. show: false  
  297. },
  298. axisLine: { //这是x轴文字颜色
  299. lineStyle: {
  300. color: "#000946",
  301. }
  302. },
  303. axisLabel: { //调整x轴的lable
  304. textStyle: {
  305. fontSize: 16 * getHeightScale // 让字体变大
  306. }
  307. }
  308. },
  309. series: [{
  310. name: '产品类型统计',
  311. type: 'bar',
  312. barWidth: 20 * getHeightScale,
  313. data: type_data_aaa,
  314. }]
  315. });
  316. myChaaaa.setOption({
  317. textStyle: {
  318. fontSize: 16 * getHeightScale,
  319. },
  320. tooltip: {
  321. trigger: 'item',
  322. formatter: "{a} <br/>{b} : {c} ({d}%)"
  323. },
  324. series: [{
  325. name: '访问来源',
  326. type: 'pie',
  327. radius: '55%',
  328. center: ['50%', '60%'],
  329. data: type_data_aaa,
  330. type_data_name_arry1,
  331. label: {
  332. normal: {
  333. position: 'inner',
  334. show: false
  335. }
  336. },
  337. itemStyle: {
  338. emphasis: {
  339. shadowBlur: 10 * getHeightScale,
  340. shadowOffsetX: 0,
  341. shadowColor: 'rgba(0, 0, 0, 0.5)'
  342. },
  343. normal: {
  344. color: function(params) {
  345. //自定义颜色
  346. var colorList = [
  347. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  348. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  349. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  350. ];
  351. return colorList[params.dataIndex]
  352. }
  353. }
  354. }
  355. }]
  356. });
  357. myChartbbb.setOption({
  358. color: ['#1852B5'],
  359. textStyle: {
  360. fontSize: 16 * getHeightScale,
  361. },
  362. tooltip: {},
  363. xAxis: {
  364. data: type_data_name_arry2, //["合计", "总经销", "二级商", "种田大户", "农户", "化工客户", "公司员工", "其他"],
  365. axisLine: { //这是x轴文字颜色
  366. lineStyle: {
  367. color: "#FFFFFF",
  368. }
  369. },
  370. axisLabel: { //调整x轴的lable
  371. textStyle: {
  372. fontSize: 16 * getHeightScale // 让字体变大
  373. }
  374. }
  375. },
  376. yAxis: {
  377. splitLine: {    
  378. show: false  
  379. },
  380. axisLine: { //这是x轴文字颜色
  381. lineStyle: {
  382. color: "#000946",
  383. }
  384. },
  385. axisLabel: { //调整x轴的lable
  386. textStyle: {
  387. fontSize: 16 * getHeightScale // 让字体变大
  388. }
  389. }
  390. },
  391. series: [{
  392. name: '渠道类型统计',
  393. type: 'bar',
  394. barWidth: 20 * getHeightScale,
  395. data: type_data_ccc,
  396. }]
  397. });
  398. myChaccc.setOption({
  399. textStyle: {
  400. fontSize: 16 * getHeightScale,
  401. },
  402. tooltip: {
  403. trigger: 'item',
  404. formatter: "{a} <br/>{b} : {c} ({d}%)"
  405. },
  406. series: [{
  407. name: '渠道类型统计',
  408. type: 'pie',
  409. radius: '55%',
  410. center: ['50%', '60%'],
  411. data: type_data_ccc,
  412. type_data_name_arry2,
  413. label: {
  414. normal: {
  415. position: 'inner',
  416. show: false
  417. }
  418. },
  419. itemStyle: {
  420. emphasis: {
  421. shadowBlur: 10 * getHeightScale,
  422. shadowOffsetX: 0,
  423. shadowColor: 'rgba(0, 0, 0, 0.5)'
  424. },
  425. normal: {
  426. color: function(params) {
  427. //自定义颜色
  428. var colorList = [
  429. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  430. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  431. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  432. ];
  433. return colorList[params.dataIndex]
  434. }
  435. }
  436. }
  437. }]
  438. });
  439. myCharteee.setOption({
  440. color: ['#1852B5'],
  441. textStyle: {
  442. fontSize: 16 * getHeightScale,
  443. },
  444. xAxis: {
  445. data: type_data_name_arry3, // ["合计", "市场管理科", "呼叫中心", "车用尿素", ""],
  446. axisLine: { //这是x轴文字颜色
  447. lineStyle: {
  448. color: "#FFFFFF",
  449. }
  450. },
  451. axisLabel: { //调整x轴的lable
  452. textStyle: {
  453. fontSize: 16 * getHeightScale // 让字体变大
  454. }
  455. }
  456. },
  457. yAxis: {
  458. splitLine: {    
  459. show: false  
  460. },
  461. axisLine: { //这是x轴文字颜色
  462. lineStyle: {
  463. color: "#000946",
  464. }
  465. },
  466. axisLabel: { //调整x轴的lable
  467. textStyle: {
  468. fontSize: 16 * getHeightScale // 让字体变大
  469. }
  470. }
  471. },
  472. series: [{
  473. name: '超期部门统计',
  474. type: 'bar',
  475. barWidth: 20 * getHeightScale,
  476. data: type_data_bbb,
  477. }]
  478. });
  479. myCharrr.setOption({
  480. textStyle: {
  481. fontSize: 16 * getHeightScale,
  482. },
  483. tooltip: {
  484. trigger: 'item',
  485. formatter: "{a} <br/>{b} : {c} ({d}%)"
  486. },
  487. series: [{
  488. name: '超期部门统计',
  489. type: 'pie',
  490. radius: '55%',
  491. center: ['50%', '60%'],
  492. data: type_data_bbb,
  493. type_data_name_arry3,
  494. label: {
  495. normal: {
  496. position: 'inner',
  497. show: false
  498. }
  499. },
  500. itemStyle: {
  501. emphasis: {
  502. shadowBlur: 10 * getHeightScale,
  503. shadowOffsetX: 0,
  504. shadowColor: 'rgba(0, 0, 0, 0.5)'
  505. },
  506. normal: {
  507. color: function(params) {
  508. //自定义颜色
  509. var colorList = [
  510. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  511. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  512. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  513. ];
  514. return colorList[params.dataIndex]
  515. }
  516. }
  517. }
  518. }]
  519. });
  520. myChartwww.setOption({
  521. color: ['#1852B5'],
  522. textStyle: {
  523. fontSize: 16 * getHeightScale,
  524. },
  525. tooltip: {},
  526. xAxis: {
  527. data: type_data_name_arry4, //["合计", "非常满意", "满意", "一般", "不满意", ""],
  528. axisLine: { //这是x轴文字颜色
  529. lineStyle: {
  530. color: "#FFFFFF",
  531. }
  532. },
  533. axisLabel: { //调整x轴的lable
  534. textStyle: {
  535. fontSize: 16 * getHeightScale // 让字体变大
  536. }
  537. }
  538. },
  539. yAxis: {
  540. splitLine: {    
  541. show: false  
  542. },
  543. axisLine: { //这是x轴文字颜色
  544. lineStyle: {
  545. color: "#000946",
  546. }
  547. },
  548. axisLabel: { //调整x轴的lable
  549. textStyle: {
  550. fontSize: 16 * getHeightScale // 让字体变大
  551. }
  552. }
  553. },
  554. series: [{
  555. name: '满意度统计',
  556. type: 'bar',
  557. barWidth: 20 * getHeightScale,
  558. data: type_data_nnn,
  559. }]
  560. });
  561. myChaqqq.setOption({
  562. tooltip: {
  563. trigger: 'item',
  564. formatter: "{a} <br/>{b} : {c} ({d}%)"
  565. },
  566. series: [{
  567. name: '满意度统计',
  568. type: 'pie',
  569. radius: '55%',
  570. center: ['50%', '60%'],
  571. data: type_data_nnn,
  572. type_data_name_arry4,
  573. label: {
  574. normal: {
  575. position: 'inner',
  576. show: false
  577. }
  578. },
  579. itemStyle: {
  580. emphasis: {
  581. shadowBlur: 10 * getHeightScale,
  582. shadowOffsetX: 0,
  583. shadowColor: 'rgba(0, 0, 0, 0.5)'
  584. },
  585. normal: {
  586. color: function(params) {
  587. //自定义颜色
  588. var colorList = [
  589. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  590. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  591. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  592. ];
  593. return colorList[params.dataIndex]
  594. }
  595. }
  596. }
  597. }]
  598. });
  599. myChartppp.setOption({
  600. color: ['#1852B5'],
  601. textStyle: {
  602. fontSize: 16 * getHeightScale,
  603. },
  604. tooltip: {},
  605. xAxis: {
  606. data: type_data_name_arry5,
  607. axisLine: { //这是x轴文字颜色
  608. lineStyle: {
  609. color: "#FFFFFF",
  610. }
  611. },
  612. axisLabel: { //调整x轴的lable
  613. textStyle: {
  614. fontSize: 16 * getHeightScale // 让字体变大
  615. }
  616. }
  617. },
  618. yAxis: {
  619. splitLine: {    
  620. show: false  
  621. },
  622. axisLine: { //这是x轴文字颜色
  623. lineStyle: {
  624. color: "#000946",
  625. }
  626. },
  627. axisLabel: { //调整x轴的lable
  628. textStyle: {
  629. fontSize: 16 * getHeightScale // 让字体变大
  630. }
  631. }
  632. },
  633. series: [{
  634. name: '工单',
  635. type: 'bar',
  636. barWidth: 20 * getHeightScale,
  637. data: type_data_uuu,
  638. }]
  639. });
  640. myChalll.setOption({
  641. textStyle: {
  642. fontSize: 16 * getHeightScale,
  643. },
  644. tooltip: {
  645. trigger: 'item',
  646. formatter: "{a} <br/>{b} : {c} ({d}%)"
  647. },
  648. series: [{
  649. name: '访问来源',
  650. type: 'pie',
  651. radius: '55%',
  652. center: ['50%', '60%'],
  653. data: type_data_uuu,
  654. type_data_name_arry5,
  655. label: {
  656. normal: {
  657. position: 'inner',
  658. show: false
  659. }
  660. },
  661. itemStyle: {
  662. emphasis: {
  663. shadowBlur: 10 * getHeightScale,
  664. shadowOffsetX: 0,
  665. shadowColor: 'rgba(0, 0, 0, 0.5)'
  666. },
  667. normal: {
  668. color: function(params) {
  669. //自定义颜色
  670. var colorList = [
  671. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  672. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  673. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  674. ];
  675. return colorList[params.dataIndex]
  676. }
  677. },
  678. }
  679. }]
  680. });
  681. myKouc1.setOption({
  682. color: ['#1852B5'],
  683. title: {
  684. text: '基地反馈统计',
  685. x: 'center',
  686. textStyle: {
  687. "color": "#53FEC0",
  688. fontSize: 24 * getHeightScale,
  689. }
  690. },
  691. textStyle: {
  692. fontSize: 14 * getHeightScale,
  693. },
  694. tooltip: {},
  695. xAxis: {
  696. data: type_data_name_arry, //["合计", "咨询", "投诉", "抽检", "建议及其他", ""], ["咨询", "投诉", "抽检", "建议", "合计"]
  697. axisLine: { //这是x轴文字颜色
  698. lineStyle: {
  699. color: "#FFFFFF",
  700. }
  701. },
  702. axisLabel: { //调整x轴的lable
  703. textStyle: {
  704. fontSize: 16 * getHeightScale // 让字体变大
  705. }
  706. }
  707. },
  708. yAxis: {
  709. splitLine: {    
  710. show: false  
  711. },
  712. axisLine: { //这是x轴文字颜色
  713. lineStyle: {
  714. color: "#FFFFFF",
  715. }
  716. },
  717. axisLabel: { //调整x轴的lable
  718. textStyle: {
  719. fontSize: 16 * getHeightScale // 让字体变大
  720. }
  721. }
  722. },
  723. dataZoom: [{
  724. show: false, //是否显示下方滚动条
  725. realtime: true,
  726. start: 0, //显示数据开始位置
  727. end: 50 //显示数据结束位置
  728. },
  729. {
  730. type: 'inside',
  731. realtime: true,
  732. start: 0,
  733. end: 50
  734. }
  735. ],
  736. series: [{
  737. name: '基地反馈统计',
  738. type: 'bar',
  739. x: 'center',
  740. // barGap:'2%', //两个柱子距离
  741. barWidth: 20 * getHeightScale,
  742. data: type_data_arry
  743. }]
  744. });
  745. myKouc.setOption({
  746. textStyle: {
  747. fontSize: 16 * getHeightScale,
  748. },
  749. tooltip: {
  750. trigger: 'item',
  751. formatter: "{a} <br/>{b} : {c} ({d}%)"
  752. },
  753. series: [{
  754. name: '基地反馈统计',
  755. type: 'pie',
  756. radius: '40%',
  757. center: ['50%', '60%'],
  758. data: type_data_arry,
  759. type_data_name_arry,
  760. itemStyle: {
  761. emphasis: {
  762. shadowBlur: 10 * getHeightScale,
  763. shadowOffsetX: 0,
  764. shadowColor: 'rgba(0, 0, 0, 0.5)'
  765. },
  766. normal: {
  767. color: function(params) {
  768. //自定义颜色
  769. var colorList = [
  770. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  771. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  772. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  773. ];
  774. return colorList[params.dataIndex]
  775. }
  776. }
  777. }
  778. }]
  779. });
  780. myKucot1.setOption({
  781. color: ['#1852B5'],
  782. title: {
  783. text: '产品类型统计',
  784. x: 'center',
  785. textStyle: {
  786. "color": "#53FEC0",
  787. fontSize: 24 * getHeightScale,
  788. }
  789. },
  790. textStyle: {
  791. fontSize: 16 * getHeightScale,
  792. },
  793. tooltip: {},
  794. xAxis: {
  795. splitNumber: 5,
  796. data: type_data_name_arry1, //["合计", "尿素", "复合肥", "水溶肥", "车用尿素", "三聚氰胺", "甲醇", "糖醇", "腐殖酸", "二甲醚", "糖醛", "液氨", "其他", ""],
  797. axisLine: { //这是x轴文字颜色
  798. lineStyle: {
  799. color: "#FFFFFF",
  800. }
  801. },
  802. axisLabel: { //调整x轴的lable
  803. textStyle: {
  804. fontSize: 16 * getHeightScale // 让字体变大
  805. }
  806. }
  807. },
  808. yAxis: {
  809. splitLine: {    
  810. show: false  
  811. },
  812. axisLine: { //这是x轴文字颜色
  813. lineStyle: {
  814. color: "#FFFFFF",
  815. }
  816. },
  817. axisLabel: { //调整x轴的lable
  818. textStyle: {
  819. fontSize: 16 * getHeightScale // 让字体变大
  820. }
  821. }
  822. },
  823. dataZoom: [{
  824. show: false, //是否显示下方滚动条
  825. realtime: true,
  826. start: 0, //显示数据开始位置
  827. end: 50 //显示数据结束位置
  828. },
  829. {
  830. type: 'inside',
  831. realtime: true,
  832. start: 0,
  833. end: 50
  834. }
  835. ],
  836. series: [{
  837. name: '产品类型统计',
  838. type: 'bar',
  839. barWidth: 20 * getHeightScale,
  840. data: type_data_aaa,
  841. }]
  842. });
  843. myKucot.setOption({
  844. textStyle: {
  845. fontSize: 16 * getHeightScale,
  846. },
  847. tooltip: {
  848. trigger: 'item',
  849. formatter: "{a} <br/>{b} : {c} ({d}%)"
  850. },
  851. series: [{
  852. name: '产品类型统计',
  853. type: 'pie',
  854. radius: '40%',
  855. center: ['50%', '60%'],
  856. data: type_data_aaa,
  857. type_data_name_arry1,
  858. itemStyle: {
  859. emphasis: {
  860. shadowBlur: 10 * getHeightScale,
  861. shadowOffsetX: 0,
  862. shadowColor: 'rgba(0, 0, 0, 0.5)'
  863. },
  864. normal: {
  865. color: function(params) {
  866. //自定义颜色
  867. var colorList = [
  868. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  869. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  870. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  871. ];
  872. return colorList[params.dataIndex]
  873. }
  874. }
  875. }
  876. }]
  877. });
  878. myTou1.setOption({
  879. color: ['#1852B5'],
  880. title: {
  881. text: '渠道类型统计',
  882. x: 'center',
  883. textStyle: {
  884. "color": "#53FEC0",
  885. fontSize: 24 * getHeightScale,
  886. }
  887. },
  888. textStyle: {
  889. fontSize: 16 * getHeightScale,
  890. },
  891. tooltip: {},
  892. xAxis: {
  893. data: type_data_name_arry2, //["合计", "总经销", "二级商", "种田大户", "农户", "化工客户", "公司员工", "其他"],
  894. axisLine: { //这是x轴文字颜色
  895. lineStyle: {
  896. color: "#FFFFFF",
  897. }
  898. },
  899. axisLabel: { //调整x轴的lable
  900. textStyle: {
  901. fontSize: 16 * getHeightScale // 让字体变大
  902. }
  903. }
  904. },
  905. yAxis: {
  906. splitLine: {    
  907. show: false  
  908. },
  909. axisLine: { //这是x轴文字颜色
  910. lineStyle: {
  911. color: "#FFFFFF",
  912. }
  913. },
  914. axisLabel: { //调整x轴的lable
  915. textStyle: {
  916. fontSize: 16 * getHeightScale // 让字体变大
  917. }
  918. }
  919. },
  920. dataZoom: [{
  921. show: false, //是否显示下方滚动条
  922. realtime: true,
  923. start: 0, //显示数据开始位置
  924. end: 150 //显示数据结束位置
  925. },
  926. {
  927. type: 'inside',
  928. realtime: true,
  929. start: 0,
  930. end: 50
  931. }
  932. ],
  933. series: [{
  934. name: '渠道类型统计',
  935. type: 'bar',
  936. barWidth: 20 * getHeightScale,
  937. data: type_data_ccc,
  938. }]
  939. });
  940. myTou.setOption({
  941. textStyle: {
  942. fontSize: 16 * getHeightScale,
  943. },
  944. tooltip: {
  945. trigger: 'item',
  946. formatter: "{a} <br/>{b} : {c} ({d}%)"
  947. },
  948. series: [{
  949. name: '渠道类型统计',
  950. type: 'pie',
  951. radius: '40%',
  952. center: ['50%', '60%'],
  953. data: type_data_ccc,
  954. type_data_name_arry2,
  955. itemStyle: {
  956. emphasis: {
  957. shadowBlur: 10 * getHeightScale,
  958. shadowOffsetX: 0,
  959. shadowColor: 'rgba(0, 0, 0, 0.5)'
  960. },
  961. normal: {
  962. color: function(params) {
  963. //自定义颜色
  964. var colorList = [
  965. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  966. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  967. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  968. ];
  969. return colorList[params.dataIndex]
  970. }
  971. }
  972. }
  973. }]
  974. });
  975. myRi1.setOption({
  976. color: ['#1852B5'],
  977. title: {
  978. text: '超期部门统计',
  979. x: 'center',
  980. textStyle: {
  981. "color": "#53FEC0",
  982. fontSize: 24 * getHeightScale,
  983. }
  984. },
  985. textStyle: {
  986. fontSize: 16 * getHeightScale,
  987. },
  988. tooltip: {},
  989. xAxis: {
  990. data: type_data_name_arry3, // ["合计", "市场管理科", "呼叫中心", "车用尿素", ""],
  991. axisLine: { //这是x轴文字颜色
  992. lineStyle: {
  993. color: "#FFFFFF",
  994. }
  995. },
  996. axisLabel: { //调整x轴的lable
  997. textStyle: {
  998. fontSize: 16 * getHeightScale // 让字体变大
  999. }
  1000. }
  1001. },
  1002. yAxis: {
  1003. splitLine: {    
  1004. show: false  
  1005. },
  1006. axisLine: { //这是x轴文字颜色
  1007. lineStyle: {
  1008. color: "#FFFFFF",
  1009. }
  1010. },
  1011. axisLabel: { //调整x轴的lable
  1012. textStyle: {
  1013. fontSize: 16 * getHeightScale // 让字体变大
  1014. }
  1015. }
  1016. },
  1017. dataZoom: [{
  1018. show: false, //是否显示下方滚动条
  1019. realtime: true,
  1020. start: 0, //显示数据开始位置
  1021. end: 50 //显示数据结束位置
  1022. },
  1023. {
  1024. type: 'inside',
  1025. realtime: true,
  1026. start: 0,
  1027. end: 50
  1028. }
  1029. ],
  1030. series: [{
  1031. name: '超期部门统计',
  1032. type: 'bar',
  1033. barWidth: 20 * getHeightScale,
  1034. data: type_data_bbb,
  1035. }]
  1036. });
  1037. myRi.setOption({
  1038. textStyle: {
  1039. fontSize: 16 * getHeightScale,
  1040. },
  1041. tooltip: {
  1042. trigger: 'item',
  1043. formatter: "{a} <br/>{b} : {c} ({d}%)"
  1044. },
  1045. series: [{
  1046. name: '超期部门统计',
  1047. type: 'pie',
  1048. radius: '40%',
  1049. center: ['50%', '60%'],
  1050. data: type_data_bbb,
  1051. type_data_name_arry3,
  1052. itemStyle: {
  1053. emphasis: {
  1054. shadowBlur: 10,
  1055. shadowOffsetX: 0,
  1056. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1057. },
  1058. normal: {
  1059. color: function(params) {
  1060. //自定义颜色
  1061. var colorList = [
  1062. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  1063. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  1064. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  1065. ];
  1066. return colorList[params.dataIndex]
  1067. }
  1068. }
  1069. }
  1070. }]
  1071. });
  1072. myEkit1.setOption({
  1073. color: ['#1852B5'],
  1074. title: {
  1075. text: '满意度统计',
  1076. x: 'center',
  1077. textStyle: {
  1078. "color": "#53FEC0",
  1079. fontSize: 24 * getHeightScale,
  1080. }
  1081. },
  1082. textStyle: {
  1083. fontSize: 16 * getHeightScale,
  1084. },
  1085. tooltip: {},
  1086. xAxis: {
  1087. data: type_data_name_arry4, //["合计", "非常满意", "满意", "一般", "不满意", ""],
  1088. axisLine: { //这是x轴文字颜色
  1089. lineStyle: {
  1090. color: "#FFFFFF",
  1091. }
  1092. },
  1093. axisLabel: { //调整x轴的lable
  1094. textStyle: {
  1095. fontSize: 16 * getHeightScale // 让字体变大
  1096. }
  1097. }
  1098. },
  1099. yAxis: {
  1100. splitLine: {    
  1101. show: false  
  1102. },
  1103. axisLine: { //这是x轴文字颜色
  1104. lineStyle: {
  1105. color: "#FFFFFF",
  1106. }
  1107. },
  1108. axisLabel: { //调整x轴的lable
  1109. textStyle: {
  1110. fontSize: 16 * getHeightScale // 让字体变大
  1111. }
  1112. }
  1113. },
  1114. dataZoom: [{
  1115. show: false, //是否显示下方滚动条
  1116. realtime: true,
  1117. start: 0, //显示数据开始位置
  1118. end: 300 //显示数据结束位置
  1119. },
  1120. {
  1121. type: 'inside',
  1122. realtime: true,
  1123. start: 0,
  1124. end: 50
  1125. }
  1126. ],
  1127. series: [{
  1128. name: '满意度统计',
  1129. type: 'bar',
  1130. barWidth: 20 * getHeightScale,
  1131. data: type_data_nnn,
  1132. }]
  1133. });
  1134. myEkit.setOption({
  1135. textStyle: {
  1136. fontSize: 16 * getHeightScale,
  1137. },
  1138. tooltip: {
  1139. trigger: 'item',
  1140. formatter: "{a} <br/>{b} : {c} ({d}%)"
  1141. },
  1142. series: [{
  1143. name: '满意度统计',
  1144. type: 'pie',
  1145. radius: '40%',
  1146. center: ['50%', '60%'],
  1147. data: type_data_nnn,
  1148. type_data_name_arry4,
  1149. itemStyle: {
  1150. emphasis: {
  1151. shadowBlur: 10,
  1152. shadowOffsetX: 0,
  1153. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1154. },
  1155. normal: {
  1156. color: function(params) {
  1157. //自定义颜色
  1158. var colorList = [
  1159. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  1160. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  1161. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  1162. ];
  1163. return colorList[params.dataIndex]
  1164. }
  1165. }
  1166. }
  1167. }]
  1168. });
  1169. myChreti1.setOption({
  1170. color: ['#1852B5'],
  1171. title: {
  1172. text: '工单总量统计',
  1173. x: 'center',
  1174. textStyle: {
  1175. "color": "#53FEC0",
  1176. fontSize: 24 * getHeightScale,
  1177. }
  1178. },
  1179. tooltip: {},
  1180. legend: {},
  1181. xAxis: [{
  1182. data: type_data_name_arry5,
  1183. axisLine: { //这是x轴文字颜色
  1184. lineStyle: {
  1185. color: "#FFFFFF",
  1186. }
  1187. },
  1188. axisLabel: { //调整x轴的lable
  1189. textStyle: {
  1190. fontSize: 16 * getHeightScale // 让字体变大
  1191. }
  1192. }
  1193. }],
  1194. yAxis: {
  1195. splitLine: {    
  1196. show: false  
  1197. },
  1198. axisLine: { //这是x轴文字颜色
  1199. lineStyle: {
  1200. color: "#FFFFFF",
  1201. }
  1202. },
  1203. axisLabel: { //调整x轴的lable
  1204. textStyle: {
  1205. fontSize: 16 * getHeightScale // 让字体变大
  1206. }
  1207. }
  1208. },
  1209. dataZoom: [{
  1210. show: false, //是否显示下方滚动条
  1211. realtime: true,
  1212. start: 0, //显示数据开始位置
  1213. end: 50 //显示数据结束位置
  1214. },
  1215. {
  1216. type: 'inside',
  1217. realtime: true,
  1218. start: 0,
  1219. end: 50
  1220. }
  1221. ],
  1222. series: [{
  1223. name: '工单总量统计',
  1224. type: 'bar',
  1225. barWidth: 20 * getHeightScale,
  1226. data: type_data_uuu,
  1227. }]
  1228. });
  1229. myChreti.setOption({
  1230. textStyle: {
  1231. fontSize: 16 * getHeightScale,
  1232. },
  1233. tooltip: {
  1234. trigger: 'item',
  1235. formatter: "{a} <br/>{b} : {c} ({d}%)"
  1236. },
  1237. series: [{
  1238. name: '工单总量统计',
  1239. type: 'pie',
  1240. radius: '40%',
  1241. center: ['50%', '60%'],
  1242. data: type_data_uuu,
  1243. type_data_name_arry5,
  1244. itemStyle: {
  1245. emphasis: {
  1246. shadowBlur: 10 * getHeightScale,
  1247. shadowOffsetX: 0,
  1248. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1249. },
  1250. normal: {
  1251. color: function(params) {
  1252. //自定义颜色
  1253. var colorList = [
  1254. '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
  1255. '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
  1256. '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
  1257. ];
  1258. return colorList[params.dataIndex]
  1259. }
  1260. }
  1261. }
  1262. }]
  1263. });
  1264. }
  1265. }
  1266. });
  1267. }
  1268. $(document).ready(function() {
  1269. DQQ($("#customer_comaddress")); //大区
  1270. XSJD($("#xiaoshou")); //销售基地
  1271. ZXCPMC($("#Product_Category")); //产品名称
  1272. ZXCPMC($("#product_name")); //三屏产品名称
  1273. QDLXX($("#customer_taxPointDes")); //渠道类型
  1274. XSJD($("#category")); //销售基地
  1275. });
  1276. //渠道类型
  1277. function QDLXX(obj) {
  1278. obj.empty();
  1279. obj.append('<option selected="selected" value="">渠道类型</option>');
  1280. $.getJSON(huayi.config.callcenter_url + "WOReport/GetDicValueListByFlag", {
  1281. // "token": $.cookie("token"),
  1282. flag: "QDLX",
  1283. }, function(data) {
  1284. if(data.state.toLowerCase() == "success") {
  1285. var content = data.data;
  1286. $(content).each(function(i, n) {
  1287. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  1288. })
  1289. }
  1290. })
  1291. }
  1292. //产品名称
  1293. function ZXCPMC(obj) {
  1294. obj.empty();
  1295. obj.append('<option selected="selected" value="">产品名称</option>');
  1296. $.getJSON(huayi.config.callcenter_url + "WOReport/GetDicValueListByFlag", {
  1297. // "token": $.cookie("token"),
  1298. flag: "CPZL",
  1299. }, function(data) {
  1300. if(data.state.toLowerCase() == "success") {
  1301. var content = data.data;
  1302. $(content).each(function(i, n) {
  1303. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  1304. })
  1305. }
  1306. })
  1307. }
  1308. //销售基地
  1309. function XSJD(obj) {
  1310. obj.empty();
  1311. obj.append('<option selected="selected" value="">基地</option>');
  1312. $.getJSON(huayi.config.callcenter_url + "WOReport/GetDicValueListByFlag", {
  1313. // "token": $.cookie("token"),
  1314. flag: "XSJD",
  1315. }, function(data) {
  1316. if(data.state.toLowerCase() == "success") {
  1317. var content = data.data;
  1318. $(content).each(function(i, n) {
  1319. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  1320. })
  1321. }
  1322. })
  1323. }
  1324. function DQQ(obj) {
  1325. obj.empty();
  1326. obj.append('<option selected="selected" value="">大区</option>');
  1327. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  1328. // "token": $.cookie("token"),
  1329. F_Layer: 1,
  1330. }, function(data) {
  1331. if(data.state.toLowerCase() == "success") {
  1332. var content = data.data;
  1333. $(content).each(function(i, n) {
  1334. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  1335. })
  1336. }
  1337. })
  1338. }
  1339. function KEFENGONG(obj) {
  1340. obj.empty();
  1341. obj.append('<option selected="selected" value="">分公司</option>');
  1342. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  1343. // "token": $.cookie("token"),
  1344. F_Layer: 2,
  1345. F_DeptName: $("#customer_comaddress").find("option:selected").text(),
  1346. }, function(data) {
  1347. if(data.state.toLowerCase() == "success") {
  1348. var content = data.data;
  1349. $(content).each(function(i, n) {
  1350. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  1351. })
  1352. }
  1353. })
  1354. }
  1355. $('#customer_comaddress').on('change', function() {
  1356. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  1357. // "token": $.cookie("token"),
  1358. F_Layer: 2,
  1359. F_DeptName: $("#customer_comaddress").find("option:selected").text(),
  1360. }, function(data) {
  1361. if(data.state.toLowerCase() == "success") {
  1362. var content = data.data;
  1363. $(content).each(function(i, n) {
  1364. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo("#customer_legalName");
  1365. })
  1366. KEFENGONG($("#customer_legalName"));
  1367. }
  1368. })
  1369. });