newReport.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936
  1. <template>
  2. <view class="content">
  3. <view class="status_bar"></view>
  4. <view class="top-nav">
  5. <uni-icons class="back" type="back" size="25" @click="back"></uni-icons>
  6. <view class="right" :class="index==2?'nav-active':''" @click="navClick(2)">
  7. 新季
  8. </view>
  9. <view class="left" :class="index==1?'nav-active':''" @click="navClick(1)">
  10. 全部
  11. </view>
  12. </view>
  13. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="content1 content-item">
  14. <view class="title">
  15. 收支核算
  16. </view>
  17. <uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
  18. :show="isSHowContent1">
  19. <u-line color="#EEEEEE" />
  20. <view class="row1 mtb40">
  21. <view class="left">
  22. <view class="">
  23. {{ym1Change}}
  24. </view>
  25. <view class="" style="font-size: 12px; color:#9E9E9E; margin-top: 10rpx;">
  26. 单位:万元
  27. </view>
  28. </view>
  29. <view class="right" v-if="index!=2">
  30. <text class="text" :class="textIndex==1?'text-active':''" @click="accounting(1)">
  31. 按月
  32. </text>
  33. <text class="text" :class="textIndex==2?'text-active':''" @click="accounting(2)">按年</text>
  34. </view>
  35. </view>
  36. <view class="row2" @click='godetail(2)'>
  37. <view class="text">
  38. 收入(万元)
  39. </view>
  40. <view class="price">
  41. {{sr?Number(sr).toFixed(2):0}}
  42. </view>
  43. </view>
  44. <view class="row3" @click='godetail(2)'>
  45. <view class="left">
  46. <view class="text">
  47. 支出(万元)
  48. </view>
  49. <view class="number">
  50. {{zc?Number(zc).toFixed(2):0}}
  51. </view>
  52. </view>
  53. <view class="center">
  54. </view>
  55. <view class="right">
  56. <view class="text">
  57. 差额(万元)
  58. </view>
  59. <view class="number">
  60. {{Number(sr-zc).toFixed(2)}}
  61. </view>
  62. </view>
  63. </view>
  64. <view class="row5 flex alc">
  65. <view class="left">
  66. <text class="point-left flex alc"></text>收入(万元):<text
  67. class="text-left">{{Number(sr).toFixed(2)}}</text>
  68. <!-- <text class="point-left flex alc"></text>收入(万元):<text class="text-left">2000.00</text> -->
  69. </view>
  70. <view class="right">
  71. <text class="point-right"></text>支出(万元):<text
  72. class="text-right">{{Number(zc).toFixed(2)}}</text>
  73. <!-- <text class="point-left flex alc"></text>收入(万元):<text class="text-left">2000.00</text> -->
  74. </view>
  75. </view>
  76. <view class="row4">
  77. <qiun-data-charts type="area" :opts="opts" :chartData="chartData" :ontouch="true"
  78. @getIndex="getIndex" />
  79. </view>
  80. </uni-transition>
  81. <view class="zd flex alc" @click="foldClcik('fade',1)">
  82. {{this.isSHowContent1?'点击收起':'点击展开'}}
  83. <image v-if="this.isSHowContent1" src="../../static/sq.png" mode="widthFix"
  84. style="width: 30rpx;margin-left: 10rpx;"></image>
  85. <image v-else src="../../static/zk.png" mode="widthFix" style="width: 30rpx;margin-left: 10rpx;">
  86. </image>
  87. </view>
  88. </view>
  89. <view class="content-item" :class="compName=='黑龙江省申融物流管理有限公司'?'content1':'content2'">
  90. <view class="title">
  91. 合同数据
  92. </view>
  93. <uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
  94. :show="isSHowContent2">
  95. <u-line color="#EEEEEE" />
  96. <view class="row1 flex jcsb" style="margin-top: 40rpx;">
  97. <view class="left title-lv2">
  98. 数量统计
  99. </view>
  100. <view @click='godetail(0)' class="right-btn" style="position: relative;z-index: 999;">
  101. 合同明细
  102. </view>
  103. </view>
  104. <!-- <view class="row2 flex jcse">
  105. <view class="left flex alc">
  106. <view class="color1"></view>
  107. <text class="text">{{index==1?'过去12个月累计签订数量':'本季累计签订合同数量'}}</text>
  108. </view>
  109. <view class="right flex alc">
  110. <view class="color2"></view>
  111. <text class="text">{{index==1?'当前执行中数量':'本季执行中数量'}}</text>
  112. </view>
  113. </view> -->
  114. <view class="row3">
  115. <qiun-data-charts type="bar" :opts="opts2" :chartData="chartData1" />
  116. </view>
  117. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="row4 flex jcsb mtb40">
  118. <view class="left title-lv2">
  119. 利润核算
  120. </view>
  121. <view @click='godetail(1)' class="right-btn">
  122. 利润明细
  123. </view>
  124. </view>
  125. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="row5">
  126. <view class="left flex">
  127. <view class="" v-if="index==1">
  128. <u-icon name="arrow-left" size="26" style="margin-right: 10rpx;" color="#969696"
  129. @click="yearClick('1')">
  130. </u-icon>
  131. <text @click="showYear=true">{{year}}年</text>
  132. <u-icon name="arrow-right" size="26" style="margin-left: 10rpx;"
  133. :color="nowYear!=year?'#969696':'#DBDBDB'" @click="yearClick('2')" v-if="nowYear!=year">
  134. </u-icon>
  135. <u-icon name="arrow-right" size="26" style="margin-left: 10rpx;"
  136. :color="nowYear!=year?'#969696':'#DBDBDB'" v-if="nowYear==year">
  137. </u-icon>
  138. </view>
  139. <view class="" v-else>
  140. 新季利润
  141. </view>
  142. </view>
  143. <view class="right">
  144. 单位:元
  145. </view>
  146. </view>
  147. <view class="row6" v-if="isHaveData3 && compName!='黑龙江省申融物流管理有限公司'">
  148. <qiun-data-charts type="column" :opts="opts3" :chartData="chartData3" />
  149. </view>
  150. </uni-transition>
  151. <view class="zd flex alc" @click="foldClcik('fade',2)">
  152. {{this.isSHowContent2?'点击收起':'点击展开'}}
  153. <image v-if="this.isSHowContent2" src="../../static/sq.png" mode="widthFix"
  154. style="width: 30rpx;margin-left: 10rpx;"></image>
  155. <image v-else src="../../static/zk.png" mode="widthFix" style="width: 30rpx;margin-left: 10rpx;">
  156. </image>
  157. </view>
  158. </view>
  159. <view class="content3 content-item">
  160. <view class="title flex jcsb">
  161. <view class="">
  162. 仓储数据
  163. </view>
  164. <view @click='goToPage(5)' class="right-btn">
  165. 库存明细
  166. </view>
  167. </view>
  168. <uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
  169. :show="isSHowContent3">
  170. <u-line color="#EEEEEE" />
  171. <view class="row1 flex jcsb mtb40">
  172. <view class="left title-lv2">
  173. 库存储量
  174. </view>
  175. <view class="right">
  176. 单位:吨
  177. </view>
  178. </view>
  179. <view class="btn">
  180. <view class="btn-in" :class='btnIndex==2?"btn-active":""' @click="changeWeight(2)">
  181. 实际重量
  182. </view>
  183. <view class="btn-in" :class='btnIndex==1?"btn-active":""' @click="changeWeight(1)">
  184. 折算纯重
  185. </view>
  186. </view>
  187. <view class="row2">
  188. <view class="" v-for="(item,index) in clList">
  189. <view class="name">
  190. {{item.name}}
  191. </view>
  192. <view class="bottom flex alc jcsb">
  193. <u-line-progress :percent="item.percent" :active-color="color4(index)" :show-percent='false'
  194. class='left' height='12'>
  195. </u-line-progress>
  196. <view class="weight">
  197. {{item.weight}}
  198. </view>
  199. </view>
  200. </view>
  201. <!-- <qiun-data-charts type="bar" :opts="opts4" :chartData="chartData4" :ontouch="true" /> -->
  202. </view>
  203. <view class="row3">
  204. <view class="list-item flex jcsb" v-for="(item,index) in InventoryList">
  205. <view class="flex alc">
  206. <image :src="item.src" mode="widthFix" style="width: 40rpx;margin-right: 20rpx;"></image>
  207. <text style="color:#707575;">{{item.name}}</text>
  208. </view>
  209. <view class="number">
  210. {{item.number}}
  211. </view>
  212. </view>
  213. </view>
  214. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="row5 flex jcsb mtb40">
  215. <view class="left title-lv2">
  216. 当期货值
  217. </view>
  218. <view class="right">
  219. 单位:万元
  220. </view>
  221. </view>
  222. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="row6">
  223. <qiun-data-charts type="column" :opts="opts5" :chartData="chartData5" :ontouch="true" />
  224. </view>
  225. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="row7">
  226. <view class="left title-lv2" style="margin: 30rpx;">
  227. 平均成本
  228. </view>
  229. <view class="list-item" v-for="item in averageCostList">
  230. <view class="flex jcsb alc">
  231. <view class="left" style="color: #7A7A7A;">
  232. {{item.name}}
  233. </view>
  234. <view class="">
  235. {{Number(item.result).toFixed(0)}}
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. </uni-transition>
  241. <view class="zd flex alc" @click="foldClcik('fade',3)">
  242. {{this.isSHowContent3?'点击收起':'点击展开'}}
  243. <image v-if="this.isSHowContent3" src="../../static/sq.png" mode="widthFix"
  244. style="width: 30rpx;margin-left: 10rpx;"></image>
  245. <image v-else src="../../static/zk.png" mode="widthFix" style="width: 30rpx;margin-left: 10rpx;">
  246. </image>
  247. </view>
  248. </view>
  249. <view class="content4 content-item">
  250. <view class="title flex jcsb">
  251. <view class="">
  252. 今日入库
  253. </view>
  254. <view @click='godetail(3)' class="right-btn">
  255. 入库明细
  256. </view>
  257. </view>
  258. <uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
  259. :show="isSHowContent4">
  260. <u-line color="#EEEEEE" />
  261. <view class="" style="color: #9E9E9E;margin: 30rpx 0 0 30rpx; font-size: 12px;">
  262. 单位:吨
  263. </view>
  264. <view class="flex alc">
  265. <view class="" style="width:40%;height: 160px;">
  266. <qiun-data-charts type="ring" :opts="opts6" :chartData="chartData6" class='opts6' />
  267. </view>
  268. <view class="zt-right">
  269. <view class="flex jcsb alc" v-for="item in rkList" style="font-weight: 700;">
  270. <view class="left">
  271. <text :style="item.style"></text>{{item.name}}
  272. </view>
  273. <view class="right">
  274. {{Number(item.value).toFixed(2)}}
  275. </view>
  276. </view>
  277. </view>
  278. </view>
  279. </uni-transition>
  280. <view class="zd flex alc" @click="foldClcik('fade',4)">
  281. {{this.isSHowContent4?'点击收起':'点击展开'}}
  282. <image v-if="this.isSHowContent4" src="../../static/sq.png" mode="widthFix"
  283. style="width: 30rpx;margin-left: 10rpx;"></image>
  284. <image v-else src="../../static/zk.png" mode="widthFix" style="width: 30rpx;margin-left: 10rpx;">
  285. </image>
  286. </view>
  287. </view>
  288. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="content5 content-item">
  289. <view class="title">
  290. 在途数据
  291. </view>
  292. <uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
  293. :show="isSHowContent5">
  294. <u-line color="#EEEEEE" />
  295. <view class="row1 days-nav">
  296. <view class="item" :class="carIndex==index?'item-active':''" v-for="(item, index) in dayList"
  297. @click="clickNav(index)">
  298. {{item}}
  299. </view>
  300. </view>
  301. <view class="flex alc">
  302. <view class="" style="width:40%;height: 160px;">
  303. <qiun-data-charts type="ring" :opts="opts7" :chartData="chartData7" />
  304. </view>
  305. <view class="zt-right">
  306. <view class="flex jcsb alc" v-for="item in ztList" style="font-weight: 700;">
  307. <view class="left">
  308. <text :style="item.style"></text>{{item.name}}
  309. </view>
  310. <view class="right">
  311. {{item.value}}
  312. </view>
  313. </view>
  314. </view>
  315. </view>
  316. </uni-transition>
  317. <view class="zd flex alc" @click="foldClcik('fade',5)">
  318. {{this.isSHowContent5?'点击收起':'点击展开'}}
  319. <image v-if="this.isSHowContent5" src="../../static/sq.png" mode="widthFix"
  320. style="width: 30rpx;margin-left: 10rpx;"></image>
  321. <image v-else src="../../static/zk.png" mode="widthFix" style="width: 30rpx;margin-left: 10rpx;">
  322. </image>
  323. </view>
  324. </view>
  325. <view v-if="compName!='黑龙江省申融物流管理有限公司'" class="content6 content-item">
  326. <view class="title">
  327. 用户增长
  328. </view>
  329. <uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
  330. :show="isSHowContent6">
  331. <u-line color="#EEEEEE" />
  332. <view class="row1 flex jcsb" style="padding:0 12rpx 0 5rpx;">
  333. <view class="left">
  334. app注册
  335. </view>
  336. <view class="right">
  337. <text>合计:</text>
  338. <text style="color: #EC6666;">{{appTotal}}</text>
  339. <text>人</text>
  340. </view>
  341. </view>
  342. <view class="row2">
  343. <qiun-data-charts type="area" :opts="opts8" :chartData="chartData8" />
  344. </view>
  345. <view class="row1 flex jcsb" style="margin-top: 90rpx;padding:0 12rpx 0 5rpx;">
  346. <view class="left">
  347. 粮脉入驻
  348. </view>
  349. <view class="right">
  350. <text>合计:</text>
  351. <text style="color: #22C572;">{{lmTotal}}</text>
  352. <text>人</text>
  353. </view>
  354. </view>
  355. <view class="row2">
  356. <qiun-data-charts type="area" :opts="opts9" :chartData="chartData9" />
  357. </view>
  358. </uni-transition>
  359. <view class="zd flex alc" @click="foldClcik('fade',6)">
  360. {{this.isSHowContent6?'点击收起':'点击展开'}}
  361. <image v-if="this.isSHowContent6" src="../../static/sq.png" mode="widthFix"
  362. style="width: 30rpx;margin-left: 10rpx;"></image>
  363. <image v-else src="../../static/zk.png" mode="widthFix" style="width: 30rpx;margin-left: 10rpx;">
  364. </image>
  365. </view>
  366. </view>
  367. <u-picker v-model="showYear" mode="selector" :range="selector" :default-selector="[2]"></u-picker>
  368. </view>
  369. </template>
  370. <script>
  371. export default {
  372. data() {
  373. return {
  374. compName:'',
  375. btnIndex: "2",
  376. rkList: [],
  377. ztList: [],
  378. ztColor: ['#38CA80', '#8D9EE9', '#FFBB6E'],
  379. color: ['#FFBB6E', '#8D9EE9', '#FF8B95', '#38CA80', '#FFDD85', "#1890FF", "#91CB74", "#FAC858", "#EE6666",
  380. "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  381. "#ea7ccc"
  382. ],
  383. clList: [],
  384. isHaveData3: true,
  385. val: 1000,
  386. carIndex: 0,
  387. appTotal: '',
  388. lmTotal: '',
  389. ym1: '',
  390. ym1Change: '',
  391. sr: '',
  392. zc: '',
  393. seachYear: '',
  394. seachMoth: '2022-10-10',
  395. dayList: ['1天', '7天', '30天'],
  396. averageCostList: [{
  397. name: '玉米',
  398. number: '2000.00'
  399. },
  400. {
  401. name: '玉米(潮粮)',
  402. number: '2000.00'
  403. },
  404. {
  405. name: '高粱',
  406. number: '2000.00'
  407. },
  408. {
  409. name: '高粱(潮粮)',
  410. number: '2000.00'
  411. },
  412. {
  413. name: '小麦',
  414. number: '2000.00'
  415. },
  416. {
  417. name: '大豆',
  418. number: '2000.00'
  419. },
  420. ],
  421. InventoryList: [{
  422. name: '合计储量',
  423. number: '1000.00',
  424. src: '../../static/img/cl.png'
  425. }, {
  426. name: '采购待执行',
  427. number: '1000.00',
  428. src: '../../static/img/cg.png'
  429. },
  430. {
  431. name: '销待执行售',
  432. number: '1000.00',
  433. src: '../../static/img/xs.png'
  434. },
  435. {
  436. name: '头寸',
  437. number: '1000.00',
  438. src: '../../static/img/tc.png'
  439. },
  440. ],
  441. year: 2022,
  442. selector: [2020, 2021, 2022],
  443. showYear: false,
  444. iconName1: 'arrow-up',
  445. iconName2: 'arrow-up',
  446. iconName3: 'arrow-up',
  447. iconName4: 'arrow-up',
  448. iconName5: 'arrow-up',
  449. iconName6: 'arrow-up',
  450. styles: {},
  451. modeClass: 'fade',
  452. isSHowContent1: true,
  453. isSHowContent2: true,
  454. isSHowContent3: true,
  455. isSHowContent4: true,
  456. isSHowContent5: true,
  457. isSHowContent6: true,
  458. chartData: {},
  459. chartData1: {},
  460. chartData3: {},
  461. chartData4: {},
  462. chartData5: {},
  463. chartData6: {},
  464. chartData7: {},
  465. chartData8: {},
  466. chartData9: {},
  467. opts: {
  468. enableScroll: true,
  469. color: ["#E84A55", "#22C572"],
  470. padding: [15, 15, 0, 15],
  471. dataPointShapeType: "hollow",
  472. legend: {
  473. show: false
  474. },
  475. xAxis: {
  476. gridType: "dash",
  477. disableGrid: true,
  478. itemCount: 6,
  479. },
  480. yAxis: {
  481. // gridType: "dash",
  482. gridType: 'solid',
  483. gridColor: "#E9E9E9",
  484. splitNumber: 5,
  485. data: [{
  486. // disabled: true,
  487. axisLine: false,
  488. fontColor: "#BEBEBE",
  489. textAlign: 'right'
  490. }],
  491. },
  492. extra: {
  493. area: {
  494. type: "straight",
  495. opacity: 0.3,
  496. addLine: true,
  497. width: 2,
  498. gradient: true
  499. },
  500. tooltip: {
  501. showBox: false,
  502. showArrow: true,
  503. showCategory: false,
  504. borderWidth: 0,
  505. borderRadius: 0,
  506. borderColor: "#000000",
  507. borderOpacity: 0.7,
  508. bgColor: "#000000",
  509. bgOpacity: 0.7,
  510. gridType: "dash",
  511. dashLength: 4,
  512. gridColor: "#E9E9E9",
  513. fontColor: "#FFFFFF",
  514. splitLine: true,
  515. horizentalLine: false,
  516. xAxisLabel: false,
  517. yAxisLabel: false,
  518. labelBgColor: "#FFFFFF",
  519. labelBgOpacity: 0.7,
  520. labelFontColor: "#666666"
  521. }
  522. },
  523. },
  524. opts2: {
  525. color: ["#D2F3E2", "#22C572"],
  526. padding: [15, 20, 0, 5],
  527. legend: {
  528. fontSize: 12,
  529. position: 'top',
  530. itemGap: 20,
  531. padding: 20
  532. },
  533. xAxis: {
  534. boundaryGap: "justify",
  535. disableGrid: false,
  536. axisLine: false,
  537. gridType: "dash",
  538. dashLength: 10,
  539. },
  540. extra: {
  541. // tooltip: {
  542. // showBox: false,
  543. // },
  544. bar: {
  545. type: "group",
  546. width: 10,
  547. meterBorde: 1,
  548. meterFillColor: "#FFFFFF",
  549. activeBgColor: "#000000",
  550. activeBgOpacity: 0.08,
  551. // linearType: "custom",
  552. barBorderCircle: true,
  553. seriesGap: 2,
  554. categoryGap: 6
  555. }
  556. }
  557. },
  558. opts3: {
  559. color: ["#8D9EE9"],
  560. padding: [15, 15, 0, 5],
  561. legend: {
  562. show: false
  563. },
  564. xAxis: {
  565. disableGrid: true,
  566. gridType: "dash",
  567. },
  568. yAxis: {
  569. gridType: "dash",
  570. data: [{
  571. min: 0,
  572. fontColor: '#BEBEBE',
  573. textAlign: 'right'
  574. }]
  575. },
  576. extra: {
  577. column: {
  578. type: "group",
  579. width: 15,
  580. activeBgColor: "#000000",
  581. activeBgOpacity: 0.08,
  582. linearType: "custom",
  583. seriesGap: 5,
  584. linearOpacity: 0.5,
  585. barBorderCircle: true,
  586. customColor: [
  587. "#8D9EE9",
  588. "#8D9EE9"
  589. ]
  590. }
  591. }
  592. },
  593. opts4: {
  594. enableScroll: true,
  595. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  596. "#ea7ccc"
  597. ],
  598. padding: [15, 30, 0, 5],
  599. legend: {
  600. show: false,
  601. },
  602. xAxis: {
  603. boundaryGap: "justify",
  604. disableGrid: false,
  605. axisLine: false,
  606. itemCount: 4,
  607. },
  608. yAxis: {
  609. },
  610. extra: {
  611. bar: {
  612. type: "group",
  613. width: 15,
  614. meterBorde: 1,
  615. meterFillColor: "#FFFFFF",
  616. activeBgColor: "#000000",
  617. activeBgOpacity: 0.08,
  618. // linearType: "custom",
  619. barBorderCircle: true,
  620. seriesGap: 2,
  621. categoryGap: 6
  622. }
  623. }
  624. },
  625. opts5: {
  626. enableScroll: true,
  627. color: ["#8D9EE9"],
  628. padding: [15, 15, 0, 5],
  629. legend: {
  630. show: false,
  631. },
  632. xAxis: {
  633. disableGrid: true,
  634. itemCount: 4,
  635. gridType: "dash",
  636. },
  637. yAxis: {
  638. gridType: "dash",
  639. data: [{
  640. min: 0,
  641. fontColor: "#BEBEBE",
  642. axisLine: false
  643. }]
  644. },
  645. extra: {
  646. column: {
  647. type: "group",
  648. width: 15,
  649. activeBgColor: "#000000",
  650. activeBgOpacity: 0.08,
  651. // linearType: "custom",
  652. seriesGap: 5,
  653. // linearOpacity: 0.5,
  654. barBorderCircle: true,
  655. customColor: [
  656. "#8D9EE9",
  657. "#8D9EE9"
  658. ]
  659. }
  660. }
  661. },
  662. opts6: {
  663. dataLabel: false,
  664. rotate: false,
  665. rotateLock: false,
  666. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  667. "#ea7ccc"
  668. ],
  669. legend: {
  670. show: false,
  671. position: "right",
  672. lineHeight: 25
  673. },
  674. title: {
  675. name: "",
  676. fontSize: 15,
  677. color: "#666666"
  678. },
  679. subtitle: {
  680. name: "",
  681. fontSize: 25,
  682. color: "#7cb5ec"
  683. },
  684. extra: {
  685. ring: {
  686. ringWidth: 10,
  687. activeOpacity: 0.5,
  688. activeRadius: 10,
  689. offsetAngle: 0,
  690. labelWidth: 15,
  691. border: false,
  692. borderWidth: 3,
  693. borderColor: "#FFFFFF"
  694. }
  695. }
  696. },
  697. opts7: {
  698. dataLabel: false,
  699. rotate: false,
  700. rotateLock: false,
  701. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  702. "#ea7ccc"
  703. ],
  704. legend: {
  705. show: false,
  706. position: "right",
  707. lineHeight: 25
  708. },
  709. title: {
  710. name: "",
  711. fontSize: 15,
  712. color: "#666666"
  713. },
  714. subtitle: {
  715. name: "",
  716. fontSize: 25,
  717. color: "#7cb5ec"
  718. },
  719. extra: {
  720. ring: {
  721. ringWidth: 10,
  722. activeOpacity: 0.5,
  723. activeRadius: 10,
  724. offsetAngle: 0,
  725. labelWidth: 15,
  726. border: false,
  727. borderWidth: 3,
  728. borderColor: "#FFFFFF"
  729. }
  730. }
  731. },
  732. opts8: {
  733. color: ["#EC6666"],
  734. padding: [15, 15, 0, 15],
  735. legend: {
  736. show: false,
  737. },
  738. xAxis: {
  739. disableGrid: true
  740. },
  741. yAxis: {
  742. gridType: "dash",
  743. dashLength: 2,
  744. data: [{
  745. // disabled: true,
  746. axisLine: false,
  747. fontColor: "#BEBEBE",
  748. }],
  749. },
  750. extra: {
  751. area: {
  752. type: "curve",
  753. opacity: 0.2,
  754. addLine: true,
  755. width: 2,
  756. gradient: true
  757. },
  758. tooltip: {
  759. showBox: false,
  760. showArrow: true,
  761. showCategory: false,
  762. borderWidth: 0,
  763. borderRadius: 0,
  764. borderColor: "#000000",
  765. borderOpacity: 0.7,
  766. bgColor: "#000000",
  767. bgOpacity: 0.7,
  768. gridType: "dash",
  769. dashLength: 4,
  770. gridColor: "#E9E9E9",
  771. fontColor: "#FFFFFF",
  772. splitLine: true,
  773. horizentalLine: false,
  774. xAxisLabel: false,
  775. yAxisLabel: false,
  776. labelBgColor: "#FFFFFF",
  777. labelBgOpacity: 0.7,
  778. labelFontColor: "#666666"
  779. }
  780. }
  781. },
  782. opts9: {
  783. color: ["#22C572"],
  784. padding: [15, 15, 0, 15],
  785. legend: {
  786. show: false,
  787. },
  788. xAxis: {
  789. disableGrid: true
  790. },
  791. yAxis: {
  792. gridType: "dash",
  793. dashLength: 2,
  794. data: [{
  795. // disabled: true,
  796. axisLine: false,
  797. fontColor: "#BEBEBE",
  798. }],
  799. },
  800. extra: {
  801. area: {
  802. type: "curve",
  803. opacity: 0.2,
  804. addLine: true,
  805. width: 2,
  806. gradient: true
  807. },
  808. tooltip: {
  809. showBox: false,
  810. showArrow: true,
  811. showCategory: false,
  812. borderWidth: 0,
  813. borderRadius: 0,
  814. borderColor: "#000000",
  815. borderOpacity: 0.7,
  816. bgColor: "#000000",
  817. bgOpacity: 0.7,
  818. gridType: "dash",
  819. dashLength: 4,
  820. gridColor: "#E9E9E9",
  821. fontColor: "#FFFFFF",
  822. splitLine: true,
  823. horizentalLine: false,
  824. xAxisLabel: false,
  825. yAxisLabel: false,
  826. labelBgColor: "#FFFFFF",
  827. labelBgOpacity: 0.7,
  828. labelFontColor: "#666666"
  829. }
  830. }
  831. },
  832. textIndex: 1,
  833. index: 2,
  834. background: {
  835. backgroundColor: '#2E303A',
  836. backgroundColor: 'red',
  837. },
  838. nowYear: ''
  839. }
  840. },
  841. onLoad: function(option) {
  842. this.nowYear = new Date().getFullYear()
  843. this.compName = uni.getStorageSync('compName1').company
  844. console.log(this.compName)
  845. },
  846. destroyed() {
  847. },
  848. onUnload() {
  849. },
  850. onReady() {
  851. this.getServerData();
  852. },
  853. methods: {
  854. changeWeight(index) {
  855. this.btnIndex = index
  856. this.makeDate4(this.chartList, index)
  857. },
  858. color4(index) {
  859. console.log(index)
  860. index = index + 1
  861. switch (index) {
  862. case 1:
  863. return '#FFBB6E'
  864. case 2:
  865. return '#8D9EE9'
  866. case 3:
  867. return '#FF8B95'
  868. case 4:
  869. return '#38CA80'
  870. case 5:
  871. return '#FFDD85'
  872. case 6:
  873. return '#FFBB6E'
  874. case 7:
  875. return '#FFBB6E'
  876. case 8:
  877. return '#FFBB6E'
  878. case 9:
  879. return '#FFBB6E'
  880. case 10:
  881. return '#FFBB6E'
  882. }
  883. },
  884. goToPage(index) {
  885. uni.navigateTo({
  886. url: '/pages/user/contractLook/inventoryCost?searchMonth=' + this.seachMoth
  887. })
  888. },
  889. clickNav(index) {
  890. this.carIndex = index
  891. let _data = ""
  892. if (index == 0) {
  893. _data = 1
  894. } else if (index == 1) {
  895. _data = 7
  896. } else {
  897. _data = 30
  898. }
  899. this.$api.doRequest('get', '/biInfoController/getTranCountWai', {
  900. seachMoth: _data,
  901. }).then(res => {
  902. console.log(res.data)
  903. this.selectMakeDate7(res.data.data[0])
  904. })
  905. },
  906. yearClick(type) {
  907. if (type == 1) {
  908. this.year--
  909. } else {
  910. this.year++
  911. }
  912. this.$api.doRequest('get', '/biInfoController/profitAccount', {
  913. compId: uni.getStorageSync('pcUserInfo').compId,
  914. seachYear: this.year,
  915. // biViewInfoList: {weight:''}
  916. }).then(res => {
  917. console.log("利润切换", res.data.data[0])
  918. // this.makeDate3(res.data[0])
  919. this.chartData3.series = [];
  920. let _categorieslr = []
  921. let _countlr = []
  922. if (res.data.data[0].biViewInfoList.length > 0) {
  923. for (let i = 0; i < res.data.data[0].biViewInfoList.length; i++) {
  924. _categorieslr.push(res.data.data[0].biViewInfoList[i].name)
  925. _countlr.push(res.data.data[0].biViewInfoList[i].weight ? res.data.data[0]
  926. .biViewInfoList[
  927. i].weight :
  928. 0)
  929. //利润核算
  930. }
  931. }
  932. let res3 = {
  933. categories: _categorieslr,
  934. series: [{
  935. name: "利润金额",
  936. data: _countlr
  937. }]
  938. };
  939. this.chartData3 = JSON.parse(JSON.stringify(res3));
  940. })
  941. },
  942. godetail(status) {
  943. var url = ''
  944. switch (status) {
  945. case 0:
  946. url = '/pages/dataReport/contractdetails/contractdetails'
  947. break;
  948. case 1:
  949. url = '/pages/dataReport/breakdownofprofit'
  950. break;
  951. case 2:
  952. url = '/pages/dataReport/costbreakdown?data=' + this.ym1 + '&type=' + this.index
  953. break;
  954. case 3:
  955. url = '/pages/dataReport/Inventoryentrydetails'
  956. break;
  957. }
  958. uni.navigateTo({
  959. url: url
  960. })
  961. },
  962. foldClcik(type, index) {
  963. switch (index) {
  964. case 1:
  965. this.isSHowContent1 = !this.isSHowContent1
  966. this.iconName1 = this.isSHowContent1 ? "arrow-up" : 'arrow-down'
  967. break;
  968. case 2:
  969. this.isSHowContent2 = !this.isSHowContent2
  970. this.iconName2 = this.isSHowContent2 ? "arrow-up" : 'arrow-down'
  971. break;
  972. case 3:
  973. this.isSHowContent3 = !this.isSHowContent3
  974. this.iconName3 = this.isSHowContent3 ? "arrow-up" : 'arrow-down'
  975. break;
  976. case 4:
  977. this.isSHowContent4 = !this.isSHowContent4
  978. this.iconName4 = this.isSHowContent4 ? "arrow-up" : 'arrow-down'
  979. break;
  980. case 5:
  981. this.isSHowContent5 = !this.isSHowContent5
  982. this.iconName5 = this.isSHowContent5 ? "arrow-up" : 'arrow-down'
  983. break;
  984. case 6:
  985. this.isSHowContent6 = !this.isSHowContent6
  986. this.iconName6 = this.isSHowContent6 ? "arrow-up" : 'arrow-down'
  987. break;
  988. }
  989. this.modeClass = type
  990. },
  991. getIndex(e) {
  992. console.log(e)
  993. // 点击图表
  994. if (this.textIndex == 1) {
  995. this.ym1 = this.chartList[0].biViewInfoList[e.currentIndex.index].name
  996. this.ym1Change = this.chartList[0].biViewInfoList[e.currentIndex.index].name.replace(/-/g, ".");
  997. this.sr = this.chartList[0].biViewInfoList[e.currentIndex.index].weight
  998. this.zc = this.chartList[2].biViewInfoList[e.currentIndex.index].weight
  999. } else {
  1000. this.ym1 = this.chartList[1].biViewInfoList[e.currentIndex.index].name
  1001. this.ym1Change = this.chartList[1].biViewInfoList[e.currentIndex.index].name.replace(/-/g, ".");
  1002. this.sr = this.chartList[1].biViewInfoList[e.currentIndex.index].weight
  1003. this.zc = this.chartList[3].biViewInfoList[e.currentIndex.index].weight
  1004. }
  1005. },
  1006. makeYData(max) {
  1007. if (max <= 100) {
  1008. return Math.ceil(max * 1.05 / 20) * 20
  1009. } else if (max <= 1000) {
  1010. return Math.ceil(max * 1.05 / 100) * 100
  1011. } else if (max > 1000) {
  1012. console.log(111)
  1013. return Math.ceil(max * 1.05 / 500) * 500
  1014. }
  1015. // Math.ceil(_max * 1.05 / 500) * 500
  1016. },
  1017. makeDate1(val) {
  1018. console.log("val", val)
  1019. // 按月1
  1020. let _categories = []
  1021. let _price1 = []
  1022. let _price2 = []
  1023. this.chartData.series = [];
  1024. // 设置x轴数据
  1025. let _ySRPriceMax = 0
  1026. let _yZCPriceMax = 0
  1027. let _max = 0
  1028. if (this.textIndex == 1) {
  1029. if (val[0].biViewInfoList && val[0].biViewInfoList.length > 0) {
  1030. for (let i = 0; i < val[0].biViewInfoList.length; i++) {
  1031. val[0].biViewInfoList[i].weight = Number(val[0].biViewInfoList[i].weight).toFixed(2)
  1032. _price1.push(val[0].biViewInfoList[i].weight)
  1033. }
  1034. //月收入最大值
  1035. _ySRPriceMax = Math.max(..._price1)
  1036. for (let i = 0; i < val[2].biViewInfoList.length; i++) {
  1037. val[2].biViewInfoList[i].weight = Number(val[2].biViewInfoList[i].weight).toFixed(2)
  1038. _price2.push(val[2].biViewInfoList[i].weight)
  1039. _categories.push(new Date(val[2].biViewInfoList[i].name).getMonth() + 1)
  1040. }
  1041. //月收入最大值
  1042. _yZCPriceMax = Math.max(..._price2)
  1043. // 判断收入支出最大值构建y坐标轴刻度
  1044. _max = _ySRPriceMax > _yZCPriceMax ? _ySRPriceMax : _yZCPriceMax
  1045. this.ym1 = val[0].biViewInfoList[val[0].biViewInfoList.length - 1].name
  1046. this.ym1Change = val[0].biViewInfoList[val[0].biViewInfoList.length - 1].name.replace(/-/g, ".");
  1047. this.sr = val[0].biViewInfoList[val[0].biViewInfoList.length - 1].weight
  1048. this.zc = val[2].biViewInfoList[val[2].biViewInfoList.length - 1].weight
  1049. }
  1050. } else {
  1051. if (val[1].biViewInfoList && val[1].biViewInfoList.length > 0) {
  1052. this.ym1Change = val[1].biViewInfoList[val[1].biViewInfoList.length - 1].name.replace(/-/g, ".");
  1053. this.ym1 = val[1].biViewInfoList[val[1].biViewInfoList.length - 1].name
  1054. this.sr = val[1].biViewInfoList[val[1].biViewInfoList.length - 1].weight
  1055. this.zc = val[3].biViewInfoList[val[3].biViewInfoList.length - 1].weight
  1056. for (let i = 0; i < val[1].biViewInfoList.length; i++) {
  1057. _categories.push(val[1].biViewInfoList[i].name)
  1058. _price1.push(val[1].biViewInfoList[i].weight)
  1059. }
  1060. for (let i = 0; i < val[3].biViewInfoList.length; i++) {
  1061. _price2.push(val[3].biViewInfoList[i].weight)
  1062. }
  1063. }
  1064. _max = _price1 > _price2 ? _price1 : _price2
  1065. }
  1066. let res = {
  1067. categories: _categories,
  1068. series: [{
  1069. name: "收入",
  1070. data: _price1,
  1071. textColor: "transparent"
  1072. }, {
  1073. name: "支出",
  1074. data: _price2,
  1075. textColor: "transparent"
  1076. }
  1077. ]
  1078. };
  1079. // this.opts.yAxis.data[0].max = Math.ceil(_max / 1000) * 1000
  1080. // 处理y轴最大值
  1081. console.log("max1", _max)
  1082. let _newMax = this.makeYData(_max)
  1083. console.log('max1', _newMax)
  1084. // this.opts.yAxis.data[0].max = Math.ceil(_max * 1.05 / 500) * 500
  1085. this.opts.yAxis.data[0].max = _newMax
  1086. this.chartData = JSON.parse(JSON.stringify(res));
  1087. },
  1088. makeDate2(val) {
  1089. let _categories = []
  1090. let _count1 = []
  1091. let _count2 = []
  1092. let _xMax1 = 0
  1093. let _xMax2 = 0
  1094. let _max = 0
  1095. if (val[4].biViewInfoList && val[4].biViewInfoList.length > 0) {
  1096. for (let i = 0; i < val[4].biViewInfoList.length; i++) {
  1097. _categories.push(val[4].biViewInfoList[i].name.substring(0, 2))
  1098. _count1.push(Number(val[4].biViewInfoList[i].weight).toFixed(0))
  1099. _count2.push(val[4].biViewInfoList[i].count ? Number(val[4].biViewInfoList[i].count).toFixed(0) :
  1100. 0)
  1101. }
  1102. }
  1103. _xMax1 = Math.max(..._count1)
  1104. _xMax2 = Math.max(..._count2)
  1105. _max = _xMax1 > _xMax2 ? _xMax1 : _xMax2
  1106. console.log(_xMax1)
  1107. console.log(_xMax2)
  1108. // this.opts2.xAxis.max = Math.ceil(_max / 100) * 100
  1109. let _newMax = this.makeYData(_max)
  1110. console.log('max2', _newMax)
  1111. this.opts2.xAxis.max = _newMax
  1112. let res1 = {
  1113. categories: _categories,
  1114. series: [{
  1115. name: this.index == 1 ? '过去12个月累计签订数量' : '本季累计签订合同数量',
  1116. data: _count1,
  1117. legendShape: "circle",
  1118. textColor: "transparent"
  1119. },
  1120. {
  1121. name: this.index == 1 ? '当前执行中数量' : '本季执行中数量',
  1122. data: _count2,
  1123. legendShape: "circle",
  1124. textColor: "transparent"
  1125. }
  1126. ]
  1127. };
  1128. this.chartData1 = JSON.parse(JSON.stringify(res1));
  1129. },
  1130. makeDate3(val) {
  1131. let _max = 0
  1132. let _categorieslr = []
  1133. let _countlr = []
  1134. if (val[5].biViewInfoList.length > 0) {
  1135. for (let i = 0; i < val[5].biViewInfoList.length; i++) {
  1136. _categorieslr.push(val[5].biViewInfoList[i].name.substring(0, 2))
  1137. _countlr.push(val[5].biViewInfoList[i].weight ? val[5].biViewInfoList[i].weight : 0)
  1138. }
  1139. _max = Math.max(..._countlr)
  1140. } else {
  1141. this.isHaveData3 = false
  1142. }
  1143. let _newMax = this.makeYData(_max)
  1144. console.log('max3', _newMax)
  1145. this.opts3.yAxis.data[0].max = _newMax
  1146. //利润核算
  1147. let res3 = {
  1148. categories: _categorieslr,
  1149. series: [{
  1150. name: "利润金额",
  1151. data: _countlr
  1152. }]
  1153. };
  1154. this.chartData3 = JSON.parse(JSON.stringify(res3));
  1155. },
  1156. makeDate4(val, type) {
  1157. let _data = []
  1158. // 合计储量
  1159. let _count = 0
  1160. this.clList = []
  1161. if (type == 1) {
  1162. _data = val[14].biViewInfoList
  1163. } else {
  1164. _data = val[8].biViewInfoList
  1165. }
  1166. let _categorieslr = []
  1167. let _countlr = []
  1168. // this.clList =
  1169. let _weightList = []
  1170. let _maxWeight = ''
  1171. if (_data && _data.length > 0) {
  1172. for (let i = 0; i < _data.length; i++) {
  1173. _weightList.push(Number(_data.weight).toFixed(0) ? Number(_data[i]
  1174. .weight).toFixed(0) : 0)
  1175. }
  1176. _maxWeight = Math.max(..._weightList) + Math.max(..._weightList) * 0.05
  1177. for (let i = 0; i < _data.length; i++) {
  1178. console.log("_data", _data)
  1179. _count += _data[i].weight
  1180. let _obj = {
  1181. percent: Number(_data[i].weight).toFixed(0) / _maxWeight * 100,
  1182. name: _data[i].name,
  1183. weight: Number(_data[i].weight).toFixed(0)
  1184. }
  1185. console.log("库存储量", _obj)
  1186. this.clList.push(_obj)
  1187. }
  1188. }
  1189. let _tc = Number(_count) + Number(val[6].biViewInfoList[1].count) - Number(
  1190. val[6].biViewInfoList[2].count)
  1191. this.InventoryList = [{
  1192. name: '合计储量',
  1193. number: Number(_count).toFixed(3),
  1194. src: '../../static/img/cl.png'
  1195. }, {
  1196. name: '采购待执行',
  1197. number: Number(val[6].biViewInfoList[1].count).toFixed(3),
  1198. src: '../../static/img/cg.png'
  1199. },
  1200. {
  1201. name: '销待执行售',
  1202. number: Number(val[6].biViewInfoList[2].count).toFixed(3),
  1203. src: '../../static/img/xs.png'
  1204. },
  1205. {
  1206. name: '头寸',
  1207. number: Number(_tc).toFixed(3),
  1208. src: '../../static/img/tc.png'
  1209. },
  1210. ]
  1211. },
  1212. makeDate5(val) {
  1213. let _max = 0
  1214. let _categorieslr = []
  1215. let _count = []
  1216. let count = []
  1217. if (val[7].biViewInfoList && val[9].biViewInfoList.length > 0) {
  1218. for (let i = 0; i < val[9].biViewInfoList.length; i++) {
  1219. let _obj = {
  1220. value: Number(val[9].biViewInfoList[i].weight ? val[9].biViewInfoList[i].weight : 0)
  1221. .toFixed(
  1222. 0),
  1223. color: this.color[i]
  1224. }
  1225. _categorieslr.push(val[9].biViewInfoList[i].name)
  1226. _count.push(_obj)
  1227. count.push(Number(val[9].biViewInfoList[i].weight ? val[9].biViewInfoList[i].weight : 0))
  1228. }
  1229. _max = Math.max(...count)
  1230. }
  1231. let _newMax = this.makeYData(_max)
  1232. console.log('max5', _newMax)
  1233. this.opts5.yAxis.data[0].max = _newMax
  1234. // data: [{
  1235. // value: 10000,
  1236. // color: "#FFBB6E"
  1237. // },
  1238. // {
  1239. // value: 40000,
  1240. // color: "#8D9EE9"
  1241. // }, {
  1242. // value: 70000,
  1243. // color: "#FF8B95"
  1244. // }, {
  1245. // value: 90000,
  1246. // color: "#38CA80"
  1247. // },
  1248. // {
  1249. // value: 100000,
  1250. // color: "#FFDD85"
  1251. // }
  1252. // ]
  1253. let res5 = {
  1254. categories: _categorieslr,
  1255. series: [{
  1256. name: "货值(万元)",
  1257. data: _count
  1258. }]
  1259. };
  1260. this.chartData5 = JSON.parse(JSON.stringify(res5));
  1261. this.averageCostList = val[9].biViewInfoList
  1262. },
  1263. makeDate6(val) {
  1264. let _data = []
  1265. if (val[10].biViewInfoList && val[10].biViewInfoList.length > 0) {
  1266. for (let i = 0; i < val[10].biViewInfoList.length; i++) {
  1267. let _obj = {
  1268. name: val[10].biViewInfoList[i].name,
  1269. value: val[10].biViewInfoList[i].weight,
  1270. color: this.color[i],
  1271. style: {
  1272. 'background': this.color[i],
  1273. 'border-radius': '50%',
  1274. 'width': '20rpx',
  1275. 'height': '20rpx',
  1276. 'display': 'inline-block',
  1277. 'margin-right': '10rpx'
  1278. },
  1279. }
  1280. _data.push(_obj)
  1281. this.rkList = _data
  1282. }
  1283. }
  1284. let res6 = {
  1285. width: 200,
  1286. series: [{
  1287. data: _data
  1288. }]
  1289. };
  1290. this.chartData6 = JSON.parse(JSON.stringify(res6));
  1291. },
  1292. selectMakeDate7(val) {
  1293. console.log(11)
  1294. console.log(val)
  1295. this.chartData7.series = [];
  1296. let _data = []
  1297. this.ztList = []
  1298. for (let i = 0; i < val.biViewInfoList.length; i++) {
  1299. let _obj = {
  1300. name: val.biViewInfoList[i].name,
  1301. value: Number(val.biViewInfoList[i].count),
  1302. color: this.ztColor[i],
  1303. style: {
  1304. 'background': this.ztColor[i],
  1305. 'border-radius': '50%',
  1306. 'width': '20rpx',
  1307. 'height': '20rpx',
  1308. 'display': 'inline-block',
  1309. 'margin-right': '10rpx'
  1310. },
  1311. }
  1312. _data.push(_obj)
  1313. this.ztList = _data
  1314. }
  1315. console.log(_data)
  1316. let res7 = {
  1317. series: [{
  1318. data: _data
  1319. }]
  1320. };
  1321. this.chartData7 = JSON.parse(JSON.stringify(res7));
  1322. },
  1323. makeDate7(val) {
  1324. let _data = []
  1325. this.ztList = []
  1326. if (val[11].biViewInfoList && val[11].biViewInfoList.length) {
  1327. for (let i = 0; i < val[11].biViewInfoList.length; i++) {
  1328. let _obj = {
  1329. name: val[11].biViewInfoList[i].name,
  1330. value: Number(val[11].biViewInfoList[i].count),
  1331. color: this.ztColor[i],
  1332. style: {
  1333. 'background': this.ztColor[i],
  1334. 'border-radius': '50%',
  1335. 'width': '20rpx',
  1336. 'height': '20rpx',
  1337. 'display': 'inline-block',
  1338. 'margin-right': '10rpx'
  1339. },
  1340. }
  1341. _data.push(_obj)
  1342. this.ztList = _data
  1343. }
  1344. }
  1345. console.log(_data)
  1346. let res7 = {
  1347. series: [{
  1348. data: _data
  1349. }]
  1350. };
  1351. this.chartData7 = JSON.parse(JSON.stringify(res7));
  1352. },
  1353. makeDate8(val) {
  1354. let _categories = []
  1355. let _data = []
  1356. let _categories1 = []
  1357. let _data1 = []
  1358. this.appTotal = val[12].count
  1359. this.lmTotal = val[13].count
  1360. let _max1 = 0
  1361. let _max2 = 0
  1362. if (val[12].biViewInfoList && val[12].biViewInfoList.length) {
  1363. for (let i = 0; i < val[12].biViewInfoList.length; i++) {
  1364. _categories.push(new Date(val[12].biViewInfoList[i].name).getMonth() + 1 + '月')
  1365. _data.push(val[12].biViewInfoList[i].weight)
  1366. }
  1367. }
  1368. _max1 = Math.max(..._data)
  1369. if (val[13].biViewInfoList && val[13].biViewInfoList.length > 0) {
  1370. for (let i = 0; i < val[13].biViewInfoList.length; i++) {
  1371. _categories1.push(new Date(val[13].biViewInfoList[i].name).getMonth() + 1 + '月')
  1372. _data1.push(val[13].biViewInfoList[i].weight)
  1373. }
  1374. }
  1375. _max2 = Math.max(..._data1)
  1376. let _newMax1 = this.makeYData(_max1)
  1377. console.log('max8', _newMax1)
  1378. this.opts8.yAxis.data[0].max = _newMax1
  1379. let _newMax2 = this.makeYData(_max2)
  1380. console.log('max9', _newMax2)
  1381. this.opts9.yAxis.data[0].max = _newMax2
  1382. let res8 = {
  1383. categories: _categories,
  1384. series: [{
  1385. name: "成交量A",
  1386. data: _data,
  1387. // textColor: "transparent"
  1388. }]
  1389. }
  1390. let res9 = {
  1391. categories: _categories1,
  1392. series: [{
  1393. name: "成交量A",
  1394. data: _data1,
  1395. // textColor: "transparent"
  1396. }]
  1397. }
  1398. this.chartData8 = JSON.parse(JSON.stringify(res8))
  1399. this.chartData9 = JSON.parse(JSON.stringify(res9))
  1400. },
  1401. isShowChart(val, index) {
  1402. if (val.length == 0) {
  1403. return false
  1404. switch (index) {
  1405. case 3:
  1406. this.isHaveData3 = false
  1407. }
  1408. }
  1409. return true
  1410. },
  1411. getServerData() {
  1412. uni.showLoading({
  1413. title: "加载中",
  1414. mask: true
  1415. })
  1416. this.$api.doRequest('get', '/biInfoController/selectPhoneBiInfo?compId=' + uni.getStorageSync(
  1417. 'pcUserInfo')
  1418. .compId + '&seachMoth=' + this.seachMoth + '&seachYear=' + this.seachYear).then(
  1419. res => {
  1420. console.log("数据报表", res)
  1421. uni.hideLoading()
  1422. this.chartList = res.data.data
  1423. // 收支核算数据处理
  1424. this.makeDate1(res.data.data)
  1425. //合同数据
  1426. this.makeDate2(res.data.data)
  1427. //利润核算
  1428. this.makeDate3(res.data.data)
  1429. //库存储量
  1430. this.makeDate4(res.data.data)
  1431. //当期货值
  1432. this.makeDate5(res.data.data)
  1433. //今日入库
  1434. this.makeDate6(res.data.data)
  1435. //在途数据
  1436. this.makeDate7(res.data.data)
  1437. //APP注册
  1438. this.makeDate8(res.data.data)
  1439. // uni.hideLoading()
  1440. })
  1441. },
  1442. back() {
  1443. uni.navigateBack()
  1444. },
  1445. navClick(val) {
  1446. this.clList = []
  1447. this.index = val
  1448. if (val == 1) {
  1449. this.seachMoth = ''
  1450. } else {
  1451. this.seachMoth = '2022-10-10'
  1452. }
  1453. this.getServerData();
  1454. },
  1455. accounting(val) {
  1456. this.textIndex = val
  1457. if (val == 1) {
  1458. console.log("按月")
  1459. } else {
  1460. console.log("按年")
  1461. }
  1462. this.makeDate1(this.chartList)
  1463. }
  1464. }
  1465. }
  1466. </script>
  1467. <style scoped lang="scss">
  1468. .flex {
  1469. display: flex;
  1470. }
  1471. .alc {
  1472. align-items: center;
  1473. }
  1474. .jcse {
  1475. justify-content: space-evenly;
  1476. }
  1477. .jcsb {
  1478. justify-content: space-between;
  1479. }
  1480. .mtb40 {
  1481. margin: 40rpx 0;
  1482. }
  1483. .title-lv2 {
  1484. font-weight: bold;
  1485. color: #333333;
  1486. }
  1487. .status_bar {
  1488. height: var(--status-bar-height);
  1489. width: 100%;
  1490. }
  1491. .top-nav {
  1492. display: flex;
  1493. align-items: center;
  1494. justify-content: space-evenly;
  1495. position: fixed;
  1496. top: 0;
  1497. width: 100%;
  1498. z-index: 1;
  1499. }
  1500. .back {
  1501. position: absolute;
  1502. left: 20rpx;
  1503. top: 25%;
  1504. bottom: 0;
  1505. margin: auto;
  1506. }
  1507. .zd {
  1508. color: #969696;
  1509. margin-top: 20rpx;
  1510. justify-content: center;
  1511. }
  1512. .top-nav {
  1513. font-size: 36rpx;
  1514. background: white;
  1515. padding: 20rpx;
  1516. }
  1517. .nav-active {
  1518. font-weight: 700;
  1519. position: relative;
  1520. }
  1521. .nav-active:after {
  1522. content: "";
  1523. position: absolute;
  1524. bottom: -20rpx;
  1525. left: 0;
  1526. right: 0;
  1527. margin: auto;
  1528. height: 10rpx;
  1529. width: 60%;
  1530. background: #262626;
  1531. border-radius: 40rpx;
  1532. }
  1533. .content-item {
  1534. background: white;
  1535. margin: 20rpx 25rpx 0 25rpx;
  1536. border-radius: 20rpx;
  1537. padding: 20rpx;
  1538. box-sizing: border-box;
  1539. }
  1540. .title {
  1541. margin-bottom: 22rpx;
  1542. font-size: 32rpx;
  1543. font-weight: 700;
  1544. color: #343434;
  1545. }
  1546. .right-btn {
  1547. width: 120rpx;
  1548. height: 42rpx;
  1549. display: flex;
  1550. align-items: center;
  1551. justify-content: center;
  1552. background: #F1F1F1;
  1553. border-radius: 30px;
  1554. font-size: 22rpx;
  1555. color: #707575;
  1556. }
  1557. .content1 {
  1558. margin-top: 100rpx;
  1559. .content1-wrap {}
  1560. .row1 {
  1561. display: flex;
  1562. justify-content: space-between;
  1563. align-items: center;
  1564. .left {
  1565. color: #868686;
  1566. }
  1567. .text {
  1568. margin-left: 38rpx;
  1569. color: #2E303A;
  1570. height: 60rpx;
  1571. display: inline-block;
  1572. line-height: 60rpx;
  1573. padding: 0 26rpx;
  1574. }
  1575. .text-active {
  1576. // margin-left: 38rpx;
  1577. color: #FFF;
  1578. background: #2E303A;
  1579. // padding: 1rpx 26rpx;
  1580. height: 60rpx;
  1581. display: inline-block;
  1582. line-height: 60rpx;
  1583. padding: 0 26rpx;
  1584. border-radius: 10rpx;
  1585. }
  1586. }
  1587. .row2 {
  1588. display: flex;
  1589. flex-direction: column;
  1590. align-items: center;
  1591. .text {
  1592. color: #636363;
  1593. margin-bottom: 10rpx
  1594. }
  1595. .price {
  1596. font-size: 56rpx;
  1597. font-weight: 700;
  1598. color: #D79C58;
  1599. }
  1600. }
  1601. .row3 {
  1602. display: flex;
  1603. justify-content: space-between;
  1604. margin-top: 27rpx;
  1605. align-items: center;
  1606. .center {
  1607. width: 2px;
  1608. height: 61rpx;
  1609. border: 2rpx solid #EEEEEE;
  1610. }
  1611. .left,
  1612. .right {
  1613. // background: green;
  1614. width: calc(50% - 1px);
  1615. text-align: center;
  1616. .text {
  1617. color: #636363
  1618. }
  1619. .number {
  1620. margin-top: 12rpx;
  1621. font-size: 34rpx;
  1622. font-weight: 700;
  1623. color: #343434;
  1624. }
  1625. }
  1626. }
  1627. .row4 {
  1628. margin-top: 20rpx;
  1629. }
  1630. .row5 {
  1631. background: #F6F6F6;
  1632. border-radius: 8px;
  1633. padding: 16rpx 0;
  1634. box-sizing: border-box;
  1635. margin: 20rpx 0;
  1636. .left,
  1637. .right {
  1638. width: 50%;
  1639. text-align: center;
  1640. }
  1641. .point-left {
  1642. width: 11rpx;
  1643. height: 11rpx;
  1644. background: #E84A55;
  1645. display: inline-block;
  1646. border-radius: 50%;
  1647. margin: 6rpx;
  1648. }
  1649. .point-right {
  1650. width: 11rpx;
  1651. height: 11rpx;
  1652. background: #22C572;
  1653. display: inline-block;
  1654. border-radius: 50%;
  1655. margin: 6rpx;
  1656. }
  1657. .text-left {
  1658. color: #E84A55;
  1659. font-weight: 700;
  1660. }
  1661. .text-right {
  1662. color: #22C572;
  1663. font-weight: 700;
  1664. }
  1665. }
  1666. }
  1667. .content2 {
  1668. .row1 {}
  1669. .row2 {
  1670. color: #707575;
  1671. font-size: 22rpx;
  1672. .color1 {
  1673. width: 16rpx;
  1674. height: 12rpx;
  1675. background: #D2F3E2;
  1676. border-radius: 7rpx;
  1677. margin-right: 10rpx;
  1678. }
  1679. .color2 {
  1680. width: 16rpx;
  1681. height: 12rpx;
  1682. background: #2CC778;
  1683. border-radius: 7rpx;
  1684. margin-right: 10rpx;
  1685. }
  1686. }
  1687. .row3 {
  1688. position: relative;
  1689. top: -40rpx;
  1690. }
  1691. .row5 {
  1692. display: flex;
  1693. justify-content: space-between;
  1694. color: #9E9E9E;
  1695. margin-bottom: 20rpx;
  1696. .left {}
  1697. }
  1698. }
  1699. .content3 {
  1700. .btn {
  1701. display: flex;
  1702. font-size: 24rpx;
  1703. background: #F5F6FA;
  1704. padding: 8rpx;
  1705. border-radius: 10rpx;
  1706. width: 332rpx;
  1707. .btn-in {
  1708. text-align: center;
  1709. width: 400rpx;
  1710. padding: 10rpx 0;
  1711. }
  1712. .btn-active {
  1713. padding: 10rpx 0;
  1714. text-align: center;
  1715. width: 400rpx;
  1716. background: #fff;
  1717. font-weight: 700;
  1718. border-radius: 12rpx;
  1719. }
  1720. }
  1721. .right {
  1722. color: #9E9E9E;
  1723. }
  1724. .row2 {
  1725. .name {
  1726. color: #7A7A7A;
  1727. margin: 17rpx 0;
  1728. }
  1729. .bottom {
  1730. display: flex;
  1731. }
  1732. .left {
  1733. width: 80%;
  1734. }
  1735. .weight {
  1736. margin-left: 20rpx;
  1737. }
  1738. }
  1739. .row3 {
  1740. padding: 31rpx 25rpx 51rpx 25rpx;
  1741. border-radius: 15rpx;
  1742. margin-top: 31rpx;
  1743. background: #FAFAFA;
  1744. .list-item {
  1745. margin-top: 20rpx;
  1746. .number {
  1747. font-weight: 700;
  1748. }
  1749. }
  1750. }
  1751. .row7 {
  1752. .list-item {
  1753. font-size: 24rpx;
  1754. display: inline-block;
  1755. padding: 20rpx;
  1756. box-sizing: border-box;
  1757. background: #FAFAFA;
  1758. width: calc(50% - 40rpx);
  1759. margin: 20rpx;
  1760. border-radius: 8rpx;
  1761. }
  1762. }
  1763. }
  1764. .content4 {
  1765. .row1 {
  1766. display: flex;
  1767. .opts6 uni-canvas {
  1768. width: 200px;
  1769. }
  1770. }
  1771. }
  1772. .content5 {
  1773. .days-nav {
  1774. display: flex;
  1775. justify-content: space-evenly;
  1776. }
  1777. }
  1778. .zt-right {
  1779. flex-direction: column;
  1780. justify-content: space-evenly;
  1781. height: 100px;
  1782. display: flex;
  1783. width: 100%;
  1784. }
  1785. .content6 {
  1786. .row1 {
  1787. margin: 20rpx 0;
  1788. }
  1789. .left {
  1790. // font-weight: 700;
  1791. // margin
  1792. }
  1793. }
  1794. .days-nav {
  1795. margin: 20rpx;
  1796. background: #F5F6FA;
  1797. border-radius: 8rpx;
  1798. padding: 4rpx 0;
  1799. .item {
  1800. width: 33%;
  1801. display: flex;
  1802. justify-content: center;
  1803. padding: 6px 0;
  1804. }
  1805. .item-active {
  1806. background: #fff;
  1807. }
  1808. }
  1809. </style>