Squashed commit of the following:

commit f9e9899e0e
Author: 浅念 <email@sample.com>
Date:   Fri Mar 28 11:10:56 2025 +0800

    设置默认语言为英语

commit 303121ba81
Author: 浅念 <email@sample.com>
Date:   Fri Mar 28 11:00:05 2025 +0800

    调用接口调整

commit 37e0e55d96
Author: 浅念 <email@sample.com>
Date:   Fri Mar 28 10:33:48 2025 +0800

    线上接口地址

commit 11dd7de521
Author: 浅念 <email@sample.com>
Date:   Thu Mar 27 16:54:52 2025 +0800

    修改样式

commit 8ceb98b321
Author: 浅念 <email@sample.com>
Date:   Thu Mar 27 16:47:04 2025 +0800

    隐藏我的名片

commit f58e712684
Author: 浅念 <email@sample.com>
Date:   Thu Mar 27 16:44:43 2025 +0800

    样式调整

commit 54ad6c9e37
Author: 浅念 <email@sample.com>
Date:   Thu Mar 27 16:35:21 2025 +0800

    修改语言包

commit 526f934a75
Author: 浅念 <email@sample.com>
Date:   Thu Mar 27 16:13:47 2025 +0800

    标签功能

commit 8583ff2543
Author: 浅念 <email@sample.com>
Date:   Wed Mar 26 17:02:04 2025 +0800

    标签管理页面

commit be8674fd51
Author: 浅念 <email@sample.com>
Date:   Tue Mar 25 17:29:37 2025 +0800

    样式调整

commit a5d5ce4e7c
Author: 浅念 <email@sample.com>
Date:   Tue Mar 25 17:23:40 2025 +0800

    倒计时组件

commit f88048b876
Author: 浅念 <email@sample.com>
Date:   Tue Mar 25 17:19:43 2025 +0800

    首页添加跟进提醒

commit f9a39d5aaa
Author: 浅念 <email@sample.com>
Date:   Tue Mar 25 13:13:39 2025 +0800

    提交

commit e3abe0bf18
Author: 浅念 <email@sample.com>
Date:   Tue Mar 25 13:12:24 2025 +0800

    名片部分页面。地图定位。国家下拉搜索  回收站
