diff --git a/pages/customer/add.vue b/pages/customer/add.vue
index d29c86c..0cc9814 100644
--- a/pages/customer/add.vue
+++ b/pages/customer/add.vue
@@ -1,95 +1,95 @@
-
+
- 渠道
+ {{$t('customer.CustomerChannel')}}
-
+
- 客户商机
+ {{$t('customer.Medal')}}
-
+
- 客户名称 *
+ {{$t('customer.CustomerName')}} *
-
+
- 性别
+ {{$t('gender')}}
- 未知
- 男
- 女
+ {{$t('gender0')}}
+ {{$t('gender1')}}
+ {{$t('gender2')}}
- 联系方式 *
+ {{$t('mine.lxcall')}} *
-
+
Email
-
+
WhatsApp
-
+
- 客户偏好
+ {{$t('customer.Customerph')}}
-
+
- 客户分级
+ {{$t('customer.Cstomerfj')}}
-
+
- 国家
+ {{$t('customer.Country')}}
-
+
- 公司
-
-
+ {{$t('customer.Company')}}
+
+
@@ -102,29 +102,28 @@
-->
- 备注(非必填)
+ {{$t('customer.Remarks')}}
-
+
-
+
@@ -135,6 +134,7 @@
export default {
data() {
return {
+ mapUrl: '',
showmap: false,
showmagnitude: false,
showgrade: false,
@@ -163,7 +163,10 @@
channel_id:'',
magnitude:'',
address:'',
- }
+ lat:'',
+ lng:'',
+ },
+ location:{}
}
},
onLoad() {
@@ -173,10 +176,28 @@
this.carType()
this.area()
},
+ onShow() {
+ console.log(uni.getStorageSync('location'))
+ if(uni.getStorageSync('location')){
+ this.location = JSON.parse(uni.getStorageSync('location'))
+ this.form.address = this.location.address
+ this.form.lng = this.location.lng
+ this.form.lat = this.location.lat
+ console.log(this.location)
+ }
+ },
+ mounted() {
+ // this.initMap();
+ },
methods: {
leftClick(){
uni.navigateBack({})
},
+ gomap(){
+ uni.navigateTo({
+ url: '/pages/customer/map'
+ });
+ },
mapclose(){
this.showmap = false
},
@@ -312,9 +333,6 @@
padding: 15px;
border-radius: 10px;
}
- .u-divider{
- margin: 0px 0px !important;
- }
.uniui-right{
position: absolute;
top: 2px;
diff --git a/pages/customer/detile.vue b/pages/customer/detile.vue
index 3b2fd21..ae16d3a 100644
--- a/pages/customer/detile.vue
+++ b/pages/customer/detile.vue
@@ -1,103 +1,103 @@
-
+
- 渠道
+ {{$t('customer.CustomerChannel')}}
-
+
- 客户商机
+ {{$t('customer.Medal')}}
-
+
- 客户名称 *
+ {{$t('customer.CustomerName')}} *
-
+
- 性别
+ {{$t('gender')}}
- 未知
- 男
- 女
+ {{$t('gender0')}}
+ {{$t('gender1')}}
+ {{$t('gender2')}}
- 联系方式 *
+ {{$t('customer.lxcall')}} *
-
+
Email
-
+
WhatsApp
-
+
- 客户偏好
+ {{$t('customer.Customerph')}}
-
+
- 客户分级
+ {{$t('customer.Cstomerfj')}}
-
+
- 国家
+ {{$t('customer.Country')}}
-
+
- 公司
-
-
+ {{$t('customer.Company')}}
+
+
- 备注(非必填)
+ {{$t('customer.Remarks')}}
-
+
@@ -105,10 +105,10 @@
- 跟进记录 跟进中
+ {{$t('customer.followrecord')}} {{datas.follow_txt}}
- 添加记录
+ {{$t('navbar.addfollow')}}
@@ -117,10 +117,10 @@
- 时间:{{item.created_at}}
+ {{$t('times')}} :{{item.created_at}}
- 地址:{{item.address}}
- 拜访内容:{{item.audio_text}}
+ {{$t('address')}}:{{item.address}}
+ {{$t('customer.Visitcontent')}}:{{item.audio_text}}
@@ -128,7 +128,7 @@
- 时间:{{item.created_at}}
+ {{$t('times')}}:{{item.created_at}}
@@ -141,9 +141,9 @@
-
+
@@ -175,6 +175,11 @@
carTypeList:[],
channelList:[],
magnitudeList:[],
+ getGradeList1:[],
+ carTypeLis1:[],
+ channelList1:[],
+ magnitudeList1:[],
+ areaList1:[],
areaList:[],
grade_name:'',
car_type_name:'',
@@ -188,7 +193,7 @@
defaultIndexgj:[0],
form: {
contacts: '',
- sex: '0',
+ sex: 0,
phone: '',
email: '',
describe: '',
@@ -197,8 +202,11 @@
car_type_id:'',
channel_id:'',
magnitude:'',
- address:'',
- }
+ address:'',
+ lat:'',
+ lng:'',
+ },
+ datas:''
}
},
@@ -215,14 +223,60 @@
},
onShow() {
+ if(uni.getStorageSync('location')){
+ this.location = JSON.parse(uni.getStorageSync('location'))
+ this.form.address = this.location.address
+ this.form.lng = this.location.lng
+ this.form.lat = this.location.lat
+ console.log(this.location)
+ }
this.followlistfn()
},
methods: {
leftClick(){
uni.navigateBack({})
},
+ gomap(){
+ uni.navigateTo({
+ url: '/pages/customer/map'
+ });
+ },
+ select(){
+ var that=this;
+ that.channelList1.forEach((item,index) => {
+ if(item.id == that.form.channel_id){
+ that.channel_name = item.name
+ that.defaultIndexqd=[index]
+ }
+ })
+ that.getGradeList1.forEach((item,index) => {
+ if(item.id == that.form.grade){
+ that.grade_name = item.name
+ that.defaultIndexfj=[index]
+ }
+ })
+ that.carTypeList1.forEach((item,index) => {
+ if(item.id == that.form.car_type_id){
+ that.car_type_name = item.name
+ that.defaultIndexph=[index]
+ }
+ })
+ that.magnitudeList1.forEach((item,index) => {
+ if(item.id == that.form.magnitude){
+ that.magnitude_name = item.name
+ that.defaultIndexsj=[index]
+ }
+ })
+ that.areaList1.forEach((item,index) => {
+ if(item.id == that.form.country_id){
+ that.channel_name = item.name
+ that.defaultIndexgj=[index]
+ }
+ })
+ },
//客户详情
customerdetailfn(){
+ var that=this;
request({
url:'customer/detail',
method:'get',
@@ -230,14 +284,9 @@
id:this.id,
}
}).then(res => {
- this.form = res.data.data
- that.channelList.forEach((item,index) => {
- if(item.id == this.form.channel_id){
- that.channel_name = item.name
- that.defaultIndexqd=[index]
- }
- })
- console.log(res.data.data)
+ that.datas = res.data.data
+ that.form = res.data.data
+ that.select()
})
},
// 跟进记录
@@ -272,6 +321,7 @@
method:'get',
}).then(res => {
var list = res.data.data
+ this.channelList1 = list
this.channelList = [list]
})
},
@@ -283,6 +333,7 @@
}).then(res => {
var list = res.data.data
this.getGradeList = [list]
+ this.getGradeList1 = list
})
},
//偏好
@@ -292,6 +343,7 @@
method:'get',
}).then(res => {
var list = res.data.data
+ this.carTypeList1 = list
this.carTypeList = [list]
})
},
@@ -302,6 +354,7 @@
method:'get',
}).then(res => {
var list = res.data.data
+ this.areaList1 = list
this.areaList = [list]
})
},
@@ -312,6 +365,7 @@
method:'get',
}).then(res => {
var list = res.data.data
+ this.magnitudeList1 = list
this.magnitudeList = [list]
})
},
@@ -404,6 +458,7 @@
}
.steps{
padding: 15px;
+ background: #fff;
image{
width: 44px;
height:44px;
@@ -423,7 +478,6 @@
margin-bottom: 15px;
.status{
font-size: 28rpx;
- color: #3471FF;
margin-left: 10px;
}
.btnjl{
diff --git a/pages/customer/followup.vue b/pages/customer/followup.vue
index 0035079..e1237ed 100644
--- a/pages/customer/followup.vue
+++ b/pages/customer/followup.vue
@@ -1,26 +1,26 @@
-
+
- 跟进方式
+ {{$t('customer.followtype')}}
- 在线跟进
- 拜访
+ {{$t('customer.Online')}}
+ {{$t('customer.Visit')}}
- 跟进时间
+ {{$t('customer.followtime')}}
-
+
- 上传跟进最后聊天截图
+ {{$t('customer.updataimg')}}
@@ -28,14 +28,14 @@
- 当前位置
+ {{$t('customer.followlocation')}}
-
+
- 当前位置拍照上传
+ {{$t('customer.locationimg')}}
@@ -44,25 +44,25 @@
- 拜访内容
+ {{$t('customer.Visitcontent')}}
-
+
- 备注(非必填)
+ {{$t('customer.Remarks')}}
-
-
+
+
- 跟进记录 跟进中
+ {{$t('customer.followrecord')}} {{datas.follow_txt}}
@@ -70,10 +70,10 @@
- 时间:{{item.created_at}}
+ {{$t('times')}} :{{item.created_at}}
- 地址:{{item.address}}
- 拜访内容:{{item.audio_text}}
+ {{$t('address')}}:{{item.address}}
+ {{$t('customer.Visitcontent')}}:{{item.audio_text}}
@@ -81,7 +81,7 @@
- 时间:{{item.created_at}}
+ {{$t('times')}}:{{item.created_at}}
@@ -94,8 +94,8 @@
{
- console.log('逆地理编码结果:', res.data);
- if (res.data.status === '1') {
- const address = res.data.regeocode.formatted_address; // 具体地址
- console.log('具体地址:', address);
- }
- },
- fail: (err) => {
- console.log('逆地理编码失败:', err);
- }
+
+ uni.request({
+ url: `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${apiKey}`,
+ success: (res) => {
+ if (res.data.results && res.data.results.length > 0) {
+ this.form.address = res.data.results[0].formatted_address; // 获取格式化地址
+ console.log(res.data.results[0].formatted_address)
+ } else {
+ console.error('未找到地址');
+ }
+ },
+ fail: (err) => {
+ console.error('请求失败:', err);
+ },
});
},
getlocahost(){
+ var that = this
uni.getLocation({
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
- getarrd(res.longitude,res.latitude)
+ that.getarrd(res.longitude,res.latitude)
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码
// 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图)
},
@@ -207,6 +211,7 @@
customer_id:this.id,
}
}).then(res => {
+ this.datas = res.data.data
this.followList = res.data.data
console.log(res.data.data)
})
@@ -223,12 +228,9 @@
icon: 'none'
});
if(res.data.code ==0){
- // setTimeout(() => {
- // uni.reLaunch({
- // url: '/pages/index/index',// 替换为你要跳转的页面路径
- // });
- // }, 1000);
-
+ setTimeout(() => {
+ uni.navigateBack({})
+ }, 1000);
}
})
},
@@ -262,6 +264,25 @@
this.shownexttime = false
this.nexttime = this.result(e.value, e.mode)
console.log(this.nexttime)
+ request({
+ url:'customer/followNext',
+ method:'post',
+ data:{
+ id:this.id,
+ follow_next:e.value
+ }
+ }).then(res => {
+ uni.showToast({
+ title: res.data.message,
+ icon: 'none'
+ });
+ if(res.data.code ==0){
+ setTimeout(() => {
+ uni.navigateBack({})
+ }, 1000);
+ }
+ })
+
},
change(e) {
// console.log('change', e)
@@ -422,6 +443,7 @@
padding-top: 20px;
}
.btn{
+ font-size: 28rpx;
background: linear-gradient(to right, #3471FF, #6776FF);
color: white;
border-radius: 50px;
@@ -431,6 +453,7 @@
margin-top: 20px;
}
.btn1{
+ font-size: 28rpx;
border: 1px solid #3471FF;
background: #fff;
color: #3471FF;
@@ -456,6 +479,7 @@
}
.steps{
padding: 15px;
+ background: #fff;
image{
width: 44px;
height:44px;
diff --git a/pages/customer/map.vue b/pages/customer/map.vue
new file mode 100644
index 0000000..68ff490
--- /dev/null
+++ b/pages/customer/map.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
diff --git a/pages/index/customer.vue b/pages/index/customer.vue
index 730537a..eaea4ac 100644
--- a/pages/index/customer.vue
+++ b/pages/index/customer.vue
@@ -6,7 +6,7 @@
{{$t('customer.title')}}
-
+
@@ -56,7 +56,7 @@
{{$t('cancel')}}
- {{$t('confirm')}}
+ {{$t('confirm')}}
@@ -76,19 +76,24 @@
return {
x: 300, //x坐标
y: 550, //y坐标
- value5:'',
+ keyword:'',
+ follow_last:'',
show:false,
showts:false,
+ del_id:'',
columns:[
[{
+ label: '全部',
+ id:''
+ },{
label: '当天跟进客户',
- id: 1
+ id: 0
}, {
label: '近三天跟进客户',
- id: 2
+ id: 1
}, {
label: '近七天跟进客户',
- id: 3
+ id: 2
}]
],
datalist:[],
@@ -98,16 +103,20 @@
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
this.x = windowWidth-70
this.y = windowHeight-55
+ uni.removeStorageSync('location')
},
methods: {
searchCli(){
-
+ this.queryList(1, 10)
},
close() {
this.show= false
},
confirm(e) {
+ console.log(e)
+ this.follow_last = e.value[0].id
this.show = false
+ this.queryList(1, 10)
},
cancel() {
this.show = false
@@ -120,7 +129,9 @@
method:'get',
data: {
page:pageNo,
- per_page:10
+ per_page:10,
+ keyword:this.keyword,
+ follow_last:this.follow_last,
}
}).then(res => {
console.log(res.data)
@@ -167,8 +178,31 @@
});
},
delClick(item){
+ this.del_id = item.id
this.showts=true
},
+ delfn(){
+ this.showts=false
+ request({
+ url:'customer/delete',
+ method:'get',
+ data: {
+ id:this.del_id,
+ }
+ }).then(res => {
+ uni.showToast({
+ title: res.data.message,
+ icon: 'none'
+ });
+ if(res.data.code ==0){
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '/pages/index/customer',// 替换为你要跳转的页面路径
+ });
+ }, 1000);
+ }
+ })
+ },
addcustomer(){
uni.navigateTo({
url: '/pages/customer/add'
@@ -189,6 +223,7 @@
height: calc(100vh - 50px);
}
.navbar{
+ padding-top: 44px;
height: 44px;
line-height: 44px;
text-align: center;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 1fca833..b1809a6 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,80 +1,88 @@
-
-
-
- {{$t('home.langbtn')}}
-
-
- {{$t('home.title')}} HESU CRM
-
-
- 66 {{$t('home.day')}}
-
-
-
-
- {{$t('home.databf')}}
-
-
-
-
+
+
+
+
+ {{$t('home.langbtn')}}
+
+
+ {{$t('home.title')}} HESU CRM
+
+
+ 66 {{$t('home.day')}}
+
+
+
+
+ {{$t('home.databf')}}
+
+
+
+
+
+
+
+
+
+ {{statisticsdata.customer}}
+ {{$t('home.addkh')}}
+
+
+ {{statisticsdata.visit}}
+ {{$t('home.addbf')}}
+
+
+ {{statisticsdata.follow}}
+ {{$t('home.addgj')}}
+
+
+
-
-
-
-
- 20
- {{$t('home.addkh')}}
-
-
- 20
- {{$t('home.addbf')}}
-
-
- 20
- {{$t('home.addgj')}}
-
-
-
-
-
-
-
-
+
-
+
+
-
-
+
+
-
+
-
-
+
+
\ No newline at end of file