report.vue 29 KB

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