Commit af10702f by 前端

Merge branch 'v3.23.1' into 'master'

V3.23.1

See merge request !80
2 parents 405a38b4 f9e8e67c
......@@ -16,7 +16,7 @@
"autoprefixer": "^8.0.0",
"core-js": "^3.6.4",
"dayjs": "^1.10.5",
"glsx-common": "^1.4.9",
"glsx-common": "^2.10.1",
"lib-flexible": "^0.3.2",
"postcss-loader": "^6.2.0",
"sass-loader": "^7.3.1",
......
......@@ -17,5 +17,6 @@ import detailApi from './detail'
import solicitApi from './solicit'
import businessApi from './business'
import datahubApi from './datahubApi'
import sopApi from './sop'
export { ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi, businessApi, datahubApi }
export { sopApi,ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi, businessApi, datahubApi }
// const url = 'http://192.168.3.192:8315/rop-scrm-sso/router'
const returnAll = true
export default {
getNoticeCustomerList(params) {
return window.$HTTP_SOP({
url: `/process/sop/api/sopInsts/getNoticeCustomerList`,
method: 'post',
data: params,
noSessionId: true,
sign: false
})
}
}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 221px 220px;}
.icon-active { width: 20px; height: 20px; background-position: -201px 0px;}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 261px 216px;}
.icon-active { width: 20px; height: 20px; background-position: -72px -162px;}
.icon-append { width: 32px; height: 32px; background-position: -105px -58px;}
.icon-appoint { width: 32px; height: 32px; background-position: -51px -112px;}
.icon-arrow { width: 7px; height: 11px; background-position: -177px -112px;}
.icon-arrow { width: 7px; height: 11px; background-position: -243px -48px;}
.icon-avatar { width: 44px; height: 44px; background-position: 0px -58px;}
.icon-collect { width: 32px; height: 28px; background-position: 0px -162px;}
.icon-collect { width: 32px; height: 28px; background-position: -201px -42px;}
.icon-copy { width: 14px; height: 14px; background-position: -243px -24px;}
.icon-coupon { width: 41px; height: 40px; background-position: -54px -58px;}
.icon-customer-active { width: 16px; height: 16px; background-position: -142px -200px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -152px -162px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: 0px -200px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -201px -30px;}
.icon-delete { width: 18px; height: 14px; background-position: -194px -200px;}
.icon-customer-active { width: 16px; height: 16px; background-position: -172px -196px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -34px -162px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: -30px -196px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -102px -162px;}
.icon-delete { width: 18px; height: 14px; background-position: -243px 0px;}
.icon-factory { width: 32px; height: 32px; background-position: -93px -112px;}
.icon-fail { width: 24px; height: 24px; background-position: -84px -162px;}
.icon-fllow { width: 18px; height: 18px; background-position: -58px -200px;}
.icon-fail { width: 24px; height: 24px; background-position: -201px -118px;}
.icon-fllow { width: 18px; height: 18px; background-position: -88px -196px;}
.icon-follow { width: 32px; height: 32px; background-position: -135px -112px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -201px -60px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -132px -162px;}
.icon-group { width: 41px; height: 40px; background-position: -150px 0px;}
.icon-identifier { width: 20px; height: 20px; background-position: -201px -90px;}
.icon-maintant { width: 20px; height: 20px; background-position: -201px -120px;}
.icon-identifier { width: 20px; height: 20px; background-position: -162px -162px;}
.icon-maintant { width: 20px; height: 20px; background-position: -192px -162px;}
.icon-merchant { width: 41px; height: 40px; background-position: -150px -50px;}
.icon-message { width: 18px; height: 18px; background-position: -86px -200px;}
.icon-message { width: 18px; height: 18px; background-position: -116px -196px;}
.icon-nophone { width: 65px; height: 48px; background-position: 0px 0px;}
.icon-notag { width: 65px; height: 47px; background-position: -75px 0px;}
.icon-phone { width: 20px; height: 20px; background-position: -201px -150px;}
.icon-phone { width: 20px; height: 20px; background-position: 0px -196px;}
.icon-psd { width: 41px; height: 40px; background-position: 0px -112px;}
.icon-remove { width: 32px; height: 28px; background-position: -42px -162px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: -28px -200px;}
.icon-succeed { width: 24px; height: 24px; background-position: -118px -162px;}
.icon-tel { width: 18px; height: 18px; background-position: -114px -200px;}
.icon-tip { width: 16px; height: 16px; background-position: -168px -200px;}
\ No newline at end of file
.icon-remind { width: 32px; height: 32px; background-position: -201px 0px;}
.icon-remove { width: 32px; height: 28px; background-position: -201px -80px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: -58px -196px;}
.icon-succeed { width: 24px; height: 24px; background-position: 0px -162px;}
.icon-tel { width: 18px; height: 18px; background-position: -144px -196px;}
.icon-tip { width: 16px; height: 16px; background-position: -198px -196px;}
\ No newline at end of file

