forked from angelo/web-retail-h5
feat(area): 添加区域考核
This commit is contained in:
parent
49abdf2e70
commit
0e9723fae6
|
@ -33,6 +33,9 @@ export const getRegionAreaTree = params =>
|
||||||
http.get('/retail-member/api/retail-member/region-tree', { params })
|
http.get('/retail-member/api/retail-member/region-tree', { params })
|
||||||
|
|
||||||
// 获取用户盒数
|
// 获取用户盒数
|
||||||
|
|
||||||
export const getMemberBoxCount = () =>
|
export const getMemberBoxCount = () =>
|
||||||
http.get('/retail-member/api/retail-member/member-box')
|
http.get('/retail-member/api/retail-member/member-box')
|
||||||
|
|
||||||
|
// 区域考核记录
|
||||||
|
export const getRegionAssessmentRecord = () =>
|
||||||
|
http.get('/bonus/api/region/query')
|
||||||
|
|
|
@ -50,3 +50,7 @@ export const validRelation = params =>
|
||||||
// 升级订单
|
// 升级订单
|
||||||
export const upgradeOrder = data =>
|
export const upgradeOrder = data =>
|
||||||
http.post('/sale/api/retail-order/confirm-upg-order', data)
|
http.post('/sale/api/retail-order/confirm-upg-order', data)
|
||||||
|
|
||||||
|
// 获取会员业绩
|
||||||
|
export const getMemberPerformance = () =>
|
||||||
|
http.get('/sale/api/retail-order/member-performance')
|
||||||
|
|
|
@ -20,7 +20,7 @@ module.exports = vm => {
|
||||||
|
|
||||||
//#ifdef DEV_SERVER
|
//#ifdef DEV_SERVER
|
||||||
console.log('DEV_SERVER')
|
console.log('DEV_SERVER')
|
||||||
config.baseURL = 'http://192.168.0.102:8080'
|
config.baseURL = 'http://localhost:8080'
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#ifdef QA_SERVER
|
//#ifdef QA_SERVER
|
||||||
|
|
|
@ -124,6 +124,14 @@
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/bonus/regional-assessment/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "区域考核",
|
||||||
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/performanceEchart/index",
|
"path": "pages/performanceEchart/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -0,0 +1,208 @@
|
||||||
|
<template>
|
||||||
|
<view class="regional-assessment">
|
||||||
|
<u-navbar title="区域考核" :autoBack="true"></u-navbar>
|
||||||
|
<view class="content">
|
||||||
|
<scroll-view scroll-y class="list-scroll" @scrolltolower="onReachBottom">
|
||||||
|
<template v-if="list.length > 0">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="index"
|
||||||
|
class="assessment-card"
|
||||||
|
>
|
||||||
|
<view class="card-main">
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="label">考核区域</text>
|
||||||
|
<text class="value">{{ item.assessAddress }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="label">考核期间</text>
|
||||||
|
<text class="value">{{ item.assessPeriod }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="label">开始时间</text>
|
||||||
|
<text class="value">{{ item.assessStartDate }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="label">结束时间</text>
|
||||||
|
<text class="value">{{ item.assessEndDate }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-footer" @click="toggleDetails(index)">
|
||||||
|
<text>查看详情</text>
|
||||||
|
<u-icon
|
||||||
|
:name="item.expanded ? 'arrow-up' : 'arrow-down'"
|
||||||
|
></u-icon>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.expanded" class="card-details">
|
||||||
|
<view
|
||||||
|
v-for="(detail, detailIndex) in item.regionAssessDetailVoList"
|
||||||
|
:key="detailIndex"
|
||||||
|
class="details-content"
|
||||||
|
>
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="label">考核日期</text>
|
||||||
|
<text class="value">{{ detail.assessDate }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="label">考核状态</text>
|
||||||
|
<text
|
||||||
|
class="value"
|
||||||
|
:class="getStatusClass(detail.assessStatus)"
|
||||||
|
>{{ detail.assessStatusVal }}</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" />
|
||||||
|
</template>
|
||||||
|
<u-empty
|
||||||
|
v-else-if="loadStatus !== 'loading'"
|
||||||
|
mode="list"
|
||||||
|
text="暂无考核记录"
|
||||||
|
></u-empty>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getRegionAssessmentRecord } from '@/config/mine.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
loadStatus: 'loading',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.loadData().then(() => {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.loadStatus === 'nomore' || this.loadStatus === 'loading') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.pageNum++
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async loadData() {
|
||||||
|
this.loadStatus = 'loading'
|
||||||
|
try {
|
||||||
|
const res = await getRegionAssessmentRecord({
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
})
|
||||||
|
if (res.code === 200) {
|
||||||
|
const newItems = res.rows.map(item => ({
|
||||||
|
...item,
|
||||||
|
expanded: false,
|
||||||
|
}))
|
||||||
|
if (this.pageNum === 1) {
|
||||||
|
this.list = newItems
|
||||||
|
} else {
|
||||||
|
this.list = [...this.list, ...newItems]
|
||||||
|
}
|
||||||
|
this.total = res.total
|
||||||
|
if (this.list.length >= this.total) {
|
||||||
|
this.loadStatus = 'nomore'
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loadmore'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loadmore'
|
||||||
|
uni.$u.toast(res.msg || '加载失败')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.loadStatus = 'loadmore'
|
||||||
|
uni.$u.toast('加载失败,请重试')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggleDetails(index) {
|
||||||
|
this.list[index].expanded = !this.list[index].expanded
|
||||||
|
this.$forceUpdate() // uni-app sometimes needs a little help to re-render
|
||||||
|
},
|
||||||
|
getStatusClass(status) {
|
||||||
|
if (status === 2) {
|
||||||
|
// 考核不通过
|
||||||
|
return 'status-fail'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.regional-assessment {
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.list-scroll {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.assessment-card {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin: 12px;
|
||||||
|
padding: 16px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 48rpx;
|
||||||
|
padding: 8rpx 0;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
color: #646566;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
color: #323233;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-fail {
|
||||||
|
color: #fa3534;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #969799;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding-top: 24rpx;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
border-top: 1px solid #f2f2f2;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.u-icon {
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-details {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
padding-top: 24rpx;
|
||||||
|
border-top: 1px solid #f2f2f2;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -344,7 +344,11 @@ import clTabbar from '@/components/cl-tabbar.vue'
|
||||||
import * as min from '@/config/balance.js'
|
import * as min from '@/config/balance.js'
|
||||||
import * as api from '@/config/login.js'
|
import * as api from '@/config/login.js'
|
||||||
import { MEMBER_SIGN } from '@/util/common.js'
|
import { MEMBER_SIGN } from '@/util/common.js'
|
||||||
import { getRegionSelect, getMemberBoxCount } from '@/config/mine.js'
|
import {
|
||||||
|
getRegionSelect,
|
||||||
|
getMemberBoxCount,
|
||||||
|
getMemberPerformance,
|
||||||
|
} from '@/config/mine.js'
|
||||||
// import talentList from "@/components/talentList.vue";
|
// import talentList from "@/components/talentList.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -465,6 +469,13 @@ export default {
|
||||||
menuKey: '',
|
menuKey: '',
|
||||||
ifshow: false,
|
ifshow: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
url: '/pages/bonus/regional-assessment/index',
|
||||||
|
name: '区域考核',
|
||||||
|
imgurl: '../../static/images/mark5.png',
|
||||||
|
menuKey: '',
|
||||||
|
ifshow: false,
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// url: '/pages/mine/addNewPv/index',
|
// url: '/pages/mine/addNewPv/index',
|
||||||
// name: '新增业绩',
|
// name: '新增业绩',
|
||||||
|
@ -602,108 +613,6 @@ export default {
|
||||||
this.userInfo = res.data
|
this.userInfo = res.data
|
||||||
if (this.userInfo.memberCode == 'CN68880628') {
|
if (this.userInfo.memberCode == 'CN68880628') {
|
||||||
this.ifSpecial = true
|
this.ifSpecial = true
|
||||||
this.otherMenuList = [
|
|
||||||
{
|
|
||||||
url: '1',
|
|
||||||
name: '我的钱包',
|
|
||||||
imgurl: '../../static/images/my_icon1.png',
|
|
||||||
menuKey: 'wallet',
|
|
||||||
ifshow: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/pickupArea/pickupArea',
|
|
||||||
name: '提货专区',
|
|
||||||
imgurl: '../../static/images/my_icon3.png',
|
|
||||||
menuKey: 'pickGoods',
|
|
||||||
ifshow: true,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// url: "/pages/memberCard/index",
|
|
||||||
// name: '电子会员卡',
|
|
||||||
// imgurl: "../../static/images/mark5.png",
|
|
||||||
// menuKey: "",
|
|
||||||
// ifshow: false,
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
url: '/pages/ticket/index',
|
|
||||||
name: '自助购票',
|
|
||||||
imgurl: '../../static/images/tickets.png',
|
|
||||||
menuKey: 'ticket',
|
|
||||||
ifshow: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/selfService/index',
|
|
||||||
name: '自助服务',
|
|
||||||
imgurl: '../../static/images/my_icon6.png',
|
|
||||||
menuKey: 'selfHelp',
|
|
||||||
ifshow: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/userSecure/index',
|
|
||||||
name: '账号安全',
|
|
||||||
imgurl: '../../static/images/my_icon8.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifshow: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/addressList/index',
|
|
||||||
name: '地址管理',
|
|
||||||
imgurl: '../../static/images/my_icon9.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifshow: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/mine/bindBank/index',
|
|
||||||
name: '银行信息',
|
|
||||||
imgurl: '../../static/images/my_icon10.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifshow: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '2',
|
|
||||||
name: '达人榜单',
|
|
||||||
imgurl: '../../static/images/my_icon10.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifdr: 1,
|
|
||||||
ifshow: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/mine/myMarket/myMarket',
|
|
||||||
name: '我的市场',
|
|
||||||
imgurl: '../../static/images/my_icon9.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifshow: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/mine/globalDistribution/globalDistribution',
|
|
||||||
name: '全球分布',
|
|
||||||
imgurl: '../../static/images/my_icon9.png',
|
|
||||||
menuKey: '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/mine/honorHall/honorHall',
|
|
||||||
name: '荣誉馆',
|
|
||||||
imgurl: '../../static/images/my_icon9.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifshow: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/pages/mine/giftAddress/list',
|
|
||||||
name: '礼品地址',
|
|
||||||
imgurl: '../../static/images/mark9.png',
|
|
||||||
menuKey: '',
|
|
||||||
ifshow: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
|
||||||
// url: '/pages/mine/addNewPv/index',
|
|
||||||
// name: '新增业绩',
|
|
||||||
// imgurl: '../../static/images/mark9.png',
|
|
||||||
// menuKey: '',
|
|
||||||
// ifshow: false,
|
|
||||||
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
} else {
|
} else {
|
||||||
this.ifSpecial = false
|
this.ifSpecial = false
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,26 +360,6 @@
|
||||||
<div>{{ '推荐姓名' }}</div>
|
<div>{{ '推荐姓名' }}</div>
|
||||||
<div>{{ orderData.parentName }}</div>
|
<div>{{ orderData.parentName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="kuang_i">
|
|
||||||
<div>{{ '安置编号' }}</div>
|
|
||||||
<div>{{ orderData.placeParent }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="kuang_i">
|
|
||||||
<div>{{ '安置姓名' }}</div>
|
|
||||||
<div>{{ orderData.placeParentName }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="kuang_i">
|
|
||||||
<div>{{ '安置位置' }}</div>
|
|
||||||
<div>{{ orderData.placeDeptVal }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="kuang_i" v-if="orderData.makerSpaceMemberCode">
|
|
||||||
<div>体验中心编号</div>
|
|
||||||
<div>{{ orderData.makerSpaceMemberCode }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="kuang_i" v-if="orderData.makerSpaceMemberName">
|
|
||||||
<div>体验中心姓名</div>
|
|
||||||
<div>{{ orderData.makerSpaceMemberName }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="kuang_i">
|
<div class="kuang_i">
|
||||||
<div>{{ '发货方式' }}</div>
|
<div>{{ '发货方式' }}</div>
|
||||||
<div>{{ orderData.deliveryWayVal }}</div>
|
<div>{{ orderData.deliveryWayVal }}</div>
|
||||||
|
|
Loading…
Reference in New Issue