Commit aa4cc1d2 by chenwq

看产值

1 parent f1c72330
...@@ -213,9 +213,9 @@ Component({ ...@@ -213,9 +213,9 @@ Component({
this.getMerchantList(isReset) this.getMerchantList(isReset)
}, },
getTotal() { getTotal() {
let { searchForm } = this.data let { userInfo } = wx.$storage.get()
let params = { let params = {
merchantId: searchForm.shopMerchantIds.length ? searchForm.shopMerchantIds[0] : '' merchantId: userInfo.subLoginUser.isSuper ? '' : userInfo.subLoginUser.merchantId
} }
outputValueApi.getMerchantTotal(params).then(res => { outputValueApi.getMerchantTotal(params).then(res => {
this.setData({ this.setData({
...@@ -240,9 +240,9 @@ Component({ ...@@ -240,9 +240,9 @@ Component({
_currentDate = new Date(startYearMonth) _currentDate = new Date(startYearMonth)
_endMonthDate = new Date(startYearMonth) _endMonthDate = new Date(startYearMonth)
} else if (startTime && endTime) { } else if (startTime && endTime) {
_currentDate = new Date(endTime) _currentDate = new Date(endTime.replace(/-/g, '/'))
_endMonthDate = new Date(endTime) _endMonthDate = new Date(endTime.replace(/-/g, '/'))
searchStart = new Date(startTime) searchStart = new Date(startTime.replace(/-/g, '/'))
} }
_endMonthDate.setMonth(_currentDate.getMonth() - monthInterval) _endMonthDate.setMonth(_currentDate.getMonth() - monthInterval)
let _startMonthDate = new Date(isReset ? _currentDate : _endMonthDate) let _startMonthDate = new Date(isReset ? _currentDate : _endMonthDate)
...@@ -252,7 +252,7 @@ Component({ ...@@ -252,7 +252,7 @@ Component({
this.setData({ this.setData({
['pageCof.startYearMonth']: startYearMonth, ['pageCof.startYearMonth']: startYearMonth,
['pageCof.endYearMonth']: endYearMonth, ['pageCof.endYearMonth']: endYearMonth,
isEnd: new Date(new Date(startTime)).format('yyyy-MM') == startYearMonth isEnd: new Date(new Date(startTime.replace(/-/g, '/'))).format('yyyy-MM') == startYearMonth
}) })
}, },
getMerchantList(isReset = false) { getMerchantList(isReset = false) {
...@@ -268,7 +268,7 @@ Component({ ...@@ -268,7 +268,7 @@ Component({
}) })
this.dealMonth(isReset) this.dealMonth(isReset)
let params = { let params = {
partnerMerchantId: userInfo.subLoginUser.merchantId, partnerMerchantId: userInfo.subLoginUser.isSuper ? '' : userInfo.subLoginUser.merchantId,
merchantId: searchForm.shopMerchantIds.length ? searchForm.shopMerchantIds[0] : '', merchantId: searchForm.shopMerchantIds.length ? searchForm.shopMerchantIds[0] : '',
sceneType: searchForm.sceneType, sceneType: searchForm.sceneType,
...this.data.pageCof ...this.data.pageCof
......
...@@ -2,7 +2,7 @@ const sceneFormList = [{ ...@@ -2,7 +2,7 @@ const sceneFormList = [{
label: '太阳膜', label: '太阳膜',
name: 'scene1Total' name: 'scene1Total'
}, { }, {
label: '众筹活动', label: '售后众筹',
name: 'scene3Total' name: 'scene3Total'
}, { }, {
label: '会员权益/升级', label: '会员权益/升级',
......
...@@ -197,6 +197,10 @@ ...@@ -197,6 +197,10 @@
color: #323436; color: #323436;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.label.num-grey {
color: #8A8C90;
}
} }
.compare-block { .compare-block {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<view class="list-content"> <view class="list-content">
<view class="flex"> <view class="flex">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block"> <view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block">
<view class="label">{{subItem.label}}</view> <view class="label num-grey">{{subItem.label}}</view>
<view class="num">¥{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}</view> <view class="num">¥{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}</view>
</view> </view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!