feat(bonus): 奖金字段调整

This commit is contained in:
woody 2025-06-04 09:59:40 +08:00
parent b1ceb0c6e9
commit 209c303913
2 changed files with 1086 additions and 1008 deletions

View File

@ -1,22 +1,14 @@
<template>
<view class="content">
<view class="header_a">
<view class="header">
<img @click="isTop=true"
src="@/assets/images/search.png"
alt="">
<img @click="isFont=true"
src="@/assets/images/change.png"
alt="">
<img @click="isTop = true" src="@/assets/images/search.png" alt="" />
<img @click="isFont = true" src="@/assets/images/change.png" alt="" />
</view>
</view>
<view class="zhan"></view>
<view class="kuang"
v-for="(item,index) in tableData"
:key="index">
<table class="tftable"
border="1">
<view class="kuang" v-for="(item, index) in tableData" :key="index">
<table class="tftable" border="1">
<tr v-if="allTxt.period">
<td align="right">结算期数</td>
<td align="left">{{ item.period }}</td>
@ -33,10 +25,7 @@
<td align="right">订单类型</td>
<td align="left">{{ item.orderTypeVal }}</td>
</tr>
<tr v-if="allTxt.sourceCountryName">
<td align="right">来源国家</td>
<td align="left">{{ item.sourceCountryName }}</td>
</tr>
<tr v-if="allTxt.sourceMemberCode">
<td align="right">来源编号</td>
<td align="left">{{ item.sourceMemberCode }}</td>
@ -46,12 +35,16 @@
<td align="left">{{ item.sourceMemberName }}</td>
</tr>
<tr v-if="allTxt.orderAmount">
<td align="right">来源金额({{isLocalSymbol() }})</td>
<td align="left">{{ item.orderAmount | toThousandthAndKeepDecimal}}</td>
<td align="right">来源金额({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.orderAmount | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.orderAchieveOri">
<td align="right">来源业绩({{isLocalSymbol() }})</td>
<td align="left">{{ item.orderAchieveOri | toThousandthAndKeepDecimal}}</td>
<td align="right">来源业绩({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.orderAchieveOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.settleCountry">
<td align="right">结算国家</td>
@ -73,53 +66,94 @@
<td align="right">荣誉奖衔</td>
<td align="left">{{ item.pkAwardsVal }}</td>
</tr>
<tr v-if="menuList[9].checked == true &&allTxt.round">
<tr v-if="getColumnVisible('round') && allTxt.round">
<td align="right">直推轮数</td>
<td align="left">{{ item.round }}</td>
</tr>
<tr v-if="menuList[10].checked == true &&allTxt.second">
<tr v-if="getColumnVisible('second') && allTxt.second">
<td align="right">直推次数</td>
<td align="left">{{ item.second }}</td>
</tr>
<tr v-if="menuList[11].checked == true &&allTxt.currentTouch">
<tr v-if="getColumnVisible('currentTouch') && allTxt.currentTouch">
<td align="right">当前碰次</td>
<td align="left">{{ item.currentTouch }}</td>
</tr>
<tr v-if="menuList[12].checked == true &&allTxt.expandTouch">
<tr v-if="getColumnVisible('expandTouch') && allTxt.expandTouch">
<td align="right">拓展碰次</td>
<td align="left">{{ item.expandTouch }}</td>
</tr>
<tr v-if="menuList[13].checked == true &&allTxt.currentGeneration">
<tr
v-if="
getColumnVisible('currentGeneration') && allTxt.currentGeneration
"
>
<td align="right">当前代数</td>
<td align="left">{{ item.currentGeneration }}</td>
</tr>
<tr v-if="menuList[14].checked == true &&allTxt.coachGeneration">
<tr
v-if="getColumnVisible('coachGeneration') && allTxt.coachGeneration"
>
<td align="right">辅导代数</td>
<td align="left">{{ item.coachGeneration }}</td>
</tr>
<tr v-if="menuList[1].checked == true &&allTxt.expandNoCappingOri">
<td align="right">拓展无封({{isLocalSymbol()}})</td>
<td align="left">{{ item.expandNoCappingOri | toThousandthAndKeepDecimal}}</td>
<tr
v-if="
getColumnVisible('expandNoCappingOri') && allTxt.expandNoCappingOri
"
>
<td align="right">拓展无封({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.expandNoCappingOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="menuList[2].checked == true &&allTxt.expandCappingOri">
<td align="right">拓展封顶({{isLocalSymbol()}})</td>
<td align="left">{{ item.expandCappingOri | toThousandthAndKeepDecimal}}</td>
<tr
v-if="getColumnVisible('expandCappingOri') && allTxt.expandCappingOri"
>
<td align="right">拓展封顶({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.expandCappingOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="menuList[3].checked == true &&allTxt.expandNormalHalfOri">
<td align="right">拓展正常减半({{isLocalSymbol()}})</td>
<td align="left">{{ item.expandNormalHalfOri | toThousandthAndKeepDecimal}}</td>
<tr
v-if="
getColumnVisible('expandNormalHalfOri') &&
allTxt.expandNormalHalfOri
"
>
<td align="right">拓展正常减半({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.expandNormalHalfOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="menuList[4].checked == true &&allTxt.expandNormalRealOri">
<td align="right">拓展实际减半({{isLocalSymbol()}})</td>
<td align="left">{{ item.expandNormalRealOri | toThousandthAndKeepDecimal}}</td>
<tr
v-if="
getColumnVisible('expandNormalRealOri') &&
allTxt.expandNormalRealOri
"
>
<td align="right">拓展实际减半({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.expandNormalRealOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.pretaxIncomeOri">
<td align="right">税前收益({{isLocalSymbol() }})</td>
<td align="right">税前收益({{ isLocalSymbol() }})</td>
<td align="left">{{ item.pretaxIncomeOri }}</td>
</tr>
<tr>
<td align="right">重消收益({{ isLocalSymbol() }})</td>
<td align="left">{{ item.backPoints }}</td>
</tr>
<tr>
<td align="right">平台服务费({{ isLocalSymbol() }})</td>
<td align="left">{{ item.serviceSpend }}</td>
</tr>
<tr v-if="allTxt.realIncomeOri">
<td align="right">实际收益({{isLocalSymbol() }})</td>
<td align="left">{{ item.realIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">实际收益({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.realIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.bonusName">
<td align="right">收益类型</td>
@ -160,225 +194,219 @@
</table>
</view>
<!-- 侧边弹框 -->
<u-popup :show="isFont"
mode="right"
@close="isFont=false">
<u-popup :show="isFont" mode="right" @close="isFont = false">
<view class="che">
<u-checkbox-group v-model="selectAll"
<u-checkbox-group
v-model="selectAll"
@change="getAll"
placement="column"
activeColor="#ED1D25">
<u-checkbox :customStyle="{marginBottom: '8px'}"
activeColor="#ED1D25"
>
<u-checkbox
:customStyle="{ marginBottom: '8px' }"
v-for="(item, index) in allList"
:key="index"
:label="item.text"
:name="item.id">
:name="item.id"
>
</u-checkbox>
</u-checkbox-group>
<u-checkbox-group v-model="selected"
<u-checkbox-group
v-model="selected"
@change="getMenu"
placement="column"
activeColor="#ED1D25">
<u-checkbox :customStyle="{marginBottom: '8px'}"
activeColor="#ED1D25"
>
<u-checkbox
:customStyle="{ marginBottom: '8px' }"
v-for="(item, index) in menuList"
:key="index"
v-show="index!=0"
v-show="index != 0"
:label="item.text"
:name="item.id">
:name="item.id"
>
</u-checkbox>
</u-checkbox-group>
</view>
</u-popup>
<!-- 顶部搜索 -->
<u-popup :show="isTop"
mode="top"
@close="isTop=false">
<u-popup :show="isTop" mode="top" @close="isTop = false">
<view class="tt">
<u--form labelPosition="left"
<u--form
labelPosition="left"
labelWidth="auto"
:model="select"
ref="uForm">
ref="uForm"
>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'订单编号'">
<u--input fontSize="12"
v-model="select.orderCode"></u--input>
<u--input fontSize="12" v-model="select.orderCode"></u--input>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'来源编号'">
<u--input fontSize="12"
v-model="select.sourceMemberCode"></u--input>
<u--input
fontSize="12"
v-model="select.sourceMemberCode"
></u--input>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'来源姓名'">
<u--input fontSize="12"
v-model="select.sourceMemberName"></u--input>
<u--input
fontSize="12"
v-model="select.sourceMemberName"
></u--input>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'收益编号'">
<u--input fontSize="12"
v-model="select.memberCode"></u--input>
<u--input fontSize="12" v-model="select.memberCode"></u--input>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'收益姓名'">
<u--input fontSize="12"
v-model="select.memberName"></u--input>
<u--input fontSize="12" v-model="select.memberName"></u--input>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'订单类型'">
<picker :range="orderTypeList"
<picker
:range="orderTypeList"
range-key="label"
@change="bindPickerChange2">
<u--input disabled
@change="bindPickerChange2"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.orderTypeVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'收益类型'">
<picker :range="yieldList"
<picker
:range="yieldList"
range-key="bonusName"
@change="bindPickerChange1">
<u--input disabled
@change="bindPickerChange1"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.pkBonusItemsVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'收益状态'">
<picker :range="yieldStatus"
<picker
:range="yieldStatus"
range-key="label"
@change="bindPickerChange3">
<u--input disabled
@change="bindPickerChange3"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.incomeStatusVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'来源国家'">
<picker :range="countryList"
range-key="name"
@change="bindPickerChange4">
<u--input disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.sourceCountryVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
</picker>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'结算国家'">
<picker :range="countryList"
range-key="name"
@change="bindPickerChange5">
<u--input disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.settleCountryVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
</picker>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'隶属体系'">
<picker :range="vertexList"
<picker
:range="vertexList"
range-key="vertexName"
@change="bindPickerChange6">
<u--input disabled
@change="bindPickerChange6"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.pkVertexVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'隶属团队'">
<picker :range="memberteamList"
<picker
:range="memberteamList"
range-key="teamName"
@change="bindPickerChange7">
<u--input disabled
@change="bindPickerChange7"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.pkTeamCodeVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'结算期数'">
<u--input fontSize="12"
v-model="select.period"></u--input>
<u--input fontSize="12" v-model="select.period"></u--input>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
</u-row>
<u-row gutter="10"> </u-row>
<u-row gutter="10">
<u-col span="12">
<u-form-item :label="'结算日期'"
@click="isData=true">
<u--input disabled
<u-form-item :label="'结算日期'" @click="isData = true">
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.creationTime"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</u-form-item>
</u-col>
</u-row>
</u--form>
<view class="footer">
<u-button @click="getList1"
<u-button
@click="getList1"
color="#C8161D"
text="搜索"
class="btnn"></u-button>
<u-button @click="reset"
text="重置"></u-button>
class="btnn"
></u-button>
<u-button @click="reset" text="重置"></u-button>
</view>
</view>
</u-popup>
<u-calendar @close="isData = false"
<u-calendar
@close="isData = false"
:closeOnClickOverlay="true"
:show="isData"
:allowSameDay="true"
@ -386,21 +414,24 @@
:maxDate="calendar.maxDate"
:minDate="calendar.minDate"
:monthNum="calendar.monthNum"
@confirm="confirm"></u-calendar>
@confirm="confirm"
></u-calendar>
<!-- 悬浮球 -->
<drag-button />
<export-ball ref="exportBall"
<export-ball
ref="exportBall"
v-hasButtons="['sourceBonusExport']"
@handleExport="handleExport" />
@handleExport="handleExport"
/>
</view>
</template>
<script>
import * as api from '@/api/settle'
import * as infor from '@/api/information'
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency'
export default {
import * as api from '@/api/settle';
import * as infor from '@/api/information';
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency';
export default {
data() {
return {
select: {},
@ -452,30 +483,14 @@ export default {
checked: true,
prop: 'expanndNormalReal',
},
{
id: 5,
text: '拓展无封' + '($)',
checked: true,
prop: 'expandNoCappingDollar',
},
{
id: 6,
text: '拓展封顶' + `(${isLocals()})`,
checked: true,
prop: 'expandCappingDollar',
},
{
id: 7,
text: '拓展正常减半' + '($)',
checked: true,
prop: 'expandNormalHalfDollar',
},
{
id: 8,
text: '拓展实际减半' + '($)',
checked: true,
prop: 'expanndNormalRealDollar',
},
{
id: 9,
text: '直推轮数',
@ -530,244 +545,251 @@ export default {
yieldList: [],
yieldStatus: [],
countryList: [],
}
};
},
onLoad(options) {
//
this.getMemberList()
//
this.getMemberList();
//
this.getUserRole()
this.getUserRole();
//
this.getData()
this.chooseTimed()
this.getAll([0])
this.todayData = Date.now()
this.minDate = Number(new Date('1950-01-01'))
this.getData();
this.chooseTimed();
this.getAll([0]);
this.todayData = Date.now();
this.minDate = Number(new Date('1950-01-01'));
},
methods: {
getColumnVisible(column) {
return this.menuList.find((item) => item.prop === column)?.checked;
},
isLocalSymbol,
isLocals,
//
chooseTimed() {
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
const date = new Date();
const year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (month <= 9) {
month = '0' + month
month = '0' + month;
}
if (day <= 9) {
day = '0' + day
day = '0' + day;
}
let minyear = year - 1
let maxyear = year + 1
this.calendar.minDate = minyear + '-' + month + '-' + day
this.calendar.maxDate = maxyear + '-' + month + '-' + day
const minyear = year - 1;
const maxyear = year + 1;
this.calendar.minDate = minyear + '-' + month + '-' + day;
this.calendar.maxDate = maxyear + '-' + month + '-' + day;
},
getData() {
//
infor.getvertexValue().then((res) => {
this.vertexList = res.data
})
//
this.vertexList = res.data;
});
//
infor.getmemberTeamList().then((res) => {
this.memberteamList = res.rows
})
this.memberteamList = res.rows;
});
//
api.getYieldType().then((res) => {
this.yieldList = res.rows
})
this.yieldList = res.rows;
});
//
api.getYieldStatus().then((res) => {
this.yieldStatus = res.data
})
this.yieldStatus = res.data;
});
//
api.getOrderType().then((res) => {
this.orderTypeList = res.data
})
this.orderTypeList = res.data;
});
//
api.getcountryAllList().then((res) => {
this.countryList = res.data
})
this.countryList = res.data;
});
},
//
getAll(e) {
if (e.length > 0) {
this.menuList.forEach((item) => {
this.$set(item, 'checked', true)
this.selected.push(item.id)
})
this.$set(item, 'checked', true);
this.selected.push(item.id);
});
} else {
this.menuList.forEach((item) => {
this.$set(item, 'checked', false)
})
this.$set(this, 'selected', [])
this.$set(item, 'checked', false);
});
this.$set(this, 'selected', []);
}
},
//
getMenu(e) {
this.menuList.forEach((item) => {
this.$set(item, 'checked', false)
this.$set(item, 'checked', false);
e.forEach((ctem) => {
if (item.id == ctem) {
this.$set(item, 'checked', true)
this.$set(item, 'checked', true);
}
})
})
});
});
if (e.length == this.menuList.length) {
this.$set(this, 'selectAll', [0])
this.$set(this, 'selectAll', [0]);
} else {
this.$set(this, 'selectAll', [])
this.$set(this, 'selectAll', []);
}
},
getUserRole() {
infor.getRoleMenu('sourceBonus').then((res) => {
let obj = {}
const obj = {};
res.data.forEach((item) => {
obj[item] = 1
})
this.allTxt = obj
})
obj[item] = 1;
});
this.allTxt = obj;
});
},
onReachBottom() {
this.queryParams.pageNum++
this.getMemberList()
this.queryParams.pageNum++;
this.getMemberList();
},
//
//
getMemberList() {
api
.bonusSource(Object.assign({}, this.queryParams, this.select))
.then((res) => {
this.total = res.total
this.tableData = this.tableData.concat(res.rows)
})
this.total = res.total;
this.tableData = this.tableData.concat(res.rows);
});
},
getList1() {
this.tableData = []
this.queryParams.pageNum = 1
this.isTop = false
this.getMemberList()
this.tableData = [];
this.queryParams.pageNum = 1;
this.isTop = false;
this.getMemberList();
},
reset() {
this.select = {}
this.select = {};
},
handleExport() {
let url = '/bonus/manage/bonus/export-bonus-source'
let obj = Object.assign({}, this.select, this.queryParams)
const url = '/bonus/manage/bonus/export-bonus-source';
const obj = Object.assign({}, this.select, this.queryParams);
this.$refs.exportBall.handleExport(
url,
obj,
`${'奖金来源'}${new Date().getTime()}`
)
);
},
bindPickerChange1(e) {
this.$set(
this.select,
'pkBonusItemsVal',
this.yieldList[e.detail.value].bonusName
)
);
this.$set(
this.select,
'pkBonusItems',
this.yieldList[e.detail.value].pkId
)
);
},
bindPickerChange2(e) {
this.$set(
this.select,
'orderTypeVal',
this.orderTypeList[e.detail.value].label
)
);
this.$set(
this.select,
'orderType',
this.orderTypeList[e.detail.value].value
)
);
},
bindPickerChange3(e) {
this.$set(
this.select,
'incomeStatusVal',
this.yieldStatus[e.detail.value].label
)
);
this.$set(
this.select,
'incomeStatus',
this.yieldStatus[e.detail.value].value
)
);
},
bindPickerChange4(e) {
this.$set(
this.select,
'sourceCountryVal',
this.countryList[e.detail.value].name
)
);
this.$set(
this.select,
'sourceCountry',
this.countryList[e.detail.value].pkId
)
);
},
bindPickerChange5(e) {
this.$set(
this.select,
'settleCountryVal',
this.countryList[e.detail.value].name
)
);
this.$set(
this.select,
'settleCountry',
this.countryList[e.detail.value].pkId
)
);
},
bindPickerChange6(e) {
this.$set(
this.select,
'pkVertexVal',
this.vertexList[e.detail.value].vertexName
)
this.$set(this.select, 'pkVertex', this.vertexList[e.detail.value].pkId)
);
this.$set(
this.select,
'pkVertex',
this.vertexList[e.detail.value].pkId
);
},
bindPickerChange7(e) {
this.$set(
this.select,
'pkTeamCodeVal',
this.memberteamList[e.detail.value].teamName
)
);
this.$set(
this.select,
'pkTeamCode',
this.memberteamList[e.detail.value].pkId
)
);
},
confirm(e) {
this.$set(this.select, 'startDate', e[0])
this.$set(this.select, 'endDate', e[e.length - 1])
this.$set(this.select, 'creationTime', e[0] + ' 至 ' + e[e.length - 1])
this.$set(this.select, 'startDate', e[0]);
this.$set(this.select, 'endDate', e[e.length - 1]);
this.$set(this.select, 'creationTime', e[0] + ' 至 ' + e[e.length - 1]);
this.isData = false
this.isData = false;
},
addressData(diqu, obj) {
this.select.diqu = diqu
this.select.recProvince = obj.province
this.select.recCity = obj.city
this.select.recCounty = obj.county
this.$forceUpdate()
this.select.diqu = diqu;
this.select.recProvince = obj.province;
this.select.recCity = obj.city;
this.select.recCounty = obj.county;
this.$forceUpdate();
},
},
}
};
</script>
<style lang="scss" scoped>
.content {
.content {
background: #f9f9f9;
// padding: 20rpx;
}
.header_a {
}
.header_a {
position: fixed;
width: 100%;
}
.header {
}
.header {
margin: 20rpx;
background: #ffffff;
box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.4);
@ -780,17 +802,17 @@ export default {
width: 24px;
height: 24px;
}
}
.zhan {
}
.zhan {
height: 130rpx;
}
.kuang {
}
.kuang {
background: #f9f9f9;
border-radius: 10px 10px 10px 10px;
margin: 20rpx;
}
.tftable {
table-layout:fixed;
}
.tftable {
table-layout: fixed;
font-size: 12px;
border-collapse: collapse;
border-radius: 10px;
@ -817,32 +839,32 @@ export default {
tr :nth-child(2) {
color: #333333;
}
}
.che {
}
.che {
padding: 20rpx 40rpx;
}
.tt {
}
.tt {
padding: 20rpx;
margin-top: 40px;
}
::v-deep .u-transition {
}
::v-deep .u-transition {
z-index: 998 !important;
}
.footer {
}
.footer {
display: flex;
align-items: center;
padding: 20rpx 60rpx;
.btnn {
margin-right: 40rpx;
}
}
::v-deep .u-input {
}
::v-deep .u-input {
padding: 0 9px !important;
}
::v-deep .u-form-item__body__left__content__label {
}
::v-deep .u-form-item__body__left__content__label {
font-size: 12px;
}
::v-deep .u-form-item__body {
}
::v-deep .u-form-item__body {
padding: 5px 0;
}
}
</style>

