Commit d64b16dd by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !74
2 parents 14ac09f6 69b175d6
......@@ -18,7 +18,8 @@
to continue.</strong>
</noscript>
<div id="app"></div>
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<!-- <script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> -->
<script src="https://wwcdn.weixin.qq.com/node/wwopen/wwopenmng/js/jsapi/wecomtest$433252bc.js"></script>
<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
<!-- 使用CDN加速的JS文件,配置在vue.config.js下 -->
<% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %>
......
const url = '/rop-scrm-entmicro/router'
// const url = 'http://192.168.1.78:8064/rop-scrm-entmicro/router'
export default {
/** 访客记录分页列表 */
cardRecordPage(data) {
data.method = 'entmicro.api.business.cardRecord.page'
return window.$HTTP({
url,
data
})
},
/** 访客记录 */
cardRecord(data) {
data.method = 'entmicro.api.business.card.cardRecord'
return window.$HTTP({
url,
data
})
}
}
......@@ -25,5 +25,13 @@ export default {
url,
data
})
},
/**变更客户车牌号信息 */
editplatCustomer(data) {
data.method = 'entmicro.api.customer.editdata'
return window.$HTTP({
url,
data
})
}
}
\ No newline at end of file
// const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router'
const recordUrl = '/rop-scrm-shopmall/router'
export default {
/**消息盒子-好友列表 */
......@@ -17,5 +18,14 @@ export default {
url,
data
})
},
//客户动态记录列表
getcustomerRecordList(data = {}) {
data.method = 'scrm.api.shopmall.customer.dynamic.record.list'
return window.$HTTP({
url: recordUrl,
data,
returnAll: true
})
}
}
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-17 18:23:27
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-09-07 14:27:07
*/
import groupChat from './groupChat'
import ssoApi from './ssoApi'
......@@ -15,4 +15,5 @@ import groupTag from './groupTag'
import entmicroApi from './entmicroApi'
import detailApi from './detail'
import solicitApi from './solicit'
export { ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi }
import businessApi from './business'
export { ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi, businessApi }
......@@ -36,7 +36,15 @@ export default {
returnAll: true
})
},
//一键营销状态回收
ocmarketingRecovery(data) {
data.method = 'marketing.api.solicit.ocmarketing.status.recovery'
return window.$HTTP({
url,
data,
returnAll: true
})
},
// 客户招揽-任务总览
taskOverviewData(data) {
data.method = 'marketing.api.solicit.taskOverview'
......
......@@ -20,14 +20,13 @@ export default {
returnAll
})
},
/** 获取userid */
getuserInfo(data={}) {
data.method = 'scrm.api.sso.user.getLoginInfo'
return window.$HTTP({
url,
data,
returnAll
})
}
}
\ No newline at end of file
/** 获取userid */
getuserInfo(data = {}) {
data.method = 'scrm.api.sso.user.getLoginInfo'
return window.$HTTP({
url,
data,
returnAll
})
}
}
......@@ -102,6 +102,12 @@ img {
.color54 {
color: #545454;
}
.color6 {
color: #666666;
}
.color9 {
color: #999999;
}
.font-10{
font-size: 10px;
}
......
.sprite-icon { background-image: url(../images/sprite.png);background-size: 158px 148px;}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 186px 148px;}
.icon-active { width: 20px; height: 20px; background-position: -72px -96px;}
.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: -140px -130px;}
.icon-arrow { width: 7px; height: 11px; background-position: -168px -24px;}
.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-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;}
......@@ -16,7 +17,8 @@
.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: -96px -76px;}
.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;}
\ No newline at end of file
.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

36.1 KB | W: | H:

