PTManager.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. //var bootstrap = function ($, learun) {
  2. $(function () {
  3. "use strict";
  4. function GetTodayInOutPie(data) {
  5. var dom = document.getElementById('todayinoutpie');
  6. var myChart = echarts.init(dom, null, {
  7. renderer: 'canvas',
  8. useDirtyRect: false
  9. });
  10. var app = {};
  11. var option;
  12. option = {
  13. title: {
  14. text: data.total,
  15. textStyle: {
  16. color: '#1C3554',
  17. },
  18. subtext: '今日任务总数',
  19. subtextStyle: {
  20. color: '#5A5E66',
  21. },
  22. left: 'center',
  23. top: '37%'
  24. },
  25. tooltip: {
  26. trigger: 'item'
  27. },
  28. legend: {
  29. top: '1%',
  30. left: 'center'
  31. },
  32. series: [
  33. {
  34. name: '出入库统计',
  35. type: 'pie',
  36. radius: ['40%', '70%'],
  37. avoidLabelOverlap: false,
  38. itemStyle: {
  39. normal: {
  40. label: {
  41. show: false
  42. },
  43. labelLine: {
  44. show: false
  45. },
  46. color: function (colors) {
  47. var colorList = [
  48. '#40A0FF',
  49. '#F7CA4D',
  50. '#23B89A',
  51. '#40A0FF',
  52. '#F7CA4D',
  53. '#23B89A'
  54. ];
  55. return colorList[colors.dataIndex];
  56. }
  57. }
  58. },
  59. label: {
  60. show: false,
  61. position: 'center'
  62. },
  63. emphasis: {
  64. label: {
  65. show: true,
  66. fontSize: 40,
  67. fontWeight: 'bold'
  68. }
  69. },
  70. labelLine: {
  71. show: false
  72. },
  73. data: data.datas
  74. //[
  75. //{ value: 1048, name: '出库任务' },
  76. //{ value: 735, name: '入库任务' },
  77. //{ value: 580, name: '移库任务' }
  78. //]
  79. }
  80. ]
  81. };
  82. if (option && typeof option === 'object') {
  83. myChart.setOption(option);
  84. }
  85. window.addEventListener('resize', myChart.resize);
  86. //var chartDom = document.getElementById('todayinoutpie');
  87. //var myChart = echarts.init(chartDom);
  88. //var option;
  89. //option = {
  90. // tooltip: {
  91. // trigger: 'item'
  92. // },
  93. // legend: {
  94. // top: '5%',
  95. // left: 'center'
  96. // },
  97. // series: [
  98. // {
  99. // name: 'Access From',
  100. // type: 'pie',
  101. // radius: ['40%', '70%'],
  102. // avoidLabelOverlap: false,
  103. // itemStyle: {
  104. // borderRadius: 10,
  105. // borderColor: '#fff',
  106. // borderWidth: 2
  107. // },
  108. // label: {
  109. // show: false,
  110. // position: 'center'
  111. // },
  112. // emphasis: {
  113. // label: {
  114. // show: true,
  115. // fontSize: 40,
  116. // fontWeight: 'bold'
  117. // }
  118. // },
  119. // labelLine: {
  120. // show: false
  121. // },
  122. // data: [
  123. // { value: 1048, name: 'Search Engine' },
  124. // { value: 735, name: 'Direct' },
  125. // { value: 580, name: 'Email' },
  126. // { value: 484, name: 'Union Ads' },
  127. // { value: 300, name: 'Video Ads' }
  128. // ]
  129. // }
  130. // ]
  131. //};
  132. //option && myChart.setOption(option);
  133. }
  134. function Get7daysTaskBar(data) {
  135. var dom = document.getElementById('sevendaysTask');
  136. var myChart = echarts.init(dom, null, {
  137. renderer: 'canvas',
  138. useDirtyRect: false
  139. });
  140. var app = {};
  141. var option;
  142. const labelOption = {
  143. show: true,
  144. position: 'insideBottom',
  145. distance: 15,
  146. align: 'left',
  147. verticalAlign: 'middle',
  148. rotate: 90,
  149. formatter: '{c} {name|{a}}',
  150. fontSize: 16,
  151. rich: {
  152. name: {}
  153. }
  154. };
  155. option = {
  156. tooltip: {
  157. trigger: 'axis',
  158. axisPointer: {
  159. type: 'cross',
  160. crossStyle: {
  161. color: '#999'
  162. }
  163. }
  164. },
  165. color: ['#40A0FF', '#23B89A', '#FF8541'],
  166. //tooltip: {
  167. // trigger: 'axis',
  168. // axisPointer: {
  169. // type: 'shadow'
  170. // }
  171. //},
  172. legend: {
  173. left: '57%',//调整位置
  174. data: ['出库', '入库', '移动']
  175. },
  176. xAxis: [
  177. {
  178. type: 'category',
  179. axisTick: { show: false },
  180. data: data.xAxis,// ['5-10', '5-11', '5-12', '5-13', '5-14', '5-15', '5-16'],
  181. }
  182. ],
  183. yAxis: [
  184. {
  185. /* interval: 50,*/
  186. axisLabel: {
  187. formatter: '{value}'
  188. },
  189. type: 'value'
  190. }
  191. ],
  192. series: [
  193. {
  194. name: '出库',
  195. type: 'bar',
  196. //label: labelOption,
  197. emphasis: {
  198. focus: 'series'
  199. },
  200. lineStyle: { // 设置线条的style等
  201. normal: {
  202. color: '#40A0FF', // 折线线条颜色:红色
  203. },
  204. },
  205. itemStyle: {
  206. normal: {
  207. label: {
  208. show: true,
  209. position:'top',
  210. },
  211. //这里是颜色
  212. color: function (params) {
  213. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  214. var colorList = ['#40A0FF'];
  215. return colorList[params.dataIndex]
  216. }
  217. }, // 移入当前的柱状图时改变颜色
  218. emphasis: {
  219. color: '#40A0FF',
  220. }
  221. },
  222. data: data.series[0].data//[22, 18, 19, 34, 29]
  223. },
  224. {
  225. name: '入库',
  226. type: 'bar',
  227. barGap: 0,
  228. //label: labelOption,
  229. emphasis: {
  230. focus: 'series'
  231. },
  232. lineStyle: { // 设置线条的style等
  233. normal: {
  234. color: '#23B89A', // 折线线条颜色:红色
  235. },
  236. },
  237. itemStyle: {
  238. normal: {
  239. label: {
  240. show: true,
  241. position: 'top',
  242. },
  243. //这里是颜色
  244. color: function (params) {
  245. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  246. var colorList = ['#23B89A'];
  247. return colorList[params.dataIndex]
  248. }
  249. },
  250. emphasis: {
  251. color: '#23B89A',
  252. }
  253. },
  254. data: data.series[1].data//[32, 32, 30, 34, 39]
  255. },
  256. {
  257. name: '移动',
  258. type: 'bar',
  259. //label: labelOption,
  260. emphasis: {
  261. focus: 'series'
  262. },
  263. lineStyle: { // 设置线条的style等
  264. normal: {
  265. color: '#FF8541', // 折线线条颜色:红色
  266. },
  267. },
  268. itemStyle: {
  269. normal: {
  270. label: {
  271. show: true,
  272. position: 'top',
  273. },
  274. //这里是颜色
  275. color: function (params) {
  276. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  277. var colorList = ['#FF8541'];
  278. return colorList[params.dataIndex]
  279. }
  280. },
  281. emphasis: {
  282. color: '#FF8541',
  283. }
  284. },
  285. data: data.series[2].data// [15, 23, 21, 15, 19]
  286. }
  287. ]
  288. };
  289. if (option && typeof option === 'object') {
  290. myChart.setOption(option);
  291. }
  292. }
  293. function GetWarehouseCellPie(data) {
  294. var chartDom = document.getElementById('WarehouseCell');
  295. var myChart = echarts.init(chartDom);
  296. var option;
  297. option = {
  298. tooltip: {
  299. trigger: 'item'
  300. },
  301. legend: {
  302. data: ['已使用', '空闲', '禁用', '锁定'],
  303. //orient: 'vertical',
  304. orient: 'horizontal',
  305. bottom: '-5',
  306. // left: 'center',
  307. // top: "50",
  308. //right: '-80%',
  309. textStyle: { color: "#000000" },//字体颜色
  310. //icon: "circle"//图例形状设置
  311. //orient: 'vertical',
  312. //right: 'right'
  313. //left: '77%',//调整位置
  314. },
  315. series: [
  316. {
  317. name: '货位使用情况',
  318. type: 'pie',
  319. radius: '70%',
  320. data: data
  321. //[{ value: 1048, name: '已使用' },
  322. //{ value: 735, name: '空闲' },
  323. //{ value: 580, name: '禁用' },
  324. //{ value: 484, name: '不可使用' }]
  325. , itemStyle: {
  326. normal: {
  327. label: {
  328. show: true,
  329. formatter: '{b}:{c}({d}%)'
  330. },
  331. labelLine: {
  332. show: true
  333. },
  334. color: function (colors) {
  335. var colorList = [
  336. '#F4BD37', '#23B89A',
  337. '#D8E7FC',
  338. '#E46989',
  339. ];
  340. return colorList[colors.dataIndex];
  341. }
  342. }
  343. },
  344. label: {
  345. show: false,
  346. position: 'center'
  347. },
  348. emphasis: {
  349. label: {
  350. show: true,
  351. fontSize: 40,
  352. fontWeight: 'bold'
  353. },
  354. itemStyle: {
  355. shadowBlur: 10,
  356. shadowOffsetX: 0,
  357. shadowColor: 'rgba(0, 0, 0, 0.5)'
  358. }
  359. },
  360. labelLine: {
  361. show: false
  362. }
  363. }
  364. ]
  365. };
  366. option && myChart.setOption(option);
  367. }
  368. function GetTunnelWarehouseCellBar(data) {
  369. var dom = document.getElementById('TunnelWarehouseCell');
  370. var myChart = echarts.init(dom, null, {
  371. renderer: 'canvas',
  372. useDirtyRect: false
  373. });
  374. var app = {};
  375. var option;
  376. //https://blog.csdn.net/fu983531588/article/details/121338767
  377. //Echarts绘制横向柱状图(圆角+渐变) https://blog.csdn.net/weixin_43953710/article/details/106694317
  378. //https://blog.csdn.net/lilycheng1986/article/details/121853940
  379. //var data = [{ "qty": 16, "total": 1732 }, { "qty": 787, "total": 1732 }, { "qty": 841, "total": 1700 }];
  380. var barWidth = 20;
  381. //option = {
  382. // grid: {
  383. // top: '5%',
  384. // left: '25%',
  385. // right: '25%',
  386. // bottom: '0%',
  387. // containLabel: true // 显示范围包含坐标刻度
  388. // },
  389. // //grid: {
  390. // // top: '10px',
  391. // // left: '120px',
  392. // // bottom: '30px',
  393. // //},
  394. // xAxis: {
  395. // show: false
  396. // },
  397. // yAxis: {
  398. // type: 'category',
  399. // inverse: true, // 倒叙
  400. // axisLabel: {
  401. // margin: 0,
  402. // align: 'left',
  403. // formatter: (val) => {
  404. // return `${val}`;
  405. // }
  406. // },
  407. // axisLine: {
  408. // show: false // 轴线
  409. // },
  410. // axisTick: {
  411. // show: false // 刻度线
  412. // },
  413. // data: ['栏目1', '栏目2', '栏目3']
  414. // },
  415. // series: [
  416. // {
  417. // type: 'bar',
  418. // showBackground: true,
  419. // barWidth: 10,
  420. // barMaxWidth: 20,
  421. // barMinWidth: 5,
  422. // label: {
  423. // show: true,
  424. // position: 'left',
  425. // offset: [100, 0],
  426. // valueAnimation: true,
  427. // fontFamily: 'monospace',
  428. // fontSize: 12,
  429. // textStyle: {
  430. // //数值样式
  431. // color: "#1C3554",
  432. // fontSize: 12
  433. // },
  434. // formatter: function (params) {
  435. // return params.data.realValue + '/' + params.data.value;
  436. // },
  437. // // distance: -22
  438. // },
  439. // itemStyle: {
  440. // normal: {
  441. // barBorderRadius: [0, 20, 20, 0], //设置圆角方向[上,右,下,左]
  442. // //这里是颜色
  443. // color: function (params) {
  444. // //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  445. // var colorList = ['#40A0FF'];
  446. // return colorList[params.dataIndex]
  447. // }
  448. // }
  449. // },
  450. // data: data.map(function (item) {
  451. // return {
  452. // realValue: item.qty,
  453. // value: item.total,
  454. // };
  455. // }),
  456. // }
  457. // ]
  458. //};
  459. option = {
  460. //backgroundColor: 'black',
  461. grid: {
  462. top: '15%',
  463. left: '25%',
  464. right: '25%',
  465. bottom: '0%',
  466. containLabel: true // 显示范围包含坐标刻度
  467. },
  468. xAxis: {
  469. show: false,
  470. },
  471. yAxis: {
  472. data: data.map(item => item.tunnel ),
  473. inverse: true,
  474. splitLine: {
  475. show: false,
  476. },
  477. axisLabel: {
  478. textStyle: { fontSize: '80%', color: '#5A5E66' },
  479. },
  480. axisLine: {
  481. show: false,
  482. },
  483. axisTick: false,
  484. },
  485. series: [
  486. {
  487. type: 'bar',
  488. barWidth: barWidth,
  489. barGap: '5%',
  490. barCategoryGap: '5%',/*多个并排柱子设置柱子之间的间距*/
  491. zlevel: 2,
  492. data: data.map(function (item) {
  493. return {
  494. value: item.qty
  495. };
  496. }),
  497. itemStyle: {
  498. normal: {
  499. barBorderRadius: [0, 20, 20, 0], //设置圆角方向[上,右,下,左]
  500. //这里是颜色
  501. color: function (params) {
  502. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  503. var colorList = ['#40A0FF'];
  504. return colorList[params.dataIndex]
  505. }
  506. }
  507. }
  508. },
  509. {
  510. type: 'bar',
  511. barWidth: barWidth,
  512. distance: 15,// 标签距离柱条的距离
  513. barGap: '-100%',
  514. barCategoryGap: '5%',/*多个并排柱子设置柱子之间的间距*/
  515. data: data.map(function (item) {
  516. return {
  517. value: item.total,
  518. realValue: item.qty,
  519. total: item.total,
  520. };
  521. }),
  522. label: {
  523. normal: {
  524. show: true,
  525. precision: 1,
  526. position: 'right',
  527. offset: [10, 0],
  528. valueAnimation: true,
  529. fontFamily: 'monospace',
  530. fontSize: 12,
  531. textStyle: {
  532. //数值样式
  533. color: "#1C3554",
  534. fontSize: 12
  535. },
  536. formatter: function (params) {
  537. return params.data.realValue + '/' + params.data.total;
  538. },
  539. }
  540. },
  541. itemStyle: {
  542. borderRadius: [0, 20, 20, 0],
  543. normal: {
  544. barBorderRadius: [0, 20, 20, 0], //设置圆角方向[上,右,下,左]
  545. //这里是颜色
  546. color: function (params) {
  547. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  548. var colorList = ['#E1E5E8'];
  549. return colorList[params.dataIndex]
  550. }
  551. }, // 移入当前的柱状图时改变颜色
  552. }
  553. },
  554. ],
  555. };
  556. if (option && typeof option === 'object') {
  557. myChart.setOption(option);
  558. }
  559. window.addEventListener('resize', myChart.resize);
  560. }
  561. function GettodaysHourTask(data) {
  562. var chartDom = document.getElementById('todaysHourTask');
  563. var myChart = echarts.init(chartDom, null, {
  564. renderer: 'canvas',
  565. useDirtyRect: false
  566. });
  567. var option;
  568. option = {
  569. tooltip: {
  570. trigger: 'axis',
  571. axisPointer: {
  572. type: 'cross',
  573. label: {
  574. backgroundColor: '#6a7985'
  575. }
  576. }
  577. },
  578. legend: {
  579. left: '57%',//调整位置
  580. top: '30',
  581. data: ['出库', '入库', '移动']
  582. },
  583. grid: {
  584. left: '3%',
  585. right: '4%',
  586. bottom: '1%',
  587. containLabel: true
  588. },
  589. xAxis: [
  590. {
  591. //type: 'category',
  592. boundaryGap: false,
  593. data: data.xAxis,//['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
  594. }
  595. ],
  596. yAxis: [
  597. {
  598. axisLabel: {
  599. formatter: '{value}'
  600. },
  601. axisLine: {
  602. show: true
  603. },
  604. type: 'value'
  605. }
  606. ],
  607. series: [
  608. {
  609. name: '出库',
  610. type: 'line',
  611. //stack: 'Total',
  612. //label: {
  613. // normal: {
  614. // show: true,
  615. // //position: 'top'
  616. // }
  617. //},
  618. lineStyle: { // 设置线条的style等
  619. normal: {
  620. color: '#40A0FF', // 折线线条颜色:红色
  621. },
  622. },
  623. itemStyle: {
  624. normal: {
  625. //这里是颜色
  626. color: function (params) {
  627. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  628. var colorList = ['#40A0FF'];
  629. return colorList[params.dataIndex]
  630. }
  631. }
  632. },
  633. areaStyle: {},
  634. emphasis: {
  635. focus: 'series'
  636. },
  637. data: data.series[0].data//[78, 93, 76, 55, 68, 89, 82]
  638. },
  639. {
  640. name: '入库',
  641. type: 'line',
  642. //stack: 'Total',
  643. //label: {
  644. // normal: {
  645. // show: true,
  646. // //position: 'top'
  647. // }
  648. //},
  649. areaStyle: {},
  650. lineStyle: { // 设置线条的style等
  651. normal: {
  652. color: '#23B89A', // 折线线条颜色:红色
  653. },
  654. },
  655. itemStyle: {
  656. normal: {
  657. //这里是颜色
  658. color: function (params) {
  659. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  660. var colorList = ['#23B89A'];
  661. return colorList[params.dataIndex]
  662. }
  663. }
  664. },
  665. emphasis: {
  666. focus: 'series'
  667. },
  668. data: data.series[1].data//[38, 23, 36, 45, 58, 59, 62]
  669. }
  670. ,
  671. {
  672. name: '移动',
  673. type: 'line',
  674. //stack: 'Total',
  675. //label: {
  676. // normal: {
  677. // show: true,
  678. // //position: 'top'
  679. // }
  680. //},
  681. lineStyle: { // 设置线条的style等
  682. normal: {
  683. color: '#FF8541', // 折线线条颜色:红色
  684. },
  685. },
  686. areaStyle: {},
  687. itemStyle: {
  688. normal: {
  689. //这里是颜色
  690. color: function (params) {
  691. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  692. var colorList = ['#FF8541'];
  693. return colorList[params.dataIndex]
  694. }
  695. }
  696. },
  697. emphasis: {
  698. focus: 'series'
  699. },
  700. data: data.series[2].data//[8, 3, 6, 5, 8, 9, 6]
  701. }
  702. ]
  703. };
  704. option && myChart.setOption(option);
  705. }
  706. function GetMatWeightCategory(data) {
  707. var dom = document.getElementById('BomType');
  708. var myChart = echarts.init(dom, null, {
  709. renderer: 'canvas',
  710. useDirtyRect: false
  711. });
  712. var option;
  713. option = {
  714. tooltip: {
  715. trigger: 'item',
  716. position: ['20%', '50%']
  717. },
  718. legend: {
  719. data: data.map(item => item.name),
  720. orient: 'vertical',
  721. top: "15",
  722. //right: '-80%',
  723. textStyle: { color: "#000000" },//字体颜色
  724. //icon: "circle"//图例形状设置
  725. //orient: 'vertical',
  726. //right: 'right'
  727. left: '66%',//调整位置
  728. tooltip: {
  729. show: true,
  730. trigger: 'item',//鼠标移动上去展示全称
  731. },
  732. formatter: function (params) {
  733. var val = "";
  734. if (!!params && params.length > 6) {
  735. val = params.substr(0, 12) + '...';
  736. return val;
  737. } else {
  738. return params;
  739. }
  740. },
  741. },
  742. series: [
  743. {
  744. name: '物料占比',
  745. type: 'pie',
  746. radius: ['30%', '60%'],
  747. avoidLabelOverlap: false,
  748. itemStyle: {
  749. normal: {
  750. label: {
  751. show: false
  752. },
  753. labelLine: {
  754. show: false
  755. },
  756. color: function (colors) {
  757. var colorList = [
  758. '#12D8E4',
  759. '#75B1FF',
  760. '#3383FF',
  761. '#FFCD7E',
  762. '#FF8A8A',
  763. '#23B89A',
  764. '#F4BD37',
  765. '#D8E7FC',
  766. '#E46989',
  767. ];
  768. return colorList[colors.dataIndex];
  769. }
  770. }
  771. },
  772. label: {
  773. show: false,
  774. position: 'center'
  775. },
  776. emphasis: {
  777. label: {
  778. show: true,
  779. fontSize: 40,
  780. fontWeight: 'bold'
  781. }
  782. },
  783. labelLine: {
  784. show: false
  785. },
  786. data: data
  787. // [
  788. // { value: 1048, name: '出库任务' },
  789. // { value: 735, name: '入库任务' },
  790. // { value: 580, name: '移库任务' }
  791. //]
  792. }
  793. ]
  794. };
  795. if (option && typeof option === 'object') {
  796. myChart.setOption(option);
  797. }
  798. window.addEventListener('resize', myChart.resize);
  799. }
  800. function init() {
  801. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/GetTodayTaskInOutPie', function (res) {
  802. if (res.code > 0) {
  803. var datas = [];
  804. for (var i = 0; i < res.data.tasks.length; i++) {
  805. if (res.data.tasks[i].name == '出库') {
  806. $("#outtoday").text(res.data.tasks[i].value);
  807. datas.push({ value: res.data.tasks[i].value, name: "出库" });
  808. }
  809. }
  810. for (var i = 0; i < res.data.tasks.length; i++) {
  811. if (res.data.tasks[i].name == '入库') {
  812. $("#intoday").text(res.data.tasks[i].value);
  813. datas.push({ value: res.data.tasks[i].value, name: "入库" });
  814. }
  815. }
  816. for (var i = 0; i < res.data.tasks.length; i++) {
  817. if (res.data.tasks[i].name == '输送') {
  818. $("#movetoday").text(res.data.tasks[i].value);
  819. datas.push({ value: res.data.tasks[i].value, name: "移动" });
  820. }
  821. }
  822. GetTodayInOutPie({ total: res.data.total, datas: datas });
  823. }
  824. });
  825. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/Get7daysTaskBar', function (res) {
  826. if (res.code > 0) {
  827. Get7daysTaskBar(res.data);
  828. }
  829. });
  830. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/GettodaysHourTask', function (res) {
  831. if (res.code > 0) {
  832. GettodaysHourTask(res.data);
  833. }
  834. });
  835. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/Report/GetLocationUsageReportList?queryJson=%7B%7D', function (res) {
  836. if (res.code > 0) {
  837. var datas = [];
  838. var WarehouseCellPie = [];
  839. for (var i = 0; i < res.data.length; i++) {
  840. if (res.data[i].Tunnel == '1') {
  841. datas.push({ tunnel: "一巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  842. } else if (res.data[i].Tunnel == '2') {
  843. datas.push({ tunnel: "二巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  844. } else if (res.data[i].Tunnel == '3') {
  845. datas.push({ tunnel: "三巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  846. } else if (res.data[i].Tunnel == '4') {
  847. datas.push({ tunnel: "四巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  848. } else if (res.data[i].Tunnel == '5') {
  849. datas.push({ tunnel: "五巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  850. } else if (res.data[i].Tunnel == '6') {
  851. datas.push({ tunnel: "六巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  852. } else if (res.data[i].Tunnel == '7') {
  853. datas.push({ tunnel: "七巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  854. } else if (res.data[i].Tunnel == '8') {
  855. datas.push({ tunnel: "八巷道", qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  856. } else if (res.data[i].Tunnel == '') {
  857. WarehouseCellPie.push({ value: res.data[i].MaterilLocation, name: '已使用' });
  858. WarehouseCellPie.push({ value: res.data[i].SpareLocation, name: '空闲' });
  859. WarehouseCellPie.push({ value: res.data[i].StopLocation, name: '禁用' });
  860. WarehouseCellPie.push({ value: res.data[i].LockLocation, name: '锁定' });
  861. }
  862. }
  863. //var data = [{ "qty": 16, "total": 1732 }, { "qty": 787, "total": 1732 }, { "qty": 841, "total": 1700 }];
  864. GetTunnelWarehouseCellBar(datas);
  865. GetWarehouseCellPie(WarehouseCellPie);
  866. }
  867. });
  868. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/GetMatWeightCategory', function (res) {
  869. if (res.code > 0) {
  870. GetMatWeightCategory(res.data);
  871. }
  872. });
  873. }
  874. init();
  875. });