View File

@ -2,61 +2,75 @@
<view class="content">
<view class="header_a">
<view class="header">
<img @click="isTop=true"
src="@/assets/images/search.png"
alt="">
<img @click="isTop = true" src="@/assets/images/search.png" alt="" />
</view>
</view>
<view class="zhan"></view>
<view class="kuang"
v-for="(item,index) in tableData"
:key="index">
<table class="tftable"
border="1">
<view class="kuang" v-for="(item, index) in tableData" :key="index">
<table class="tftable" border="1">
<tr v-if="allTxt.period">
<td align="right">{{ '结算期数' }}</td>
<td align="left">{{ item.period }}</td>
</tr>
<tr v-if="allTxt.directIncomeOri">
<td align="right">{{ '直推收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.directIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '直推收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.directIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.expandIncomeOri">
<td align="right">{{ '拓展收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.expandIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '拓展收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.expandIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.coachIncomeOri">
<td align="right">{{ '辅导收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.coachIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '辅导收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.coachIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.shareIncomeOri">
<td align="right">{{ '分红收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.shareIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '分红收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.shareIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.serviceIncomeOri">
<td align="right">{{ '报单收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.serviceIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '报单收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.serviceIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurPushIncomeOri">
<td align="right">{{ '复购推荐收益' }}</td>
<td align="left">{{ item.repurPushIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="left">
{{ item.repurPushIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurRangeIncomeOri">
<td align="right">{{ '复购级差收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.repurRangeIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '复购级差收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.repurRangeIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurExpandIncomeOri">
<td align="right">{{ '复购拓展收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.repurExpandIncomeOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '复购拓展收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.repurExpandIncomeOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurCoachIncome">
<td align="right">{{ '复购辅导收益' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.repurCoachIncome | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '复购辅导收益' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.repurCoachIncome | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurCouponOri">
<td align="right">{{ '复购券' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.repurCouponOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '复购券' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.repurCouponOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurCouponShareOri">
@ -64,43 +78,58 @@
<td align="left">{{ item.repurCouponShareOri }}</td>
</tr>
<tr v-if="allTxt.backPointsOri">
<td align="right">{{ '商城重消' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.backPointsOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '商城重消' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.backPointsOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.serviceSpendOri">
<td align="right">{{ '平台服务费' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.serviceSpendOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '平台服务费' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.serviceSpendOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr>
<td align="right">直推级差({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.globalPointsOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.carAwardPointsOri">
<td align="right">{{ '车奖积分' }}</td>
<td align="left">{{ item.carAwardPointsOri | toThousandthAndKeepDecimal}}</td>
<td align="left">
{{ item.carAwardPointsOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.purRealSubtotalOri">
<td align="right">{{ '首购实发小计' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.purRealSubtotalOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '首购实发小计' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.purRealSubtotalOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurRealSubtotalOri">
<td align="right">{{ '复购实发小计' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.repurRealSubtotalOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '复购实发小计' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.repurRealSubtotalOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.repurCouponSubtotalOri">
<td align="right">{{ '复购券实发小计' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.repurCouponSubtotalOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '复购券实发小计' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.repurCouponSubtotalOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.realIncomeTotalOri">
<td align="right">{{ '实发收益总计' }}({{isLocalSymbol() }})</td>
<td align="left">{{ item.realIncomeTotalOri | toThousandthAndKeepDecimal}}</td>
<td align="right">{{ '实发收益总计' }}({{ isLocalSymbol() }})</td>
<td align="left">
{{ item.realIncomeTotalOri | toThousandthAndKeepDecimal }}
</td>
</tr>
<tr v-if="allTxt.settleDate">
<td align="right">{{ '结算时间' }}</td>
@ -112,98 +141,114 @@
</tr> -->
</table>
<view class="table_f">
<u-button @click="bonusTap(item)"
<u-button
@click="bonusTap(item)"
size="small"
color="#E70DEC"
:text="'奖金明细'"></u-button>
:text="'奖金明细'"
></u-button>
</view>
</view>
<u-popup :show="isTop"
mode="top"
@close="isTop=false">
<u-popup :show="isTop" mode="top" @close="isTop = false">
<view class="tt">
<u--form labelPosition="left"
<u--form
labelPosition="left"
labelWidth="auto"
:model="select"
ref="uForm">
ref="uForm"
>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'结算期数'">
<u--input fontSize="12"
v-model="select.period"></u--input>
<u--input fontSize="12" v-model="select.period"></u--input>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'币种展示'">
<picker :range="acList"
<picker
:range="acList"
range-key="label"
@change="bindPickerChange1">
<u--input disabled
@change="bindPickerChange1"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.pkCurrencyVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="12">
<u-form-item :label="'操作日期'"
@click="isData=true">
<u--input disabled
<u-form-item :label="'操作日期'" @click="isData = true">
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.operationTimeVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</u-form-item>
</u-col>
</u-row>
<u-row gutter="10">
<u-col span="6">
<u-form-item :label="'隶属体系'">
<picker :range="vertexList"
<picker
:range="vertexList"
range-key="vertexName"
@change="bindPickerChange4">
<u--input disabled
@change="bindPickerChange4"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.vertexIdVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item :label="'隶属团队'">
<picker :range="memberteamList"
<picker
:range="memberteamList"
range-key="teamName"
@change="bindPickerChange5">
<u--input disabled
@change="bindPickerChange5"
>
<u--input
disabled
fontSize="12"
disabledColor="#ffffff"
v-model="select.teamIdVal"
suffixIcon="arrow-down"
suffixIconStyle="font-size: 12px;"></u--input>
suffixIconStyle="font-size: 12px;"
></u--input>
</picker>
</u-form-item>
</u-col>
</u-row>
</u--form>
<view class="footer">
<u-button @click="getList1"
<u-button
@click="getList1"
color="#C8161D"
text="搜索"
class="btnn"></u-button>
<u-button @click="reset"
text="重置"></u-button>
class="btnn"
></u-button>
<u-button @click="reset" text="重置"></u-button>
</view>
</view>
</u-popup>
<u-calendar @close="isData = false"
<u-calendar
@close="isData = false"
:closeOnClickOverlay="true"
:show="isData"
:allowSameDay="true"
@ -211,21 +256,24 @@
:maxDate="calendar.maxDate"
:minDate="calendar.minDate"
:monthNum="calendar.monthNum"
@confirm="confirm"></u-calendar>
@confirm="confirm"
></u-calendar>
<!-- 悬浮球 -->
<drag-button />
<export-ball ref="exportBall"
<export-ball
ref="exportBall"
v-hasButtons="['totalBonusExport']"
@handleExport="handleExport" />
@handleExport="handleExport"
/>
</view>
</template>
<script>
import * as api from '@/api/settle'
import * as infor from '@/api/information'
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency'
export default {
import * as api from '@/api/settle';
import * as infor from '@/api/information';
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency';
export default {
data() {
return {
select: {},
@ -260,148 +308,156 @@ export default {
todayData: '',
acList: [],
verList: [],
}
};
},
onLoad(options) {
//
this.getMemberList()
//
this.getMemberList();
//
this.getUserRole()
this.getUserRole();
//
this.getData()
this.chooseTimed()
this.todayData = Date.now()
this.minDate = Number(new Date('1950-01-01'))
this.getData();
this.chooseTimed();
this.todayData = Date.now();
this.minDate = Number(new Date('1950-01-01'));
},
methods: {
isLocalSymbol,
isLocals,
//
chooseTimed() {
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
const date = new Date();
const year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (month <= 9) {
month = '0' + month
month = '0' + month;
}
if (day <= 9) {
day = '0' + day
day = '0' + day;
}
let minyear = year - 1
let maxyear = year + 1
this.calendar.minDate = minyear + '-' + month + '-' + day
this.calendar.maxDate = maxyear + '-' + month + '-' + day
const minyear = year - 1;
const maxyear = year + 1;
this.calendar.minDate = minyear + '-' + month + '-' + day;
this.calendar.maxDate = maxyear + '-' + month + '-' + day;
},
getData() {
api.accountList().then((res) => {
this.acList = res.data
})
this.acList = res.data;
});
//
infor.getvertexValue().then((res) => {
this.vertexList = res.data
})
//
this.vertexList = res.data;
});
//
infor.getmemberTeamList().then((res) => {
this.memberteamList = res.rows
})
this.memberteamList = res.rows;
});
},
bonusTap(item) {
uni.setStorageSync('name', 'BonusDetail')
uni.setStorageSync('name', 'BonusDetail');
uni.redirectTo({
url:
'/pages/settlementCenter/bonusDetail?settleDate=' + item.settleDate,
})
});
},
getUserRole() {
infor.getRoleMenu('totalBonus').then((res) => {
let obj = {}
const obj = {};
res.data.forEach((item) => {
obj[item] = 1
})
this.allTxt = obj
})
obj[item] = 1;
});
this.allTxt = obj;
});
},
onReachBottom() {
this.queryParams.pageNum++
this.getMemberList()
this.queryParams.pageNum++;
this.getMemberList();
},
//
//
getMemberList() {
api
.queryBonusTotal(Object.assign({}, this.queryParams, this.select))
.then((res) => {
this.total = res.total
this.tableData = this.tableData.concat(res.rows)
})
this.total = res.total;
this.tableData = this.tableData.concat(res.rows);
});
},
getList1() {
this.tableData = []
this.queryParams.pageNum = 1
this.isTop = false
this.getMemberList()
this.tableData = [];
this.queryParams.pageNum = 1;
this.isTop = false;
this.getMemberList();
},
reset() {
this.select = {}
this.select = {};
},
handleExport() {
let url = '/bonus/manage/bonus/export-bonus-total'
let obj = Object.assign({}, this.select, this.queryParams)
const url = '/bonus/manage/bonus/export-bonus-total';
const obj = Object.assign({}, this.select, this.queryParams);
this.$refs.exportBall.handleExport(
url,
obj,
`${'奖金汇总'}-${new Date().getTime()}`
)
);
},
bindPickerChange1(e) {
this.$set(this.select, 'pkCurrencyVal', this.acList[e.detail.value].label)
this.$set(this.select, 'pkCurrency', this.acList[e.detail.value].value)
this.$set(
this.select,
'pkCurrencyVal',
this.acList[e.detail.value].label
);
this.$set(this.select, 'pkCurrency', this.acList[e.detail.value].value);
},
bindPickerChange4(e) {
this.$set(
this.select,
'vertexIdVal',
this.vertexList[e.detail.value].vertexName
)
this.$set(this.select, 'pkVertex', this.vertexList[e.detail.value].pkId)
);
this.$set(
this.select,
'pkVertex',
this.vertexList[e.detail.value].pkId
);
},
bindPickerChange5(e) {
this.$set(
this.select,
'teamIdVal',
this.memberteamList[e.detail.value].teamName
)
);
this.$set(
this.select,
'pkTeamCode',
this.memberteamList[e.detail.value].pkId
)
);
},
confirm(e) {
this.$set(this.select, 'startDate', e[0])
this.$set(this.select, 'endDate', e[e.length - 1])
this.$set(this.select, 'startDate', e[0]);
this.$set(this.select, 'endDate', e[e.length - 1]);
this.$set(
this.select,
'operationTimeVal',
e[0] + ' 至 ' + e[e.length - 1]
)
this.isData = false
);
this.isData = false;
},
},
}
};
</script>
<style lang="scss" scoped>
.content {
.content {
background: #f9f9f9;
// padding: 20rpx;
}
.header_a {
}
.header_a {
position: fixed;
width: 100%;
}
.header {
}
.header {
margin: 20rpx;
background: #ffffff;
box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.4);
@ -414,16 +470,16 @@ export default {
width: 24px;
height: 24px;
}
}
.zhan {
}
.zhan {
height: 130rpx;
}
.kuang {
}
.kuang {
background: #f9f9f9;
border-radius: 10px 10px 10px 10px;
margin: 20rpx;
}
.tftable {
}
.tftable {
font-size: 12px;
border-collapse: collapse;
border-radius: 10px;
@ -450,35 +506,35 @@ export default {
tr :nth-child(2) {
color: #333333;
}
}
.che {
}
.che {
padding: 20rpx 40rpx;
}
.tt {
}
.tt {
padding: 20rpx;
margin-top: 40px;
}
::v-deep .u-transition {
}
::v-deep .u-transition {
z-index: 998 !important;
}
.footer {
}
.footer {
display: flex;
align-items: center;
padding: 20rpx 60rpx;
.btnn {
margin-right: 40rpx;
}
}
::v-deep .u-input {
}
::v-deep .u-input {
padding: 0 9px !important;
}
::v-deep .u-form-item__body__left__content__label {
}
::v-deep .u-form-item__body__left__content__label {
font-size: 12px;
}
::v-deep .u-form-item__body {
}
::v-deep .u-form-item__body {
padding: 5px 0;
}
::v-deep .u-checkbox-group {
}
::v-deep .u-checkbox-group {
flex-wrap: wrap;
flex-shrink: inherit;
.u-checkbox {
@ -491,5 +547,5 @@ export default {
.u-icon__icon {
margin-right: 0rpx;
}
}
}
</style>