SXManager.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  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: '79%',//调整位置
  314. },
  315. series: [
  316. {
  317. name: '货位使用情况',
  318. type: 'pie',
  319. radius: '60%',
  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 = 10;
  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: '53%',
  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. show: true,
  614. position: 'top'
  615. },
  616. lineStyle: { // 设置线条的style等
  617. normal: {
  618. color: '#40A0FF', // 折线线条颜色:红色
  619. },
  620. },
  621. itemStyle: {
  622. normal: {
  623. label: {
  624. show: true,
  625. position: 'top'
  626. },
  627. //这里是颜色
  628. color: function (params) {
  629. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  630. var colorList = ['#40A0FF'];
  631. return colorList[params.dataIndex]
  632. }
  633. }
  634. },
  635. areaStyle: {},
  636. emphasis: {
  637. focus: 'series'
  638. },
  639. data: data.series[0].data//[78, 93, 76, 55, 68, 89, 82]
  640. },
  641. {
  642. name: '入库',
  643. type: 'line',
  644. //stack: 'Total',
  645. label: {
  646. show: true,
  647. position: 'top'
  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. show: true,
  677. position: 'top'
  678. },
  679. lineStyle: { // 设置线条的style等
  680. normal: {
  681. color: '#FF8541', // 折线线条颜色:红色
  682. },
  683. },
  684. areaStyle: {},
  685. itemStyle: {
  686. normal: {
  687. //这里是颜色
  688. color: function (params) {
  689. //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
  690. var colorList = ['#FF8541'];
  691. return colorList[params.dataIndex]
  692. }
  693. }
  694. },
  695. emphasis: {
  696. focus: 'series'
  697. },
  698. data: data.series[2].data//[8, 3, 6, 5, 8, 9, 6]
  699. }
  700. ]
  701. };
  702. option && myChart.setOption(option);
  703. }
  704. function GetMatWeightCategory(data) {
  705. var dom = document.getElementById('BomType');
  706. var myChart = echarts.init(dom, null, {
  707. renderer: 'canvas',
  708. useDirtyRect: false
  709. });
  710. var option;
  711. option = {
  712. tooltip: {
  713. trigger: 'item',
  714. position: ['20%', '50%']
  715. },
  716. legend: {
  717. data: data.map(item => item.name),
  718. orient: 'vertical',
  719. top: "15",
  720. //right: '-80%',
  721. textStyle: { color: "#000000" },//字体颜色
  722. //icon: "circle"//图例形状设置
  723. //orient: 'vertical',
  724. //right: 'right'
  725. left: '66%',//调整位置
  726. tooltip: {
  727. show: true,
  728. trigger: 'item',//鼠标移动上去展示全称
  729. },
  730. formatter: function (params) {
  731. var val = "";
  732. if (params.length > 6) {
  733. val = params.substr(0, 12) + '...';
  734. return val;
  735. } else {
  736. return params;
  737. }
  738. },
  739. },
  740. series: [
  741. {
  742. name: '物料占比',
  743. type: 'pie',
  744. radius: ['30%', '60%'],
  745. avoidLabelOverlap: false,
  746. itemStyle: {
  747. normal: {
  748. label: {
  749. show: false
  750. },
  751. labelLine: {
  752. show: false
  753. },
  754. color: function (colors) {
  755. var colorList = [
  756. '#12D8E4',
  757. '#75B1FF',
  758. '#3383FF',
  759. '#FFCD7E',
  760. '#FF8A8A',
  761. '#23B89A',
  762. '#F4BD37',
  763. '#D8E7FC',
  764. '#E46989',
  765. ];
  766. return colorList[colors.dataIndex];
  767. }
  768. }
  769. },
  770. label: {
  771. show: false,
  772. position: 'center'
  773. },
  774. emphasis: {
  775. label: {
  776. show: true,
  777. fontSize: 40,
  778. fontWeight: 'bold'
  779. }
  780. },
  781. labelLine: {
  782. show: false
  783. },
  784. data: data
  785. // [
  786. // { value: 1048, name: '出库任务' },
  787. // { value: 735, name: '入库任务' },
  788. // { value: 580, name: '移库任务' }
  789. //]
  790. }
  791. ]
  792. };
  793. if (option && typeof option === 'object') {
  794. myChart.setOption(option);
  795. }
  796. window.addEventListener('resize', myChart.resize);
  797. }
  798. function init() {
  799. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/GetTodayTaskInOutPie', function (res) {
  800. if (res.code > 0) {
  801. var datas = [];
  802. for (var i = 0; i < res.data.tasks.length; i++) {
  803. if (res.data.tasks[i].name == '出库') {
  804. $("#outtoday").text(res.data.tasks[i].value);
  805. datas.push({ value: res.data.tasks[i].value, name: "出库" });
  806. }
  807. }
  808. for (var i = 0; i < res.data.tasks.length; i++) {
  809. if (res.data.tasks[i].name == '入库') {
  810. $("#intoday").text(res.data.tasks[i].value);
  811. datas.push({ value: res.data.tasks[i].value, name: "入库" });
  812. }
  813. }
  814. for (var i = 0; i < res.data.tasks.length; i++) {
  815. if (res.data.tasks[i].name == '移库') {
  816. $("#movetoday").text(res.data.tasks[i].value);
  817. datas.push({ value: res.data.tasks[i].value, name: "移库" });
  818. }
  819. }
  820. GetTodayInOutPie({ total: res.data.total, datas: datas });
  821. }
  822. });
  823. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/Get7daysTaskBar', function (res) {
  824. if (res.code > 0) {
  825. Get7daysTaskBar(res.data);
  826. }
  827. });
  828. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/GettodaysHourTask', function (res) {
  829. if (res.code > 0) {
  830. GettodaysHourTask(res.data);
  831. }
  832. });
  833. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/Report/GetLocationUsageReportList?queryJson=%7B%7D', function (res) {
  834. if (res.code > 0) {
  835. var datas = [];
  836. var WarehouseCellPie = [];
  837. for (var i = 0; i < res.data.length; i++) {
  838. if (res.data[i].Tunnel == '1') {
  839. datas.push({ tunnel: res.data[i].Floor + "层 一巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  840. } else if (res.data[i].Tunnel == '2') {
  841. datas.push({ tunnel: res.data[i].Floor + "层 二巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  842. } else if (res.data[i].Tunnel == '3') {
  843. datas.push({ tunnel: res.data[i].Floor + "层 三巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  844. }
  845. else if (res.data[i].Tunnel == '4') {
  846. datas.push({ tunnel: res.data[i].Floor + "层 四巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  847. } else if (res.data[i].Tunnel == '5') {
  848. datas.push({ tunnel: res.data[i].Floor + "层 五巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  849. } else if (res.data[i].Tunnel == '6') {
  850. datas.push({ tunnel: res.data[i].Floor + "层 六巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  851. } else if (res.data[i].Tunnel == '7') {
  852. datas.push({ tunnel: res.data[i].Floor + "层 七巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  853. } else if (res.data[i].Tunnel == '8') {
  854. datas.push({ tunnel: res.data[i].Floor + "层 八巷道" , qty: res.data[i].MaterilLocation, total: res.data[i].AllLocationTotal });
  855. } else if (res.data[i].Tunnel == '') {
  856. WarehouseCellPie.push({ value: res.data[i].MaterilLocation, name: '已使用' });
  857. WarehouseCellPie.push({ value: res.data[i].SpareLocation, name: '空闲' });
  858. WarehouseCellPie.push({ value: res.data[i].StopLocation, name: '禁用' });
  859. WarehouseCellPie.push({ value: res.data[i].LockLocation, name: '锁定' });
  860. }
  861. }
  862. //var data = [{ "qty": 16, "total": 1732 }, { "qty": 787, "total": 1732 }, { "qty": 841, "total": 1700 }];
  863. GetTunnelWarehouseCellBar(datas);
  864. GetWarehouseCellPie(WarehouseCellPie);
  865. }
  866. });
  867. top.learun.httpAsyncGet(top.$.rootUrl + '/' + Tenant + '/AdminDesktopHome/GetMatWeightCategory', function (res) {
  868. if (res.code > 0) {
  869. GetMatWeightCategory(res.data);
  870. }
  871. });
  872. }
  873. init();
  874. });