39.5 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
......@@ -131,7 +131,7 @@ export default {
}
},
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
this.groupId = this.getQuery().groupId
},
computed: {
......
<template>
<div class="enter-wrap">
<div class="plateInput" id="plateInput">
<div class="item" :class="{ active: plateInput.input.type === 'p1' }" @click.stop="clickInput('p1')">
<span id="p1">{{ plateInput.input.value.p1 }}</span>
</div>
<div class="item" :class="{ active: plateInput.input.type === 'p2' }" @click.stop="clickInput('p2')">
<span id="p2">{{ plateInput.input.value.p2 }}</span>
</div>
<div class="icon-black"></div>
<div class="item" :class="{ active: plateInput.input.type === 'p3' }" @click.stop="clickInput('p3')">
<span id="p3">{{ plateInput.input.value.p3 }}</span>
</div>
<div class="item" :class="{ active: plateInput.input.type === 'p4' }" @click.stop="clickInput('p4')">
<span id="p4">{{ plateInput.input.value.p4 }}</span>
</div>
<div class="item" :class="{ active: plateInput.input.type === 'p5' }" @click.stop="clickInput('p5')">
<span id="p5">{{ plateInput.input.value.p5 }}</span>
</div>
<div class="item" :class="{ active: plateInput.input.type === 'p6' }" @click.stop="clickInput('p6')">
<span id="p6">{{ plateInput.input.value.p6 }}</span>
</div>
<div class="item" :class="{ active: plateInput.input.type === 'p7' }" @click.stop="clickInput('p7')">
<span id="p7">{{ plateInput.input.value.p7 }}</span>
</div>
<div class="item" :class="{ active: plateInput.input.type === 'p8', new: !plateInput.input.value.p8 }" @click.stop="clickInput('p8')">
<span id="p8">{{ plateInput.input.value.p8 }}</span>
</div>
</div>
<div class="bords" v-if="plateInput.input.dialogVisible">
<div class="bor">
<div class="btns">
<button type="primary" size="small" plain @click="hiddenKeybord">取消</button>
<button type="primary" class="success" size="small" plain @click="enterWord">完成</button>
</div>
<ul class="keyboard province" id="province" v-if="plateInput.input.dialogVisible && plateInput.input.type === 'p1'">
<li v-for="i in Keyboard.province" @click.stop="clickKeyboard(i)" :key="i">{{ i }}</li>
<li class="delete" @click.stop="clickDelete">
<div class="sprite-icon icon-delete"></div>
<!-- 删 -->
</li>
</ul>
<ul class="keyboard province" id="number" v-if="plateInput.input.dialogVisible && plateInput.input.type !== 'p1'">
<li
:key="i"
v-for="i in Keyboard.number"
:class="{
num:
(plateInput.input.type === 'p2' && parseInt(i) >= 0 && parseInt(i) <= 9) ||
(['学', '港', '澳', '挂'].includes(i) && ['p1', 'p2', 'p3', 'p4', 'p5', 'p6'].includes(plateInput.input.type)),
lastBtn: lastBtn
}"
@click.stop="clickKeyboard(i)"
>
{{ i }}
</li>
<li class="delete deletes" @click.stop="clickDelete">
<div class="sprite-icon icon-delete"></div>
<!-- 删 -->
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'PlatNum',
data() {
return {
currentPlate: undefined,
plateInput: {
input: {
value: {
p1: '',
p2: '',
p3: '',
p4: '',
p5: '',
p6: '',
p7: '',
p8: ''
},
type: 'p1',
dialogVisible: false
}
},
Keyboard: {
province: [
'京',
'粤',
'津',
'晋',
'冀',
'蒙',
'辽',
'吉',
'黑',
'渝',
'苏',
'浙',
'皖',
'闽',
'赣',
'鲁',
'鄂',
'沪',
'宁',
'桂',
'琼',
'川',
'贵',
'云',
'藏',
'陕',
'新',
'豫',
'湘',
'青',
'甘'
],
number: [
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'J',
'K',
'L',
'M',
'N',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
'学',
'港',
'澳',
'挂'
]
},
lastBtn: false
}
},
props: ['name', 'plateNumber', 'noRightPart'],
computed: {
plateNumber1: {
get() {
return this.plateNumber || ''
},
set(val) {
this.$emit('update:plateNumber', val)
}
}
},
methods: {
clickInput(type) {
this.plateInput.input.type = type
let val = this.plateInput.input.value['p' + (Number(type.split('')[1]) - 1)]
if (['学', '港', '澳', '挂'].includes(val) && this.plateInput.input.type == 'p8') {
this.lastBtn = true
} else {
this.lastBtn = false
}
this.plateInput.input.dialogVisible = true
},
hiddenKeybord() {
this.plateInput.input.dialogVisible = false
},
enterWord() {
this.$emit('updateChange', this.plateInput.input.value)
},
clickKeyboard(val) {
if (this.plateInput.input.type === 'p2' && parseInt(val) >= 0 && parseInt(val) <= 9) {
return
}
if (['学', '港', '澳', '挂'].includes(val) && ['p1', 'p2', 'p3', 'p4', 'p5', 'p6'].includes(this.plateInput.input.type)) {
return
}
if (['学', '港', '澳', '挂'].includes(val) && this.plateInput.input.type == 'p7') {
this.lastBtn = true
}
if (this.lastBtn && this.plateInput.input.type == 'p8') {
return
}
this.plateInput.input.value[this.plateInput.input.type] = val
let type = this.plateInput.input.type.split('p')[1]
if (type !== '8') {
this.plateInput.input.type = 'p' + (parseInt(type) + 1)
}
},
clickDelete() {
this.plateInput.input.value[this.plateInput.input.type] = undefined
let nu = this.plateInput.input.type.split('p')[1] - 1
if (nu >= 0) {
this.plateInput.input.value['p' + nu] = undefined
}
let type = this.plateInput.input.type.split('p')[1]
if (type !== '1') {
this.plateInput.input.type = 'p' + (parseInt(type) - 1)
}
},
setPlateNumber() {
if (this.plateInput.input.plateNumber) {
this.plateNumber1 = this.plateInput.input.plateNumber
} else {
this.plateNumber1 = undefined
}
},
setDirectIssuedPlateNumber() {
if (this.plateInput.input.plateNumber) {
this.plateNumber1 = this.plateInput.input.plateNumber
} else {
this.plateNumber1 = undefined
}
}
}
}
</script>
<style scoped lang='scss'>
.enter-wrap {
.plateInput {
padding: 0 32px;
display: flex;
justify-content: space-around;
align-items: center;
.item {
width: 30px;
height: 40px;
background: rgba(50, 127, 250, 0.1);
border: 0.5px solid rgba(50, 127, 250, 0.15);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 18px;
color: #282829;
&:last-child {
background: #f3ffe7;
border: 0.5px solid #e0f8c9;
}
}
.icon-black {
height: 8px;
width: 8px;
background: #282829;
border-radius: 100%;
}
.active {
border: 1.5px solid #327ffa !important;
}
}
.bords {
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
.bor {
position: relative;
.btns {
width: 375px;
height: 38px;
background: #ffffff;
position: absolute;
display: flex;
justify-content: space-between;
align-items: center;
top: -35px;
left: 0;
padding: 0 15px;
box-sizing: border-box;
button {
background: #f2f2f2;
border-radius: 4px;
padding: 5px 12px;
box-sizing: border-box;
font-weight: 600;
font-size: 14px;
color: #3b3b3d;
text-align: center;
border: 0;
}
.success {
background: #07c160;
border-radius: 4px;
color: #ffffff;
}
}
}
// 键盘
.keyboard {
position: fixed;
bottom: 0;
left: 0;
background: #f7f7f7;
width: 100%;
height: 180px;
margin: 0;
padding: 0;
font-size: 18px;
z-index: 1;
}
.keyboard li {
list-style: none;
border-radius: 4px;
}
.keyboard li {
float: left;
background: #ffffff;
border-radius: 4px;
margin-left: 7px;
margin-top: 8px;
font-size: 16px;
color: #333333;
}
.num {
background: #ffffff;
border-radius: 4px;
font-size: 16px;
color: #cacacc !important;
}
.lastBtn {
background: #ffffff !important;
border-radius: 4px;
font-size: 16px;
color: #cacacc !important;
}
.province {
position: relative;
}
.provinces {
position: relative;
}
.province li {
width: calc((100% - 8px * 11) / 10);
height: calc((100% - 8px * 5) / 4);
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
justify-content: center;
-webkit-justify-content: center;
}
.province li.delete {
width: calc((100% - 8px * 11) / 10 * 2);
}
.province li.deletes {
width: calc((100% - 8px * 11) / 10 * 2 + 10px);
}
.disabled {
color: rgba(0, 0, 0, 0.15);
}
}
}
</style>
\ No newline at end of file
......@@ -11,7 +11,7 @@ module.exports = {
envVersion: 'develop',
title: '嘀加企微管家',
request: {
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -17,7 +17,7 @@ import store from './store'
import api from './api'
import { fetchConfig, cfg } from '@/config'
import '@/assets/css/index.scss'
import { bus, tools, store as local, util,constants } from './utils'
import { bus, tools, store as local, util, constants } from './utils'
import './utils/util'
import 'components'
import { components } from '@/plugins/vant'
......
......@@ -64,6 +64,20 @@ const pages = {
backgroundColor: '#F7F7F7',
keepAlive: true
}
},
{
name: 'editPlat',
meta: {
backgroundColor: '#F7F7F7',
keepAlive: true
}
},
{
name: 'record',
meta: {
title: '客户记录',
backgroundColor: '#F7F7F7'
}
}
],
tag: [
......@@ -84,6 +98,15 @@ const pages = {
}
}
],
proxy: [
{
name: 'index',
meta: {
title: '名片访问记录',
backgroundColor: '#F7F7F7'
}
}
],
customerDetails: [
{
name: 'index',
......@@ -143,6 +166,15 @@ const pages = {
backgroundColor: '#F7F7F7'
}
}
],
other:[
{
name: 'index',
meta: {
title: '自定义',
backgroundColor: '#F7F7F7'
}
}
]
}
......
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-07-06 12:02:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-09-02 17:34:51
*/
import { ssoApi } from '@/api'
import { store, util } from 'utils'
......@@ -120,14 +120,14 @@ const actions = {
window.location.href = `${wxUrl}?appid=${appid}&redirect_uri=${encodeURIComponent(redirectUrl)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
}
} else {
const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
const { corpId, agentId } = util.getLocalStorage('dj_scrm_corpId')
const { baseURL } = window.$fetchConfig.request
let url = `${baseURL}/dj-scrm-wx-work-main/#/`
window.location.href = `${url}?redirect_uri=${redirectUrl}&corpId=${storage_corpId.corpId}`
window.location.href = `${url}?redirect_uri=${encodeURIComponent(redirectUrl)}&corpId=${corpId}&agentId=${agentId}`
}
},
navigation({ dispatch }) {
let { sessionId, corpId, id, activityId } = getParams()
let { sessionId, corpId, id, activityId, agentId } = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId
if (corpId && storage_corpId) {
......@@ -136,7 +136,9 @@ const actions = {
util.clearSessionId()
}
}
util.setLocalStorage('dj_scrm_corpId', { corpId })
let dj_scrm_storage = { corpId }
if (agentId) dj_scrm_storage.agentId = agentId
util.setLocalStorage('dj_scrm_corpId', dj_scrm_storage)
if (activityId) util.setLocalStorage('dj_scrm_activityId', activityId)
if (id) util.setLocalStorage('dj_scrm_id', { id })
const storage_sessionId = util.getSessionId()
......
......@@ -161,6 +161,18 @@ export default {
key: 'customerPhone'
},
{
title: '车牌号',
type: 'platNumber',
value: obj => {
return obj.vehicleInfo.vehicleNo
},
save_key: 'audi',
placeholder: '请输入',
// placeholder: '',
key: 'vehicleTrain',
maxlength: 10
},
{
title: '购车日期',
type: 'date',
value: obj => {
......@@ -204,18 +216,6 @@ export default {
key: 'insEndTime'
},
{
title: '车牌号',
type: 'platNumber',
value: obj => {
return obj.vehicleInfo.vehicleNo
},
save_key: 'audi',
// placeholder: '请输入',
placeholder: '',
key: 'vehicleTrain',
maxlength: 10
},
{
title: '车架号',
type: 'standNo',
value: obj => {
......@@ -263,7 +263,6 @@ export default {
},
activated() {
this.watchPageBack().then(() => {
console.log(this.id)
this.showToast('更新成功', () => {
this.showLoading()
this.getCustomerDetail(this.id)
......@@ -317,9 +316,13 @@ export default {
this.$router.back()
},
moreInfo() {
let { customerPhone } = this.userInfo.info
if (!customerPhone && this.customerId == 0) {
this.showToast('请完善手机号码,系统将自动关联更多客户信息')
let {
info: { customerPhone },
vehicleInfo: { vehicleNo }
} = this.userInfo
this.customerId = 0
if (!customerPhone && !vehicleNo && this.customerId == 0) {
this.showToast('请完善客户的联系电话或车牌号,系统将自动关联更多的客户信息')
return
}
this.isMore = !this.isMore
......@@ -328,28 +331,29 @@ export default {
this.labelArray[index].isShow = !this.labelArray[index].isShow
},
getCustomerDetail(userId) {
this.hideLoading()
detailApi.getCustomerDetail({ userId }).then(res => {
if (res) {
this.flag = true
let staffNameList = []
if (res.staffFollows) {
res.staffFollows.map(e => {
staffNameList.push(e.staffName)
setTimeout(() => {
this.hideLoading()
detailApi.getCustomerDetail({ userId }).then(res => {
if (res) {
this.flag = true
let staffNameList = []
if (res.staffFollows) {
res.staffFollows.map(e => {
staffNameList.push(e.staffName)
})
}
if (res.vehicleInfoList && res.vehicleInfoList.length) res.vehicleInfo = res.vehicleInfoList[0]
this.staffNameList = staffNameList.join('、')
Object.keys(res).map(key => {
if (res[key]) this.userInfo[key] = res[key]
})
this.initLabel()
}
if (res.vehicleInfoList && res.vehicleInfoList.length) res.vehicleInfo = res.vehicleInfoList[0]
this.staffNameList = staffNameList.join('、')
Object.keys(res).map(key => {
if (res[key]) this.userInfo[key] = res[key]
})
this.initLabel()
}
})
})
}, 3000)
},
//标签分组
initLabel() {
console.log('this.userInfo.labelInfos', this.userInfo.labelInfos)
let labelArray = [
{
labelGroupType: '企业标签',
......@@ -376,7 +380,7 @@ export default {
}
})
})
console.log(labelArray)
// console.log(labelArray)
this.labelArray = labelArray
},
setDetail({ type, title, save_key, maxlength }) {
......@@ -386,10 +390,12 @@ export default {
} = this
let userId = this.id
if (this.customerId == -1) return
if (type == 'tel') {
if (type == 'tel' || type == 'platNumber') {
if (info.customerPhone && save_key == 'customerPhone') return
if (vehicleInfo.vehicleNo && save_key == 'audi') return
let name = type == 'platNumber' ? 'customer.editPlat' : 'customer.editDetail'
this.$router.push({
name: 'customer.editDetail',
name,
params: {
title,
type,
......@@ -467,7 +473,6 @@ export default {
...obj
})
.then(res => {
console.log(res)
this.showToast('更新成功', () => {
this.showLoading()
this.getCustomerDetail(id)
......@@ -581,7 +586,7 @@ export default {
}
}
.more-hidden {
max-height: 180px;
max-height: 240px;
}
.placeholder {
color: #ccc;
......
......@@ -36,7 +36,7 @@ export default {
let { value } = this
const phoneRex = /^[1]([3-9])[0-9]{9}$/
let obj = {
customerSex: info.customerSex
// customerSex: info.customerSex
}
if (type == 'tel') {
if (!phoneRex.test(value)) {
......@@ -47,17 +47,18 @@ export default {
obj.customerPhone = info.customerPhone
}
if (vehicleInfo) {
Object.keys(vehicleInfo).map(i => {
if (vehicleInfo[i]) {
detailObj.map(k => {
if (k.key == i && save_key != k.save_key) {
if (!obj[k.save_key]) obj[k.save_key] = k.type == 'date' ? vehicleInfo[i].replace(/-/g, '/') : vehicleInfo[i]
}
})
}
})
// Object.keys(vehicleInfo).map(i => {
// if (vehicleInfo[i]) {
// detailObj.map(k => {
// if (k.key == i && save_key != k.save_key) {
// if (!obj[k.save_key]) obj[k.save_key] = k.type == 'date' ? vehicleInfo[i].replace(/-/g, '/') : vehicleInfo[i]
// }
// })
// }
// })
if(vehicleInfo.vehicleNo) obj.carNumber = vehicleInfo.vehicleNo
}
console.log(obj)
let staffUserId = this.getLocalStorage('dj_scrm_userInfo').workUserId
entmicroApi
.editCustomer({
......
<template>
<div class="plat-wrapper">
<div class="title">输入车牌号码</div>
<plat-num ref="platNum" :plateNumber.sync="plateNumber" @updateChange="updateData"></plat-num>
<div class="tip flex">
<div class="sprite-icon icon-tip"></div>
请确认绑定车辆的信息,绑定后暂不支持变更
</div>
</div>
</template>
<script>
import { entmicroApi } from '@/api'
export default {
data() {
return {
plateNumber: ''
}
},
methods: {
updateData(val) {
let plateNum = Object.values(val).join('')
var regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1,2}$)/
if (!regExp.test(plateNum)) {
this.showToast('请输入正确的车牌号')
return
}
this.$refs.platNum.plateInput.input.dialogVisible = false
let {
userId,
info: { customerPhone }
} = this.getParams()
// console.log(customerPhone, 'customerPhone', this.getParams())
let staffUserId = this.getLocalStorage('dj_scrm_userInfo').workUserId
entmicroApi
.editplatCustomer({
staffUserId,
userId,
customerPhone,
carNumber: plateNum,
addWay: 1
})
.then(res => {
window.$back = true
this.$router.back(-1)
})
}
}
}
</script>
<style lang="scss" scoped>
.plat-wrapper {
.title {
font-size: 18px;
font-weight: 600;
color: #333;
text-align: center;
margin: 42px 0;
letter-spacing: 1px;
}
.tip {
font-weight: 400;
font-size: 12px;
color: #cacaca;
text-align: left;
padding:10px 32px 0 32px;
}
.icon-tip{
margin-right:4px;
}
}
</style>
\ No newline at end of file
<template>
<div class="record-container" v-if="flag">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-if="recordList.length > 0">
<div class="record-container-content">
<!-- <div class="font-16 color-3 fw5 line-22 m-l-4">2021-12-31</div> -->
<template v-for="(item, index) in recordList">
<div class="record-container-content-item" :key="index">
<div class="portrait">
<img :src="item.avatar" alt="" v-if="item.avatar" />
<img v-else src="../../assets/images/user.png" />
</div>
<div class="m-t-4 font-14 line-22">
<div class="color-3 customerName text-hide">{{ item.customerName }}</div>
<div class="color6 m-t-4">
{{ item.operationType == 1 ? '浏览了' : item.operationType == 2 ? '领取优惠券' : '下单购买' }}
<span class="color-3 m-l-4">{{ item.goodsName }}</span>
</div>
<div class="font-12 color9 m-t-4" v-if="item.operationType == 3">订单编号:{{ item.orderCode }}</div>
</div>
<div class="font-12 color9 time">{{ item.operationDate }}</div>
</div>
</template>
</div>
</template>
<template v-else>
<empty description="暂无数据" />
</template>
</scroll-view>
</div>
</template>
<script>
import { groupCustomer } from '@/api'
import { Notify } from 'vant'
import { util } from '../../utils'
import { mapActions } from 'vuex'
export default {
data() {
return {
flag: false,
recordList: [],
page: {
pageNum: 1,
pageSize: 10
}
}
},
mounted() {
this.showLoading()
this.getcustomerRecordList()
},
methods: {
...mapActions({
navigation: 'navigation'
}),
//重新登录
reLogin() {
/**登录过期 重新登录 */
util.clearSessionId()
this.navigation()
},
getcustomerRecordList() {
let list = this.recordList
groupCustomer.getcustomerRecordList({ ...this.page }).then(({ code, data, message }) => {
this.hideLoading()
if (code == 0) {
this.recordList = [...list, ...data.list]
if (this.page.pageNum > 1) this.$refs.scrollView.loading = false
if (data.list == 0 && this.flag) {
this.$refs.scrollView.finished = true
}
} else if(code == 21) {
this.reLogin()
}else{
Notify(message)
}
this.flag = true
})
},
onReachBottom() {
this.page.pageNum++
this.getcustomerRecordList()
}
}
}
</script>
<style lang="scss" scoped>
.record-container {
padding: 0 12px;
/deep/ .van-list {
background: #f7f7f7;
height: 100%;
.van-empty {
height: 100%;
}
}
&-content-item {
background: #ffffff;
border-radius: 6px;
margin: 8px 0;
padding: 8px 12px 12px 12px;
display: flex;
position: relative;
.customerName {
max-width: 160px;
}
.portrait {
width: 40px;
height: 40px;
margin-right: 6px;
img {
width: 100%;
border-radius: 50%;
}
}
.time {
position: absolute;
top: 14px;
right: 12px;
line-height: 18px;
}
}
}
</style>
<template>
<div>
<tab :list="['已跟进','未跟进']" :index="1" :sticky="true">测试</tab>
</div>
</template>
<template>
<div>
<template v-if="count">
<div class="proxy-list proxy-header">
<div class="proxy-item">访客</div>
<div class="proxy-item">联系电话</div>
<div class="proxy-item">最后访问日期</div>
<div class="proxy-item">操作</div>
</div>
<div class="proxy-body">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<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>
<div class="proxy-item">{{ item.phone }}</div>
<div class="proxy-item">{{ item.lastTime }}</div>
<div class="proxy-item" @click="popupShow(item)">访问记录</div>
</div>
</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>
</template>
<van-empty description="暂无数据" v-else />
</div>
</template>
<script>
import { businessApi } from '@/api'
export default {
data() {
return {
dataList: [],
detailList: [],
loading: false,
finished: false,
refreshing: false,
show: false,
count: 1,
pageNum: 0,
pageSize: 20
}
},
methods: {
cardRecordPage() {
this.loading = true
const { pageNum, pageSize } = this
businessApi.cardRecordPage({ pageNum, pageSize }).then(res => {
if (res) {
const dataList = res.data
this.dataList = this.dataList.concat(dataList)
this.count = res.count
if (this.dataList.length <= this.count) {
if (this.count === 0) {
this.finished = true
} else {
this.finished = false
}
}
this.loading = false
}
})
},
popupShow(item) {
this.show = true
this.detailList = item.recordRelationList
},
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.cardRecordPage()
this.loading = false
}
} else {
this.loading = false
this.finished = true
}
},
onRefresh() {
this.dataList = []
this.pageNum = 1
this.cardRecordPage()
if (this.refreshing) {
this.content = this.dataList
this.dataList = this.content
this.refreshing = false
}
this.loading = false
}
}
}
</script>
<style lang="scss" scoped>
.proxy-body {
position: absolute;
top: 48px;
height: calc(100% - 48px);
width: 100%;
left: 0px;
::v-deep {
.van-pull-refresh__track {
overflow: auto;
}
}
}
.proxy-list {
height: 48px;
line-height: 48px;
background: #ffffff;
box-shadow: inset 0 -1px 0 0 #f2f2f2;
display: flex;
&.proxy-header {
position: fixed;
width: 100%;
top: 0px;
left: 0px;
background: #f2f2f2;
.proxy-item {
&:last-child {
color: #414141;
}
}
}
.proxy-item {
font-size: 13px;
color: #414141;
text-align: center;
&.proxy-nickname {
color: #2cca74;
label {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #414141;
max-width: 70px;
}
}
&:first-child {
width: 120px;
display: flex;
align-items: center;
justify-content: center;
}
&:last-child,
&:nth-child(2),
&:nth-child(3) {
flex: 1;
}
&:last-child {
color: #3975c6;
}
}
}
.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>
......@@ -44,6 +44,10 @@ export default {
type: Array,
default: () => []
},
specialData: {
type: Array,
default: () => []
},
id: {
type: String,
default: ''
......@@ -59,13 +63,13 @@ export default {
}
},
mounted() {
console.log(this.list)
this.initCanvas()
},
methods: {
initCanvas() {
let id = this.refId
let { chartData, chartColor, centerData } = this
let { chartData, chartColor, specialData,centerData } = this
let data = specialData.length>0?specialData:chartData
this.chart && this.chart.clear()
this.chart = null
this.chart = new F2.Chart({
......@@ -73,7 +77,8 @@ export default {
pixelRatio: window.devicePixelRatio,
padding: [20, 20, 20, 20]
})
this.chart.source(chartData)
this.chart.source(data)
this.chart.coord('polar', {
transposed: true,
radius: 0.9,
......@@ -88,25 +93,8 @@ export default {
<div style="font-size: 12px;color: rgba(47, 64, 86, 0.7);">${centerData.text}</div>
<div style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;line-height: 24px;">${centerData.rate}</div>
</div>`
// html: '<div style="text-align: center;width:150px;height: 50px;">\n <p style="font-size: 10px;color: #999;margin: 0" id="title"></p>\n <p style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;" id="value"></p>\n </div>'
})
this.chart.interval().position('const*value').adjust('stack').color('text', chartColor)
// this.chart.pieLabel({
// activeShape: false,
// lineStyle: {
// stroke: '#fff' // 线的颜色
// },
// anchorStyle: {
// fill: '#fff'
// },
// onClick(ev) {
// const data = ev.data
// if (data) {
// document.getElementById('title').innerText = data.text
// document.getElementById('value').innerText = data.value
// }
// }
// })
this.chart.render()
}
}
......
......@@ -62,7 +62,7 @@ export default {
})
},
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
this.groupId = this.getQuery().groupId
this.groupName = this.getQuery().groupName ? this.getQuery().groupName : ''
},
mounted() {
......@@ -112,7 +112,11 @@ export default {
data.solicitTime = data.solicitTime ? data.solicitTime.slice(0, 11) : data.solicitTime
data.updatedTime = data.updatedTime ? data.updatedTime.slice(0, 11) : data.updatedTime
this.customerInfo[this.customerIndex] = data
this.$set(this.customerInfo, this.customerIndex, data)
if (data.followFlag == 2) {
this.customerInfo.splice(this.customerIndex, 1)
} else {
this.$set(this.customerInfo, this.customerIndex, data)
}
} else {
Notify(message)
}
......@@ -128,12 +132,11 @@ export default {
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId,
followFlag: this.status == 0 ? '' : this.status == 2 ? 0 : this.status //0未跟进、1已跟进
followFlag: this.status == 0 ? 10 : this.status == 2 ? 0 : this.status //0未跟进、1已跟进
}
if (this.status != 2) {
params.followResult = this.result != 0 ? this.result : ''
}
console.log(params)
solicitApi.getCustomerList(params).then(({ code, data, message }) => {
if (code == 0) {
data.map(item => {
......
......@@ -77,7 +77,7 @@ export default {
}
},
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
this.groupId = this.getQuery().groupId
this.getocmarketingList()
},
computed: {
......
......@@ -4,7 +4,7 @@
<div class="title-info">客户招揽概况</div>
<div class="overview-content">
<template v-if="chart.pieData.length > 0">
<pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData"></pieChart>
<pieChart :color="chart.pieColor" id="overviewRef" :list="chart.pieData" :centerData="chart.centerData" :specialData="chart.specialData"></pieChart>
</template>
<template v-else>
<empty></empty>
......@@ -63,6 +63,7 @@ export default {
chart: {
pieColor: ['#3975C6', '#E6E7EB'],
pieData: [],
specialData:[],
centerData: {},
barData: [],
barColor: '#3975C6'
......@@ -165,6 +166,18 @@ export default {
value: overviewInfo.notFollowedUpCount
}
]
this.chart.specialData = [
{
const: 'const',
text: ' 已跟进 (人)',
value: overviewInfo.followedUpCount
},
{
const: 'const',
text: '未跟进',
value: parseInt(overviewInfo.notFollowedUpCount-overviewInfo.followedUpCount)
}
]
this.chart.centerData = {
text: '达成率',
rate: overviewInfo.followedUpPercent ? parseInt(overviewInfo.followedUpPercent * 100) + '%' : 0
......
......@@ -138,11 +138,12 @@ export default {
})
},
created() {
this.groupId = this.getQuery().groupId ? this.getQuery().groupId : ''
this.groupId = this.getQuery().groupId
},
mounted() {
this.showLoading()
//一键营销状态回收
this.ocmarketingRecovery()
//员工发送状态判断
this.staffSendStatus()
// 触达统计-客户送达分层
......@@ -175,6 +176,14 @@ export default {
this.show = true
this.phoneNumber = data.phoneNumber
},
ocmarketingRecovery() {
let params = {
id: this.activityId,
staffId: this.staffId,
groupId: this.groupId
}
solicitApi.ocmarketingRecovery(params).then(({ code, data, message }) => {})
},
staffSendStatus() {
let params = {
// id: 65,
......@@ -213,7 +222,13 @@ export default {
data.solicitTime = data.solicitTime ? data.solicitTime.slice(0, 11) : data.solicitTime
data.updatedTime = data.updatedTime ? data.updatedTime.slice(0, 11) : data.updatedTime
this[target[this.tabIndex]][this.customerIndex] = data
this.$set(this[target[this.tabIndex]], this.customerIndex, data)
// if (data.followFlag == 2) {
// this[target[this.tabIndex]].splice(this.customerIndex, 1)
// } else {
// this.$set(this[target[this.tabIndex]], this.customerIndex, data)
// }
} else {
Notify(message)
}
......
......@@ -5,7 +5,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
const resolve = dir => path.join(__dirname, dir)
// page title
const name = defaultSettings.title || 'vue mobile template'
const name = defaultSettings.title || ''
// 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
// externals
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!