Commit f699d202 by 前端

commit

1 parent c19d05a8
...@@ -25,5 +25,13 @@ export default { ...@@ -25,5 +25,13 @@ export default {
url, url,
data data
}) })
},
/**变更客户车牌号信息 */
editplatCustomer(data) {
data.method = 'entmicro.api.customer.editdata'
return window.$HTTP({
url,
data
})
} }
} }
\ No newline at end of file \ No newline at end of file
.sprite-icon { background-image: url(../images/sprite.png);background-size: 158px 148px;} .sprite-icon { background-image: url(../images/sprite.png);background-size: 165px 150px;}
.icon-active { width: 20px; height: 20px; background-position: -72px -96px;} .icon-active { width: 20px; height: 20px; background-position: -106px -96px;}
.icon-append { width: 32px; height: 32px; background-position: -54px 0px;} .icon-append { width: 32px; height: 32px; background-position: 0px -54px;}
.icon-appoint { width: 32px; height: 32px; background-position: 0px -54px;} .icon-appoint { width: 32px; height: 32px; background-position: -42px -54px;}
.icon-arrow { width: 7px; height: 11px; background-position: -140px -130px;} .icon-arrow { width: 7px; height: 11px; background-position: -84px -54px;}
.icon-avatar { width: 44px; height: 44px; background-position: 0px 0px;} .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-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-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: -96px -76px;}
.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 \ No newline at end of file
.icon-customer-active { width: 16px; height: 16px; background-position: -142px -130px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -68px -96px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: 0px -130px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -145px 0px;}
.icon-factory { width: 32px; height: 32px; background-position: -103px 0px;}
.icon-fail { width: 24px; height: 24px; background-position: 0px -96px;}
.icon-fllow { width: 18px; height: 18px; background-position: -58px -130px;}
.icon-follow { width: 32px; height: 32px; background-position: -103px -42px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -145px -30px;}
.icon-identifier { width: 20px; height: 20px; background-position: -145px -60px;}
.icon-maintant { width: 20px; height: 20px; background-position: -145px -90px;}
.icon-message { width: 18px; height: 18px; background-position: -86px -130px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -84px -75px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: -28px -130px;}
.icon-succeed { width: 24px; height: 24px; background-position: -34px -96px;}
.icon-tel { width: 18px; height: 18px; background-position: -114px -130px;}
.icon-delete { width: 39px; height: 30px; background-position: -54px 0px;}
\ No newline at end of file \ No newline at end of file

36.1 KB | W: | H:

