report.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. <template>
  2. <view class="content">
  3. <view class="content1">
  4. <u-navbar back-text="" title="数据统计" :border-bottom='false' :background="background" back-icon-color='white'
  5. title-color='white'>
  6. </u-navbar>
  7. <view class="row2">
  8. <!-- <view class="left" @click="dateClick">
  9. {{nowDate}}
  10. <u-icon name="arrow-down-fill" size="16" class="icon"></u-icon>
  11. </view> -->
  12. <!-- <view class="left">
  13. <div :class="btnIndex==1?'activeBtn':''" @click="selectData(1)" class="type-style">新季</div>
  14. <div :class="btnIndex==2?'activeBtn':''" @click="selectData(2)" class="type-style">历史</div>
  15. </view> -->
  16. <view class="right">
  17. <div :class="btnIndex==1?'activeBtn':''" @click="selectData(1)" class="btn-style">新季</div>
  18. <div :class="btnIndex==2?'activeBtn':''" @click="selectData(2)" class="btn-style">历史</div>
  19. <view :class="typeSelect==index?'type-bgc':''" class="type-style" v-for="(item,index) in moneyList"
  20. @click="typeClick(index)">
  21. {{item.name}}
  22. </view>
  23. </view>
  24. </view>
  25. <view class="row3">
  26. <view class="title">
  27. {{moneyList[typeSelect].name}}
  28. </view>
  29. <view class="number">
  30. {{moneyList[typeSelect].count}}元
  31. </view>
  32. </view>
  33. </view>
  34. <view class="move-content">
  35. <view class="content2 content-wrap">
  36. <view class="row1">
  37. <view class="left title">
  38. 合同完成进度
  39. </view>
  40. <view class="right">
  41. <view class="item" :class="contractSelect=='0'?'item-Select':''" @click="htClick(0)">采购</view>
  42. <view class="item" :class="contractSelect=='1'?'item-Select':''" @click="htClick(1)">销售</view>
  43. </view>
  44. </view>
  45. <u-line color="#EEEEEE" class="u-line" />
  46. <view class="row2" @click="goToPage(1)">
  47. <view class="top">
  48. 合同总量
  49. </view>
  50. <view class="bottom">
  51. <view class="left">
  52. <image src="../../static/img/report/hetongzongliang.png" mode=""></image>
  53. </view>
  54. <view class="right" v-if="contractSelect=='0'">
  55. <view class="top">
  56. <view class="left">
  57. 已完成量
  58. <view class="number">{{dataObj3.percentage}}</view>
  59. </view>
  60. <view class="right-number">{{dataObj3.total}}吨</view>
  61. </view>
  62. <view class="bottom">
  63. <u-line-progress height="12" active-color="#22C572" :show-percent="false"
  64. :striped="true" :percent="dataObj3.percent" :striped-active="true">
  65. </u-line-progress>
  66. </view>
  67. </view>
  68. <view class="right" v-if="contractSelect=='1'">
  69. <view class="top">
  70. <view class="left">
  71. 已完成量
  72. <view class="number">{{dataObj0.percentage}}</view>
  73. </view>
  74. <view class="right-number">{{dataObj0.total}}吨</view>
  75. </view>
  76. <view class="bottom">
  77. <u-line-progress height="12" active-color="#22C572" :show-percent="false"
  78. :striped="true" :percent="dataObj0.percent" :striped-active="true">
  79. </u-line-progress>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="row3" @click="goToPage(2)">
  85. <view class="top">
  86. 开票情况
  87. </view>
  88. <view class="bottom">
  89. <view class="left">
  90. <image src="../../static/img/report/kaipiao.png" mode=""></image>
  91. </view>
  92. <view class="right" v-if="contractSelect=='0'">
  93. <view class="top">
  94. <view class="left">
  95. 已开票
  96. <view class="number">{{dataObj4.percentage}}</view>
  97. </view>
  98. <view class="right-number">¥{{dataObj4.total}}</view>
  99. </view>
  100. <view class="bottom">
  101. <u-line-progress height="12" active-color="#FD714F" :show-percent="false"
  102. :striped="true" :percent="dataObj4.percent" :striped-active="true">
  103. </u-line-progress>
  104. </view>
  105. </view>
  106. <view class="right" v-if="contractSelect=='1'">
  107. <view class="top">
  108. <view class="left">
  109. 已开票
  110. <view class="number">{{dataObj1.percentage}}</view>
  111. </view>
  112. <view class="right-number">¥{{dataObj1.total}}</view>
  113. </view>
  114. <view class="bottom">
  115. <u-line-progress height="12" active-color="#FD714F" :show-percent="false"
  116. :striped="true" :percent="dataObj1.percent" :striped-active="true">
  117. </u-line-progress>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <view class="row4" @click="goToPage(3)">
  123. <view class="top">
  124. 结算情况
  125. </view>
  126. <view class="bottom">
  127. <view class="left">
  128. <image src="../../static/img/report/hetongzongliang.png" mode=""></image>
  129. </view>
  130. <view class="right" v-if="contractSelect=='0'">
  131. <view class="top">
  132. <view class="left">
  133. 已结算
  134. <view class="number">{{dataObj5.percentage}}</view>
  135. </view>
  136. <view class="right-number">¥{{dataObj5.total}}</view>
  137. </view>
  138. <view class="bottom">
  139. <u-line-progress height="12" active-color="#5C75DF" :show-percent="false"
  140. :striped="true" :percent="dataObj5.percent" :striped-active="true">
  141. </u-line-progress>
  142. </view>
  143. </view>
  144. <view class="right" v-if="contractSelect=='1'">
  145. <view class="top">
  146. <view class="left">
  147. 已结算
  148. <view class="number">{{dataObj2.percentage}}</view>
  149. </view>
  150. <view class="right-number">¥{{dataObj2.total}}</view>
  151. </view>
  152. <view class="bottom">
  153. <u-line-progress height="12" active-color="#5C75DF" :show-percent="false"
  154. :striped="true" :percent="dataObj2.percent" :striped-active="true">
  155. </u-line-progress>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. <view class="content5 content-wrap" @click="goToPage(5)">
  162. <view class="title">库存头寸(吨)</view>
  163. <u-line color="#EEEEEE" class="u-line" />
  164. <view class="row1">
  165. <view class="left">
  166. <image src="../../static/img/report/kuncunliang.png" mode=""></image>
  167. <view class="text">
  168. 实际存量
  169. </view>
  170. </view>
  171. <view class="right">
  172. {{inventoryAct}}
  173. </view>
  174. </view>
  175. <view class="row2">
  176. <view class="left">
  177. <image src="../../static/img/report/jiazhi.png" mode=""></image>
  178. <view class="text">
  179. 采购待执行
  180. </view>
  181. </view>
  182. <view class="right">
  183. {{inventoryBuy}}
  184. </view>
  185. </view>
  186. <view class="row2">
  187. <view class="left">
  188. <image src="../../static/img/report/jiazhi.png" mode=""></image>
  189. <view class="text">
  190. 销售待执行
  191. </view>
  192. </view>
  193. <view class="right">
  194. {{inventorySale}}
  195. </view>
  196. </view>
  197. <view class="row2">
  198. <view class="left">
  199. <image src="../../static/img/report/jiazhi.png" mode=""></image>
  200. <view class="text">
  201. 头寸
  202. </view>
  203. </view>
  204. <view class="right">
  205. {{inventoryTC}}
  206. </view>
  207. </view>
  208. </view>
  209. <view class="content3 content-wrap">
  210. <view class="title" @click="goToPage(4)">粮食品种占比</view>
  211. <u-line color="#EEEEEE" class="u-line" />
  212. <qiun-data-charts type="line" class='line-chart' :chartData="chartData" :opts='zringoptions'
  213. background="none" :ontouch="true" />
  214. </view>
  215. <view class="content4 content-wrap">
  216. <view class="title">在途信息统计表</view>
  217. <u-line color="#EEEEEE" class="u-line" />
  218. <qiun-data-charts type="column" class='line-chart' :chartData="carChartData" :opts='ringoptions'
  219. background="none" />
  220. </view>
  221. <!-- <view class="content6 content-wrap">
  222. <view class="title">库点流向分布</view>
  223. <u-line color="#EEEEEE" class="u-line" />
  224. <iframe class='map' :src='url'></iframe>
  225. </view> -->
  226. <!-- <view class="content7">
  227. <maoScroll :data="ztList" :showNum="showNum" :lineHeight="lineHeight" :animationScroll="animationScroll"
  228. :animation="animation">
  229. <template v-slot="{line}">
  230. <view class="row1">
  231. <view class="zt">
  232. <view class="point"></view>在途
  233. </view>
  234. <view>{{line.startName}}</view>
  235. <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt="">
  236. <view class="">
  237. {{line.endName}}
  238. </view>
  239. </view>
  240. </template>
  241. </maoScroll>
  242. </view> -->
  243. <!-- <view class="content7">
  244. <view ref='scroll' class='scroll' :style="{'top':'-'+scrollTop+'px'}">
  245. <view class="row1" v-for="(item,index) in ztList">
  246. <view class="zt">
  247. <view class="point"></view>在途
  248. </view>
  249. <view>{{item.startName}}</view>
  250. <view class="">
  251. {{item.endName}}
  252. </view>
  253. </view>
  254. </view>
  255. </view> -->
  256. </view>
  257. <u-select v-model="showDate" mode="mutil-column" confirm-color='#22C572' :list="dateList" @confirm="confirm">
  258. </u-select>
  259. </view>
  260. </template>
  261. <script>
  262. import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
  263. export default {
  264. components: {
  265. maoScroll
  266. },
  267. data() {
  268. return {
  269. btnIndex:1,
  270. scrollTop: 0,
  271. carInterval: null,
  272. inventoryAct: 0,
  273. inventoryBuy: 0,
  274. inventorySale: 0,
  275. inventoryTC: 0,
  276. contractSelect: '0',
  277. url: '',
  278. nowDate: '2022年1月',
  279. seachMoth: '2022',
  280. background: {
  281. backgroundColor: '#2E303A',
  282. },
  283. typeSelect: '0',
  284. contractSelect: '0',
  285. showDate: false,
  286. chartData: {},
  287. carChartData: {},
  288. carRingoptions: {},
  289. ringoptions: {},
  290. zringoptions: {},
  291. moneyList: [{
  292. name: '收入'
  293. }, {
  294. name: '支出'
  295. }, {
  296. name: '毛利润'
  297. }],
  298. dataList: [],
  299. dataObj0: {
  300. percentage: '',
  301. total: '',
  302. percentage: ''
  303. },
  304. dataObj1: {
  305. percentage: '',
  306. total: '',
  307. percentage: ''
  308. },
  309. dataObj2: {
  310. percentage: '',
  311. total: '',
  312. percentage: ''
  313. },
  314. dataObj3: {
  315. percentage: '',
  316. total: '',
  317. percentage: ''
  318. },
  319. dataObj4: {
  320. percentage: '',
  321. total: '',
  322. percentage: ''
  323. },
  324. dataObj5: {
  325. percentage: '',
  326. total: '',
  327. percentage: ''
  328. },
  329. dateList: [
  330. [{
  331. value: '2',
  332. label: '2022年'
  333. }],
  334. [{
  335. value: '01',
  336. label: '1月'
  337. },
  338. {
  339. value: '02',
  340. label: '2月'
  341. },
  342. {
  343. value: '03',
  344. label: '3月'
  345. },
  346. {
  347. value: '04',
  348. label: '4月'
  349. },
  350. {
  351. value: '05',
  352. label: '5月'
  353. },
  354. {
  355. value: '06',
  356. label: '6月'
  357. },
  358. {
  359. value: '07',
  360. label: '7月'
  361. },
  362. {
  363. value: '08',
  364. label: '8月'
  365. },
  366. {
  367. value: '09',
  368. label: '9月'
  369. },
  370. {
  371. value: '10',
  372. label: '10月'
  373. },
  374. {
  375. value: '11',
  376. label: '11月'
  377. },
  378. {
  379. value: '12',
  380. label: '12月'
  381. },
  382. {
  383. value: '0',
  384. label: '全年'
  385. },
  386. ]
  387. ],
  388. ztList: [],
  389. showNum: 8,
  390. lineHeight: 80,
  391. animationScroll: 5000,
  392. animation: 0,
  393. }
  394. },
  395. onLoad: function(option) {
  396. // uni.showLoading({
  397. // title: "数据加载中...",
  398. // mask: true
  399. // })
  400. // if (this.nowDate == '2022年1月') {
  401. // this.seachMoth = '2022-10-10'
  402. // }
  403. this.seachMoth = '2022-10-10'
  404. this.init()
  405. },
  406. destroyed() {
  407. clearInterval(this.carInterval)
  408. },
  409. onUnload() {
  410. clearInterval(this.carInterval)
  411. },
  412. methods: {
  413. selectData(type){
  414. this.seachMoth = ''
  415. this.btnIndex = type
  416. if(type==2){
  417. this.seachMoth = '2021-10-10'
  418. }else{
  419. this.seachMoth = '2022-10-10'
  420. }
  421. this.init()
  422. },
  423. goToPage(index) {
  424. // console.log(index)
  425. if (index == 4) {
  426. uni.navigateTo({
  427. url: '/pages/user/contractLook/warehouseReserves'
  428. })
  429. return true
  430. } else if (index == 5) {
  431. uni.navigateTo({
  432. url: '/pages/user/contractLook/inventoryCost?searchMonth=' + this.seachMoth
  433. })
  434. return true
  435. }
  436. if (this.contractSelect == '0') {
  437. uni.navigateTo({
  438. url: '/pages/user/contractLook/purchaseContract'
  439. })
  440. } else {
  441. uni.navigateTo({
  442. url: '/pages/user/contractLook/salesContract'
  443. })
  444. }
  445. },
  446. init() {
  447. this.url = "https://liangxin.zthymaoyi.com/map_0105.html?id=" + uni.getStorageSync('pcUserInfo').compId +
  448. '&seachMoth=' + this.seachMoth
  449. uni.showLoading({
  450. title: "加载中",
  451. mask: true
  452. })
  453. this.$api.doRequest('get', '/biInfoController//selectBiInfoNew?compId=' + uni.getStorageSync('pcUserInfo')
  454. .compId + '&seachMoth=' + this.seachMoth).then(res => {
  455. console.log("数据报表", res)
  456. uni.hideLoading()
  457. let _list = []
  458. this.dataList = res.data.data
  459. for (let i = 0; i < res.data.data.length; i++) {
  460. let _obj = {}
  461. let _color = []
  462. let _title = ""
  463. let _subtitle = ''
  464. let _name = ''
  465. let _count = ''
  466. let _data = []
  467. let _x = []
  468. let _y = []
  469. if (i < 6) {
  470. if (res.data.data[i].biViewInfoList[0].percentage) {
  471. res.data.data[i].biViewInfoList[0].percent = Number(res.data.data[i]
  472. .biViewInfoList[0]
  473. .percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage
  474. .length -
  475. 1)).toFixed(2)
  476. res.data.data[i].biViewInfoList[0].percentage = Number(res.data.data[i]
  477. .biViewInfoList[
  478. 0]
  479. .percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage
  480. .length -
  481. 1)).toFixed(2) + '%'
  482. }
  483. res.data.data[i].total = Number(res.data.data[i].total).toFixed(2)
  484. switch (i) {
  485. case 0:
  486. // this.dataObj0 = {
  487. // percentage: res.data.data[i].biViewInfoList[0].percentage,
  488. // total: res.data.data[i].total,
  489. // percent: Number(res.data.data[i].biViewInfoList[0].percent)
  490. // }
  491. this.carCount1 = res.data.data[i].biViewInfoList[0] ? res.data.data[i]
  492. .biViewInfoList[0].count : ""
  493. this.carCount2 = res.data.data[i].biViewInfoList[1] ? res.data.data[i]
  494. .biViewInfoList[1].count : ""
  495. this.carCount3 = res.data.data[i].biViewInfoList[2] ? res.data.data[i]
  496. .biViewInfoList[2].count : ""
  497. for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
  498. _x.push(res.data.data[i].biViewInfoList[k].name)
  499. _y.push(Number(res.data.data[i].biViewInfoList[k].count))
  500. }
  501. this.carChartData = {
  502. categories: _x,
  503. series: [{
  504. "name": '车辆',
  505. "data": _y
  506. }]
  507. }
  508. this.ringoptions = {
  509. "type": "column",
  510. "canvasId": "",
  511. "canvas2d": false,
  512. "background": "none",
  513. "animation": true,
  514. "timing": "easeOut",
  515. "duration": 1000,
  516. "color": [
  517. "#22C572"
  518. ],
  519. "padding": [
  520. 15,
  521. 15,
  522. 0,
  523. 5
  524. ],
  525. "rotate": false,
  526. "errorReload": true,
  527. "fontSize": 13,
  528. "fontColor": "#666666",
  529. "enableScroll": false,
  530. "touchMoveLimit": 60,
  531. "enableMarkLine": false,
  532. "dataLabel": true,
  533. "dataPointShape": true,
  534. "dataPointShapeType": "solid",
  535. "tapLegend": true,
  536. "xAxis": {
  537. "disabled": false,
  538. "axisLine": false,
  539. "axisLineColor": "#CCCCCC",
  540. "calibration": false,
  541. "fontColor": "#666666",
  542. "fontSize": 13,
  543. "rotateLabel": false,
  544. "itemCount": 5,
  545. "boundaryGap": "center",
  546. "disableGrid": true,
  547. "gridColor": "#CCCCCC",
  548. "gridType": "solid",
  549. "dashLength": 4,
  550. "gridEval": 1,
  551. "scrollShow": false,
  552. "scrollAlign": "left",
  553. "scrollColor": "#A6A6A6",
  554. "scrollBackgroundColor": "#EFEBEF",
  555. "format": ""
  556. },
  557. "yAxis": {
  558. "disabled": true,
  559. "disableGrid": true,
  560. "splitNumber": 5,
  561. "gridType": "solid",
  562. "dashLength": 8,
  563. "gridColor": "#CCCCCC",
  564. "padding": 10,
  565. "showTitle": false,
  566. "data": []
  567. },
  568. "legend": {
  569. "show": false,
  570. "position": "bottom",
  571. "float": "center",
  572. "padding": 5,
  573. "margin": 5,
  574. "backgroundColor": "rgba(0,0,0,0)",
  575. "borderColor": "rgba(0,0,0,0)",
  576. "borderWidth": 0,
  577. "fontSize": 13,
  578. "fontColor": "#666666",
  579. "lineHeight": 11,
  580. "hiddenColor": "#CECECE",
  581. "itemGap": 10
  582. },
  583. "extra": {
  584. "column": {
  585. "type": "group",
  586. "width": 30,
  587. "seriesGap": 2,
  588. "categoryGap": 3,
  589. "barBorderCircle": true,
  590. "linearType": "none",
  591. "linearOpacity": 1,
  592. "colorStop": 0,
  593. "meterBorder": 1,
  594. "meterFillColor": "#FFFFFF",
  595. "activeBgColor": "#000000",
  596. "activeBgOpacity": 0.08,
  597. "meterBorde": 1
  598. },
  599. "tooltip": {
  600. "showBox": true,
  601. "showArrow": true,
  602. "showCategory": false,
  603. "borderWidth": 0,
  604. "borderRadius": 0,
  605. "borderColor": "#000000",
  606. "borderOpacity": 0.7,
  607. "bgColor": "#000000",
  608. "bgOpacity": 0.7,
  609. "gridType": "solid",
  610. "dashLength": 4,
  611. "gridColor": "#CCCCCC",
  612. "fontColor": "#FFFFFF",
  613. "splitLine": true,
  614. "horizentalLine": false,
  615. "xAxisLabel": false,
  616. "yAxisLabel": false,
  617. "labelBgColor": "#FFFFFF",
  618. "labelBgOpacity": 0.7,
  619. "labelFontColor": "#666666"
  620. },
  621. "markLine": {
  622. "type": "solid",
  623. "dashLength": 4,
  624. "data": []
  625. }
  626. }
  627. }
  628. break;
  629. case 1:
  630. // this.dataObj1 = {
  631. // percentage: res.data.data[i].biViewInfoList[0].percentage,
  632. // total: Number(res.data.data[i].total),
  633. // percent: Number(res.data.data[i].biViewInfoList[0].percent)
  634. // }
  635. this.inventoryAct = Number(res.data.data[i].biViewInfoList[0].count).toFixed(2)
  636. this.inventoryBuy = Number(res.data.data[i].biViewInfoList[1].count).toFixed(2)
  637. this.inventorySale = Number(res.data.data[i].biViewInfoList[2].count).toFixed(2)
  638. this.inventoryTC = Number(Number(this.inventoryAct) + Number(this.inventoryBuy) -
  639. Number(this.inventorySale)).toFixed(2)
  640. break;
  641. case 2:
  642. // this.dataObj2 = {
  643. // percentage: res.data.data[i].biViewInfoList[0].percentage,
  644. // total: Number(res.data.data[i].total),
  645. // percent: Number(res.data.data[i].biViewInfoList[0].percent)
  646. // }
  647. // let _x = []
  648. // let _y = []
  649. if (res.data.data[i].biViewInfoList) {
  650. for (let k = 0; k < res.data.data[i].biViewInfoList.length; k++) {
  651. if (Number(res.data.data[i].biViewInfoList[k].count).toFixed(2) != 0) {
  652. _x.push(res.data.data[i].biViewInfoList[k].name)
  653. _y.push(Number(res.data.data[i].biViewInfoList[k].count).toFixed(2))
  654. }
  655. }
  656. }
  657. this.chartData = {
  658. categories: _x,
  659. series: [{
  660. "name": '储量',
  661. "data": _y
  662. }]
  663. }
  664. this.zringoptions = {
  665. "type": "line",
  666. "canvasId": "",
  667. "canvas2d": false,
  668. "background": "none",
  669. "animation": true,
  670. "timing": "easeOut",
  671. "duration": 1000,
  672. "color": [
  673. "#91CB74",
  674. ],
  675. "padding": [
  676. 15,
  677. 10,
  678. 0,
  679. 15
  680. ],
  681. "rotate": false,
  682. "errorReload": true,
  683. "fontSize": 13,
  684. "fontColor": "#666666",
  685. "enableScroll": true,
  686. "touchMoveLimit": 60,
  687. "enableMarkLine": true,
  688. "dataLabel": true,
  689. "dataPointShape": true,
  690. "dataPointShapeType": "hollow",
  691. "tapLegend": true,
  692. "xAxis": {
  693. "disabled": false,
  694. "axisLine": false,
  695. "axisLineColor": "#CCCCCC",
  696. "calibration": false,
  697. "fontColor": "#666666",
  698. "fontSize": 13,
  699. "rotateLabel": false,
  700. "itemCount": 4,
  701. "boundaryGap": "center",
  702. "disableGrid": false,
  703. "gridColor": "#CCCCCC",
  704. "gridType": "dash",
  705. "dashLength": 4,
  706. "gridEval": 1,
  707. "scrollShow": false,
  708. "scrollAlign": "left",
  709. "scrollColor": "#A6A6A6",
  710. "scrollBackgroundColor": "#EFEBEF",
  711. "format": ""
  712. },
  713. "yAxis": {
  714. "disabled": true,
  715. "disableGrid": true,
  716. "splitNumber": 5,
  717. "gridType": "dash",
  718. "dashLength": 2,
  719. "gridColor": "#CCCCCC",
  720. "padding": 10,
  721. "showTitle": false,
  722. "data": []
  723. },
  724. "legend": {
  725. "show": false,
  726. "position": "bottom",
  727. "float": "center",
  728. "padding": 5,
  729. "margin": 5,
  730. "backgroundColor": "rgba(0,0,0,0)",
  731. "borderColor": "rgba(0,0,0,0)",
  732. "borderWidth": 0,
  733. "fontSize": 13,
  734. "fontColor": "#666666",
  735. "lineHeight": 11,
  736. "hiddenColor": "#CECECE",
  737. "itemGap": 10
  738. },
  739. "extra": {
  740. "line": {
  741. "type": "straight",
  742. "width": 2
  743. },
  744. "tooltip": {
  745. "showBox": true,
  746. "showArrow": true,
  747. "showCategory": false,
  748. "borderWidth": 0,
  749. "borderRadius": 0,
  750. "borderColor": "#000000",
  751. "borderOpacity": 0.7,
  752. "bgColor": "#000000",
  753. "bgOpacity": 0.7,
  754. "gridType": "dash",
  755. "dashLength": 4,
  756. "gridColor": "#22C572",
  757. "fontColor": "#FFFFFF",
  758. "splitLine": true,
  759. "horizentalLine": false,
  760. "xAxisLabel": false,
  761. "yAxisLabel": false,
  762. "labelBgColor": "#FFFFFF",
  763. "labelBgOpacity": 0.7,
  764. "labelFontColor": "#666666"
  765. },
  766. "markLine": {
  767. "type": "solid",
  768. "dashLength": 4,
  769. "data": []
  770. }
  771. }
  772. }
  773. break;
  774. case 3:
  775. // this.dataObj3 = {
  776. // percentage: res.data.data[i].biViewInfoList[0].percentage,
  777. // total: Number(res.data.data[i].total),
  778. // percent: Number(res.data.data[i].biViewInfoList[0].percent)
  779. // }
  780. break;
  781. case 4:
  782. this.dataObj4 = {
  783. percentage: res.data.data[i].biViewInfoList[0].percentage,
  784. total: Number(res.data.data[i].total),
  785. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  786. }
  787. break;
  788. case 5:
  789. this.dataObj5 = {
  790. percentage: res.data.data[i].biViewInfoList[0].percentage,
  791. total: Number(res.data.data[i].total),
  792. percent: Number(res.data.data[i].biViewInfoList[0].percent)
  793. }
  794. break;
  795. }
  796. } else if (i == 10) { //销售已完成
  797. uni.hideLoading()
  798. this.dataObj0 = {
  799. percentage: Number(res.data.data[i].biViewInfoList[0].count).toFixed(2),
  800. total: Number(res.data.data[i].total).toFixed(2),
  801. percent: Number(res.data.data[i].biViewInfoList[0].percentage)
  802. }
  803. }else if (i == 11) { //销售已开票
  804. uni.hideLoading()
  805. this.dataObj1 = {
  806. percentage: Number(res.data.data[i].biViewInfoList[0].count).toFixed(2),
  807. total: Number(res.data.data[i].total).toFixed(),
  808. percent:Number(res.data.data[i].biViewInfoList[0].percentage)
  809. }
  810. }else if (i == 12) { //销售已结算
  811. uni.hideLoading()
  812. this.dataObj2 = {
  813. percentage: Number(res.data.data[i].biViewInfoList[0].count).toFixed(2) ,
  814. total: Number(res.data.data[i].total).toFixed(2),
  815. percent: Number(res.data.data[i].biViewInfoList[0].percentage)
  816. }
  817. }else if(i == 13){//采购已完成
  818. uni.hideLoading()
  819. this.dataObj3 = {
  820. percentage: Number(res.data.data[i].biViewInfoList[0].count),
  821. total: Number(res.data.data[i].total).toFixed(2),
  822. percent: Number(res.data.data[i].biViewInfoList[0].percentage)
  823. }
  824. }else if(i == 14){//采购已开票
  825. uni.hideLoading()
  826. this.dataObj4 = {
  827. percentage: Number(res.data.data[i].biViewInfoList[0].count).toFixed(2),
  828. total: Number(res.data.data[i].total).toFixed(2),
  829. percent: Number(res.data.data[i].biViewInfoList[0].percentage)
  830. }
  831. }else if(i == 15){//采购已结算
  832. uni.hideLoading()
  833. this.dataObj5 = {
  834. percentage: Number(res.data.data[i].biViewInfoList[0].count).toFixed(2) ,
  835. total: Number(res.data.data[i].total).toFixed(2),
  836. percent: Number(res.data.data[i].biViewInfoList[0].percentage)
  837. }
  838. }else if (i == 16) {
  839. uni.hideLoading()
  840. this.moneyList = res.data.data[i].biViewInfoList
  841. console.log('收入', this.moneyList)
  842. }
  843. this.$forceUpdate()
  844. }
  845. this.chartlist = _list
  846. // this.scroll()
  847. uni.hideLoading()
  848. })
  849. },
  850. scroll() {
  851. let that = this
  852. let _outHeight = ''
  853. let _inHeight = ''
  854. let obj = uni.createSelectorQuery().select('.content7')
  855. obj.boundingClientRect(function(data) {
  856. // console.log(data)
  857. _outHeight = data.height
  858. }).exec()
  859. setTimeout(function() {
  860. let obj1 = uni.createSelectorQuery().select('.scroll')
  861. obj1.boundingClientRect(function(data) {
  862. console.log(data)
  863. _inHeight = data.height
  864. }).exec()
  865. that.carInterval = setInterval(() => {
  866. console.log('···················')
  867. console.log("_scroll", that.scrollTop)
  868. console.log('_inHeight', _inHeight)
  869. console.log('_outHeight', _outHeight)
  870. if (that.scrollTop < _inHeight - _outHeight) {
  871. that.scrollTop++
  872. // console.log(that.$refs)
  873. // that.$refs.scroll.$el.style.top = '-' + _scroll + 'px'
  874. } else {
  875. that.scrollTop = 0
  876. }
  877. }, 100)
  878. }, 10)
  879. },
  880. confirm(e) {
  881. console.log(e)
  882. this.nowDate = e[0].label + e[1].label
  883. let _year = e[0].label.substring(0, 4)
  884. if (e[1].label != '全年') {
  885. this.seachMoth = _year + '-' + e[1].value
  886. } else {
  887. this.seachMoth = _year
  888. }
  889. this.init()
  890. },
  891. dateClick() {
  892. this.showDate = true
  893. },
  894. typeClick(index) {
  895. this.typeSelect = index
  896. console.log(index)
  897. },
  898. htClick(index) {
  899. // this.itemSelect = index
  900. this.contractSelect = index
  901. }
  902. }
  903. }
  904. </script>
  905. <style scoped lang="scss">
  906. .title {
  907. font-size: 32rpx;
  908. font-weight: 400;
  909. color: #343434;
  910. }
  911. .content-wrap {
  912. background: white;
  913. margin: 0 20rpx;
  914. border-radius: 20rpx;
  915. padding: 20rpx;
  916. }
  917. .u-line {
  918. margin: 20rpx 0 !important;
  919. }
  920. .line-chart {
  921. height: 200px;
  922. }
  923. .content1 {
  924. background: #2E303A;
  925. padding: 0 20rpx 180rpx 20rpx;
  926. .row2 {
  927. display: flex;
  928. justify-content: space-between;
  929. color: white;
  930. font-size: 32rpx;
  931. align-items: center;
  932. color: #FFFFFF;
  933. .icon {
  934. margin: 0 10rpx;
  935. }
  936. .right {
  937. display: flex;
  938. font-size: 26rpx;
  939. .type-style {
  940. margin-left: 38rpx;
  941. padding: 6rpx 16rpx;
  942. border-radius: 10rpx;
  943. color: #A6A6A6;
  944. }
  945. .type-bgc {
  946. background: rgba(255, 255, 255, 0.3);
  947. color: white;
  948. }
  949. }
  950. }
  951. .row3 {
  952. .title {
  953. font-size: 26rpx;
  954. font-weight: 400;
  955. color: #C5C5C5;
  956. margin: 35rpx 0 20rpx 0;
  957. }
  958. .number {
  959. font-size: 32rpx;
  960. font-weight: 400;
  961. color: #E2C4A1;
  962. }
  963. }
  964. }
  965. .move-content {
  966. position: relative;
  967. top: -136rpx;
  968. }
  969. .content2 {
  970. .row1 {
  971. display: flex;
  972. justify-content: space-between;
  973. .left {
  974. }
  975. .right {
  976. display: flex;
  977. .item {
  978. background: #F1F1F1;
  979. border-radius: 30px;
  980. margin-left: 20rpx;
  981. font-size: 2rpx;
  982. color: #333333;
  983. padding: 13rpx 27rpx;
  984. }
  985. .item-Select {
  986. background-color: black;
  987. color: white;
  988. }
  989. }
  990. }
  991. .row2,
  992. .row3,
  993. .row4 {
  994. .top {
  995. font-size: 26rpx;
  996. color: #929292;
  997. margin: 0;
  998. }
  999. .bottom {
  1000. display: flex;
  1001. align-items: center;
  1002. margin: 10rpx;
  1003. .left {
  1004. margin-left: 20rpx;
  1005. image {
  1006. width: 45rpx;
  1007. height: 45rpx;
  1008. }
  1009. }
  1010. .right {
  1011. width: 100%;
  1012. padding-left: 20rpx;
  1013. .top {
  1014. display: flex;
  1015. justify-content: space-between;
  1016. width: 100%;
  1017. margin-top: 10px;
  1018. .left,
  1019. .right-number {
  1020. display: flex;
  1021. align-items: center;
  1022. font-size: 26rpx;
  1023. color: #343434;
  1024. .number {
  1025. font-size: 26rpx;
  1026. font-weight: 400;
  1027. color: #929292;
  1028. margin-left: 10rpx;
  1029. }
  1030. }
  1031. }
  1032. .bottom {
  1033. margin: 30rpx 0 30rpx 20rpx;
  1034. }
  1035. }
  1036. }
  1037. }
  1038. }
  1039. .content3,
  1040. .content4,
  1041. .content5,
  1042. .content6 {
  1043. margin-top: 20rpx;
  1044. }
  1045. .content5 {
  1046. .row1,
  1047. .row2 {
  1048. display: flex;
  1049. justify-content: space-between;
  1050. align-items: center;
  1051. margin: 40rpx 0;
  1052. .left {
  1053. display: flex;
  1054. align-items: center;
  1055. .text {
  1056. font-size: 28rpx;
  1057. font-weight: 400;
  1058. color: #707575;
  1059. margin-left: 20rpx;
  1060. }
  1061. }
  1062. .right {
  1063. font-size: 34rpx;
  1064. font-weight: 500;
  1065. color: #333333;
  1066. }
  1067. image {
  1068. width: 54rpx;
  1069. height: 54rpx;
  1070. }
  1071. }
  1072. }
  1073. .btn-style{
  1074. // width: 70px;
  1075. // height: 28px;
  1076. background: rgba(47,108,233,0.2);
  1077. border-radius: 4px;
  1078. border: 1px solid rgba(0,220,255,0.2);
  1079. padding: 5px 20px;
  1080. box-sizing: border-box;
  1081. // font-size: 16px;
  1082. margin-right: 10px;
  1083. cursor:pointer
  1084. }
  1085. .activeBtn{
  1086. color:#06DBF1
  1087. }
  1088. .content6 {
  1089. .map {
  1090. border: 0;
  1091. width: 100%;
  1092. height: 500rpx;
  1093. }
  1094. }
  1095. .content7 {
  1096. position: relative;
  1097. overflow: hidden;
  1098. height: 520rpx;
  1099. margin-top: 20rpx;
  1100. .scroll {
  1101. position: absolute;
  1102. width: 100%;
  1103. }
  1104. .row1 {
  1105. background: #FAFAFA;
  1106. display: flex;
  1107. align-items: center;
  1108. justify-content: space-between;
  1109. margin: 20rpx;
  1110. padding: 20rpx;
  1111. color: #707575;
  1112. .point {
  1113. width: 15rpx;
  1114. height: 15rpx;
  1115. border-radius: 50%;
  1116. background: #22C572;
  1117. margin-right: 10px;
  1118. }
  1119. .zt {
  1120. display: flex;
  1121. align-items: center;
  1122. }
  1123. }
  1124. }
  1125. </style>