Commit 9bc02682 by 前端

Merge branch 'v3.2.0' into 'master'

V3.2.0

See merge request !76
2 parents 91dbec3c fd165c66
......@@ -17,5 +17,39 @@ export default {
url,
data
})
},
/** 分页查询活动申请记录*/
activityRecord(data) {
data.method = 'entmicro.api.business.card.activity.record'
return window.$HTTP({
url,
data
})
},
/** 分页查询活动申请记录*/
activityRecord(data) {
data.method = 'entmicro.api.business.card.activity.record'
return window.$HTTP({
url,
data
})
},
/**智能名片活动页面访问记录 */
getActivityRecord(data) {
data.method = 'entmicro.api.business.card.activity.pagerecord'
return window.$HTTP({
url,
data
})
},
/**智能名片活动跟进*/
activityFollow(data) {
data.method = 'entmicro.api.business.card.activity.follow'
return window.$HTTP({
url,
data,
returnAll:true
})
}
}
......@@ -49,7 +49,7 @@ img {
overflow: hidden;
text-overflow: ellipsis;
}
.nowrap{
.nowrap {
white-space: nowrap;
}
.text-two-line {
......@@ -97,7 +97,7 @@ img {
}
.colord8 {
// color: #d8d8d8;
color:rgba(216, 216, 216, 0.3)
color: rgba(216, 216, 216, 0.3);
}
.color54 {
color: #545454;
......@@ -108,7 +108,7 @@ img {
.color9 {
color: #999999;
}
.font-10{
.font-10 {
font-size: 10px;
}
.font-12 {
......@@ -118,7 +118,6 @@ img {
font-size: 20px;
}
.font-24 {
font-size: 24px;
}
......@@ -130,7 +129,7 @@ img {
.font-16 {
font-size: 16px;
}
.line-22{
.line-22 {
line-height: 22px;
}
.line-24 {
......@@ -192,7 +191,7 @@ img {
.m-l-16 {
margin-left: 16px;
}
.m-l-14{
.m-l-14 {
margin-left: 14px;
}
.fw4 {
......@@ -204,7 +203,7 @@ img {
.fw7 {
font-weight: 700;
}
.bold{
.bold {
font-weight: bold;
}
.button {
......@@ -244,6 +243,15 @@ img {
width: 20px;
height: 20px;
}
.p52{
padding:11px 52px;
}
\ No newline at end of file
.p52 {
padding: 11px 52px;
}
.tip {
font-weight: 400;
font-size: 12px;
color: rgba(255, 255, 255, 0.9);
letter-spacing: 0;
text-align: center;
line-height: 18px;
margin:7px 8px;
}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 186px 148px;}
.icon-active { width: 20px; height: 20px; background-position: -72px -96px;}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 194px 154px;}
.icon-active { width: 20px; height: 20px; background-position: -138px -30px;}
.icon-append { width: 32px; height: 32px; background-position: -54px 0px;}
.icon-appoint { width: 32px; height: 32px; background-position: 0px -54px;}
.icon-arrow { width: 7px; height: 11px; background-position: -168px -24px;}
.icon-arrow { width: 7px; height: 11px; background-position: -176px -104px;}
.icon-avatar { width: 44px; height: 44px; background-position: 0px 0px;}
.icon-customer-active { width: 16px; height: 16px; background-position: -114px -130px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -34px -96px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: -138px -90px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -102px -96px;}
.icon-delete { width: 18px; height: 14px; background-position: -168px 0px;}
.icon-collect { width: 32px; height: 28px; background-position: -96px -42px;}
.icon-customer-active { width: 16px; height: 16px; background-position: -176px -28px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -138px 0px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: -110px -96px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -138px -60px;}
.icon-delete { width: 18px; height: 14px; background-position: -176px -80px;}
.icon-factory { width: 32px; height: 32px; background-position: -42px -54px;}
.icon-fail { width: 24px; height: 24px; background-position: -96px -42px;}
.icon-fllow { width: 18px; height: 18px; background-position: -30px -130px;}
.icon-fail { width: 24px; height: 24px; background-position: -42px -96px;}
.icon-fllow { width: 18px; height: 18px; background-position: -120px -134px;}
.icon-follow { width: 32px; height: 32px; background-position: -96px 0px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -138px 0px;}
.icon-identifier { width: 20px; height: 20px; background-position: -138px -30px;}
.icon-maintant { width: 20px; height: 20px; background-position: -138px -60px;}
.icon-message { width: 18px; height: 18px; background-position: -58px -130px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -168px -45px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: 0px -130px;}
.icon-succeed { width: 24px; height: 24px; background-position: 0px -96px;}
.icon-tel { width: 18px; height: 18px; background-position: -86px -130px;}
.icon-tip { width: 16px; height: 16px; background-position: -140px -130px;}
\ No newline at end of file
.icon-followRecord { width: 20px; height: 20px; background-position: -138px -90px;}
.icon-identifier { width: 20px; height: 20px; background-position: 0px -134px;}
.icon-maintant { width: 20px; height: 20px; background-position: -30px -134px;}
.icon-message { width: 18px; height: 18px; background-position: -148px -134px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -176px -125px;}
.icon-phone { width: 20px; height: 20px; background-position: -60px -134px;}
.icon-remove { width: 32px; height: 28px; background-position: 0px -96px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: -90px -134px;}
.icon-succeed { width: 24px; height: 24px; background-position: -76px -96px;}
.icon-tel { width: 18px; height: 18px; background-position: -176px 0px;}
.icon-tip { width: 16px; height: 16px; background-position: -176px -54px;}
\ No newline at end of file

39.5 KB | W: | H:

44.7 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -21,6 +21,8 @@ import { bus, tools, store as local, util, constants } from './utils'
import './utils/util'
import 'components'
import { components } from '@/plugins/vant'
import { Popover } from 'vant';
Vue.use(Popover);
components.forEach(component => Vue.use(component))
Vue.prototype.$constants = constants
Vue.prototype.api = api
......
......@@ -105,6 +105,13 @@ const pages = {
title: '名片访问记录',
backgroundColor: '#F7F7F7'
}
},
{
name: 'list',
meta: {
title: '名片访客',
backgroundColor: '#F7F7F7'
}
}
],
customerDetails: [
......
<template>
<div class="apply-wrap">
<template v-if="count">
<van-pull-refresh class="content" v-model="refreshing" @refresh="onRefresh">
<van-list v-model="loading" :finished="finished" finished-text="已经到底啦" @load="onLoad">
<template v-for="(i, index) in dataList">
<div class="apply-item" :key="index">
<div class="apply-item-head">
<div class="title flex">
<div class="maxWidth">{{ i.merchantName }}</div>
</div>
<div class="type">主营: {{ i.carModel ? i.carModel : '--' }}</div>
</div>
<div class="apply-item-content">
<div class="content-wrap flex">
<div class="title">申请场景</div>
<div class="info">{{ i.businessScenario ? i.businessScenario : '--' }}</div>
</div>
<div class="content-wrap flex-top">
<div class="title">申请活动</div>
<div class="info">{{ i.productItems ? i.productItems : '--' }}</div>
</div>
<div class="content-wrap flex">
<div class="title">申请时间</div>
<div class="info">{{ i.createdTime }}</div>
</div>
<div class="content-wrap flex">
<div class="title">申请人</div>
<div class="info linkman flex" @click="makePhone(i)">
<div style="max-width: 120px; overflow: hidden; white-space: nowrap">{{ i.contactName }}</div>
<span class="phone-num">{{ i.contactPhone }}</span>
<div class="sprite-icon icon-phone"></div>
</div>
</div>
</div>
<div class="apply-item-footer flex">
<div class="flex">
<template v-if="index == 0">
<van-popover v-model="showPopover" theme="dark" placement="top-start">
<div class="tip">点击可切换状态</div>
<template #reference>
<div :class="['sprite-icon', i.followType == 0 ? ' icon-remove' : ' icon-collect']" @click.stop="checkCollect(i)"></div>
</template>
</van-popover>
</template>
<div v-else :class="['sprite-icon', i.followType == 0 ? ' icon-remove' : ' icon-collect']" @click.stop="checkCollect(i)"></div>
<div :class="['follew-result', i.followType == 0 ? 'fail' : 'success']">{{ i.followType == 0 ? '未跟进' : '已跟进' }}</div>
</div>
<div class="record" @click.stop="popupShow(i)">访问记录</div>
</div>
</div>
</template>
</van-list>
</van-pull-refresh>
</template>
<van-empty description="暂无数据" v-else />
<popup-comp :show.sync="show" :list="detailList"></popup-comp>
</div>
</template>
<script>
import { Toast } from 'vant'
import { businessApi } from '@/api'
import popupComp from './popupComp.vue'
export default {
components: {
popupComp
},
data() {
return {
dataList: [],
detailList: [],
loading: false,
finished: false,
refreshing: false,
show: false,
count: 1,
pageNum: 0,
pageSize: 20,
showPopover: true,
uuid: ''
}
},
mounted() {
this.uuid = this.getLocalStorage('dj_scrm_userInfo').uuid ? this.getLocalStorage('dj_scrm_userInfo').uuid : null
setTimeout(() => {
this.showPopover = false
}, 3000)
},
methods: {
makePhone(item) {
this.makePhoneCall(item.contactPhone)
},
onLoad() {
this.pageNum++
this.loading = true
const num = this.count / this.pageSize
if (Number.isInteger(num)) {
this.number = num
} else {
this.number = parseInt(num) + 1
}
if (this.dataList.length < this.count) {
if (this.pageNum <= this.number) {
this.activityRecord()
this.loading = false
}
} else {
this.loading = false
this.finished = true
}
},
activityRecord(isdiff) {
this.loading = true
const { pageNum, pageSize, uuid } = this
businessApi.activityRecord({ pageNum, pageSize, userType: 2, uuid }).then(res => {
if (res) {
const dataList = res.data
this.dataList = this.dataList.concat(dataList)
this.count = res.count
if(isdiff) Toast('刷新成功');
if (this.dataList.length <= this.count) {
if (this.count === 0) {
this.finished = true
} else {
this.finished = false
}
}
this.loading = false
}
})
},
onRefresh() {
this.dataList = []
this.pageNum = 1
let isdiff = 1
this.activityRecord(isdiff)
if (this.refreshing) {
this.content = this.dataList
this.dataList = this.content
this.refreshing = false
}
this.loading = false
},
popupShow(item) {
let data = {
activityId: item.activityId
}
this.detailList = []
businessApi.getActivityRecord(data).then(res => {
this.show = true
this.detailList = res ? res : []
})
},
checkCollect(item) {
this.show = false
let data = {
activityId: item.activityId,
followType: item.followType == 0 ? 1 : 0
}
businessApi.activityFollow(data).then(res => {
if (res.code == 0) {
this.dataList = []
this.activityRecord()
Toast('跟进状态修改成功')
}
})
}
}
}
</script>
<style lang='scss' scoped>
.apply-wrap {
padding: 12px;
.content {
height: calc(100% - 80px);
overflow: scroll;
}
.apply-item {
box-sizing: border-box;
background: #fff;
box-shadow: 0 4px 8px 0 rgba(224, 224, 224, 0.5);
margin-bottom: 12px;
&-head {
padding: 10px 16px 12px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
.title {
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 24px;
}
.maxWidth {
max-width: 350px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.type {
font-weight: 400;
font-size: 12px;
color: #999999;
line-height: 16px;
}
}
&-content {
padding: 12px 16px 10px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
.content-wrap {
margin-bottom: 8px;
.title {
font-weight: 400;
font-size: 14px;
color: #999999;
width: 56px;
text-align: left;
white-space: nowrap;
}
.info {
font-weight: 400;
font-size: 14px;
color: #333333;
margin-left: 16px;
}
.linkman {
height: 32px;
background: #f5f7fa;
border-radius: 4px;
line-height: 32px;
padding: 0 8px;
box-sizing: border-box;
.phone-num {
color: #6e6e7a;
margin: 0 6px 0 4px;
}
}
}
}
&-footer {
height: 48px;
padding: 0 16px 0 12px;
box-sizing: border-box;
justify-content: space-between;
font-size: 14px;
.follew-result {
color: #f0aa06;
}
.fail {
color: #999999 !important;
}
.record {
color: #3975c6;
text-align: right;
}
}
.icon-remove,
.icon-collect {
margin-right: 8px;
}
}
}
</style>
\ No newline at end of file
......@@ -12,8 +12,8 @@
<van-list v-model="loading" :finished="finished" finished-text="已经到底啦" @load="onLoad">
<div class="proxy-list" v-for="item in dataList" :key="item.id">
<div class="proxy-item proxy-nickname">
<label>{{ item.nickName }}</label>
{{ item.type == 1 ? '@微信' : '' }}
<div class="label">{{ item.nickName }}</div>
<div>{{ item.type == 1 ? '@微信' : '' }}</div>
</div>
<div class="proxy-item">{{ item.phone }}</div>
<div class="proxy-item">{{ item.lastTime }}</div>
......@@ -22,31 +22,19 @@
</van-list>
</van-pull-refresh>
</div>
<van-popup v-model="show" position="bottom" round :style="{ 'min-height': '40%', 'max-height': '80%', 'overflow-y': 'hidden', 'padding-bottom': '30px' }">
<div class="popup-header">
<div class="popup-title">访问记录</div>
<div class="popup-icon"><van-icon name="cross" @click="show = false" /></div>
</div>
<div class="popup-content">
<div class="popup-content-header">
<div class="popup-item">序号</div>
<div class="popup-item">访问页面</div>
<div class="popup-item">访问时间</div>
</div>
<div class="popup-content-body" v-for="(item, index) in detailList" :key="item.id">
<div class="popup-item">{{ index + 1 }}</div>
<div class="popup-item">{{ item.pageName }}</div>
<div class="popup-item">{{ item.createdTime }}</div>
</div>
</div>
</van-popup>
<popup-comp :show.sync="show" :list="detailList"></popup-comp>
</template>
<van-empty description="暂无数据" v-else />
</div>
</template>
<script>
import { businessApi } from '@/api'
import popupComp from './popupComp.vue'
export default {
components: {
popupComp
},
name: 'index',
data() {
return {
dataList: [],
......@@ -119,9 +107,7 @@ export default {
</script>
<style lang="scss" scoped>
.proxy-body {
position: absolute;
top: 48px;
height: calc(100% - 48px);
height: calc(100% - 90px);
width: 100%;
left: 0px;
::v-deep {
......@@ -131,16 +117,15 @@ export default {
}
}
.proxy-list {
height: 48px;
line-height: 48px;
height: 56px;
background: #ffffff;
box-shadow: inset 0 -1px 0 0 #f2f2f2;
display: flex;
align-items: center;
padding: 12px;
box-sizing: border-box;
&.proxy-header {
position: fixed;
width: 100%;
top: 0px;
left: 0px;
height: 40px;
background: #f2f2f2;
.proxy-item {
&:last-child {
......@@ -150,27 +135,29 @@ export default {
}
.proxy-item {
font-size: 13px;
font-size: 14px;
color: #414141;
text-align: center;
text-align: left;
&.proxy-nickname {
color: #2cca74;
label {
font-size: 11px;
.label {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #414141;
max-width: 70px;
font-size: 14px;
}
}
&:first-child {
width: 120px;
display: flex;
align-items: center;
justify-content: center;
width: 84px;
}
&:last-child {
width: 56px;
white-space: nowrap;
}
&:last-child,
&:nth-child(2),
&:nth-child(3) {
flex: 1;
......@@ -180,51 +167,5 @@ export default {
}
}
}
.popup-header {
height: 56px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 16px;
.popup-title {
font-weight: 500;
font-size: 16px;
color: #222222;
}
}
.popup-content {
max-height: calc(80vh - 50px);
overflow: auto;
&-header {
display: flex;
height: 40px;
line-height: 48px;
background: #f2f2f2;
text-align: center;
.popup-item {
font-weight: 600;
font-size: 14px;
color: #333333;
}
}
&-body {
display: flex;
height: 48px;
line-height: 48px;
background: #ffffff;
border: 1px solid #e5e5e5;
text-align: center;
}
.popup-item {
font-size: 14px;
color: #666666;
&:first-child {
width: 60px;
}
&:nth-child(2),
&:nth-child(3) {
flex: 1;
}
}
}
</style>
<template>
<div class="list-wrap">
<tab :list="['访客记录', '活动申请']" :index="currentIndex" :sticky="true" @change="changeIndex"></tab>
<component :is="currentComponent"></component>
</div>
</template>
<script>
import index from './index.vue'
import apply from './apply.vue'
export default {
data() {
return {
currentIndex: 0,
currentComponent: 'index'
}
},
components: {
index,
apply
},
methods: {
changeIndex(index) {
this.currentComponent = index == 0 ? 'index' : 'apply'
}
}
}
</script>
<style lang='scss' scoped>
.list-wrap {
}
</style>
\ No newline at end of file
<template>
<van-popup v-model="show" position="bottom" round :style="{ 'min-height': '40%', 'max-height': '80%', 'overflow-y': 'hidden', 'padding-bottom': '30px' }">
<div class="popup-header">
<div class="popup-title">访问记录</div>
<div class="popup-icon"><van-icon name="cross" @click="updateShow" /></div>
</div>
<div class="popup-content">
<div class="popup-content-header">
<div class="popup-item">序号</div>
<div class="popup-item">访问页面</div>
<div class="popup-item">访问时间</div>
</div>
<div class="popup-content-body" v-for="(item, index) in list" :key="item.id">
<div class="popup-item">{{ index + 1 }}</div>
<div class="popup-item">{{ item.pageName }}</div>
<div class="popup-item">{{ item.createdTime }}</div>
</div>
</div>
</van-popup>
</template>
<script>
export default {
data() {
return {}
},
props: {
show: {
default: false,
type: Boolean
},
list: {
default: () => [],
type: Array
}
},
methods: {
updateShow() {
this.$emit('update:show', false)
}
}
}
</script>
<style scoped lang="scss">
.popup-header {
height: 56px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 16px;
.popup-title {
font-weight: 600;
font-size: 16px;
color: #222222;
}
}
.popup-content {
max-height: calc(80vh - 50px);
overflow: auto;
&-header {
display: flex;
height: 40px;
line-height: 48px;
background: #f2f2f2;
text-align: center;
.popup-item {
font-weight: 600;
font-size: 14px;
color: #333333;
}
}
&-body {
display: flex;
height: 48px;
line-height: 48px;
background: #ffffff;
border: 1px solid #e5e5e5;
text-align: center;
}
.popup-item {
font-size: 14px;
color: #666666;
&:first-child {
width: 60px;
}
&:nth-child(2),
&:nth-child(3) {
flex: 1;
}
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!