Commit 8553dd98 by chenwq

bug修复

1 parent a08937a1
......@@ -20,7 +20,7 @@
<!-- followUpPerson -->
<view class="item">
<view class="label">跟进人</view>
<view class="name">{{item.employeeName}}|{{item.advanceUserName}}</view>
<view class="name">{{item.employeeName}}{{ item.sellerName ? ('|' + item.sellerName) : ''}}</view>
</view>
<!-- reasonContainer -->
<view class="item">
......
......@@ -3,6 +3,9 @@ import * as echarts from '~/packagesList/packageOutput/components/ec-canvas/echa
import constant from './constant/constant'
import echartData from './constant/echartData'
import outputApi from '~/api/outputApi/index'
import {
IMG_URL
} from '~/utils/constantData'
Page({
/**
......@@ -12,6 +15,8 @@ Page({
ec: {
lazyLoad: true
},
IMGURL: IMG_URL,
emptyShow: false,
navStyle: 'background-color: rgba(0,0,0,0);',
navTitleStyle: "font-weight: 600; font- size: 34rpx; color: #282829;",
sceneFormList: constant.sceneFormList,
......@@ -132,13 +137,11 @@ Page({
let { diagramList } = this.data
const abscissaDataList = [],
moneyTotalList = [],
stockList = []
moneyTotalList = []
diagramList.forEach(element => {
abscissaDataList.push(element.abscissaData)
moneyTotalList.push(element.purchaseMoney)
stockList.push(element.stock)
})
// 使用 Math.max 方法找到数组中的最大值
const max = Math.max(...moneyTotalList)
......@@ -151,27 +154,7 @@ Page({
right: '15%'
},
tooltip: {
trigger: 'axis',
// formatter: function (params) {
// console.log(params, 'formatter')
// // debugger
// // + '\n'
// var html = params[0].name
// html += '\n'
// for (var i = 0; i < params.length; i++) {
// let unit = i + 1 == params.length ? '' : '\n'
// let template = params[i].marker + params[i].seriesName + ':' + ' ' + params[i].value
// if (option.series[params[i].seriesIndex].name == '转化率') {
// template = template + '%' + unit
// } else {
// template = template + unit
// }
// html += template
// }
// // html += params[0].name
// console.log(html, 'html')
// return html
// }
trigger: 'axis'
},
// 滚动设置
dataZoom: [
......@@ -194,7 +177,7 @@ Page({
}
],
legend: {
data: ['采购价格', '剩余库存'],
data: ['采购价格'],
top: 'bottom'
},
xAxis: [
......@@ -216,17 +199,17 @@ Page({
axisLabel: {
formatter: '{value} 元'
}
},
{
type: 'value',
name: '米',
position: 'right',
alignTicks: true,
offset: -10,
axisLabel: {
formatter: '{value} 米'
}
}
// {
// type: 'value',
// name: '米',
// position: 'right',
// alignTicks: true,
// offset: -10,
// axisLabel: {
// formatter: '{value} 米'
// }
// }
],
series: [
{
......@@ -234,12 +217,6 @@ Page({
type: 'bar',
yAxisIndex: 0,
data: moneyTotalList
},
{
name: '剩余库存',
type: 'line',
yAxisIndex: 1,
data: stockList
}
]
}
......@@ -362,10 +339,17 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$api.showLoading('加载中...')
this.initTime()
this.freshPage()
this.getPurchaseList()
this.getPurTendency()
new setTimeout(() => {
wx.$api.hideLoading()
this.setData({
emptyShow: true
})
}, 3000)
},
/**
......
......@@ -294,4 +294,15 @@
width: 670rpx;
height: 538rpx;
}
}
\ No newline at end of file
.content-empty {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.img-empty {
width: 512rpx;
height: 512rpx;
}
}}
\ No newline at end of file
......@@ -28,7 +28,7 @@
</view>
</view>
<!-- 门店引流 -->
<view class="box">
<view class="box" wx:if="{{rankList.length}}">
<!-- 门店引流排行 -->
<view class="title">门店引流排行</view>
<view class="rank">
......@@ -71,7 +71,7 @@
</view>
</view>
<!-- 采购金额 -->
<view class="box">
<view class="box" wx:if="{{purList.length}}">
<!-- 采购金额走势 -->
<view class="title">采购金额走势
<view class="title-tips no-bold">总采购金额<text class="txt-red">¥{{purObj.purchaseMoney}}</text></view>
......@@ -92,9 +92,9 @@
<view class="rank-num">
<view class="rank-txt {{'txt' + index}}">{{index + 1}}</view>
</view>
<view class="goods-name text-hide">{{item.goodsName}}</view>
<view class="goods-name text-hide">{{item.upgradeGoodsName}}</view>
</view>
<view class="purchase-num">已发<text class="num">{{item.purchaseNum}}</text>卷</view>
<view class="purchase-num"><text class="num">{{item.goodsNumber}}</text>卷</view>
</view>
<view class="">{{item.merchantName}}</view>
</view>
......@@ -103,4 +103,8 @@
<glsx-image wx:if="{{purList.length != purTotal}}" src="{{'output/icon-more.png'}}" class="more" bindtap="getPurchaseList" />
</view>
</view>
<!-- 暂无数据 -->
<view wx:if="{{!rankList.length && !purList.length && emptyShow}}" class="content-empty">
<image class="img-empty" src="{{IMGURL}}output/sun-empty-transparent.png?v={{img_version }}" />
</view>
</scroll-view>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!