Merge branch 'lx-test' of gitee.com:cabbage_qd/web-base-h5 into lx-online

This commit is contained in:
woody 2025-06-06 09:16:52 +08:00
commit 8c2b0233ab
3 changed files with 682 additions and 587 deletions

View File

@ -1,4 +1,3 @@
<template> <template>
<view class="main"> <view class="main">
<view v-if="userInfo.pkCountry != 1" class="top"> <view v-if="userInfo.pkCountry != 1" class="top">
@ -6,27 +5,33 @@
<view class="time-text">{{ '查询时间' }}</view> <view class="time-text">{{ '查询时间' }}</view>
<view class="time1"> <view class="time1">
<picker :value="query.startDate" mode="date" @change="bindDateChange"> <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> <view v-else class="uni-input">{{ '开始日期' }}</view>
</picker> </picker>
</view> </view>
<view class="text_s">{{ '至' }}</view> <view class="text_s">{{ '至' }}</view>
<view class="time1"> <view class="time1">
<picker :value="query.endDate" mode="date" @change="bindDateChange1"> <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> <view v-else class="uni-input">{{ '结束日期' }}</view>
</picker> </picker>
</view> </view>
<view class="search-icons" @click="submit"> <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>
</view> </view>
<view class="search-content"> <view class="search-content">
<view class="search-list"> <view class="search-list">
<view v-for="item in dataList" class="search-view"> <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="flex_s">
<view class="data-left"> <view class="data-left">
{{ '奖金日期' }} {{ '奖金日期' }}
@ -37,7 +42,7 @@
</view> </view>
<view class="flex_s"> <view class="flex_s">
<view class="data-left"> <view class="data-left">
{{'直推收益'}}({{ isLocaled() }}) {{ '直推收益' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.directIncome | toThousandthAndKeepDecimal }} {{ item.directIncome | toThousandthAndKeepDecimal }}
@ -45,7 +50,7 @@
</view> </view>
<view class="flex_s"> <view class="flex_s">
<view class="data-left"> <view class="data-left">
{{'拓展收益'}}({{ isLocaled() }}) {{ '拓展收益' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.expandIncome | toThousandthAndKeepDecimal }} {{ item.expandIncome | toThousandthAndKeepDecimal }}
@ -53,7 +58,7 @@
</view> </view>
<view class="flex_s"> <view class="flex_s">
<view class="data-left"> <view class="data-left">
{{'辅导收益'}}({{ isLocaled() }}) {{ '辅导收益' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.coachIncome | toThousandthAndKeepDecimal }} {{ item.coachIncome | toThousandthAndKeepDecimal }}
@ -61,7 +66,7 @@
</view> </view>
<!-- <view class="flex_s"> <!-- <view class="flex_s">
<view class="data-left"> <view class="data-left">
{{'分红收益'}}({{ isLocaled() }}) {{'分红收益'}}
</view> </view>
<view class="data-right"> <view class="data-right">
{{item.shareIncome| toThousandthAndKeepDecimal}} {{item.shareIncome| toThousandthAndKeepDecimal}}
@ -69,23 +74,21 @@
</view> --> </view> -->
<view class="flex_s" v-if="userInfo.pkCountry == 1"> <view class="flex_s" v-if="userInfo.pkCountry == 1">
<view class="data-left"> <view class="data-left">
{{'服务补贴'}}({{ isLocaled() }}) {{ '服务补贴' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.serviceIncome | toThousandthAndKeepDecimal }} {{ item.serviceIncome | toThousandthAndKeepDecimal }}
</view> </view>
</view> </view>
<view class="flex_s"> <view class="flex_s">
<view class="data-left"> <view class="data-left"> 级差收益 </view>
级差收益({{ isLocaled() }})
</view>
<view class="data-right"> <view class="data-right">
{{ item.repurRangeIncome | toThousandthAndKeepDecimal }} {{ item.repurRangeIncome | toThousandthAndKeepDecimal }}
</view> </view>
</view> </view>
<view class="flex_s"> <view class="flex_s">
<view class="data-left"> <view class="data-left">
{{$t('直推级差')}}({{ isLocaled() }}) {{ $t('直推级差') }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.globalPoints | toThousandthAndKeepDecimal }} {{ item.globalPoints | toThousandthAndKeepDecimal }}
@ -93,7 +96,7 @@
</view> </view>
<view class="flex_s" v-if="userInfo.pkCountry == 1"> <view class="flex_s" v-if="userInfo.pkCountry == 1">
<view class="data-left"> <view class="data-left">
{{'重复消费'}}({{ isLocaled() }}) {{ '重复消费' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.backPoints | toThousandthAndKeepDecimal }} {{ item.backPoints | toThousandthAndKeepDecimal }}
@ -101,7 +104,7 @@
</view> </view>
<view class="flex_s" v-if="userInfo.pkCountry == 1"> <view class="flex_s" v-if="userInfo.pkCountry == 1">
<view class="data-left"> <view class="data-left">
{{'平台服务费'}}({{ isLocaled() }}) {{ '平台服务费' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.serviceSpend | toThousandthAndKeepDecimal }} {{ item.serviceSpend | toThousandthAndKeepDecimal }}
@ -109,7 +112,7 @@
</view> </view>
<view class="flex_s"> <view class="flex_s">
<view class="data-left"> <view class="data-left">
{{'实发小计'}}({{ isLocaled() }}) {{ '实发小计' }}
</view> </view>
<view class="data-right"> <view class="data-right">
{{ item.purRealSubtotal | toThousandthAndKeepDecimal }} {{ item.purRealSubtotal | toThousandthAndKeepDecimal }}
@ -120,8 +123,8 @@
{{'查看详情'}} {{'查看详情'}}
</view> </view>
</view> --> </view> -->
<view style="clear: both;"></view> <view style="clear: both"></view>
<view style="height: 20rpx;background-color: #fff;"></view> <view style="height: 20rpx; background-color: #fff"></view>
</view> </view>
</view> </view>
</view> </view>
@ -130,13 +133,9 @@
<script> <script>
import * as api from '@/config/login.js' import * as api from '@/config/login.js'
import { import { setToken } from '@/config/auth.js'
setToken
} from '@/config/auth.js'
import store from '@/store' import store from '@/store'
import { import { isLocaled } from '@/util/numberToCurrency'
isLocaled
} from '@/util/numberToCurrency'
export default { export default {
data() { data() {
@ -150,18 +149,16 @@
endDate: '', endDate: '',
sourceMemberCode: '', sourceMemberCode: '',
sourceMemberName: '', sourceMemberName: '',
pkBonusItems: '' pkBonusItems: '',
}, },
page: { page: {
pageNum: 1, pageNum: 1,
pageSize: 50 pageSize: 50,
} },
} }
}, },
props: ["num", "checkRule"], props: ['num', 'checkRule'],
onLoad() { onLoad() {},
},
created() { created() {
// this.getType() // this.getType()
this.userInfo = uni.getStorageSync('User') this.userInfo = uni.getStorageSync('User')
@ -171,15 +168,18 @@
isLocaled, isLocaled,
urlTap() { urlTap() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/bonusSource/index' url: '/pages/bonusSource/index',
}) })
}, },
getInfo() { getInfo() {
api.getInfo().then(res => { api
.getInfo()
.then(res => {
if (res) { if (res) {
this.userInfo = res.data this.userInfo = res.data
} }
}).catch(error => { })
.catch(error => {
reject(error) reject(error)
}) })
}, },
@ -187,11 +187,14 @@
this.getDataList() this.getDataList()
}, },
getType() { getType() {
api.getBonusType().then(res => { api
.getBonusType()
.then(res => {
if (res) { if (res) {
this.getBonusTypeList = res.rows this.getBonusTypeList = res.rows
} }
}).catch(error => { })
.catch(error => {
reject(error) reject(error)
}) })
}, },
@ -205,17 +208,21 @@
this.query.endDate = e.detail.value this.query.endDate = e.detail.value
}, },
getDataList(num) { 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) { if (res) {
this.dataList.push(...res.rows) this.dataList.push(...res.rows)
} }
}).catch(error => { })
.catch(error => {
reject(error) reject(error)
}) })
}, },
submit() { submit() {},
},
}, },
} }
</script> </script>
@ -233,14 +240,14 @@
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
background: #005BAC; background: #005bac;
margin: 30rpx 0 0 0; margin: 30rpx 0 0 0;
float: right; float: right;
border-radius: 24rpx; border-radius: 24rpx;
} }
.type { .type {
color: #005BAC !important; color: #005bac !important;
} }
.flex_s { .flex_s {
@ -263,7 +270,7 @@
.search-view { .search-view {
/* display: flex; */ /* display: flex; */
/* justify-content: space-between; */ /* justify-content: space-between; */
padding: 30rpx 20rpx 0 20rpx; padding: 16rpx 20rpx 0 20rpx;
border-bottom: 20rpx solid #eee; border-bottom: 20rpx solid #eee;
/* border-bottom: 1px solid #eee; */ /* border-bottom: 1px solid #eee; */
margin: 0; margin: 0;
@ -291,7 +298,7 @@
.search-icons { .search-icons {
width: 47rpx; width: 47rpx;
height: 47rpx; height: 47rpx;
background: #005BAC; background: #005bac;
border-radius: 50%; border-radius: 50%;
margin-left: 20rpx; margin-left: 20rpx;
display: flex; display: flex;
@ -377,10 +384,12 @@
left: 30rpx; left: 30rpx;
top: 12rpx; top: 12rpx;
image {} image {
}
} }
.search-bg {} .search-bg {
}
.top { .top {
/* height: 200rpx; */ /* height: 200rpx; */
@ -400,7 +409,7 @@
.search-bg { .search-bg {
width: 432rpx; width: 432rpx;
height: 35rpx; height: 35rpx;
background: #F5F6F8; background: #f5f6f8;
border-radius: 33rpx; border-radius: 33rpx;
display: flex; display: flex;
position: relative; position: relative;

View File

@ -13,7 +13,7 @@ module.exports = vm => {
//#ifdef DEV_SERVER //#ifdef DEV_SERVER
console.log('DEV_SERVER') console.log('DEV_SERVER')
config.baseURL = 'http://localhost:8080' config.baseURL = 'http://t-app.beida413.com/prod-api'
//#endif //#endif
//#ifdef QA_SERVER //#ifdef QA_SERVER

View File

@ -1,25 +1,57 @@
<template> <template>
<view class="main"> <view class="main">
<scroll-view class="left_scrol_style" scroll-x="false" scroll-y="true"> <view class="totals-summary-bar">
<view class="top-lists" v-if="navList.length > 0"> <view class="total-item">
<view v-for="(item, index) in navList" v-show="item.menuKey!=''" :key="index" <text class="total-label">本月合计</text>
:class="navIndex == item.path ? 'styles' : ''" class="nav-view" @click="clickHref(item.path)"> <text class="total-amount primary-amount">{{
{{ item.name }} formatCurrency(monthIncomeTotal)
}}</text>
</view> </view>
<view class="total-separator"></view>
<view class="total-item">
<text class="total-label">昨日合计</text>
<text class="total-amount secondary-amount">{{
formatCurrency(toSum)
}}</text>
</view> </view>
</scroll-view>
<view class="sum-val">
<view v-if="monthIncomeTotal" >本月合计: <span>{{monthIncomeTotal | toThousandthAndKeepDecimal}}</span></view>
<view>昨日合计: <span>{{toSum | toThousandthAndKeepDecimal}}</span></view>
</view> </view>
<template> <template>
<sgsy v-if="navIndex==0" ref="sgsyData" :checkRule="marketList[0].isShow" :num="page.pageNum" /> <sgsy
<fgsy v-if="navIndex==1" ref="sgsyData" :checkRule="marketList[0].isShow" /> v-if="navIndex == 0"
<hignfsy v-if="navIndex==2" ref="sgsyData" :checkRule="marketList[0].isShow" /> ref="sgsyData"
<hfsy v-if="navIndex==3" ref="sgsyData" :checkRule="marketList[0].isShow" /> :checkRule="marketList[0].isShow"
<sbydsy v-if="navIndex==4" ref="sgsyData" :checkRule="marketList[0].isShow" /> :num="page.pageNum"
<fgqsy v-if="navIndex==5" ref="sgsyData" :checkRule="marketList[0].isShow" /> />
<ckkj v-if="navIndex==6" ref="sgsyData" :checkRule="marketList[0].isShow" /> <fgsy
v-if="navIndex == 1"
ref="sgsyData"
:checkRule="marketList[0].isShow"
/>
<hignfsy
v-if="navIndex == 2"
ref="sgsyData"
:checkRule="marketList[0].isShow"
/>
<hfsy
v-if="navIndex == 3"
ref="sgsyData"
:checkRule="marketList[0].isShow"
/>
<sbydsy
v-if="navIndex == 4"
ref="sgsyData"
:checkRule="marketList[0].isShow"
/>
<fgqsy
v-if="navIndex == 5"
ref="sgsyData"
:checkRule="marketList[0].isShow"
/>
<ckkj
v-if="navIndex == 6"
ref="sgsyData"
:checkRule="marketList[0].isShow"
/>
</template> </template>
</view> </view>
</template> </template>
@ -28,9 +60,7 @@
import * as api from '@/config/login.js' import * as api from '@/config/login.js'
import * as apis from '@/config/market.js' import * as apis from '@/config/market.js'
import * as api1 from '@/config/bonus.js' import * as api1 from '@/config/bonus.js'
import { import { setToken } from '@/config/auth.js'
setToken
} from '@/config/auth.js'
import store from '@/store' import store from '@/store'
import sgsy from '@/components/bonus/sgsy.vue' import sgsy from '@/components/bonus/sgsy.vue'
import fgsy from '@/components/bonus/fgsy.vue' import fgsy from '@/components/bonus/fgsy.vue'
@ -45,43 +75,46 @@
toSum: 0, toSum: 0,
index: null, index: null,
userInfo: [], userInfo: [],
marketList: [{ marketList: [
{
text: '奖金来源', text: '奖金来源',
id: 3, id: 3,
path: "/marketDynamics", path: '/marketDynamics',
name: 'bonusSource', name: 'bonusSource',
isShow: false, isShow: false,
}, ], },
navList: [{ ],
navList: [
{
name: '首购收益', name: '首购收益',
path: 0, path: 0,
value: "firstPurchase", value: 'firstPurchase',
menuKey: '' menuKey: '',
}, },
{ {
name: '复购收益', name: '复购收益',
path: 1, path: 1,
value: "repurchaseEarnings", value: 'repurchaseEarnings',
menuKey: '' menuKey: '',
}, },
{ {
name: '海粉收益', name: '海粉收益',
path: 2, path: 2,
value: "hignFans", value: 'hignFans',
menuKey: '' menuKey: '',
}, },
{ {
name: '海粉收益', name: '海粉收益',
path: 3, path: 3,
value: "seaFans", value: 'seaFans',
menuKey: '' menuKey: '',
}, },
// { name: '',path:4,value:"sbyd",menuKey:''}, // { name: '',path:4,value:"sbyd",menuKey:''},
{ {
name: '复购券收益', name: '复购券收益',
path: 5, path: 5,
value: "repurchaseTicket", value: 'repurchaseTicket',
menuKey: '' menuKey: '',
}, },
// { // {
// name: '', // name: '',
@ -105,15 +138,15 @@
hfsy, hfsy,
sbydsy, sbydsy,
fgqsy, fgqsy,
ckkj ckkj,
}, },
onLoad() { onLoad() {
this.getMenuLists() // this.getMenuLists()
this.getSum() this.getSum()
}, },
methods: { methods: {
getSum() { getSum() {
api1.queryBonusTotal({}).then((res) => { api1.queryBonusTotal({}).then(res => {
console.log(res, '....res====aa') console.log(res, '....res====aa')
this.toSum = res.rows[0].realIncomeTotal this.toSum = res.rows[0].realIncomeTotal
this.monthIncomeTotal = res.rows[0].monthIncomeTotal this.monthIncomeTotal = res.rows[0].monthIncomeTotal
@ -123,25 +156,35 @@
this.index = e.detail.value this.index = e.detail.value
}, },
clickHref(index) { clickHref(index) {
let that = this; let that = this
this.navIndex = index this.navIndex = index
this.page.pageNum = 1 this.page.pageNum = 1
}, },
getMenuLists() { formatCurrency(value) {
api.menuList().then((res) => { let num = parseFloat(value)
console.log(res, '....resmenu') if (isNaN(num)) {
res.data.forEach((item) => { num = 0
this.navList.forEach((items) => {
if (item.menuKey == items.value) {
items.menuKey = item.menuKey
} }
}) const fixedNum = num.toFixed(2)
if (this.marketList[0].name == item.menuKey) { const parts = fixedNum.split('.')
this.marketList[0].isShow = true parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')
} return parts.join('.')
})
})
}, },
// getMenuLists() {
// api.menuList().then(res => {
// console.log(res, '....resmenu')
// res.data.forEach(item => {
// this.navList.forEach(items => {
// if (item.menuKey == items.value) {
// items.menuKey = item.menuKey
// }
// })
// if (this.marketList[0].name == item.menuKey) {
// this.marketList[0].isShow = true
// }
// })
// })
// },
// async onReachBottom() { // async onReachBottom() {
// this.page.pageNum+1 // this.page.pageNum+1
// this.$refs.sgsyData.getDataList(this.page.pageNum+=1); // this.$refs.sgsyData.getDataList(this.page.pageNum+=1);
@ -150,6 +193,49 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.totals-summary-bar {
display: flex;
justify-content: space-around;
align-items: center;
background-color: #ffffff;
padding: 24rpx 20rpx;
border-radius: 16rpx;
box-shadow: 0 6rpx 18rpx rgba(0, 0, 0, 0.06);
margin-top: 16rpx;
margin-bottom: 20rpx;
.total-item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
.total-label {
font-size: 26rpx;
color: #777777;
margin-bottom: 8rpx;
}
.total-amount {
font-size: 36rpx;
font-weight: 600;
}
.primary-amount {
color: #005bac; // Theme color
}
.secondary-amount {
color: #333333;
}
}
.total-separator {
width: 1rpx;
height: 60rpx; // Adjust as needed
background-color: #e0e0e0;
}
}
.sum-val { .sum-val {
background-color: #fff; background-color: #fff;
// height: 100rpx; // height: 100rpx;
@ -206,7 +292,7 @@
.styles { .styles {
border: none !important; border: none !important;
color: #fff !important; color: #fff !important;
background: #005BAC; background: #005bac;
} }
.top-lists { .top-lists {