feat(bonus): 奖金添加复购级差收益字段,且只有存在时才可见

This commit is contained in:
woody 2025-07-09 15:54:49 +08:00
parent 45bc6165e5
commit 4320d22cac
4 changed files with 379 additions and 368 deletions

View File

@ -1,4 +1,3 @@
<template>
<view class="main">
<view v-if="userInfo.pkCountry != 1" class="top">
@ -6,27 +5,33 @@
<view class="time-text">{{ '查询时间' }}</view>
<view class="time1">
<picker :value="query.startDate" mode="date" @change="bindDateChange">
<view v-if="query.startDate!=''" class="uni-input">{{query.startDate}}</view>
<view v-if="query.startDate != ''" class="uni-input">{{
query.startDate
}}</view>
<view v-else class="uni-input">{{ '开始日期' }}</view>
</picker>
</view>
<view class="text_s">{{ '至' }}</view>
<view class="time1">
<picker :value="query.endDate" mode="date" @change="bindDateChange1">
<view v-if="query.endDate!=''" class="uni-input">{{query.endDate}}</view>
<view v-if="query.endDate != ''" class="uni-input">{{
query.endDate
}}</view>
<view v-else class="uni-input">{{ '结束日期' }}</view>
</picker>
</view>
<view class="search-icons" @click="submit">
<image class="search-icon-s" src="../../static/images/search.png"></image>
<image
class="search-icon-s"
src="../../static/images/search.png"
></image>
</view>
</view>
</view>
<view class="search-content">
<view class="search-list">
<view v-for="item in dataList" class="search-view">
<view style="height: 20rpx;"></view>
<view style="height: 20rpx"></view>
<view class="flex_s">
<view class="data-left">
{{ '奖金日期' }}
@ -36,25 +41,19 @@
</view>
</view>
<view class="flex_s">
<view class="data-left">
{{'直推收益'}}({{ isLocaled() }})
</view>
<view class="data-left"> {{ '直推收益' }}({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.directIncome | toThousandthAndKeepDecimal }}
</view>
</view>
<view class="flex_s">
<view class="data-left">
{{'拓展收益'}}({{ isLocaled() }})
</view>
<view class="data-left"> {{ '拓展收益' }}({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.expandIncome | toThousandthAndKeepDecimal }}
</view>
</view>
<view class="flex_s">
<view class="data-left">
{{'辅导收益'}}({{ isLocaled() }})
</view>
<view class="data-left"> {{ '辅导收益' }}({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.coachIncome | toThousandthAndKeepDecimal }}
</view>
@ -68,22 +67,18 @@
</view>
</view> -->
<view class="flex_s" v-if="userInfo.pkCountry == 1">
<view class="data-left">
{{'服务补贴'}}({{ isLocaled() }})
</view>
<view class="data-left"> {{ '服务补贴' }}({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.serviceIncome | toThousandthAndKeepDecimal }}
</view>
</view>
<!-- <view class="flex_s">
<view class="data-left">
级差收益({{ isLocaled() }})
</view>
<view v-if="item.repurRangeIncome" class="flex_s">
<view class="data-left"> 复购级差收益({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.repurRangeIncome | toThousandthAndKeepDecimal }}
</view>
</view>
<view class="flex_s">
<!-- <view class="flex_s">
<view class="data-left">
{{$t('直推级差')}}({{ isLocaled() }})
</view>
@ -92,9 +87,7 @@
</view>
</view> -->
<view class="flex_s" v-if="userInfo.pkCountry == 1">
<view class="data-left">
{{'重复消费'}}({{ isLocaled() }})
</view>
<view class="data-left"> {{ '重复消费' }}({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.backPoints | toThousandthAndKeepDecimal }}
</view>
@ -108,9 +101,7 @@
</view>
</view>
<view class="flex_s">
<view class="data-left">
{{'实发小计'}}({{ isLocaled() }})
</view>
<view class="data-left"> {{ '实发小计' }}({{ isLocaled() }}) </view>
<view class="data-right">
{{ item.purRealSubtotal | toThousandthAndKeepDecimal }}
</view>
@ -120,8 +111,8 @@
{{'查看详情'}}
</view>
</view> -->
<view style="clear: both;"></view>
<view style="height: 20rpx;background-color: #fff;"></view>
<view style="clear: both"></view>
<view style="height: 20rpx; background-color: #fff"></view>
</view>
</view>
</view>
@ -130,13 +121,9 @@
<script>
import * as api from '@/config/login.js'
import {
setToken
} from '@/config/auth.js'
import { setToken } from '@/config/auth.js'
import store from '@/store'
import {
isLocaled
} from '@/util/numberToCurrency'
import { isLocaled } from '@/util/numberToCurrency'
export default {
data() {
@ -150,18 +137,16 @@
endDate: '',
sourceMemberCode: '',
sourceMemberName: '',
pkBonusItems: ''
pkBonusItems: '',
},
page: {
pageNum: 1,
pageSize: 50
}
pageSize: 50,
},
}
},
props: ["num", "checkRule"],
onLoad() {
},
props: ['num', 'checkRule'],
onLoad() {},
created() {
// this.getType()
this.userInfo = uni.getStorageSync('User')
@ -171,15 +156,18 @@
isLocaled,
urlTap() {
uni.navigateTo({
url: '/pages/bonusSource/index'
url: '/pages/bonusSource/index',
})
},
getInfo() {
api.getInfo().then(res => {
api
.getInfo()
.then(res => {
if (res) {
this.userInfo = res.data
}
}).catch(error => {
})
.catch(error => {
reject(error)
})
},
@ -187,11 +175,14 @@
this.getDataList()
},
getType() {
api.getBonusType().then(res => {
api
.getBonusType()
.then(res => {
if (res) {
this.getBonusTypeList = res.rows
}
}).catch(error => {
})
.catch(error => {
reject(error)
})
},
@ -205,17 +196,21 @@
this.query.endDate = e.detail.value
},
getDataList(num) {
api.queryBonusFirst(this.query, `?pageNum=${num||1}&pageSize=${this.page.pageSize}`).then(res => {
api
.queryBonusFirst(
this.query,
`?pageNum=${num || 1}&pageSize=${this.page.pageSize}`
)
.then(res => {
if (res) {
this.dataList.push(...res.rows)
}
}).catch(error => {
})
.catch(error => {
reject(error)
})
},
submit() {
},
submit() {},
},
}
</script>
@ -233,14 +228,14 @@
color: #fff;
font-size: 28rpx;
text-align: center;
background: #005BAC;
background: #005bac;
margin: 30rpx 0 0 0;
float: right;
border-radius: 24rpx;
}
.type {
color: #005BAC !important;
color: #005bac !important;
}
.flex_s {
@ -291,7 +286,7 @@
.search-icons {
width: 47rpx;
height: 47rpx;
background: #005BAC;
background: #005bac;
border-radius: 50%;
margin-left: 20rpx;
display: flex;
@ -377,10 +372,12 @@
left: 30rpx;
top: 12rpx;
image {}
image {
}
}
.search-bg {}
.search-bg {
}
.top {
/* height: 200rpx; */
@ -400,7 +397,7 @@
.search-bg {
width: 432rpx;
height: 35rpx;
background: #F5F6F8;
background: #f5f6f8;
border-radius: 33rpx;
display: flex;
position: relative;

View File

@ -20,7 +20,7 @@ module.exports = vm => {
//#ifdef DEV_SERVER
console.log('DEV_SERVER')
config.baseURL = 'http://192.168.0.86:8080'
config.baseURL = '/prod-api'
//#endif
//#ifdef QA_SERVER

View File

@ -53,12 +53,13 @@
<view
v-for="(fieldName, fieldKey) in BONUS_FIELD_MAP"
:key="fieldKey"
class="bonus-item"
>
<view class="bonus-item" v-if="dailyBonus[fieldKey]">
<text class="item-label">{{ fieldName }}(¥)</text>
<text class="item-value">{{ dailyBonus[fieldKey] }}</text>
</view>
</view>
</view>
<view class="card-footer">
<text class="subtotal-label">小计(¥)</text>
<text class="subtotal-value">{{
@ -115,7 +116,8 @@ export default {
retailSameLevelIncome: '平级收益',
retailAreaIncome: '区域收益',
retailBenefitRangeIncome: '福利级差收益',
retailMonthRepurchaseIncome: '复购级差收益',
repurRangeIncome: '复购级差收益',
retailMonthRepurchaseIncome: '月复购级差收益',
coachIncome: '培育津贴',
retailBenefitIncomeTotal: '福利分红收益',
backPoints: '重消收益',

View File

@ -21,11 +21,22 @@
}}</text>
</view>
<view v-for="(label, key) in detailLabels" :key="key" class="detail-item">
<template
v-if="key === 'repurRangeIncome' && bonusData.repurRangeIncome"
>
<text class="detail-label">{{ label }}</text>
<text class="detail-value">
<text class="currency-symbol-small">¥</text>
{{ bonusData[key] || '0.00' }}
</text>
</template>
<template v-else>
<text class="detail-label">{{ label }}</text>
<text class="detail-value">
<text class="currency-symbol-small">¥</text>
{{ bonusData[key] || '0.00' }}
</text>
</template>
</view>
<!-- 分割线 -->
<view class="divider"></view>
@ -63,6 +74,7 @@ export default {
retailRangeIncome: '直推收益(¥)',
retailSameLevelIncome: '平级收益(¥)',
retailAreaIncome: '区域收益(¥)',
repurRangeIncome: '复购级差收益(¥)',
// welfareLevelDifferenceIncome: '(¥)',
// welfareDividendIncome: '(¥)',
backPoints: '重消收益(¥)',