Commit 8553dd98 by chenwq

bug修复

1 parent a08937a1
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<!-- followUpPerson --> <!-- followUpPerson -->
<view class="item"> <view class="item">
<view class="label">跟进人</view> <view class="label">跟进人</view>
<view class="name">{{item.employeeName}}|{{item.advanceUserName}}</view> <view class="name">{{item.employeeName}}{{ item.sellerName ? ('|' + item.sellerName) : ''}}</view>
</view> </view>
<!-- reasonContainer --> <!-- reasonContainer -->
<view class="item"> <view class="item">
......
...@@ -3,6 +3,9 @@ import * as echarts from '~/packagesList/packageOutput/components/ec-canvas/echa ...@@ -3,6 +3,9 @@ import * as echarts from '~/packagesList/packageOutput/components/ec-canvas/echa
import constant from './constant/constant' import constant from './constant/constant'
import echartData from './constant/echartData' import echartData from './constant/echartData'
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
import {
IMG_URL
} from '~/utils/constantData'
Page({ Page({
/** /**
...@@ -12,6 +15,8 @@ Page({ ...@@ -12,6 +15,8 @@ Page({
ec: { ec: {
lazyLoad: true lazyLoad: true
}, },
IMGURL: IMG_URL,
emptyShow: false,
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
navTitleStyle: "font-weight: 600; font- size: 34rpx; color: #282829;", navTitleStyle: "font-weight: 600; font- size: 34rpx; color: #282829;",
sceneFormList: constant.sceneFormList, sceneFormList: constant.sceneFormList,
...@@ -132,13 +137,11 @@ Page({ ...@@ -132,13 +137,11 @@ Page({
let { diagramList } = this.data let { diagramList } = this.data
const abscissaDataList = [], const abscissaDataList = [],
moneyTotalList = [], moneyTotalList = []
stockList = []
diagramList.forEach(element => { diagramList.forEach(element => {
abscissaDataList.push(element.abscissaData) abscissaDataList.push(element.abscissaData)
moneyTotalList.push(element.purchaseMoney) moneyTotalList.push(element.purchaseMoney)
stockList.push(element.stock)
}) })
// 使用 Math.max 方法找到数组中的最大值 // 使用 Math.max 方法找到数组中的最大值
const max = Math.max(...moneyTotalList) const max = Math.max(...moneyTotalList)
...@@ -151,27 +154,7 @@ Page({ ...@@ -151,27 +154,7 @@ Page({
right: '15%' right: '15%'
}, },
tooltip: { tooltip: {
trigger: 'axis', 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
// }
}, },
// 滚动设置 // 滚动设置
dataZoom: [ dataZoom: [
...@@ -194,7 +177,7 @@ Page({ ...@@ -194,7 +177,7 @@ Page({
} }
], ],
legend: { legend: {
data: ['采购价格', '剩余库存'], data: ['采购价格'],
top: 'bottom' top: 'bottom'
}, },
xAxis: [ xAxis: [
...@@ -216,17 +199,17 @@ Page({ ...@@ -216,17 +199,17 @@ Page({
axisLabel: { axisLabel: {
formatter: '{value} 元' 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: [ series: [
{ {
...@@ -234,12 +217,6 @@ Page({ ...@@ -234,12 +217,6 @@ Page({
type: 'bar', type: 'bar',
yAxisIndex: 0, yAxisIndex: 0,
data: moneyTotalList data: moneyTotalList
},
{
name: '剩余库存',
type: 'line',
yAxisIndex: 1,
data: stockList
} }
] ]
} }
...@@ -362,10 +339,17 @@ Page({ ...@@ -362,10 +339,17 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
wx.$api.showLoading('加载中...')
this.initTime() this.initTime()
this.freshPage() this.freshPage()
this.getPurchaseList() this.getPurchaseList()
this.getPurTendency() this.getPurTendency()
new setTimeout(() => {
wx.$api.hideLoading()
this.setData({
emptyShow: true
})
}, 3000)
}, },
/** /**
......
...@@ -294,4 +294,15 @@ ...@@ -294,4 +294,15 @@
width: 670rpx; width: 670rpx;
height: 538rpx; height: 538rpx;
} }
}
\ No newline at end of file \ 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 \ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
</view> </view>
<!-- 门店引流 --> <!-- 门店引流 -->
<view class="box"> <view class="box" wx:if="{{rankList.length}}">
<!-- 门店引流排行 --> <!-- 门店引流排行 -->
<view class="title">门店引流排行</view> <view class="title">门店引流排行</view>
<view class="rank"> <view class="rank">
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</view> </view>
</view> </view>
<!-- 采购金额 --> <!-- 采购金额 -->
<view class="box"> <view class="box" wx:if="{{purList.length}}">
<!-- 采购金额走势 --> <!-- 采购金额走势 -->
<view class="title">采购金额走势 <view class="title">采购金额走势
<view class="title-tips no-bold">总采购金额<text class="txt-red">¥{{purObj.purchaseMoney}}</text></view> <view class="title-tips no-bold">总采购金额<text class="txt-red">¥{{purObj.purchaseMoney}}</text></view>
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
<view class="rank-num"> <view class="rank-num">
<view class="rank-txt {{'txt' + index}}">{{index + 1}}</view> <view class="rank-txt {{'txt' + index}}">{{index + 1}}</view>
</view> </view>
<view class="goods-name text-hide">{{item.goodsName}}</view> <view class="goods-name text-hide">{{item.upgradeGoodsName}}</view>
</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>
<view class="">{{item.merchantName}}</view> <view class="">{{item.merchantName}}</view>
</view> </view>
...@@ -103,4 +103,8 @@ ...@@ -103,4 +103,8 @@
<glsx-image wx:if="{{purList.length != purTotal}}" src="{{'output/icon-more.png'}}" class="more" bindtap="getPurchaseList" /> <glsx-image wx:if="{{purList.length != purTotal}}" src="{{'output/icon-more.png'}}" class="more" bindtap="getPurchaseList" />
</view> </view>
</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> </scroll-view>
\ No newline at end of file \ 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!