This commit is contained in:
浅念
2025-03-28 14:46:49 +08:00
parent f7ff9d65a5
commit 5e8e44f88f
34 changed files with 1777 additions and 704 deletions
+234 -29
View File
@@ -14,19 +14,43 @@
<view class="cont">
<view class="title">
<view class=""><text class="name">{{datas.phone}}</text></view>
<view class="ststus">渠道:{{datas.channel_name}}</view>
<view class="ststus" v-if="datas.channel_name!=''">{{$t('channel')}}:{{datas.channel_name}}</view>
</view>
<view class="info"><text class="sex">{{datas.sex_txt}}</text> | <text class="addr">{{datas.country_name}}</text><text class="type">{{datas.car_type_name}}</text>
</view>
<view v-if="datas.email!=''">Email: {{datas.email}}</view>
<view v-if="datas.WhatsApp!=''">WhatsAPP: {{datas.WhatsApp}}</view>
<view v-if="datas.address!=''">公司: {{datas.address}}</view>
<view v-if="datas.describe!=''">备注: {{datas.describe}}</view>
<view v-if="datas.address!=''">{{$t('customer.Company')}}: {{datas.address}}</view>
<view v-if="datas.describe!=''">{{$t('remarks')}}: {{datas.describe}}</view>
</view>
<view class="edt">
<!-- <view class="btn" @click="showtag = true"><image src="/static/image/customer/tagadd.png" mode=""></image><text> {{$t('addtag')}}</text></view> -->
<view class="btn" @click="editFn"><image src="/static/image/customer/edit.png" mode=""></image><text> {{$t('edtbtn')}}</text></view>
</view>
</view>
<view class="cells">
<view class="top">
<view class="item">{{$t('CustomerProfile')}}</view>
<view class="right">
<view class="btn"@click="showtag = true"><image src="/static/image/customer/tagadd.png" mode=""></image><text> {{$t('addtag')}}</text></view>
</view>
</view>
<view v-if="datas.tags.length>0">
<view class="conts" :class="{'expandeds':!expanded}">
<view class="tags" v-for="(item, index) in datas.tags" :key="index">{{item.name}}</view>
</view>
<view class="toggle" @click="expanded = !expanded">
<text >
{{ expanded ? $t('retract') : $t('expand') }}
</text>
<u-icon v-if="expanded" class="arrowright" name="arrow-up" size="16" color="#999999"></u-icon>
<u-icon v-else class="arrowright" name="arrow-down" size="16" color="#999999"></u-icon>
</view>
</view>
<view v-else class="nones">
{{$t('CustomerProfilemag')}}
</view>
</view>
<view class="cell">
<view class="item">{{$t('customer.Cstomerfj')}}</view>
<view class="right select" @click="showgrade = true">
@@ -47,26 +71,36 @@
</view>
</view>
<u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot>
<u-steps-item :title="item.type_txt" v-for="(item, index) in followList" :key="index">
<u-steps-item :title="item.type==1? $t('customer.Online') : $t('customer.Visit') " v-for="(item, index) in followList" :key="index">
<view slot="desc" class="desc">
<view class="" v-if="item.type==0">
<view class="flex" v-if="item.type==0">
<view class="">
<view class="">
<view class="lingh">
{{$t('times')}} :{{item.created_at}}
</view>
<view class="">{{$t('address')}}:{{item.address}}</view>
<view class="">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
<view class="lingh">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
</view>
<view class="">
<image :src="item.oss_picture" mode=""></image>
<!-- <image :src="item.oss_picture" mode=""></image> -->
<u-album
:urls="isurls(item.oss_picture)"
:singleSize="80"
keyName="src"
></u-album>
</view>
</view>
<view class="" v-else>
<view class="">
<view class="lingh">
{{$t('times')}}:{{item.created_at}}
</view>
<view class="">
<image :src="item.oss_picture" mode=""></image>
<u-album
:urls="isurls(item.oss_picture)"
keyName="src"
:singleSize="80"
></u-album>
<!-- <image :src="item.oss_picture" mode=""></image> -->
</view>
</view>
</view>
@@ -75,23 +109,27 @@
<empty :list="followList"></empty>
</view>
<view class="zw"></view>
<!-- <view class="foot">
<button class="btn" @click="nextFn">{{$t('submit')}}</button>
</view> -->
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexfj" :show="showgrade" @cancel="cancel('showgrade')" @close="close('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
<!-- <u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose">
<view class="mapcont">
<view class="header">
<view class="cancel" @click="mapclose">取消</view>
<view class="title">地图位置</view>
<view class="confirm" @click="mapconfirm">确定</view>
</view>
<view class="map">
<!-- 客户标签 -->
<u-popup closeOnClickOverlay :show="showtag" mode="bottom" :round="10" @close="closetag('showtag')" :closeable="true" >
<view class="popup-content">
<scroll-view scroll-y class="tag-list">
<view
v-for="(item, index) in taglist"
:key="index"
class="tags"
>
<view class="name">{{ item.name }}</view>
<view class="row">
<view class="col4 tagitem" v-for="(item1, index1) in item.tags" :class="{ 'tagactive': isActive(item1.group_id, item1.id) }" @click="tagSelect(item1)" :key="index1">
{{ item1.name }}
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</u-popup> -->
</u-popup>
</view>
</template>
@@ -101,7 +139,9 @@
data() {
return {
id:'',
expanded:false,
followList:[],
showtag: false,
showmap: false,
showmagnitude: false,
showgrade: false,
@@ -115,7 +155,9 @@
form: {
grade:'',
},
datas:''
datas:'',
activeMap: {}, // 存储每个父级下选中的子项 { 父ID: 子ID }
taglist:[]
}
},
@@ -125,6 +167,7 @@
var that = this
this.getGrade()
this.customerdetailfn()
this.tagGroup()
},
onShow() {
@@ -141,6 +184,13 @@
leftClick(){
uni.navigateBack({})
},
isurls(url){
var urls=[]
var obj={}
obj.src = url
urls.push(obj)
return urls
},
gomap(){
uni.navigateTo({
url: '/pages/customer/map'
@@ -166,6 +216,10 @@
}
}).then(res => {
that.datas = res.data.data
that.datas.tags.forEach((item,index) => {
that.$set(that.activeMap, item.group_id,item.id);
})
that.form = res.data.data
that.select()
})
@@ -238,11 +292,49 @@
close(val){
this[val] = false
},
closetag(val){
this[val] = false
this.customerdetailfn()
},
editFn(){
uni.navigateTo({
url: '/pages/customer/editdetile?id='+this.id
});
},
//标签
tagGroup(){
request({
url:'tagGroup/list',
method:'get',
}).then(res => {
this.taglist = res.data.data
})
},
//标签点击
tagSelect(item) {
// 如果已选中则取消,否则设置选中
this.$set(this.activeMap, item.group_id, this.activeMap[item.group_id] === item.id ? '' : item.id);
console.log(this.activeMap)
request({
url:'tagGroup/updatePivot',
method:'post',
data:{
customer_id: this.id,
group_id:item.group_id,
tag_id:this.activeMap[item.group_id]
}
}).then(res => {
if(res.data.code!=0){
uni.showToast({
title: res.data.message,
icon: 'none'
});
}
})
},
isActive(parentId, childId) {
return this.activeMap[parentId] === childId;
},
nextFn(){
request({
url:'customer/save',
@@ -267,6 +359,16 @@
</script>
<style lang="scss">
::v-deep .u-cell__body{
padding: 0px !important;
}
::v-deep .u-collapse-item__content__text{
padding: 10px 0px!important;
}
::v-deep .u-cell__title-text{
font-size: 14px;
}
.u-m-lr-10{
margin: 0px 10px;
}
@@ -290,11 +392,68 @@
position: absolute;
top: 2px;
}
.expandeds{
height: 33px;
overflow: hidden;
}
.cells{
margin-bottom: 10px;
background: #f6f6f6;
padding:13px 15px;
border-radius: 10px;
.top{
display: flex;
align-items: center;
justify-content: space-between;
color: #666666;
}
.btn{
color: #3471FF;
text-align: right;
display: flex;
align-items: center;
}
image{
width: 14px;
height: 14px;
margin-right: 5px;
}
.conts{
padding: 10px 0px;
}
.tags{
display: inline-block;
margin: 4px 3px;
// width: 31%;
background: #ECF2FF;
border-radius: 15px;
color: #3471FF;
text-align: center;
padding: 5px 15px;
}
.toggle{
display: flex;
align-items: center;
justify-content: center;
color: #999999;
font-size: 12px;
margin-top: 5px;
text{
margin-right: 5px;
}
}
.nones{
text-align: center;
color: #999999;
line-height: 30px;
font-size: 12px;
}
}
.cell{
position: relative;
display: flex;
justify-content:space-between;
padding: 18px 20px;
padding: 13px 20px;
align-items: center;
font-weight: 500;
.item{
@@ -315,6 +474,10 @@
position: relative;
margin-right: 10px;
}
.tagname{
color: #726CFF;
font-size: 12px;
}
.content{
padding: 10px 15px;
background: #FFFFFF;
@@ -324,8 +487,9 @@
margin-bottom: 10px;
.edt{
display: flex;
justify-content: right;
justify-content: flex-end;
padding-bottom: 10px;
text-align: center;
image{
width: 14px;
height: 14px;
@@ -402,10 +566,17 @@
height:44px;
}
.desc{
display: flex;
justify-content: space-between;
align-items: center;
color: #999999;
.lingh{
line-height: 40px;
}
.flex{
display: flex;
justify-content: space-between;
align-items: center;
}
}
.title{
display: flex;
@@ -427,4 +598,38 @@
}
}
}
// 标签弹框
.popup-content {
padding: 20px;
}
.tag-list{
max-height: 900rpx;
margin-top: 20rpx;
.tags{
margin-top: 10px;
}
.name{
margin: 10px 0px;
}
.tagitem{
background: #ECF2FF;
border-radius: 8px;
color: #3471FF;
text-align: center;
padding: 5px 0px;
}
.row{
width: 100%;
}
.col4{
display: inline-block;
margin: 4px 3px;
width: 30%;
}
}
.tagactive{
background: #3471FF !important;
color: #fff !important;
}
</style>