38.8 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
<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" 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 }" @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',
// '学',
// '港',
// '澳'
]
}
}
},
props: ['name', 'plateNumber', 'noRightPart'],
computed: {
plateNumber1: {
get() {
return this.plateNumber || ''
},
set(val) {
console.log(val,'3333')
this.$emit('update:plateNumber', val)
}
}
},
methods: {
clickInput(type) {
this.plateInput.input.type = type
this.plateInput.input.dialogVisible = true
},
hiddenKeybord() {
this.plateInput.input.dialogVisible = false
},
enterWord() {
// this.plateInput.input.dialogVisible = false
console.log()
this.$emit('updateChange',this.plateInput.input.value)
},
clickKeyboard(val) {
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 10px;
display: flex;
justify-content: space-around;
align-items: center;
.item {
width: 30px;
height: 37px;
border: 1px solid #3399ff;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
&:last-child{
border: 1px solid #2beb12;
}
}
.icon-black{
height:8px;
width:8px;
background: #000;
border-radius: 100%;
}
.active {
border-color: #ff5100 !important; ;
}
}
.bords {
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
.bor {
position: relative;
.btns {
width: 100%;
height: 35px;
background: #fff;
border-top: 1px solid rgba(0, 0, 0, 0.05);
position: absolute;
display: flex;
justify-content: space-between;
align-items: center;
top: -35px;
left: 0;
padding:0 8px;
box-sizing: border-box;
button {
margin: 0;
padding:1px 2px;
}
}
}
// 键盘
.keyboard {
position: fixed;
bottom: 0;
left: 0;
background-color: #ced2d9;
width: 100%;
height: 180px;
margin: 0;
padding: 0;
font-size: 18px;
z-index: 1;
}
.keyboard li {
list-style: none;
border-radius: 5px;
}
.keyboard li {
float: left;
background-color: #fefefe;
margin-left: 8px;
margin-top: 8px;
}
.num {
color: rgba(0, 0, 0, 0.15);
}
.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 + 8px);
}
.province li.deletes {
width: calc((100% - 8px * 11) / 10 * 2 + 45px);
}
.disabled {
color: rgba(0, 0, 0, 0.15);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -15,8 +15,8 @@ export const fetchConfig = function(isEnv = true) { ...@@ -15,8 +15,8 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(config) return Promise.resolve(config)
} }
// return window.fetch('http://192.168.3.171:7300/mock/617918601072f92988f05a11/base/scrm-wx-work-customer-config', {}).then(res => res.json()) return window.fetch('http://192.168.3.171:7300/mock/617918601072f92988f05a11/base/scrm-wx-work-customer-config', {}).then(res => res.json())
return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-customer-config', {}).then(res => res.json()) // return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-customer-config', {}).then(res => res.json())
} }
export const cfg = { export const cfg = {
install(vue, config) { install(vue, config) {
......
...@@ -66,6 +66,13 @@ const pages = { ...@@ -66,6 +66,13 @@ const pages = {
} }
}, },
{ {
name: 'editPlat',
meta: {
backgroundColor: '#F7F7F7',
keepAlive: true
}
},
{
name: 'record', name: 'record',
meta: { meta: {
title: '客户记录', title: '客户记录',
...@@ -150,6 +157,15 @@ const pages = { ...@@ -150,6 +157,15 @@ const pages = {
backgroundColor: '#F7F7F7' backgroundColor: '#F7F7F7'
} }
} }
],
other:[
{
name: 'index',
meta: {
title: '自定义',
backgroundColor: '#F7F7F7'
}
}
] ]
} }
......
...@@ -161,6 +161,18 @@ export default { ...@@ -161,6 +161,18 @@ export default {
key: 'customerPhone' key: 'customerPhone'
}, },
{ {
title: '车牌号',
type: 'platNumber',
value: obj => {
return obj.vehicleInfo.vehicleNo
},
save_key: 'audi',
placeholder: '请输入',
// placeholder: '',
key: 'vehicleTrain',
maxlength: 10
},
{
title: '购车日期', title: '购车日期',
type: 'date', type: 'date',
value: obj => { value: obj => {
...@@ -204,18 +216,6 @@ export default { ...@@ -204,18 +216,6 @@ export default {
key: 'insEndTime' key: 'insEndTime'
}, },
{ {
title: '车牌号',
type: 'platNumber',
value: obj => {
return obj.vehicleInfo.vehicleNo
},
save_key: 'audi',
// placeholder: '请输入',
placeholder: '',
key: 'vehicleTrain',
maxlength: 10
},
{
title: '车架号', title: '车架号',
type: 'standNo', type: 'standNo',
value: obj => { value: obj => {
...@@ -317,9 +317,14 @@ export default { ...@@ -317,9 +317,14 @@ export default {
this.$router.back() this.$router.back()
}, },
moreInfo() { moreInfo() {
let { customerPhone } = this.userInfo.info let {
if (!customerPhone && this.customerId == 0) { info: { customerPhone },
this.showToast('请完善手机号码,系统将自动关联更多客户信息') vehicleInfo: { vehicleNo }
} = this.userInfo
this.customerId = 0
console.log(customerPhone, !vehicleNo, '99999')
if (!customerPhone && !vehicleNo && this.customerId == 0) {
this.showToast('请完善客户的联系电话或车牌号,系统将自动关联更多的客户信息')
return return
} }
this.isMore = !this.isMore this.isMore = !this.isMore
...@@ -349,7 +354,6 @@ export default { ...@@ -349,7 +354,6 @@ export default {
}, },
//标签分组 //标签分组
initLabel() { initLabel() {
console.log('this.userInfo.labelInfos', this.userInfo.labelInfos)
let labelArray = [ let labelArray = [
{ {
labelGroupType: '企业标签', labelGroupType: '企业标签',
...@@ -386,10 +390,12 @@ export default { ...@@ -386,10 +390,12 @@ export default {
} = this } = this
let userId = this.id let userId = this.id
if (this.customerId == -1) return if (this.customerId == -1) return
if (type == 'tel') { if (type == 'tel' || type == 'platNumber') {
if (info.customerPhone && save_key == 'customerPhone') return 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({ this.$router.push({
name: 'customer.editDetail', name,
params: { params: {
title, title,
type, type,
...@@ -581,7 +587,7 @@ export default { ...@@ -581,7 +587,7 @@ export default {
} }
} }
.more-hidden { .more-hidden {
max-height: 180px; max-height: 240px;
} }
.placeholder { .placeholder {
color: #ccc; color: #ccc;
......
<template>
<div class="plat-wrapper">
<div class="title">输入车牌号码</div>
<plat-num ref="platNum" :plateNumber.sync="plateNumber" @updateChange="updateData"></plat-num>
</div>
</template>
<script>
import { entmicroApi } from '@/api'
export default {
data() {
return {
plateNumber: ''
}
},
methods: {
updateData(val) {
let plateNum = Object.values(val).join('')
var regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$)/
console.log(regExp.test(plateNum), plateNum)
if (plateNum.length < 8) {
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: 30px 0;
letter-spacing: 1px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<tab :list="['已跟进','未跟进']" :index="1" :sticky="true">测试</tab>
</div>
</template>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!