84.8 KB | W: | H:

88.3 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
......@@ -44,6 +44,7 @@ router.beforeEach((to, from, next) => {
document.documentElement.style.backgroundColor = to.meta.backgroundColor || '#fff'
if (to.matched.some(recode => recode.meta.noAuth)) {
store.state.app.showWindow = true
store.dispatch('registerHttp')
} else {
store.dispatch('navigation')
}
......
......@@ -183,6 +183,16 @@ const pages = {
}
}
],
task: [
{
name: 'index',
meta: {
title: '任务详情',
backgroundColor: '#F7F7F7',
noAuth:true
}
}
],
other: [
{
name: 'index',
......@@ -197,7 +207,6 @@ const pages = {
const redirect = ''
let routes = []
const keepAlives = []
console.log(Object.keys(pages))
Object.keys(pages).map(parent => {
pages[parent].map(val => {
const isIndex = parent == redirect && val.name == 'index'
......
......@@ -156,6 +156,8 @@ const actions = {
},
registerHttp({}, sessionId = '') {
window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } })
const {request_sop,response_sop} = window.$fetchConfig
window.$HTTP_SOP = new Http({ request:request_sop, response:response_sop,alert: Notify, headers: { 'Content-Type': 'application/json'} })
}
}
const getParams = name => {
......
<template>
<div
v-if="flag"
class="layout"
>
<div v-if="flag" class="layout">
<div class="detail-bg detail-first">
<div
class="detail-customer"
@click="editInfo()"
>
<div class="detail-customer" @click="editInfo()">
<template v-if="userInfo.info.avatar">
<img
:src="userInfo.info.avatar"
class="avatar"
/>
<img :src="userInfo.info.avatar" class="avatar" />
</template>
<template v-else>
<div class="sprite-icon icon-avatar"></div>
</template>
<div class="detail-customer-name">
<div class="name text-hide">{{ userInfo.info.nickName || '--'}}</div>
<div class="name text-hide">{{ userInfo.info.nickName || '--' }}</div>
<div class="phone">
{{ userInfo.info.customerPhone || '--'}}
{{ userInfo.info.customerPhone || '--' }}
</div>
</div>
</div>
<div
class="detail-count flex"
@click="editInfo()"
>
<div class="detail-count flex" @click="editInfo()">
<div class="item flex">
<span>{{ recordList.length }}</span>
跟进记录数
......@@ -38,44 +26,30 @@
</div>
</div>
<div class="detail-tool flex">
<template v-for="(i,index) in toolList">
<template v-for="(i, index) in toolList">
<template>
<div
:key="index"
class="item"
@click="jumpTool(i)"
>
<div :key="index" class="item" @click="jumpTool(i)">
<div :class="['sprite-icon', `icon-${i.icon}`]"></div>
{{ i.text }}
</div>
</template>
</template>
</div>
<van-icon
name="arrow"
class="arrow"
@click="editInfo()"
/>
<van-icon name="arrow" class="arrow" @click="editInfo()" />
</div>
<div class="detail-bg detail-third">
<div class="title flex">
客户标签
<div
class="prompt-text"
@click="editTags"
>
<div class="prompt-text" @click="editTags">
更多
<van-icon name="arrow" />
</div>
</div>
<div class="detail-label">
<template v-if="userInfo.labels && userInfo.labels.length">
<template v-for="(i,index) in userInfo.labels">
<template v-for="(i, index) in userInfo.labels">
<template v-if="index < 6">
<div
:key="index"
class="label-text"
>
<div :key="index" class="label-text">
{{ i.labelValue }}
</div>
</template>
......@@ -83,8 +57,7 @@
</template>
<template v-else>
<div class="nothing">
<div class="sprite-icon icon-notag">
</div>
<div class="sprite-icon icon-notag"></div>
暂无标签
</div>
</template>
......@@ -93,37 +66,31 @@
<div class="detail-bg detail-second">
<div class="title">智能档案</div>
<template v-if="userInfo.info && userInfo.info.customerPhone">
<div :class="['group',{'more-hidden':!isMore}]">
<div :class="['group', { 'more-hidden': !isMore }]">
<template v-for="(i, index) in detailObj">
<template>
<div
class="item flex"
:key="index"
>
<div class="item flex" :key="index">
<div class="label">{{ i.title }}</div>
<div class="value">
{{userInfo.vehicleInfo[i.key] || '--' }}
{{ userInfo.vehicleInfo[i.key] || '--' }}
</div>
</div>
</template>
</template>
</div>
<div
class="detail-more text-center"
@click="isMore = !isMore"
>
<div class="detail-more text-center" @click="isMore = !isMore">
<div class="btn text-center">
{{ isMore ? '收起' : '展开更多' }}
<div :class="['arrow', { 'more': isMore }]"></div>
<div :class="['arrow', { more: isMore }]"></div>
</div>
</div>
</template>
<template v-else>
<div class="nothing">
<div class="sprite-icon icon-nophone">
</div>
<div class="sprite-icon icon-nophone"></div>
<div>
完善客户手机号可获取客户智能档案 <span @click="editInfo(true)">去添加</span>
完善客户手机号可获取客户智能档案
<span @click="editInfo(true)">去添加</span>
</div>
</div>
</template>
......@@ -131,16 +98,13 @@
<template v-if="recordList.length">
<div class="title">跟进记录</div>
<div class="detail-bg record">
<template v-for="(i,index) in recordList">
<template v-for="(i, index) in recordList">
<template>
<div
:key="index"
class="record-item"
>
<div :key="index" class="record-item">
<template v-if="recordList.length > 1">
<div :class="['line',{'first':index == 0},{'last':index == recordList.length - 1}]"></div>
<div :class="['line', { first: index == 0 }, { last: index == recordList.length - 1 }]"></div>
</template>
<div class="record-title">{{ i.title}}</div>
<div class="record-title">{{ i.title }}</div>
<div class="text flex">
{{ i.desc }}
<div class="time">{{ i.time }}</div>
......@@ -151,10 +115,7 @@
</div>
</template>
<template v-if="!userAgent && isTrue">
<div
class="button"
@click="goBack"
>返回</div>
<div class="button" @click="goBack">返回</div>
</template>
</div>
</template>
......@@ -164,7 +125,7 @@ import make from '@/views/tag/make.vue'
import { detailApi, wxConfig } from '@/api'
export default {
components: { make },
data () {
data() {
return {
toolList: [
{
......@@ -182,7 +143,7 @@ export default {
{
text: '一客一群',
icon: 'group'
},
}
],
flag: false,
isMore: false,
......@@ -220,8 +181,7 @@ export default {
{
title: '保险到期日期',
key: 'insEndTime'
},
}
],
id: '',
userAgent: false,
......@@ -229,10 +189,11 @@ export default {
recordList: []
}
},
created () {
},
beforeRouteEnter (to, from, next) {
let { params: { delay } } = from
created() {},
beforeRouteEnter(to, from, next) {
let {
params: { delay }
} = from
next(vm => {
if (delay) {
vm.showLoading()
......@@ -242,7 +203,7 @@ export default {
}
})
},
activated () {
activated() {
this.watchPageBack().then(() => {
this.showToast('更新成功', () => {
this.showLoading()
......@@ -250,7 +211,7 @@ export default {
})
})
},
mounted () {
mounted() {
this.userAgent = this.isMobile()
this.showLoading()
let { id, isTrue, sessionId } = this.getQuery()
......@@ -262,34 +223,36 @@ export default {
this.getCustomerDetail(id)
} else {
wxConfig.init(['getCurExternalContact']).then(() => {
wxConfig.getCurExternalContact().then(userId => {
this.id = userId
this.getCustomerDetail(userId)
}).catch(e => {
this.hideLoading()
this.$router.push({ name: 'customer.groupDetail' })
})
wxConfig
.getCurExternalContact()
.then(userId => {
this.id = userId
this.getCustomerDetail(userId)
})
.catch(e => {
this.hideLoading()
this.$router.push({ name: 'customer.groupDetail' })
})
})
}
},
methods: {
isMobile () {
isMobile() {
if (window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) {
return true // 移动端
} else {
return false // PC端
}
},
goBack () {
goBack() {
this.$router.back()
},
getCustomerDetail (userId) {
getCustomerDetail(userId) {
this.hideLoading()
detailApi.getCustomerDetail({ userId }).then(res => {
if (res) {
this.flag = true
if (res.vehicleInfoList && res.vehicleInfoList.length) {
let [vehicleInfo] = res.vehicleInfoList,
carBrands = ''
res.vehicleInfo = vehicleInfo
......@@ -306,38 +269,39 @@ export default {
}
})
},
async getCustomerRecord () {
async getCustomerRecord() {
const res = await detailApi.getCustomerRecord({
userId: this.id
})
this.recordList = res || []
},
jumpTool (e) {
jumpTool(e) {
const path = {
'coupon': 'activity',
'merchant': 'activity',
'psd': 'psd',
'group': 'customer'
}[e.icon],
coupon: 'activity',
merchant: 'activity',
psd: 'psd',
group: 'customer'
}[e.icon],
target = {
'coupon': 'coupon/verificationList',
'merchant': 'merchant',
'psd': '',
'group': 'customerGroup'
coupon: 'coupon/verificationList',
merchant: 'merchant',
psd: '',
group: 'customerGroup'
}[e.icon]
let url = `/dj-scrm-wx-work-attachment-${path}/#/${target}?sessionId=${this.getSessionId()}`
if (e.icon == 'group') url += `&id=${this.id}`
window.location.href = url
},
editTags () {
editTags() {
this.$router.push({
name: 'customer.tags', params: {
name: 'customer.tags',
params: {
userInfo: this.userInfo,
userId: this.id
}
})
},
editInfo (show = false) {
editInfo(show = false) {
this.$router.push({
name: 'customer.editDetail',
params: {
......
<template>
<div class="task-wrap">
<div class="task-hd">
<div class="sprite-icon icon-remind"></div>
<span class="tip">客户跟进提醒</span>
</div>
<div class="task-ct">
<div class="ct-title">跟进内容</div>
<div>{{ params.noticeContent }}</div>
</div>
<div class="task-target">
<h3>营销对象</h3>
<div class="target-list">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<div class="target" v-for="(item, index) in targetList" :key="index" @click="gotoInfo(item)">
<div class="target-top">
<div class="portrait">
<img :src="item.customerAvatarUrl" alt="" v-if="item.customerAvatarUrl" />
<img src="../../assets/images/user.png" alt="" v-else />
</div>
<div class="info">
<div class="info-name text-hide">{{ item.customerName }}</div>
<div class="info-phone flex">
{{ item.customerPhone }}
<div class="sprite-icon icon-copy" @click.stop="copy(item.customerPhone)"></div>
</div>
</div>
<div class="sprite-icon icon-phone" @click.stop="makePhone(item.customerPhone)" v-if="item.customerPhone"></div>
</div>
<div class="target-car flex">
<div class="vehicleNo">
车牌号:
<span>{{ item.carNumber?item.carNumber:'--' }}</span>
</div>
</div>
</div>
</scroll-view>
</div>
</div>
</div>
</template>
<script>
import { sopApi } from '@/api'
import { Toast } from 'vant'
export default {
data() {
return {
params: {},
targetList: []
}
},
created() {
this.params = this.getParams()
this.params.noticeContent = decodeURIComponent(this.params.noticeContent)
this.getNoticeCustomerList()
},
methods: {
copy(text) {
let input = document.createElement('input')
input.value = text
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Toast('复制成功')
},
getNoticeCustomerList() {
let { notebatchNo, batchNo, nodeId, userId } = this.params,
data = {
notebatchNo,
batchNo,
nodeId,
userId
}
sopApi.getNoticeCustomerList(data).then(res => {
this.targetList = res
})
},
makePhone(phoneNumber) {
this.makePhoneCall(phoneNumber)
},
getParams(name) {
let [url, paramsList] = window.location.href.split('?')
if (!paramsList) return name ? null : {}
let param = paramsList.split('&')
let obj = {}
param.map(e => {
let [key, value] = e.split('=')
obj[key] = value
})
return name ? obj[name] : obj
},
onReachBottom() {}
}
}
</script>
<style lang="scss" scoped>
.task-wrap {
.task-hd {
width: 100%;
height: 104px;
padding: 10px 20px;
box-sizing: border-box;
background: #4873c1;
display: flex;
.icon-remind {
width: 32px;
height: 32px;
}
.tip {
font-size: 16px;
color: #ffffff;
line-height: 24px;
margin-left: 8px;
}
}
.task-ct {
width: 351px;
height: 98px;
font-size: 14px;
color: #1b233d;
background: #ffffff;
border-radius: 6px;
padding: 12px 16px;
margin: -50px 12px 16px;
box-sizing: border-box;
.ct-title {
font-size: 15px;
line-height: 22px;
margin-bottom: 8px;
}
}
.task-target {
margin: 12px;
h3 {
font-size: 15px;
color: #1b233d;
font-weight: 500;
margin-bottom: 8px;
}
.target-list {
/deep/ .van-list {
background: #f6f6f6;
}
// background: #fff;
.content {
height: calc(100vh - 164px);
}
.target {
padding: 0 16px;
background: #ffffff;
border-radius: 6px;
box-sizing: border-box;
position: relative;
margin-bottom: 8px;
.target-top {
padding: 12px 0;
display: flex;
align-items: center;
border-bottom: 1px solid #f6f6f6;
.portrait {
width: 40px;
height: 40px;
margin-right: 10px;
img {
width: 100%;
}
}
.info {
.info-name {
font-size: 15px;
color: #1b233d;
line-height: 22px;
width: 150px;
}
.info-phone {
font-size: 13px;
color: #7a8299;
}
.icon-copy {
margin-left: 8px;
}
}
.icon-phone {
// width: 32px;
// height: 32px;
position: absolute;
right: 16px;
top: 16px;
}
}
.target-car {
padding: 8px 0;
display: flex;
align-items: center;
.vehicleNo {
font-size: 13px;
color: #7a8299;
line-height: 20px;
span {
color: #1b233d;
}
}
}
}
}
}
}
</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!