feat(performanceList): 拨比列表字段调整

This commit is contained in:
woody 2025-06-04 09:45:26 +08:00
parent 158525544e
commit b1ceb0c6e9
2 changed files with 528 additions and 556 deletions

View File

@ -8,9 +8,7 @@
<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="" />
<!-- <img @click="isFont=true"
src="@/assets/images/change.png"
alt=""> -->
@ -18,52 +16,51 @@
</view>
<view class="zhan"></view>
<!-- table -->
<view class="kuang"
v-for="(item,index) in tableData"
:key="item.id">
<table class="tftable"
border="1">
<tr v-for="(ctem,cndex) in menuList"
<view class="kuang" v-for="(item, index) in tableData" :key="item.id">
<table class="tftable" border="1">
<tr
v-for="(ctem, cndex) in menuList"
:key="ctem.id"
v-if="ctem.id!=0">
v-if="ctem.id != 0"
>
<td align="right">{{ ctem.text }}</td>
<td align="left">{{ item[ctem.prop] }}</td>
</tr>
</table>
</view>
<view class="kuang">小计</view>
<view class="kuang"
v-for="(item,index) in tableList"
:key="item.id">
<table class="tftable"
border="1">
<tr v-for="(ctem,cndex) in menuList"
<view class="kuang" v-for="(item, index) in tableList" :key="item.id">
<table class="tftable" border="1">
<tr
v-for="(ctem, cndex) in menuList"
:key="ctem.id"
v-if="ctem.total!=undefined">
v-if="ctem.total != undefined"
>
<td align="right">{{ ctem.text }}</td>
<td align="left">{{ item[ctem.total] }}</td>
</tr>
</table>
</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="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>
@ -71,20 +68,28 @@
<u-col span="12">
<u-form-item :label="'隶属体系'">
<u-checkbox-group v-model="select.pkBdVertexList">
<view v-for="item in verList"
<view
v-for="item in verList"
:key="item.pkId"
class="disFlex">
<u-checkbox :name="item.pkId"
class="disFlex"
>
<u-checkbox
:name="item.pkId"
@change="selAll($event, item)"
:label="item.vertexName">
:label="item.vertexName"
>
</u-checkbox>
<view class="disFlex1">
<u-checkbox-group @change="selAngle(item)"
v-model="item.pkBdVertexEd">
<u-checkbox v-for="ctem in item.childList"
<u-checkbox-group
@change="selAngle(item)"
v-model="item.pkBdVertexEd"
>
<u-checkbox
v-for="ctem in item.childList"
:key="ctem.pkId"
:name="ctem.pkId"
:label="ctem.vertexName">
:label="ctem.vertexName"
>
</u-checkbox>
</u-checkbox-group>
</view>
@ -108,15 +113,17 @@
</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-calendar @close="isData = false"
<u-calendar
@close="isData = false"
:closeOnClickOverlay="true"
:show="isData"
:allowSameDay="true"
@ -124,21 +131,24 @@
:maxDate="calendar.maxDate"
:minDate="calendar.minDate"
:monthNum="calendar.monthNum"
@confirm="confirm"></u-calendar>
@confirm="confirm"
></u-calendar>
</u-popup>
<!-- 悬浮球 -->
<drag-button />
<export-ball ref="exportBall"
<export-ball
ref="exportBall"
v-hasButtons="['performanceListExport']"
@handleExport="handleExport" />
@handleExport="handleExport"
/>
</view>
</template>
<script>
import * as api from '@/api/settle'
import * as infor from '@/api/information'
import * as api from '@/api/settle';
import * as infor from '@/api/information';
import { isLocals, isLocalSymbol, isOther } from '@/util/numberToCurrency'
import { isLocals, isLocalSymbol, isOther } from '@/util/numberToCurrency';
export default {
data() {
return {
@ -176,6 +186,26 @@ export default {
checked: true,
prop: 'vertexName',
},
{
id: 'creationTime',
text: '业绩时间',
checked: true,
prop: 'creationTime',
},
{
id: 'mainBonusPvRate',
text: '首购PV拨比(%)',
checked: true,
prop: 'mainBonusPvRate',
total: 'mainBonusPvRateSum',
},
{
id: 'repurBonusPvRate',
text: '复购PV拨比(%)',
checked: true,
prop: 'repurBonusPvRate',
total: 'repurBonusPvRateSum',
},
{
id: 2,
text: '隶属团队',
@ -196,20 +226,7 @@ export default {
prop: 'mainUpAmount',
total: 'mainUpAmountSum',
},
{
id: 5,
text: `${'云代注册'}(${isOther()})`,
checked: true,
prop: 'agentRegAmount',
total: 'agentRegAmountSum',
},
{
id: 6,
text: `${'云代升级'}(${isOther()})`,
checked: true,
prop: 'agentUpAmount',
total: 'agentUpAmountSum',
},
{
id: 7,
text: `${'首购金额'}(${isOther()})`,
@ -238,13 +255,13 @@ export default {
prop: 'leaderBonus',
total: 'leaderBonusSum',
},
{
id: 11,
text: `${'分红收益'}(${isOther()})`,
checked: true,
prop: 'shareBonus',
total: 'shareBonusSum',
},
// {
// id: 11,
// text: `${''}(${isOther()})`,
// checked: true,
// prop: 'shareBonus',
// total: 'shareBonusSum',
// },
{
id: 12,
text: `${'服务补贴'}(${isOther()})`,
@ -252,27 +269,7 @@ export default {
prop: 'serviceBonus',
total: 'serviceBonusSum',
},
{
id: 13,
text: `${'云代直推'}(${isOther()})`,
checked: true,
prop: 'agentIntroduceBonus',
total: 'agentIntroduceBonusSum',
},
{
id: 14,
text: `${'云代首购'}(${isOther()})`,
checked: true,
prop: 'agentFirstAmount',
total: 'agentFirstAmountSum',
},
{
id: 15,
text: `${'云代复购'}(${isOther()})`,
checked: true,
prop: 'agentRepurAmount',
total: 'agentRepurAmountSum',
},
{
id: 16,
text: `${'复购专区'}(${isOther()})`,
@ -280,19 +277,7 @@ export default {
prop: 'mainRepurAmount',
total: 'mainRepurAmountSum',
},
{
id: 17,
text: `${'海粉专区'}(${isOther()})`,
checked: true,
prop: 'hifansRegAmount',
total: 'hifansRegAmountSum',
},
// {
// id: 16,
// text: `${''}(${isOther()})`,
// checked: false,
// prop: 'agentRepurAmount',
// },
{
id: 18,
text: `${'复购金额'}(${isOther()})`,
@ -356,118 +341,106 @@ export default {
prop: 'totalBonusRate',
total: 'totalBonusRateSum',
},
{
id: 27,
text: '创建时间',
checked: false,
prop: 'creationTime',
},
// {
// id: 28,
// text: '',
// checked: false,
// prop: 'endDate',
// },
],
}
};
},
onLoad(options) {
this.getData()
this.chooseTimed()
this.getData();
this.chooseTimed();
},
onShow() {
this.getSearch()
this.getSearch();
},
onPullDownRefresh() {
this.getList1()
this.getList1();
},
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() {
//
infor.vertexChild().then((res) => {
this.verList = res.data
this.verList = res.data;
this.verList.forEach((item) => {
item.pkBdVertexEd = []
})
})
item.pkBdVertexEd = [];
});
});
//
infor.getmemberTeamList().then((res) => {
this.memberteamList = res.rows
})
this.memberteamList = res.rows;
});
},
selAll(e, item) {
if (e) {
this.verList.forEach((ctem) => {
if (item.pkId == ctem.pkId) {
ctem.pkBdVertexEd = ctem.childList.map((stem) => stem.pkId)
ctem.pkBdVertexEd = ctem.childList.map((stem) => stem.pkId);
}
})
});
} else {
this.verList.forEach((ctem) => {
this.$set(ctem, 'pkBdVertexEd', [])
})
this.$set(ctem, 'pkBdVertexEd', []);
});
}
let arr = []
const arr = [];
this.verList.forEach((item) => {
item.pkBdVertexEd.forEach((ctem) => {
arr.push(ctem)
})
})
let pkBdVertexStr = arr.join(',')
this.$set(this.select, 'pkBdVertexStr', pkBdVertexStr)
arr.push(ctem);
});
});
const pkBdVertexStr = arr.join(',');
this.$set(this.select, 'pkBdVertexStr', pkBdVertexStr);
},
selAngle(item) {
this.$nextTick(() => {
if (item.pkBdVertexEd.length == item.childList.length) {
this.select.pkBdVertexList.push(item.pkId)
this.select.pkBdVertexList.push(item.pkId);
} else {
this.select.pkBdVertexList = this.removeElement(
this.select.pkBdVertexList,
item.pkId
)
);
}
let arr = []
const arr = [];
this.verList.forEach((item) => {
item.pkBdVertexEd.forEach((ctem) => {
arr.push(ctem)
})
})
let pkBdVertexStr = arr.join(',')
this.$set(this.select, 'pkBdVertexStr', pkBdVertexStr)
})
arr.push(ctem);
});
});
const pkBdVertexStr = arr.join(',');
this.$set(this.select, 'pkBdVertexStr', pkBdVertexStr);
});
},
removeElement(arr, element) {
return arr.filter(function (value) {
return value !== element
})
return value !== element;
});
},
getSearch() {
api
.bonusList(Object.assign({}, this.queryParams, this.select))
.then((res) => {
uni.stopPullDownRefresh()
this.tableData = res.rows
this.getTotal()
})
uni.stopPullDownRefresh();
this.tableData = res.rows;
this.getTotal();
});
},
getTotal() {
api
@ -475,44 +448,44 @@ export default {
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.tableList = [res.data]
this.tableList = [res.data];
} else {
this.tableList = []
this.tableList = [];
}
}
})
});
},
getList1() {
this.tableData = []
this.queryParams.pageNum = 1
this.isTop = false
this.tableData = []
this.getSearch()
this.tableData = [];
this.queryParams.pageNum = 1;
this.isTop = false;
this.tableData = [];
this.getSearch();
},
reset() {
this.select = {}
this.select = {};
},
handleExport() {
let url = '/member/manage/bonus-statis/export'
let obj = Object.assign({}, this.select, this.queryParams)
const url = '/member/manage/bonus-statis/export';
const obj = Object.assign({}, this.select, this.queryParams);
this.$refs.exportBall.handleExport(
url,
obj,
`拨比列表-${new Date().getTime()}`
)
);
},
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 {

View File

@ -18,22 +18,21 @@ module.exports = {
// }
// },
'/prod-api': {
target: 'http://t-mana.beida413.com',
target: 'http://t-mana.beida666.com',
changeOrigin: true,
// pathRewrite: {
// '^/prod-api': ''
// }
}
}
},
},
},
configureWebpack: {
externals: {
'zhCN':'zhCN',
'enUS':'enUS',
'zhTC':'zhTC',
'ruRU':'ruRU',
'frFR':'frFR',
}
}
}
zhCN: 'zhCN',
enUS: 'enUS',
zhTC: 'zhTC',
ruRU: 'ruRU',
frFR: 'frFR',
},
},
};