|
@@ -37,7 +37,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-line color="#EEEEEE" class="u-line" />
|
|
|
- <view class="row2">
|
|
|
+ <view class="row2" @click="goToPage(1)">
|
|
|
<view class="top">
|
|
|
合同总量
|
|
|
</view>
|
|
@@ -75,7 +75,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="row3">
|
|
|
+ <view class="row3" @click="goToPage(2)">
|
|
|
<view class="top">
|
|
|
合同总额
|
|
|
</view>
|
|
@@ -113,7 +113,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="row4">
|
|
|
+ <view class="row4" @click="goToPage(3)">
|
|
|
<view class="top">
|
|
|
合同总额
|
|
|
</view>
|
|
@@ -154,7 +154,7 @@
|
|
|
|
|
|
</view>
|
|
|
<view class="content3 content-wrap">
|
|
|
- <view class="title">粮食品种占比</view>
|
|
|
+ <view class="title" @click="goToPage(4)">粮食品种占比</view>
|
|
|
<u-line color="#EEEEEE" class="u-line" />
|
|
|
<qiun-data-charts type="line" class='line-chart' :chartData="chartData" :opts='zringoptions'
|
|
|
background="none" :ontouch="true" />
|
|
@@ -165,7 +165,7 @@
|
|
|
<qiun-data-charts type="column" class='line-chart' :chartData="carChartData" :opts='ringoptions'
|
|
|
background="none" />
|
|
|
</view>
|
|
|
- <view class="content5 content-wrap">
|
|
|
+ <view class="content5 content-wrap" @click="goToPage(5)">
|
|
|
<view class="title">库存成本</view>
|
|
|
<u-line color="#EEEEEE" class="u-line" />
|
|
|
<view class="row1">
|
|
@@ -198,11 +198,12 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="content7">
|
|
|
- <maoScroll :data="ztList" :showNum="showNum" :lineHeight="lineHeight" :animationScroll="animationScroll" :animation="animation">
|
|
|
+ <maoScroll :data="ztList" :showNum="showNum" :lineHeight="lineHeight" :animationScroll="animationScroll"
|
|
|
+ :animation="animation">
|
|
|
<template v-slot="{line}">
|
|
|
<view class="row1">
|
|
|
<view class="zt">
|
|
|
- <view class="point"></view>在途
|
|
|
+ <view class="point"></view>在途
|
|
|
</view>
|
|
|
<view>{{line.startName}}</view>
|
|
|
<img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt="">
|
|
@@ -212,16 +213,6 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
</maoScroll>
|
|
|
- <!-- <view class="row1" v-for="(item,index) in ztList">
|
|
|
- <view class="zt">
|
|
|
- <view class="point"></view>在途
|
|
|
- </view>
|
|
|
- <view>{{item.startName}}</view>
|
|
|
- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jiantou.png" alt="">
|
|
|
- <view class="">
|
|
|
- {{item.endName}}
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -233,7 +224,7 @@
|
|
|
<script>
|
|
|
import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
|
|
|
export default {
|
|
|
- components:{
|
|
|
+ components: {
|
|
|
maoScroll
|
|
|
},
|
|
|
data() {
|
|
@@ -242,15 +233,10 @@
|
|
|
inventoryValue: '',
|
|
|
contractSelect: '0',
|
|
|
url: '',
|
|
|
- nowDate: '2021年全年',
|
|
|
+ nowDate: '2022年全年',
|
|
|
+ seachMoth: '',
|
|
|
background: {
|
|
|
backgroundColor: '#2E303A',
|
|
|
- // 导航栏背景图
|
|
|
- // background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
|
|
|
- // 还可以设置背景图size属性
|
|
|
- // backgroundSize: 'cover',
|
|
|
- // 渐变色
|
|
|
- // backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
|
|
|
},
|
|
|
typeSelect: '0',
|
|
|
contractSelect: '0',
|
|
@@ -299,13 +285,13 @@
|
|
|
percentage: ''
|
|
|
},
|
|
|
dateList: [
|
|
|
- [{
|
|
|
+ [ {
|
|
|
value: '1',
|
|
|
- label: '2020年'
|
|
|
+ label: '2021年'
|
|
|
},
|
|
|
{
|
|
|
value: '2',
|
|
|
- label: '2021年'
|
|
|
+ label: '2022年'
|
|
|
}
|
|
|
],
|
|
|
[{
|
|
@@ -313,39 +299,39 @@
|
|
|
label: '全年'
|
|
|
},
|
|
|
{
|
|
|
- value: '1',
|
|
|
+ value: '01',
|
|
|
label: '1月'
|
|
|
},
|
|
|
{
|
|
|
- value: '2',
|
|
|
+ value: '02',
|
|
|
label: '2月'
|
|
|
},
|
|
|
{
|
|
|
- value: '3',
|
|
|
+ value: '03',
|
|
|
label: '3月'
|
|
|
},
|
|
|
{
|
|
|
- value: '4',
|
|
|
+ value: '04',
|
|
|
label: '4月'
|
|
|
},
|
|
|
{
|
|
|
- value: '5',
|
|
|
+ value: '05',
|
|
|
label: '5月'
|
|
|
},
|
|
|
{
|
|
|
- value: '6',
|
|
|
+ value: '06',
|
|
|
label: '6月'
|
|
|
},
|
|
|
{
|
|
|
- value: '7',
|
|
|
+ value: '07',
|
|
|
label: '7月'
|
|
|
},
|
|
|
{
|
|
|
- value: '8',
|
|
|
+ value: '08',
|
|
|
label: '8月'
|
|
|
},
|
|
|
{
|
|
|
- value: '9',
|
|
|
+ value: '09',
|
|
|
label: '9月'
|
|
|
},
|
|
|
{
|
|
@@ -363,7 +349,6 @@
|
|
|
]
|
|
|
],
|
|
|
ztList: [],
|
|
|
- //向上滚动
|
|
|
showNum: 8,
|
|
|
lineHeight: 80,
|
|
|
animationScroll: 5000,
|
|
@@ -371,17 +356,43 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
- uni.showLoading({
|
|
|
- title:"数据加载中...",
|
|
|
- mask:true
|
|
|
- })
|
|
|
- this.url = "https://liangxin.zthymaoyi.com/map.html?id=" + uni.getStorageSync('pcUserInfo').compId
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: "数据加载中...",
|
|
|
+ // mask: true
|
|
|
+ // })
|
|
|
+ this.url = "https://liangxin.zthymaoyi.com/map_0105.html?id=" + uni.getStorageSync('pcUserInfo').compId
|
|
|
+ if (this.nowDate == '2022年全年') {
|
|
|
+ this.seachMoth = '2022'
|
|
|
+ }
|
|
|
this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
+ goToPage(index) {
|
|
|
+ console.log(index)
|
|
|
+ if (index == 4) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/user/contractLook/warehouseReserves'
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ } else if (index == 5) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/user/contractLook/inventoryCost'
|
|
|
+ })
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (this.contractSelect == '0') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/user/contractLook/purchaseContract'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/user/contractLook/salesContract'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
init() {
|
|
|
this.$api.doRequest('get', '/biInfoController/selectBiInfo?compId=' + uni.getStorageSync('pcUserInfo')
|
|
|
- .compId).then(res => {
|
|
|
+ .compId + '&seachMoth=' + this.seachMoth).then(res => {
|
|
|
console.log(res)
|
|
|
uni.hideLoading()
|
|
|
let _list = []
|
|
@@ -398,7 +409,6 @@
|
|
|
res.data.data[i].biViewInfoList[0].percent = Number(res.data.data[i].biViewInfoList[0]
|
|
|
.percentage.substring(0, res.data.data[i].biViewInfoList[0].percentage.length -
|
|
|
1))
|
|
|
-
|
|
|
switch (i) {
|
|
|
case 0:
|
|
|
this.dataObj0 = {
|
|
@@ -724,44 +734,23 @@
|
|
|
uni.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
- getHeight(Class) {
|
|
|
- let query = uni.createSelectorQuery().in(this);
|
|
|
- query
|
|
|
- .selectAll(Class)
|
|
|
- .boundingClientRect(data => {
|
|
|
- this.height = data[0].height;
|
|
|
- })
|
|
|
- .exec();
|
|
|
- },
|
|
|
- prizeScroll() {
|
|
|
- let speed = 50;
|
|
|
- let animation = uni.createAnimation({
|
|
|
- duration: this.getHeight('.content7') / speed,
|
|
|
- timingFunction: 'linear',
|
|
|
- delay: 0
|
|
|
- });
|
|
|
- // this.animation = animation;
|
|
|
- setInterval(() => {
|
|
|
- if (this.scrollHeight >= this.height) {
|
|
|
- animation.translateY(0).step();
|
|
|
- this.scrollHeight = 0;
|
|
|
- this.animationData = animation.export();
|
|
|
- } else {
|
|
|
- this.scrollHeight = this.scrollHeight + 1;
|
|
|
- animation.translateY(-this.scrollHeight).step();
|
|
|
- this.animationData = animation.export();
|
|
|
- }
|
|
|
- }, speed);
|
|
|
- },
|
|
|
confirm(e) {
|
|
|
console.log(e)
|
|
|
+ this.nowDate = e[0].label+e[1].label
|
|
|
+ let _year = e[0].label.substring(0, 4)
|
|
|
+
|
|
|
+ if (e[1].label != '全年') {
|
|
|
+ this.seachMoth = _year + e[1].value
|
|
|
+ } else {
|
|
|
+ this.seachMoth = _year
|
|
|
+ }
|
|
|
+ this.init()
|
|
|
},
|
|
|
dateClick() {
|
|
|
this.showDate = true
|
|
|
},
|
|
|
typeClick(index) {
|
|
|
this.typeSelect = index
|
|
|
-
|
|
|
console.log(index)
|
|
|
},
|
|
|
htClick(index) {
|