mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 03:26:45 +08:00
调试接口
This commit is contained in:
65
src/api/ebiz/eqiVisit/eqiVisit.js
Normal file
65
src/api/ebiz/eqiVisit/eqiVisit.js
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import request from '@/assets/js/utils/request'
|
||||||
|
import getUrl from '@/assets/js/utils/get-url'
|
||||||
|
|
||||||
|
// 陪访机构信息查询
|
||||||
|
export function getAccompanyComCode(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/accompany/getAccompanyComCode', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 陪访代理人查询
|
||||||
|
export function getAccompanyPerson(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/accompany/getAccompanyPerson', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 陪访记录查询
|
||||||
|
export function getAgentAccompanyRecordPage(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/accompany/getAgentAccompanyRecordPage', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 陪访信息登记
|
||||||
|
export function saveAccompanyRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/accompany/saveAccompanyRecord', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 陪访记录详情查询
|
||||||
|
export function getAccompanyDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/accompany/getAccompanyDetail', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 积分记录查询
|
||||||
|
export function getRewardRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/reward/getRewardRecord', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 积分榜单查询
|
||||||
|
export function getAccompanyRank(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/reward/getAccompanyRank', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -94,6 +94,16 @@ let hgb = ['/sale/order/selectHgb', '/sale/order/getHgbDetail']
|
|||||||
|
|
||||||
let whitelist = ['/agent/white/getWhiteInfo']
|
let whitelist = ['/agent/white/getWhiteInfo']
|
||||||
|
|
||||||
|
let eqiVisit = [
|
||||||
|
'/agent/accompany/getAccompanyComCode',
|
||||||
|
'/agent/accompany/getAccompanyPerson',
|
||||||
|
'/agent/accompany/getAgentAccompanyRecordPage',
|
||||||
|
'/agent/accompany/saveAccompanyRecord',
|
||||||
|
'/agent/accompany/getAccompanyDetail',
|
||||||
|
'/agent/reward/getRewardRecord',
|
||||||
|
'/agent/reward/getAccompanyRank'
|
||||||
|
]
|
||||||
|
|
||||||
let whiteList = [
|
let whiteList = [
|
||||||
'/customer/agent/getCustomersList',
|
'/customer/agent/getCustomersList',
|
||||||
...proposal,
|
...proposal,
|
||||||
@@ -106,7 +116,8 @@ let whiteList = [
|
|||||||
...preserve,
|
...preserve,
|
||||||
...renewalManage,
|
...renewalManage,
|
||||||
...hgb,
|
...hgb,
|
||||||
...whitelist
|
...whitelist,
|
||||||
|
...eqiVisit
|
||||||
]
|
]
|
||||||
|
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height:auto;
|
height: auto;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
@@ -20,7 +20,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
height:auto;
|
height: auto;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,6 +33,35 @@ a:hover {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thin-right,
|
||||||
|
.thin-bottom {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thin-right::after {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
border-right: 1px solid #edeff2;
|
||||||
|
transform-origin: top left;
|
||||||
|
transform: scale(0.5);
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thin-bottom::after {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
border-bottom: 1px solid #edeff2;
|
||||||
|
transform-origin: top left;
|
||||||
|
transform: scale(0.5);
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 宽度设置
|
// 宽度设置
|
||||||
@include set-width($width-list);
|
@include set-width($width-list);
|
||||||
// 宽度设置
|
// 宽度设置
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl, zssqUrl ,REQ_PWD, CACHE_ENCRYP, API_VERSION, assetsUpUrl// 保融支付的收银台服务地址
|
let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl, zssqUrl, REQ_PWD, CACHE_ENCRYP, API_VERSION, assetsUpUrl // 保融支付的收银台服务地址
|
||||||
|
|
||||||
// 可以多个接口域名,按需添加
|
// 可以多个接口域名,按需添加
|
||||||
console.log('环境:', process.env.VUE_APP_FLAG)
|
console.log('环境:', process.env.VUE_APP_FLAG)
|
||||||
switch (process.env.VUE_APP_FLAG) {
|
switch (process.env.VUE_APP_FLAG) {
|
||||||
case 'dev':
|
case 'dev':
|
||||||
apiDomain = 'http://139.199.50.151:7000/api/v2' // 国富api ///api/v1
|
apiDomain = 'http://139.199.50.151:7000/api/v1' // 国富api ///api/v1
|
||||||
imgDomain = 'http://211.159.248.123:7012/updown' // dev
|
imgDomain = 'http://211.159.248.123:7012/updown' // dev
|
||||||
// 静态服务资源
|
// 静态服务资源
|
||||||
assetsUrl = 'http://139.199.50.151:8000/app/'
|
assetsUrl = 'http://139.199.50.151:8000/app/'
|
||||||
@@ -20,9 +20,9 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
mainUrl = 'http://139.199.50.151'
|
mainUrl = 'http://139.199.50.151'
|
||||||
payUrl = 'https://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action'
|
payUrl = 'https://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action'
|
||||||
zssqUrl = 'http://139.199.50.151/html/test/index.html#/'
|
zssqUrl = 'http://139.199.50.151/html/test/index.html#/'
|
||||||
REQ_PWD = '41424344454631323334353637383930'
|
REQ_PWD = '41424344454631323334353637383930'
|
||||||
CACHE_ENCRYP = '41424344454631323334353637383930'
|
CACHE_ENCRYP = '41424344454631323334353637383930'
|
||||||
API_VERSION = 'v2'
|
API_VERSION = 'v1'
|
||||||
break
|
break
|
||||||
case 'uat':
|
case 'uat':
|
||||||
apiDomain = 'http://115.159.235.59:7000/api/v1' // 国富api
|
apiDomain = 'http://115.159.235.59:7000/api/v1' // 国富api
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bg-white">
|
<div class="bg-white newcomerlist">
|
||||||
<van-sticky>
|
<van-sticky>
|
||||||
<van-tabs v-model="deptIndex">
|
<van-tabs v-model="deptIndex" :ellipsis="false" @change="onDeptChanged">
|
||||||
<van-tab v-for="(dept, i) in depts" :key="i" :title="dept.name" />
|
<van-tab v-for="(dept, i) in depts" :key="i" :title="dept.name" />
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
<van-tabs v-model="groupIndex">
|
<van-tabs v-model="groupIndex" :ellipsis="false" @change="onGroupChanged">
|
||||||
<van-tab v-for="(group, i) in groups" :key="i" :title="group.name" />
|
<van-tab v-for="(group, i) in groups" :key="i" :title="group.name" />
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
</van-sticky>
|
</van-sticky>
|
||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||||
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getNewcomers" :immediate-check="false">
|
||||||
<div v-for="(item, i) in list" :key="i" class="van-hairline--bottom newcomer">
|
<div v-for="(item, i) in list" :key="i" class="van-hairline--bottom newcomer" @click="saveNewcomerInfo(item)">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<img :src="avatar" />
|
<img :src="avatar" />
|
||||||
</div>
|
</div>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<p class="mb10 agentCode">工号: {{ item.agentCode }}</p>
|
<p class="mb10 agentCode">工号: {{ item.agentCode }}</p>
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<span>{{ item.gender }}</span>
|
<span>{{ item.gender | genderFilter }}</span>
|
||||||
<span>{{ item.phone }}</span>
|
<span>{{ item.phone }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,7 +31,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import avatar from '@/assets/images/bnf_avatar.png'
|
import avatar from '@/assets/images/bnf_avatar.png'
|
||||||
import { Tab, Tabs, Sticky } from 'vant'
|
import { Tab, Tabs, Sticky } from 'vant'
|
||||||
|
import { getAccompanyComCode, getAccompanyPerson } from '@/api/ebiz/eqiVisit/eqiVisit'
|
||||||
export default {
|
export default {
|
||||||
|
name: 'NewcomerList',
|
||||||
components: {
|
components: {
|
||||||
[Tab.name]: Tab,
|
[Tab.name]: Tab,
|
||||||
[Tabs.name]: Tabs,
|
[Tabs.name]: Tabs,
|
||||||
@@ -41,93 +43,93 @@ export default {
|
|||||||
return {
|
return {
|
||||||
avatar,
|
avatar,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
list: [
|
list: [],
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' },
|
|
||||||
{ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' }
|
|
||||||
],
|
|
||||||
loading: false,
|
loading: false,
|
||||||
finished: false,
|
finished: false,
|
||||||
deptIndex: 0,
|
deptIndex: 0,
|
||||||
depts: [
|
depts: [],
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: 'aaa部门'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: 'bbb部门'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: 'ccc部门'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
groupIndex: 0,
|
groupIndex: 0,
|
||||||
groups: [
|
groups: [],
|
||||||
{
|
pageSize: 10,
|
||||||
id: 1,
|
pageNum: 1
|
||||||
name: 'aaa组'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: 'bbb组'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: 'ccc组'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
name: 'ddd组'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 5,
|
|
||||||
name: 'eee组'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 6,
|
|
||||||
name: 'fff组'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
computed: {
|
||||||
onRefresh() {
|
dept() {
|
||||||
setTimeout(() => {
|
return this.depts.find((item, index) => index === this.deptIndex)
|
||||||
this.isLoading = false
|
|
||||||
this.count++
|
|
||||||
}, 1000)
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
groupCode() {
|
||||||
// 异步更新数据
|
return this.groups.find((item, index) => index === this.groupIndex).groupCode
|
||||||
// setTimeout 仅做示例,真实场景中一般为 ajax 请求
|
}
|
||||||
setTimeout(() => {
|
},
|
||||||
for (let i = 0; i < 10; i++) {
|
async created() {
|
||||||
this.list.push({ agentCode: '0232389', name: 'xxx', gender: 0, phone: '13888888888' })
|
// 获取代理人可查看部门
|
||||||
|
await this.getDepts()
|
||||||
|
// 设置初始组
|
||||||
|
this.groups = this.dept.subBranchGroupLst
|
||||||
|
await this.getNewcomers()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getDepts() {
|
||||||
|
let res = await getAccompanyComCode({})
|
||||||
|
if (res.result === '0') {
|
||||||
|
let dept = {
|
||||||
|
...res.content.branchInfoBeanList[0]
|
||||||
}
|
}
|
||||||
|
let d = JSON.parse(JSON.stringify(dept))
|
||||||
// 加载状态结束
|
d.code = '1450100201'
|
||||||
this.loading = false
|
d.subBranchGroupLst.splice(0, 4)
|
||||||
|
this.depts = [dept, d]
|
||||||
// 数据全部加载完成
|
} else {
|
||||||
if (this.list.length >= 40) {
|
this.$toast(res.resultMessage)
|
||||||
this.finished = true
|
}
|
||||||
|
},
|
||||||
|
// 刷新组
|
||||||
|
async onRefresh() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.finished = false
|
||||||
|
await this.getNewcomers()
|
||||||
|
this.loading = false
|
||||||
|
this.isLoading = false
|
||||||
|
},
|
||||||
|
// 切换部
|
||||||
|
onDeptChanged() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.groupIndex = 0
|
||||||
|
this.groups = this.dept.subBranchGroupLst
|
||||||
|
},
|
||||||
|
// 切换组
|
||||||
|
onGroupChanged() {
|
||||||
|
this.pageNum = 1
|
||||||
|
this.getNewcomers()
|
||||||
|
},
|
||||||
|
async getNewcomers() {
|
||||||
|
let res = await getAccompanyPerson({
|
||||||
|
groupCode: this.groupCode,
|
||||||
|
pageReqDTO: {
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum
|
||||||
}
|
}
|
||||||
}, 1000)
|
})
|
||||||
|
this.pageNum++
|
||||||
|
this.finished = res.content.pageInfo.isLastPage
|
||||||
|
this.list = res.content.pageInfo.list
|
||||||
|
},
|
||||||
|
saveNewcomerInfo(newcomer) {
|
||||||
|
this.$CacheUtils.setLocItem('newcomer', JSON.stringify(newcomer))
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
forbidSwipeBack: '1',
|
||||||
|
url: location.origin + `/#/eqiVisit/visitInfoRegister?edit=true`
|
||||||
|
},
|
||||||
|
routerInfo: { path: '/eqiVisit/visitInfoRegister?edit=true' }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
genderFilter(val) {
|
||||||
|
return val === 0 ? '男' : '女'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,4 +161,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .van-tabs__line {
|
||||||
|
background-color: #1989fa !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newcomerlist {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<img class="mb30 icon" :src="img" />
|
<img class="mb30 icon" :src="img" />
|
||||||
<h1 class="blue mb30">恭喜完成陪访</h1>
|
<h1 class="blue mb30">恭喜完成陪访</h1>
|
||||||
<p class="blue mb30">奖励: +1积分</p>
|
<p class="blue mb30">奖励: +{{ singleScore }}积分</p>
|
||||||
<h2 class="blue mb30">累计积分99分</h2>
|
<h2 class="blue mb30">累计积分{{ totalScore }}分</h2>
|
||||||
<div class="btns p30">
|
<div class="btns p30">
|
||||||
<van-button class="mr5" plain color="#199ed8" type="primary">继续登记陪访</van-button>
|
<van-button class="mr5" plain color="#199ed8" type="primary" @click="accompanyAgain">继续登记陪访</van-button>
|
||||||
<van-button class="ml5" plain color="#199ed8" type="primary">积分榜</van-button>
|
<van-button class="ml5" plain color="#199ed8" type="primary">积分榜</van-button>
|
||||||
<van-button color="#199ed8" type="primary">返回</van-button>
|
<van-button color="#199ed8" type="primary" @click="quit">返回</van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,10 +17,58 @@
|
|||||||
<script>
|
<script>
|
||||||
import img from '@/assets/images/success.png'
|
import img from '@/assets/images/success.png'
|
||||||
export default {
|
export default {
|
||||||
|
name: 'RegisterResult',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
img
|
img
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
totalScore() {
|
||||||
|
return this.$route.query.total
|
||||||
|
},
|
||||||
|
singleScore() {
|
||||||
|
return this.$route.query.single
|
||||||
|
},
|
||||||
|
agentCode() {
|
||||||
|
return this.$route.query.agentCode
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.setLeftBtn()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setLeftBtn() {
|
||||||
|
setTimeout(() => {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||||
|
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
|
||||||
|
intercept: '1'
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
window.appCallBack = this.appCallBack
|
||||||
|
},
|
||||||
|
appCallBack(data) {
|
||||||
|
if (data.trigger == 'left_button_click') {
|
||||||
|
this.quit()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
quit() {
|
||||||
|
// 跳转首页
|
||||||
|
this.$jump({
|
||||||
|
flag: 'home'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
accompanyAgain() {
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
forbidSwipeBack: '1',
|
||||||
|
url: location.origin + `/#/eqiVisit/visitInfoRegister?agentCode=${this.agentCode}`
|
||||||
|
},
|
||||||
|
routerInfo: { path: `/eqiVisit/visitInfoRegister?agentCode=${this.agentCode}` }
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,34 +2,34 @@
|
|||||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||||
<div class="bg-white ranking">
|
<div class="bg-white ranking">
|
||||||
<van-notice-bar :text="noticeText" wrapable />
|
<van-notice-bar :text="noticeText" wrapable />
|
||||||
<div class="table-wrapper" v-if="data.length">
|
<div class="table-wrapper" v-if="ranking.length">
|
||||||
<table class="van-hairline--surround">
|
<table class="van-hairline--surround">
|
||||||
<thead>
|
<thead>
|
||||||
<th v-for="(th, i) in theads" :key="i">{{ th }}</th>
|
<th v-for="(th, i) in theads" :key="i">{{ th }}</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="van-hairline--bottom">
|
<tr class="hairline-bottom">
|
||||||
<template v-if="agentRank">
|
<template v-if="agentRank.name">
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 2em;">{{ agentRank.rank }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 2em;">{{ agentRank.rank }}</td>
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 3em;">{{ agentRank.name }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 3em;">{{ agentRank.name }}</td>
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 4em;">{{ agentRank.org }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 4em;">{{ agentRank.org }}</td>
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 2em;">{{ agentRank.level }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 2em;">{{ agentRank.level }}</td>
|
||||||
<td class="van-hairline--bottom" style="max-width: 2em;" @click="jumpToDetail">{{ agentRank.score }}</td>
|
<td class="van-hairline--bottom" style="max-width: 2em;" @click="jumpToDetail">{{ agentRank.score }}</td>
|
||||||
</template>
|
</template>
|
||||||
<td v-else colspan="5">暂无积分</td>
|
<td class="van-hairline--bottom" v-else colspan="5">暂无积分</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr v-for="(d, index) in data" :key="index">
|
<tr v-for="(rank, index) in ranking" :key="index">
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 2em;">{{ d.rank }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 2em;">{{ rank.rank }}</td>
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 3em;">{{ d.name }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 3em;">{{ rank.agentName }}</td>
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 4em;">{{ d.org }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 4em;">{{ rank.thirManageName }}</td>
|
||||||
<td class="van-hairline--right van-hairline--bottom" style="max-width: 2em;">{{ d.level }}</td>
|
<td class="thin-right thin-bottom" style="max-width: 2em;">{{ rank.applGrade }}</td>
|
||||||
<td class="van-hairline--bottom" style="max-width: 2em;">{{ d.score }}</td>
|
<td class="thin-bottom" style="max-width: 2em;">{{ rank.rewardCount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="empty pt150">
|
<div class="empty pt150" v-else>
|
||||||
<p class="mb10">暂无排名</p>
|
<p class="mb10">暂无排名</p>
|
||||||
<img :src="empty" />
|
<img :src="empty" />
|
||||||
</div>
|
</div>
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { NoticeBar } from 'vant'
|
import { NoticeBar } from 'vant'
|
||||||
import empty from '@/assets/images/empty.png'
|
import empty from '@/assets/images/empty.png'
|
||||||
|
import { getAccompanyRank } from '@/api/ebiz/eqiVisit/eqiVisit'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
[NoticeBar.name]: NoticeBar
|
[NoticeBar.name]: NoticeBar
|
||||||
@@ -47,26 +48,35 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
empty,
|
empty,
|
||||||
agentRank: null,
|
agentRank: {},
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
theads: ['排名', '姓名', '所在机构', '职级', '积分'],
|
theads: ['排名', '姓名', '所在机构', '职级', '积分'],
|
||||||
data: []
|
ranking: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
noticeText() {
|
noticeText() {
|
||||||
if (this.data.length) {
|
if (this.ranking.length) {
|
||||||
return '温馨提示: 每日凌晨更新前一日积分排行,下拉刷新最新排行'
|
return '温馨提示: 每日凌晨更新前一日积分排行,下拉刷新最新排行'
|
||||||
} else {
|
} else {
|
||||||
return '温馨提示:当前暂无最新排名,赶紧去陪访吧!'
|
return '温馨提示:当前暂无最新排名,赶紧去陪访吧!'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
agentCode() {
|
||||||
|
return this.$route.query.agentCode
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.queryRanking()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onRefresh() {
|
async queryRanking() {
|
||||||
setTimeout(() => {
|
let res = await getAccompanyRank({ billboardStart: 0, billboardEnd: 20, agentCode: this.agentCode })
|
||||||
this.isLoading = false
|
this.ranking = res.content.statisticsBeanList
|
||||||
}, 2000)
|
},
|
||||||
|
async onRefresh() {
|
||||||
|
await this.queryRanking()
|
||||||
|
this.isLoading = false
|
||||||
},
|
},
|
||||||
jumpToDetail() {
|
jumpToDetail() {
|
||||||
this.$jump({
|
this.$jump({
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<div class="full-page bg-white">
|
<div class="full-page bg-white">
|
||||||
<div class="form ml10 mr10">
|
<div class="form ml10 mr10">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="accompanyingName" label="陪访人" readonly />
|
<van-field v-model="agentInfo.name" label="陪访人" readonly />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell-group>
|
<van-cell-group @click="selectNewcomer">
|
||||||
<van-field
|
<van-field
|
||||||
right-icon="arrow"
|
right-icon="arrow"
|
||||||
v-model="newcomerName"
|
v-model="newcomerInfo.name"
|
||||||
label="陪访新人姓名"
|
label="陪访新人姓名"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
required
|
required
|
||||||
@@ -37,25 +37,27 @@
|
|||||||
</template>
|
</template>
|
||||||
</PopupSelector>
|
</PopupSelector>
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="customerName" label="客户姓名" placeholder="请输入" required name="客户姓名" v-validate="'required'" />
|
<van-field v-model="visitName" label="客户姓名" placeholder="请输入" required name="客户姓名" v-validate="'required'" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<PopupSelector v-model="customerAge" :columns="ages" label="客户年龄" placeholder="请选择" readonly required name="客户年龄" v-validate="'required'" />
|
<PopupSelector v-model="visitAge" :columns="ages" label="客户年龄" placeholder="请选择" readonly required name="客户年龄" v-validate="'required'" />
|
||||||
<PopupSelector v-model="areaName" label="地点" placeholder="请选择" readonly required name="地点" v-validate="'required'">
|
<PopupSelector v-model="areaName" label="地点" placeholder="请选择" readonly required name="地点" v-validate="'required'">
|
||||||
<template v-slot:default="{ closePopup }">
|
<template v-slot:default="{ closePopup }">
|
||||||
<van-area :area-list="areaList" value="450000" @confirm="onAreaConfirm($event, closePopup)" @cancel="closePopup" />
|
<van-area :area-list="areaList" value="450000" @confirm="onAreaConfirm($event, closePopup)" @cancel="closePopup" />
|
||||||
</template>
|
</template>
|
||||||
</PopupSelector>
|
</PopupSelector>
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="homeAddress" label="详细地址" placeholder="请输入" required clearable name="详细地址" v-validate="'required'" maxlength="200" />
|
<van-field v-model="visitAddress" label="详细地址" placeholder="请输入" required clearable name="详细地址" v-validate="'required'" maxlength="200" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<p class="m10">现场照片(最多9张)</p>
|
<p class="m10">现场照片(最多9张)</p>
|
||||||
<van-uploader class="m10" v-model="fileList" :after-read="afterRead" :max-count="9" />
|
<van-uploader class="m10" v-model="imageList" :after-read="uploadImg" :max-count="9" />
|
||||||
</div>
|
</div>
|
||||||
<van-button type="info" block @click="submitInfo">提交</van-button>
|
<van-button type="info" block @click="submitInfo">提交</van-button>
|
||||||
|
|
||||||
<van-popup :value="isSearchMoreShow" position="bottom" @click-overlay="isSearchMoreShow = false">
|
<van-popup :value="isSearchMoreShow" position="bottom" @click-overlay="isSearchMoreShow = false">
|
||||||
<div class="action van-hairline--bottom" v-for="(action, i) in actions" :key="i" @click="jumpPage(action)">{{ action.title }}</div>
|
<div class="action van-hairline--bottom" v-for="(action, i) in actions" :key="i" @click="jumpPage(action)">{{ action.title }}</div>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
|
<check-agent @checModelSuccessMethod="initThisPage" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -65,25 +67,34 @@ import areaList from '@/assets/js/utils/areaForSale'
|
|||||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||||
import { uploadImg } from '@/api/ebiz/sale/sale'
|
import { uploadImg } from '@/api/ebiz/sale/sale'
|
||||||
import timeUtil from '@/assets/js/utils/date-utils'
|
import timeUtil from '@/assets/js/utils/date-utils'
|
||||||
|
import { getAgentInfo } from '@/api/ebiz/my/my'
|
||||||
|
import CheckAgent from '@/components/common/CheckAgent'
|
||||||
|
import { saveAccompanyRecord } from '@/api/ebiz/eqiVisit/eqiVisit'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'VisitInfoRegister',
|
name: 'VisitInfoRegister',
|
||||||
components: {
|
components: {
|
||||||
PopupSelector
|
PopupSelector,
|
||||||
|
[CheckAgent.name]: CheckAgent
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
newcomerInfo: {},
|
||||||
|
showFlag: true,
|
||||||
|
agentInfo: {},
|
||||||
|
imageList: [],
|
||||||
areaList,
|
areaList,
|
||||||
accompanyingName: '张三',
|
|
||||||
newcomerName: '',
|
newcomerName: '',
|
||||||
customerName: '',
|
visitName: '',
|
||||||
customerAge: '',
|
visitAge: '',
|
||||||
areaName: '',
|
areaName: '',
|
||||||
homeProvince: '',
|
visitProvinceCode: '',
|
||||||
homeCity: '',
|
visitProvinceName: '',
|
||||||
homeArea: '',
|
visitCityCode: '',
|
||||||
homeAddress: '',
|
visitCityName: '',
|
||||||
|
visitAreaCode: '',
|
||||||
|
visitAreaName: '',
|
||||||
|
visitAddress: '',
|
||||||
visitType: '',
|
visitType: '',
|
||||||
visitTypes: ['入职前陪访', '新人首单', '冲刺挑战', '参与衔训'],
|
visitTypes: ['入职前陪访', '新人首单', '冲刺挑战', '参与衔训'],
|
||||||
visitDate: '',
|
visitDate: '',
|
||||||
@@ -128,10 +139,44 @@ export default {
|
|||||||
return age
|
return age
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.setRightBtn()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
initThisPage(showFlag) {
|
||||||
|
this.showFlag = showFlag
|
||||||
|
if (this.showFlag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
async init() {
|
||||||
|
// 拦截右上角按钮
|
||||||
|
this.setRightBtn()
|
||||||
|
// 获取代理人信息
|
||||||
|
await this.setAgentInfo({})
|
||||||
|
// 新增陪访记录时清空缓存数据, 编辑时从缓存取出数据回显
|
||||||
|
if (this.$route.query.edit) {
|
||||||
|
this.newcomerInfo = JSON.parse(this.$CacheUtils.getLocItem('newcomer'))
|
||||||
|
} else {
|
||||||
|
this.$CacheUtils.removeLocItem('newcomer')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async setAgentInfo() {
|
||||||
|
let res = await getAgentInfo({})
|
||||||
|
if (res.result === '0') {
|
||||||
|
this.agentInfo = res
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectNewcomer() {
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
forbidSwipeBack: '1',
|
||||||
|
url: location.origin + `/#/eqiVisit/newcomerList`
|
||||||
|
},
|
||||||
|
routerInfo: { path: '/eqiVisit/newcomerList' }
|
||||||
|
})
|
||||||
|
},
|
||||||
setRightBtn() {
|
setRightBtn() {
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// // eslint-disable-next-line no-undef
|
// // eslint-disable-next-line no-undef
|
||||||
@@ -150,7 +195,7 @@ export default {
|
|||||||
this.isSearchMoreShow = true
|
this.isSearchMoreShow = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async afterRead(file) {
|
async uploadImg(file) {
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
data.append('imgPath', file.file)
|
data.append('imgPath', file.file)
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
@@ -158,9 +203,11 @@ export default {
|
|||||||
loadingType: 'spinner'
|
loadingType: 'spinner'
|
||||||
})
|
})
|
||||||
let res = await uploadImg(data)
|
let res = await uploadImg(data)
|
||||||
console.log('res :>> ', res)
|
this.$toast.clear()
|
||||||
if (res.result === '0') {
|
if (res.result === '0') {
|
||||||
file.result = res.path
|
file.rgssUrl = res.path
|
||||||
|
} else {
|
||||||
|
this.imageList.splice(this.imageList.length - 1, 1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onDateConfirm(data, fun) {
|
onDateConfirm(data, fun) {
|
||||||
@@ -169,7 +216,8 @@ export default {
|
|||||||
},
|
},
|
||||||
onAreaConfirm(data, fun) {
|
onAreaConfirm(data, fun) {
|
||||||
let [province, city, area] = [data[0], data[1], data[2]]
|
let [province, city, area] = [data[0], data[1], data[2]]
|
||||||
;[this.homeProvince, this.homeCity, this.homeArea] = [province.code, city.code, area.code]
|
;[this.visitProvinceCode, this.visitCityCode, this.visitAreaCode] = [province.code, city.code, area.code]
|
||||||
|
;[this.visitProvinceName, this.visitCityName, this.visitAreaName] = [province.name, city.name, area.name]
|
||||||
this.areaName = getAreaName(data)
|
this.areaName = getAreaName(data)
|
||||||
fun()
|
fun()
|
||||||
},
|
},
|
||||||
@@ -178,12 +226,50 @@ export default {
|
|||||||
fun()
|
fun()
|
||||||
},
|
},
|
||||||
async submitInfo() {
|
async submitInfo() {
|
||||||
this.isSearchMoreShow = true
|
let res = await this.$validator.validate()
|
||||||
// let res = await this.$validator.validate()
|
if (!res) {
|
||||||
// if (!res) {
|
return this.$toast(this.$validator.errors.all()[0])
|
||||||
// return this.$toast(this.$validator.errors.all()[0])
|
}
|
||||||
// }
|
// 保存陪访信息
|
||||||
// console.log('res :>> ', res)
|
let accompanyType = `0${this.visitTypes.findIndex(type => type === this.visitType) + 1}`
|
||||||
|
let param = {
|
||||||
|
accompanyRecordDTO: {
|
||||||
|
agentCode: this.agentInfo.jobNo,
|
||||||
|
agentName: this.agentInfo.name,
|
||||||
|
applGrade: this.agentInfo.agentGrade,
|
||||||
|
accompanyAgentCode: this.newcomerInfo.agentCode,
|
||||||
|
accompanyAgentName: this.newcomerInfo.name,
|
||||||
|
accompanyApplGrade: this.newcomerInfo.applGrade,
|
||||||
|
accompanyType,
|
||||||
|
accompanyName: this.visitType,
|
||||||
|
visitDate: this.visitDate,
|
||||||
|
visitDuration: this.visitDuration,
|
||||||
|
visitName: this.visitName,
|
||||||
|
visitAge: this.visitAge,
|
||||||
|
visitProvinceCode: this.visitProvinceCode,
|
||||||
|
visitProvinceName: this.visitProvinceName,
|
||||||
|
visitCityCode: this.visitCityCode,
|
||||||
|
visitCityName: this.visitCityName,
|
||||||
|
visitAreaCode: this.visitAreaCode,
|
||||||
|
visitAreaName: this.visitAreaName,
|
||||||
|
visitAddress: this.visitAddress
|
||||||
|
},
|
||||||
|
mediaDTOLst: this.imageList.map(img => ({ rgssUrl: img.rgssUrl }))
|
||||||
|
}
|
||||||
|
res = await saveAccompanyRecord(param)
|
||||||
|
if (res.result === '0') {
|
||||||
|
let { rewardCount, allRewardCount } = res.content
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
forbidSwipeBack: '1',
|
||||||
|
url: location.origin + `/#/eqiVisit/registerResult?single=${rewardCount}&total=${allRewardCount}&agentCode=${this.agentInfo.jobNo}`
|
||||||
|
},
|
||||||
|
routerInfo: { path: `/eqiVisit/registerResult?single=${rewardCount}&total=${allRewardCount}&agentCode=${this.agentInfo.jobNo}` }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
jumpPage(route) {
|
jumpPage(route) {
|
||||||
if (route.to) {
|
if (route.to) {
|
||||||
@@ -227,4 +313,8 @@ export default {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .van-tabs__line {
|
||||||
|
background-color: #1989fa !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user