report.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145
  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. this.$forceUpdate()
  822. }
  823. this.chartlist = _list
  824. // this.scroll()
  825. uni.hideLoading()
  826. })
  827. },
  828. scroll() {
  829. let that = this
  830. let _outHeight = ''
  831. let _inHeight = ''
  832. let obj = uni.createSelectorQuery().select('.content7')
  833. obj.boundingClientRect(function(data) {
  834. // console.log(data)
  835. _outHeight = data.height
  836. }).exec()
  837. setTimeout(function() {
  838. let obj1 = uni.createSelectorQuery().select('.scroll')
  839. obj1.boundingClientRect(function(data) {
  840. console.log(data)
  841. _inHeight = data.height
  842. }).exec()
  843. that.carInterval = setInterval(() => {
  844. console.log('···················')
  845. console.log("_scroll", that.scrollTop)
  846. console.log('_inHeight', _inHeight)
  847. console.log('_outHeight', _outHeight)
  848. if (that.scrollTop < _inHeight - _outHeight) {
  849. that.scrollTop++
  850. // console.log(that.$refs)
  851. // that.$refs.scroll.$el.style.top = '-' + _scroll + 'px'
  852. } else {
  853. that.scrollTop = 0
  854. }
  855. }, 100)
  856. }, 10)
  857. },
  858. confirm(e) {
  859. uni.showLoading({
  860. title: "加载中",
  861. mask: true
  862. })
  863. console.log(e)
  864. this.nowDate = e[0].label + e[1].label
  865. let _year = e[0].label.substring(0, 4)
  866. if (e[1].label != '全年') {
  867. this.seachMoth = _year + '-' + e[1].value
  868. } else {
  869. this.seachMoth = _year
  870. }
  871. this.init()
  872. },
  873. dateClick() {
  874. this.showDate = true
  875. },
  876. typeClick(index) {
  877. this.typeSelect = index
  878. console.log(index)
  879. },
  880. htClick(index) {
  881. // this.itemSelect = index
  882. this.contractSelect = index
  883. }
  884. }
  885. }
  886. </script>
  887. <style scoped lang="scss">
  888. .title {
  889. font-size: 32rpx;
  890. font-weight: 400;
  891. color: #343434;
  892. }
  893. .content-wrap {
  894. background: white;
  895. margin: 0 20rpx;
  896. border-radius: 20rpx;
  897. padding: 20rpx;
  898. }
  899. .u-line {
  900. margin: 20rpx 0 !important;
  901. }
  902. .line-chart {
  903. height: 200px;
  904. }
  905. .content1 {
  906. background: #2E303A;
  907. padding: 0 20rpx 180rpx 20rpx;
  908. .row2 {
  909. display: flex;
  910. justify-content: space-between;
  911. color: white;
  912. font-size: 32rpx;
  913. align-items: center;
  914. color: #FFFFFF;
  915. .icon {
  916. margin: 0 10rpx;
  917. }
  918. .right {
  919. display: flex;
  920. font-size: 26rpx;
  921. .type-style {
  922. margin-left: 38rpx;
  923. padding: 6rpx 16rpx;
  924. border-radius: 10rpx;
  925. color: #A6A6A6;
  926. }
  927. .type-bgc {
  928. background: rgba(255, 255, 255, 0.3);
  929. color: white;
  930. }
  931. }
  932. }
  933. .row3 {
  934. .title {
  935. font-size: 26rpx;
  936. font-weight: 400;
  937. color: #C5C5C5;
  938. margin: 35rpx 0 20rpx 0;
  939. }
  940. .number {
  941. font-size: 32rpx;
  942. font-weight: 400;
  943. color: #E2C4A1;
  944. }
  945. }
  946. }
  947. .move-content {
  948. position: relative;
  949. top: -136rpx;
  950. }
  951. .content2 {
  952. .row1 {
  953. display: flex;
  954. justify-content: space-between;
  955. .left {}
  956. .right {
  957. display: flex;
  958. .item {
  959. background: #F1F1F1;
  960. border-radius: 30px;
  961. margin-left: 20rpx;
  962. font-size: 2rpx;
  963. color: #333333;
  964. padding: 13rpx 27rpx;
  965. }
  966. .item-Select {
  967. background-color: black;
  968. color: white;
  969. }
  970. }
  971. }
  972. .row2,
  973. .row3,
  974. .row4 {
  975. .top {
  976. font-size: 26rpx;
  977. color: #929292;
  978. margin: 0;
  979. }
  980. .bottom {
  981. display: flex;
  982. align-items: center;
  983. margin: 10rpx;
  984. .left {
  985. margin-left: 20rpx;
  986. image {
  987. width: 45rpx;
  988. height: 45rpx;
  989. }
  990. }
  991. .right {
  992. width: 100%;
  993. padding-left: 20rpx;
  994. .top {
  995. display: flex;
  996. justify-content: space-between;
  997. width: 100%;
  998. margin-top: 10px;
  999. .left,
  1000. .right-number {
  1001. display: flex;
  1002. align-items: center;
  1003. font-size: 26rpx;
  1004. color: #343434;
  1005. .number {
  1006. font-size: 26rpx;
  1007. font-weight: 400;
  1008. color: #929292;
  1009. margin-left: 10rpx;
  1010. }
  1011. }
  1012. }
  1013. .bottom {
  1014. margin: 30rpx 0 30rpx 20rpx;
  1015. }
  1016. }
  1017. }
  1018. }
  1019. }
  1020. .content3,
  1021. .content4,
  1022. .content5,
  1023. .content6 {
  1024. margin-top: 20rpx;
  1025. }
  1026. .content5 {
  1027. .row1,
  1028. .row2 {
  1029. display: flex;
  1030. justify-content: space-between;
  1031. align-items: center;
  1032. margin: 40rpx 0;
  1033. .left {
  1034. display: flex;
  1035. align-items: center;
  1036. .text {
  1037. font-size: 28rpx;
  1038. font-weight: 400;
  1039. color: #707575;
  1040. margin-left: 20rpx;
  1041. }
  1042. }
  1043. .right {
  1044. font-size: 34rpx;
  1045. font-weight: 500;
  1046. color: #333333;
  1047. }
  1048. image {
  1049. width: 54rpx;
  1050. height: 54rpx;
  1051. }
  1052. }
  1053. }
  1054. .content6 {
  1055. .map {
  1056. border: 0;
  1057. width: 100%;
  1058. height: 500rpx;
  1059. }
  1060. }
  1061. .content7 {
  1062. position: relative;
  1063. overflow: hidden;
  1064. height: 520rpx;
  1065. margin-top: 20rpx;
  1066. .scroll {
  1067. position: absolute;
  1068. width: 100%;
  1069. }
  1070. .row1 {
  1071. background: #FAFAFA;
  1072. display: flex;
  1073. align-items: center;
  1074. justify-content: space-between;
  1075. margin: 20rpx;
  1076. padding: 20rpx;
  1077. color: #707575;
  1078. .point {
  1079. width: 15rpx;
  1080. height: 15rpx;
  1081. border-radius: 50%;
  1082. background: #22C572;
  1083. margin-right: 10px;
  1084. }
  1085. .zt {
  1086. display: flex;
  1087. align-items: center;
  1088. }
  1089. }
  1090. }
  1091. </style>