feat(performanceList): 拨比列表字段调整
This commit is contained in:
parent
158525544e
commit
b1ceb0c6e9
|
@ -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"
|
||||
@change="selAll($event,item)"
|
||||
:label="item.vertexName">
|
||||
class="disFlex"
|
||||
>
|
||||
<u-checkbox
|
||||
:name="item.pkId"
|
||||
@change="selAll($event, item)"
|
||||
: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,22 +131,25 @@
|
|||
: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'
|
||||
export default {
|
||||
import { isLocals, isLocalSymbol, isOther } from '@/util/numberToCurrency';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
|
@ -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,56 +448,56 @@ 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 {
|
||||
.content {
|
||||
background: #f9f9f9;
|
||||
// padding: 20rpx;
|
||||
}
|
||||
.header_a {
|
||||
}
|
||||
.header_a {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.header {
|
||||
}
|
||||
.header {
|
||||
margin: 20rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.4);
|
||||
|
@ -537,22 +510,22 @@ export default {
|
|||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
.zhan {
|
||||
}
|
||||
.zhan {
|
||||
height: 130rpx;
|
||||
}
|
||||
.kuang {
|
||||
}
|
||||
.kuang {
|
||||
margin: 20rpx;
|
||||
background: #f9f9f9;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
.table_f {
|
||||
}
|
||||
.table_f {
|
||||
display: flex;
|
||||
uni-button {
|
||||
margin: 20rpx 10rpx;
|
||||
}
|
||||
}
|
||||
.tftable {
|
||||
}
|
||||
.tftable {
|
||||
table-layout: fixed;
|
||||
font-size: 12px;
|
||||
border-collapse: collapse;
|
||||
|
@ -580,41 +553,41 @@ export default {
|
|||
tr :nth-child(2) {
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.tt {
|
||||
}
|
||||
.tt {
|
||||
padding: 20rpx;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.tt1 {
|
||||
}
|
||||
.tt1 {
|
||||
padding: 20rpx;
|
||||
margin-top: 40px;
|
||||
// width: 60%;
|
||||
}
|
||||
::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--row {
|
||||
}
|
||||
::v-deep .u-checkbox-group--row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
::v-deep .u-checkbox-group {
|
||||
}
|
||||
::v-deep .u-checkbox-group {
|
||||
flex-wrap: wrap;
|
||||
flex-shrink: inherit;
|
||||
.u-checkbox {
|
||||
|
@ -624,14 +597,14 @@ export default {
|
|||
font-size: 12px !important;
|
||||
// margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.disFlex {
|
||||
}
|
||||
.disFlex {
|
||||
display: flex;
|
||||
border-bottom: 2rpx dashed #ccc;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.disFlex1 {
|
||||
}
|
||||
.disFlex1 {
|
||||
display: flex;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -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',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue