Commit fab9ad6e by Lin

Merge branch 'saas+v5.8.3' of http://192.168.3.233:8090/glsx/gl_tape into saas+v5.8.3

2 parents db4b7a98 2534d711
<template>
<view class="table">
<view class="table-header">
<view class="header-item customer-col">客户信息</view>
<view class="header-item order-col">订单完成信息</view>
<view class="header-item tag-col">客户标签</view>
<view class="header-item follower-col">跟进人</view>
<view class="header-item action-col">操作</view>
</view>
<view class="table-body">
<view v-for="(item, index) in tableData" :key="index" class="table-row">
<view class="row-item customer-col">
<view class="customer-info">
<view class="avatar">{{ item.avatar }}</view>
<view class="customer-detail">
<view class="name-row">
<text class="name">{{ item.name }}</text>
<text class="car-model">{{ item.carModel }}</text>
</view>
<view class="phone">{{ item.phone }}</view>
<view class="customer-group">{{ item.customerGroup }}</view>
</view>
</view>
</view>
<view class="row-item order-col">
<view class="order-status" :class="item.statusClass">{{ item.status }}</view>
<view class="order-date">{{ item.orderDate }}</view>
</view>
<view class="row-item tag-col">
<view class="tag-list" :id="`tag-list-${index}`">
<view v-for="(tag, tagIndex) in item.tags" :key="tagIndex" class="tag" :id="`tag-${index}-${tagIndex}`">
{{ tag }}
</view>
<view v-if="item.hasMoreTags" class="tag more-tags">...</view>
</view>
</view>
<view class="row-item follower-col">
<text>{{ item.follower }}</text>
</view>
<view class="row-item action-col">
<view class="action-btn primary-btn">推送运营任务</view>
<view class="action-btn secondary-btn">查看任务记录</view>
</view>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Table',
data() {
return {
tableData: [
{
avatar: '张',
name: '张**',
carModel: '奥迪 A6L',
phone: '136****6789',
customerGroup: '张先生2827-客户大定精品服务群吉...',
status: '已升级',
statusClass: 'success',
orderDate: '2016-02-23',
tags: ['全款购车', '家庭用车', '价格敏感', '30-25岁', '高意向客户'],
hasMoreTags: false,
follower: '郭莎莎'
},
{
avatar: '李',
name: '李**',
carModel: '宝马 5系',
phone: '138****1234',
customerGroup: '李女士5820-客户专属服务群奔驰车主',
status: '战败',
statusClass: 'failed',
orderDate: '2021-05-10',
tags: ['分期购车', '中等预算', '25-20岁'],
hasMoreTags: false,
follower: '李明'
},
{
avatar: '王',
name: '王**',
carModel: '奔驰 C级',
phone: '139****5678',
customerGroup: '王先生2931-客户定制车服务群豪车...',
status: '战败',
statusClass: 'failed',
orderDate: '2020-08-05',
tags: ['二手车交易', '学生用车', '性价比高', '20-18岁', '低意向客户', '年轻人首车', '实打实的铝合金发送到', '寄售点开始点', '测试标签'],
hasMoreTags: false,
follower: '张婷'
},
{
avatar: '赵',
name: '赵**',
carModel: '丰田 凯美瑞',
phone: '137****9876',
customerGroup: '客户群不存在',
status: '已升级',
statusClass: 'success',
orderDate: '2023-01-15',
tags: ['豪华车购置', '商务用车', '高预算', '40-30岁'],
hasMoreTags: false,
follower: '陈晓华'
},
{
avatar: '刘',
name: '刘**',
carModel: '特斯拉 Model 3',
phone: '135****4321',
customerGroup: '刘先生3748-客户新能源车服务群绿...',
status: '已升级',
statusClass: 'success',
orderDate: '2024-03-30',
tags: ['11111111111111111111111111111111111111111111111', '环保意识强', '中高预算', '35-28岁', '高意向客户', 'sdjkfhsdkfh', 'jjddjdjdj'],
hasMoreTags: false,
follower: '刘芳'
}
]
}
},
watch: {},
computed: {},
mounted() {
this.$nextTick(() => {
this.tableData.forEach((item, index) => {
this.showTagMore(item.tags, index)
})
})
},
methods: {
showTagMore(tags, index) {
let query = uni.createSelectorQuery(),
listItem = null,
targetIndex = 0
this.$nextTick(() => {
try {
query.select(`#tag-list-${index}`).boundingClientRect((data) => {
listItem = data
}).exec()
tags.forEach((tag, tagIndex) => {
query.select(`#tag-${index}-${tagIndex}`).boundingClientRect((data) => {
if (listItem && data.top > (listItem.height + listItem.top) && !targetIndex) targetIndex = tagIndex - 1
}).exec()
})
if (targetIndex != 0) query.select(`#tag-${index}-${targetIndex}`).boundingClientRect((data) => {
let listWidth = listItem.left + listItem.width,
cutWidth = data.left + data.width
if (cutWidth + 34 < listWidth) targetIndex += 1
}).exec()
if (targetIndex) {
this.$set(this.tableData[index], 'tags', tags.slice(0, targetIndex))
this.$set(this.tableData[index], 'hasMoreTags', true)
}
} catch (error) {
console.log(error)
}
})
}
}
}
</script>
<style scoped lang='scss'>
.table {
width: 100%;
background-color: #ffffff;
border-radius: 16rpx;
overflow: hidden;
.table-header {
display: flex;
align-items: center;
background-color: #F5F7FA;
font-size: 26rpx;
color: #6C6F75;
font-weight: 500;
height: 72rpx;
.header-item {
text-align: center;
&.customer-col {
width: 588rpx;
}
&.order-col {
width: 226rpx;
}
&.tag-col {
width: 656rpx;
}
&.follower-col {
width: 224rpx;
}
&.action-col {
width: 284rpx;
}
}
}
.table-body {
.table-row {
display: flex;
align-items: center;
padding: 32rpx 0;
border-bottom: 1rpx solid #F0F1F5;
&:last-child {
border-bottom: none;
}
.row-item {
font-size: 26rpx;
color: #333333;
&.customer-col {
width: 588rpx;
box-sizing: border-box;
padding: 0 32rpx;
.customer-info {
display: flex;
align-items: flex-start;
.avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #2C66F71A;
color: #2C66F7;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 500;
margin-right: 20rpx;
flex-shrink: 0;
}
.customer-detail {
flex: 1;
min-width: 0;
.name-row {
display: flex;
align-items: center;
margin-bottom: 16rpx;
.name {
font-size: 32rpx;
font-weight: 500;
color: #1A1A2E;
margin-right: 12rpx;
}
.car-model {
font-size: 24rpx;
color: #6C6F75;
padding: 0 16rpx;
border-radius: 8rpx;
border: 1px solid #DCE1E6
}
}
.phone {
font-size: 26rpx;
color: #999EA8;
margin-bottom: 16rpx;
}
.customer-group {
font-size: 26rpx;
color: #999EA8;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
&.order-col {
width: 226rpx;
box-sizing: border-box;
padding-left: 32rpx;
.order-status {
display: inline-block;
padding: 6rpx 16rpx;
border-radius: 8rpx;
font-size: 24rpx;
margin-bottom: 16rpx;
&.success {
background-color: #EAF9F1;
color: #35C376;
}
&.failed {
background-color: #F5F7FA;
color: #999EA8;
}
}
.order-date {
font-size: 26rpx;
color: #999EA8;
}
}
&.tag-col {
width: 656rpx;
box-sizing: border-box;
padding: 0 32rpx;
.tag-list {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
color: #6C6F75;
font-size: 26rpx;
max-height: 100rpx;
overflow: hidden;
// align-content: center;
.tag {
padding: 0 16rpx;
border-radius: 8rpx;
border: 1px solid #DCE1E6;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.more-tags {
border: 1px solid #DCE1E6;
}
}
}
&.follower-col {
width: 224rpx;
font-size: 26rpx;
color: #292D33;
text-align: center;
}
&.action-col {
width: 284rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
box-sizing: border-box;
padding: 0 32rpx;
.action-btn {
padding: 12rpx 24rpx;
border-radius: 8rpx;
font-size: 24rpx;
text-align: center;
cursor: pointer;
transition: all 0.2s;
&.primary-btn {
background-color: #2C66F70D;
color: #2C66F7;
border: 1rpx solid #2C66F71A;
&:active {
background-color: #D4E4FF;
}
}
&.secondary-btn {
background-color: #FFFFFF;
color: #292D33;
border: 1rpx solid #DCE1E6;
&:active {
background-color: #F5F7FA;
}
}
}
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="customer-box">
<view class="tips flex">今日任务({{ toDay }})
<view class="text">根据SOP策略生成营销任务,请及时推送客户</view>
</view>
<view class="tabs-box">tabs</view>
<view class="customer-content">
<Table />
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs';
import Table from './components/Table'
export default {
name: 'CustomerOpportunities',
components: { Table },
data() {
return {
toDay: dayjs().format('MM-DD')
}
},
watch: {},
computed: {},
mounted() { },
methods: {}
}
</script>
<style scoped lang='scss'>
.customer-box {
width: 100%;
height: 100%;
padding: 32rpx 40rpx;
box-sizing: border-box;
.tips {
height: 64rpx;
background: #2C66F70D;
padding: 0 24rpx;
font-size: 26rpx;
color: #6C6F75;
border-radius: 20rpx;
.text {
margin-left: auto;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -85,9 +85,6 @@ export default { ...@@ -85,9 +85,6 @@ export default {
watchStatus() { watchStatus() {
return this.$store.state.user.historyStatus; return this.$store.state.user.historyStatus;
}, },
blockClass() {
return ['block-0', 'block-1', 'block-2'][this.blockIndex]
},
boutiqueMediaConfig() { boutiqueMediaConfig() {
return this.$store.state.user.boutiqueMediaConfig return this.$store.state.user.boutiqueMediaConfig
}, },
...@@ -189,9 +186,6 @@ export default { ...@@ -189,9 +186,6 @@ export default {
console.log(goodsList) console.log(goodsList)
return goodsList return goodsList
}, },
firstClass(list = []) {
return list.length == 2 ? 'two-block' : ''
},
statusText(status) { statusText(status) {
return status == 1 ? '主推' : '次推' return status == 1 ? '主推' : '次推'
}, },
...@@ -249,6 +243,7 @@ export default { ...@@ -249,6 +243,7 @@ export default {
line-height: toRpx(36); line-height: toRpx(36);
max-height: toRpx(144); max-height: toRpx(144);
overflow: hidden; overflow: hidden;
word-break: break-all;
} }
.goods-price { .goods-price {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!