Commit fb20258d by 王志慧

bug修复

1 parent 4dceb1d9
...@@ -65,17 +65,43 @@ img { ...@@ -65,17 +65,43 @@ img {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
line-height: 17px;
} }
.text-20{ .text-20{
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
}
.line-28{
line-height: 28px; line-height: 28px;
} }
.line-17{
line-height: 17px;
}
.text-14{ .text-14{
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
} }
.hg{
height: 28px;
}
.button{
width: 343px;
height: 42px;
background: #3975C6;
border-radius: 21px;
font-size: 14px;
font-weight: 500;
color: #FFFFFF;
line-height: 42px;
text-align: center;
margin:0 auto;
}
.bottom{
vertical-align:bottom;
}
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<div v-if="i.value(userInfo) && i.special !== 'special'">{{ i.value(userInfo) }}</div> <div v-if="i.value(userInfo) && i.special !== 'special'">{{ i.value(userInfo) }}</div>
<div v-else-if="i.special == 'special'">{{ i.value(userInfo) }} {{ i.valueTrain(userInfo) }} {{ i.valueType(userInfo) }}</div> <div v-else-if="i.special == 'special'">{{ i.value(userInfo) }} {{ i.valueTrain(userInfo) }} {{ i.valueType(userInfo) }}</div>
<div v-else class="placeholder"> <div v-else class="placeholder">
<template v-if="i.placeholder&&customerId == 0">{{ i.placeholder }}</template> <template v-if="i.placeholder && customerId == 0">{{ i.placeholder }}</template>
</div> </div>
</template> </template>
</van-cell> </van-cell>
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
</div> </div>
</div> </div>
</div> </div>
<template v-if="!userAgent && isTrue">
<div class="button" @click="goBack">返回</div>
</template>
<van-popup v-model="showDatePicker" position="bottom" round> <van-popup v-model="showDatePicker" position="bottom" round>
<van-datetime-picker v-model="selectDate" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @confirm="confirmDate" @cancel="showDatePicker = false" /> <van-datetime-picker v-model="selectDate" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @confirm="confirmDate" @cancel="showDatePicker = false" />
</van-popup> </van-popup>
...@@ -229,7 +233,9 @@ export default { ...@@ -229,7 +233,9 @@ export default {
selectDate: new Date(), selectDate: new Date(),
minDate: new Date(2002, 1, 1), minDate: new Date(2002, 1, 1),
target: '', target: '',
customerId: 0 //默认是客户显示打标签按钮 customerId: 0, //默认是客户显示打标签按钮
userAgent: false,
isTrue: true
} }
}, },
activated() { activated() {
...@@ -242,12 +248,14 @@ export default { ...@@ -242,12 +248,14 @@ export default {
}) })
}, },
mounted() { mounted() {
this.userAgent = this.isMobile()
this.showLoading() this.showLoading()
let { id, customerId, isTrue } = this.getQuery() let { id, customerId, isTrue } = this.getQuery()
// console.log(id,'测试测试') // console.log(id,'测试测试')
// id = 'wo_pmOEQAAr93aXGLTNtAjLGZZxpwXuQ' // id = 'wo_pmOEQAAr93aXGLTNtAjLGZZxpwXuQ'
if (id || isTrue) { if (id || isTrue) {
this.id = id this.id = id
this.isTrue = isTrue
this.customerId = customerId //用来判断。若员工尚未添加该客户为好友,则暂不允许在客户跟进中修改客户的信息,仅只读。 this.customerId = customerId //用来判断。若员工尚未添加该客户为好友,则暂不允许在客户跟进中修改客户的信息,仅只读。
this.getCustomerDetail(id) this.getCustomerDetail(id)
} else { } else {
...@@ -274,9 +282,19 @@ export default { ...@@ -274,9 +282,19 @@ export default {
} }
}, },
methods: { methods: {
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() {
this.$router.back()
},
moreInfo() { moreInfo() {
let { customerPhone } = this.userInfo.info let { customerPhone } = this.userInfo.info
if (!customerPhone&&this.customerId==0) { if (!customerPhone && this.customerId == 0) {
this.showToast('请完善手机号码,系统将自动关联更多客户信息') this.showToast('请完善手机号码,系统将自动关联更多客户信息')
return return
} }
...@@ -593,7 +611,7 @@ export default { ...@@ -593,7 +611,7 @@ export default {
} }
} }
.detail-fourth { .detail-fourth {
margin: 10px 16px; margin: 10px 16px 36px 10px;
padding: 10px 16px 0; padding: 10px 16px 0;
.title { .title {
font-weight: 700; font-weight: 700;
......
...@@ -15,31 +15,31 @@ ...@@ -15,31 +15,31 @@
</div> </div>
<div class="group-customer-members flex"> <div class="group-customer-members flex">
<div class="group-customer-members-line"> <div class="group-customer-members-line">
<div class="group-customer-members-line-text text-12">全部群成员</div> <div class="group-customer-members-line-text text-12 line-17">全部群成员</div>
<div class="flex text-20"> <div class="flex text-20">
{{ baseStatics && baseStatics.total }} <span class="bottom">{{ baseStatics && baseStatics.total }}</span>
<div class="text-12">人</div> <div class="text-12 bottom">人</div>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="group-customer-members-line"> <div class="group-customer-members-line">
<div class="group-customer-members-line-text text-12">今日入群</div> <div class="group-customer-members-line-text text-12 line-17">今日入群</div>
<div class="flex text-20"> <div class="flex text-20">
{{ baseStatics && baseStatics.addNum }} <span class="bottom">{{ baseStatics && baseStatics.addNum }}</span>
<div class="text-12">人</div> <div class="text-12 bottom">人</div>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="group-customer-members-line"> <div class="group-customer-members-line">
<div class="group-customer-members-line-text text-12">今日退群</div> <div class="group-customer-members-line-text text-12 line-17">今日退群</div>
<div class="flex text-20"> <div class="flex text-20">
{{ baseStatics && baseStatics.removeNum }} <span class="bottom">{{ baseStatics && baseStatics.removeNum }}</span>
<div class="text-12">人</div> <div class="text-12 bottom">人</div>
</div> </div>
</div> </div>
</div> </div>
<tab-customer :list="['客户(' + custList.length + ')', '员工(' + staffList.length + ')']" @change="change" :index="tabIndex"> <tab-customer :list="['客户(' + custList.length + ')', '员工(' + staffList.length + ')']" @change="change" :index="tabIndex">
<index ref="customerIndex" :index="tabIndex" :keyWord="keyWord" @searchkeyWord="searchkeyWord"></index> <index ref="customerIndex" :index="tabIndex" :keyWord="keyWord" @searchkeyWord="searchkeyWord" :tableData="tabIndex == 0 ? custList : staffList"></index>
</tab-customer> </tab-customer>
</div> </div>
</template> </template>
...@@ -140,8 +140,8 @@ export default { ...@@ -140,8 +140,8 @@ export default {
} }
detailApi.getCustomerCustList(obj).then(res => { detailApi.getCustomerCustList(obj).then(res => {
if (res) { if (res) {
console.log(res, 'res')
this.custList = res this.custList = res
this.$refs.customerIndex.custList = res
} }
}) })
}, },
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
detailApi.getCustomerStaffList(obj).then(res => { detailApi.getCustomerStaffList(obj).then(res => {
if (res) { if (res) {
this.staffList = res this.staffList = res
this.$refs.customerIndex.staffList = res // this.$refs.customerIndex.staffList = res
} }
}) })
}, },
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
color: #333333; color: #333333;
padding: 10px 0 20px 10px; padding: 10px 0 20px 10px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
word-break:break-all; word-break: break-all;
} }
.group-customer-person-info { .group-customer-person-info {
margin: 9px 0 10px 10px; margin: 9px 0 10px 10px;
......
<template> <template>
<div :class="['layoutIndex', `page-type-${tabIndex}`]"> <div :class="['layoutIndex', `page-type-${tabIndex}`]">
<search :placeholder="tabIndex == 0 ? '姓名、手机、车牌号' : '输入员工姓名'" :keyword="keyWord" @search="searchkeyWord"></search> <search :placeholder="tabIndex == 0 ? '姓名、手机、车牌号' : '输入员工姓名'" :keyword="keyWord" @search="searchkeyWord"></search>
<template v-if="tabIndex == 0 ? custList.length > 0 : staffList.length > 0"> <template v-if="list.length > 0">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView"> <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-for="(item, index) in tabIndex == 0 ? custList : staffList"> <template v-for="(item, index) in list">
<div :key="index" class="item flex" @click="goTo(item)"> <div :key="index" class="item flex" @click="goTo(item)">
<template> <template>
<div class="avatar"> <div class="avatar">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="time">进群时间:{{ item.joinTime }}</div> <div class="time">进群时间:{{ item.joinTime }}</div>
</template> </template>
<div class="tag-wrap flex" v-else> <div class="tag-wrap flex" v-else>
<template v-if="item.labels.length > 0"> <template v-if="item.labels&&item.labels.length > 0">
<div class="tag" v-for="tag in item.labels.slice(0, 3)" :key="tag.labelId">{{ tag.labelValue }}</div> <div class="tag" v-for="tag in item.labels.slice(0, 3)" :key="tag.labelId">{{ tag.labelValue }}</div>
</template> </template>
</div> </div>
...@@ -55,8 +55,7 @@ export default { ...@@ -55,8 +55,7 @@ export default {
data() { data() {
return { return {
tabIndex: this.index, tabIndex: this.index,
custList: [], list: this.tableData
staffList: []
} }
}, },
props: { props: {
...@@ -67,11 +66,21 @@ export default { ...@@ -67,11 +66,21 @@ export default {
keyWord: { keyWord: {
type: String, type: String,
default: '' default: ''
},
tableData: {
type: Array,
default: () => []
} }
}, },
watch: { watch: {
index(n) { index(n) {
this.tabIndex = n this.tabIndex = n
},
tableData: {
handler(e) {
this.list = e
},
deep: true
} }
}, },
created() { created() {
...@@ -109,7 +118,7 @@ export default { ...@@ -109,7 +118,7 @@ export default {
return return
} }
if (this.tabIndex == 0) this.$router.push({ name: 'customer.detail', query: { id: data.userId, customerId: data.isMyCustomer, isTrue: true } }) if (this.tabIndex == 0) this.$router.push({ name: 'customer.detail', query: { id: data.userId, customerId: data.isMyCustomer, isTrue: true } })
if (this.tabIndex == 1&&this.workUserId!=data.userId) { if (this.tabIndex == 1 && this.workUserId != data.userId) {
let seach = { let seach = {
userIds: [data.userId], //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。 userIds: [data.userId], //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
externalUserIds: [data.userId], // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。 externalUserIds: [data.userId], // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!