名片部分页面。地图定位。国家下拉搜索 回收站
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
const baseUrl = "http://219.157.255.213:9007/"; //这里放置url域名32044
|
// const baseUrl = "http://219.157.255.213:9007/"; //这里放置url域名32044
|
||||||
// const baseUrl = "http://api.crm.hnxinyouhe.com/"; //这里放置url域名32044
|
// const baseUrl = "http://api.crm.hnxinyouhe.com/"; //这里放置url域名32044
|
||||||
// const baseUrl = "http://192.168.50.4:8787/"; //这里放置url域名32044
|
const baseUrl = "http://192.168.50.9:8787/"; //这里放置url域名32044
|
||||||
// const baseUrl = "/api/"; //这里放置url域名32044
|
// const baseUrl = "/api/"; //这里放置url域名32044
|
||||||
export function request(options){//封装的requset
|
export function request(options){//封装的requset
|
||||||
let { url,data,method } = options;
|
let { url,data,method } = options;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export default {
|
|||||||
addfollowup:'Add follow-up',
|
addfollowup:'Add follow-up',
|
||||||
userList:'Customer Management',
|
userList:'Customer Management',
|
||||||
persondata:'Personal Data',
|
persondata:'Personal Data',
|
||||||
|
businesscard:'Business card'
|
||||||
|
|
||||||
},
|
},
|
||||||
home: {
|
home: {
|
||||||
@@ -66,7 +67,7 @@ export default {
|
|||||||
msg:'Message Notification',
|
msg:'Message Notification',
|
||||||
cpassword:'Change Password',
|
cpassword:'Change Password',
|
||||||
contact:'Contact Service',
|
contact:'Contact Service',
|
||||||
feedback:'Feedback',
|
feedback:'Work order',
|
||||||
about:'About Us',
|
about:'About Us',
|
||||||
logoff:'Log Off',
|
logoff:'Log Off',
|
||||||
logout:'Log Out',
|
logout:'Log Out',
|
||||||
@@ -156,4 +157,8 @@ export default {
|
|||||||
details:'Details',
|
details:'Details',
|
||||||
auth:'Lark Authorize',
|
auth:'Lark Authorize',
|
||||||
inputnl:'Please select',
|
inputnl:'Please select',
|
||||||
|
noresults:'No matching results',
|
||||||
|
keyword:"Please enter search keywords",
|
||||||
|
prompt:'Prompt',
|
||||||
|
restoremsg:'Confirm to restore the current customer data?'
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,7 @@ export default {
|
|||||||
addfollowup:'添加跟进',
|
addfollowup:'添加跟进',
|
||||||
userList:'客户管理',
|
userList:'客户管理',
|
||||||
persondata:'个人资料',
|
persondata:'个人资料',
|
||||||
|
businesscard:'我的名片'
|
||||||
},
|
},
|
||||||
home: {
|
home: {
|
||||||
desc: '首页',
|
desc: '首页',
|
||||||
@@ -65,7 +66,7 @@ export default {
|
|||||||
msg:'消息通知',
|
msg:'消息通知',
|
||||||
cpassword:'修改密码',
|
cpassword:'修改密码',
|
||||||
contact:'联系客服',
|
contact:'联系客服',
|
||||||
feedback:'意见反馈',
|
feedback:'提交工单',
|
||||||
about:'关于我们',
|
about:'关于我们',
|
||||||
logoff:'注销账户',
|
logoff:'注销账户',
|
||||||
logout:'退出登录',
|
logout:'退出登录',
|
||||||
@@ -90,7 +91,7 @@ export default {
|
|||||||
recyclebin:'回收站',
|
recyclebin:'回收站',
|
||||||
restore:'恢复客户',
|
restore:'恢复客户',
|
||||||
position:'职位',
|
position:'职位',
|
||||||
positioninput:'请填写职位'
|
positioninput:'请填写职位',
|
||||||
},
|
},
|
||||||
call:'呼叫',
|
call:'呼叫',
|
||||||
delete:'删除',
|
delete:'删除',
|
||||||
@@ -155,4 +156,8 @@ export default {
|
|||||||
details:'详情',
|
details:'详情',
|
||||||
auth:'飞书授权',
|
auth:'飞书授权',
|
||||||
inputnl:'请选择',
|
inputnl:'请选择',
|
||||||
|
noresults:'无匹配结果',
|
||||||
|
keyword:"请输入搜索关键词",
|
||||||
|
prompt:'提示',
|
||||||
|
restoremsg:'确认要恢复当前客户数据?'
|
||||||
}
|
}
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@googlemaps/js-api-loader": "^1.16.8",
|
"@googlemaps/js-api-loader": "^1.16.8",
|
||||||
"cordova-plugin-googlemaps": "^2.7.1",
|
"cordova-plugin-googlemaps": "^2.7.1",
|
||||||
|
"html2canvas": "^1.4.1",
|
||||||
"vue-i18n": "^9.1.9"
|
"vue-i18n": "^9.1.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -61,7 +61,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/index/mine",
|
"path" : "pages/index/mine",//我的
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/index/customer",
|
"path" : "pages/index/customer",//客户管理
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
"root": "pages/customer",
|
"root": "pages/customer",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
"path": "add",
|
"path": "add",//添加客户
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "detile",
|
"path" : "detile",//客户详情
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "editdetile",
|
"path" : "editdetile", //编辑客户
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "followup",
|
"path" : "followup",//添加跟进
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "followsuccess",
|
"path" : "followsuccess",//设置下次提醒
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
"root": "pages/mine",
|
"root": "pages/mine",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
"path": "changinfo",
|
"path": "changinfo",//修改信息
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "massege",
|
"path" : "massege",//消息通知
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "feedback",
|
"path" : "feedback",//意见反馈
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "about",
|
"path" : "about",//关于我们
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "logoff",
|
"path" : "logoff",//注销账号
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "resetPwd",
|
"path" : "resetPwd",//修改密码
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "recyclebin",
|
"path" : "recyclebin",//回收站
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "recyclebindetil",
|
"path" : "businesscard",//我的名片
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "",
|
"navigationBarTitleText" : "",
|
||||||
|
|||||||
+103
-15
@@ -117,21 +117,37 @@
|
|||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showmagnitude" @cancel="cancel('showmagnitude')" @close="close('showmagnitude')" :columns="magnitudeList" keyName="name" @confirm="magnitudeChange"></u-picker>
|
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showmagnitude" @cancel="cancel('showmagnitude')" @close="close('showmagnitude')" :columns="magnitudeList" keyName="name" @confirm="magnitudeChange"></u-picker>
|
||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showcartype" @cancel="cancel('showcartype')" @close="close('showcartype')" :columns="carTypeList" keyName="name" @confirm="cartypesChange"></u-picker>
|
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showcartype" @cancel="cancel('showcartype')" @close="close('showcartype')" :columns="carTypeList" keyName="name" @confirm="cartypesChange"></u-picker>
|
||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showgrade" @cancel="cancel('showgrade')" @close="close('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
|
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showgrade" @cancel="cancel('showgrade')" @close="close('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
|
||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showarea" @cancel="cancel('showarea')" @close="close('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker>
|
<!-- <u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showarea" @cancel="cancel('showarea')" @close="close('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker> -->
|
||||||
|
<u-popup closeOnClickOverlay :show="showarea" mode="bottom" :round="10" @close="close('showarea')">
|
||||||
<!-- <u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose" width="90%" height="70%">
|
<view class="text">
|
||||||
<view class="mapcont">
|
<view class="qx" @click="close('showarea') ">{{$t('cancel')}}</view>
|
||||||
<view class="header">
|
<view class="qd" @click="arerfn">{{$t('confirm')}}</view>
|
||||||
<view class="cancel" @click="mapclose">取消</view>
|
|
||||||
<view class="title">地图位置</view>
|
|
||||||
<view class="confirm" @click="mapconfirm">确定</view>
|
|
||||||
</view>
|
|
||||||
<view class="map" id="map">
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</u-popup> -->
|
<view class="popup-content">
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<u-input
|
||||||
|
v-model="searchKeyword"
|
||||||
|
:placeholder="$t('keyword')"
|
||||||
|
@input="handleSearch"
|
||||||
|
></u-input>
|
||||||
|
|
||||||
|
<!-- 选项列表 -->
|
||||||
|
<scroll-view scroll-y class="option-list">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in filteredOptions"
|
||||||
|
:key="index"
|
||||||
|
class="option-item"
|
||||||
|
@click="handleSelect(item)"
|
||||||
|
:class="actives==item.id?'actives':''"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
<view v-if="filteredOptions.length === 0" class="no-data">
|
||||||
|
{{$t('noresults')}}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -140,7 +156,11 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mapUrl: '',
|
actives:'',
|
||||||
|
searchKeyword: "", // 搜索关键词
|
||||||
|
selectedLabel: "", // 选中的值(显示在输入框中)
|
||||||
|
filteredOptions: [], // 过滤后的数据
|
||||||
|
mapUrl: '',
|
||||||
showmap: false,
|
showmap: false,
|
||||||
showmagnitude: false,
|
showmagnitude: false,
|
||||||
showgrade: false,
|
showgrade: false,
|
||||||
@@ -259,7 +279,8 @@
|
|||||||
method:'get',
|
method:'get',
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
var list = res.data.data
|
var list = res.data.data
|
||||||
this.areaList = [list]
|
this.areaList = list
|
||||||
|
this.filteredOptions = list;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//商机
|
//商机
|
||||||
@@ -302,6 +323,31 @@
|
|||||||
this.car_type_name = val.value[0].name
|
this.car_type_name = val.value[0].name
|
||||||
this.showcartype = false
|
this.showcartype = false
|
||||||
},
|
},
|
||||||
|
// 国家搜索处理函数
|
||||||
|
handleSearch() {
|
||||||
|
if (this.searchKeyword) {
|
||||||
|
console.log(this.searchKeyword)
|
||||||
|
this.filteredOptions = this.areaList.filter((item) =>
|
||||||
|
item.name.includes(this.searchKeyword)
|
||||||
|
);
|
||||||
|
console.log(this.filteredOptions)
|
||||||
|
} else {
|
||||||
|
// 如果搜索框为空,显示全部数据
|
||||||
|
this.filteredOptions = this.areaList;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 选择选项
|
||||||
|
handleSelect(item) {
|
||||||
|
this.selectedLabel = item.name; // 回显选中的值
|
||||||
|
this.actives = item.id
|
||||||
|
console.log("选中的值:", item.id);
|
||||||
|
console.log("选中的值:", item.name);
|
||||||
|
},
|
||||||
|
arerfn(){
|
||||||
|
this.showarea = false; // 关闭弹窗
|
||||||
|
this.country_name = this.selectedLabel
|
||||||
|
this.form.country_id = this.actives
|
||||||
|
},
|
||||||
cancel(val){
|
cancel(val){
|
||||||
this[val] = false
|
this[val] = false
|
||||||
},
|
},
|
||||||
@@ -436,4 +482,46 @@
|
|||||||
height: 350px;
|
height: 350px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
.actives{
|
||||||
|
background-color: #dfdfdf;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 30px;
|
||||||
|
padding: 10px 15px 0px;
|
||||||
|
.qd{
|
||||||
|
color: #3471FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.popup-content {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-list {
|
||||||
|
max-height: 400rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item {
|
||||||
|
padding: 20rpx;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+118
-43
@@ -67,14 +67,6 @@
|
|||||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <u-line></u-line>
|
|
||||||
<view class="cell">
|
|
||||||
<view class="item">{{$t('customer.Cstomerfj')}}</view>
|
|
||||||
<view class="right select" @click="showgrade = true">
|
|
||||||
<view class="" :class="['content2', { placeholder: !grade_name }]">{{grade_name || $t('customer.Cstomerfjinput')}}</view>
|
|
||||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<u-line></u-line>
|
<u-line></u-line>
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
<view class="item">{{$t('customer.Country')}}</view>
|
<view class="item">{{$t('customer.Country')}}</view>
|
||||||
@@ -109,20 +101,37 @@
|
|||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexsj" :show="showmagnitude" @cancel="cancel('showmagnitude')" @close="close('showmagnitude')" :columns="magnitudeList" keyName="name" @confirm="magnitudeChange"></u-picker>
|
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexsj" :show="showmagnitude" @cancel="cancel('showmagnitude')" @close="close('showmagnitude')" :columns="magnitudeList" keyName="name" @confirm="magnitudeChange"></u-picker>
|
||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')":defaultIndex="defaultIndexph" :show="showcartype" @cancel="cancel('showcartype')" @close="close('showcartype')" :columns="carTypeList" keyName="name" @confirm="cartypesChange"></u-picker>
|
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')":defaultIndex="defaultIndexph" :show="showcartype" @cancel="cancel('showcartype')" @close="close('showcartype')" :columns="carTypeList" keyName="name" @confirm="cartypesChange"></u-picker>
|
||||||
<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-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-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexgj" :show="showarea" @cancel="cancel('showarea')" @close="close('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker>
|
<!-- <u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexgj" :show="showarea" @cancel="cancel('showarea')" @close="close('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker> -->
|
||||||
|
<u-popup closeOnClickOverlay :show="showarea" mode="bottom" :round="10" @close="close('showarea')">
|
||||||
<!-- <u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose">
|
<view class="text">
|
||||||
<view class="mapcont">
|
<view class="qx" @click="close('showarea') ">{{$t('cancel')}}</view>
|
||||||
<view class="header">
|
<view class="qd" @click="arerfn">{{$t('confirm')}}</view>
|
||||||
<view class="cancel" @click="mapclose">取消</view>
|
|
||||||
<view class="title">地图位置</view>
|
|
||||||
<view class="confirm" @click="mapconfirm">确定</view>
|
|
||||||
</view>
|
|
||||||
<view class="map">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</u-popup> -->
|
<view class="popup-content">
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<u-input
|
||||||
|
v-model="searchKeyword"
|
||||||
|
:placeholder="$t('keyword')"
|
||||||
|
@input="handleSearch"
|
||||||
|
></u-input>
|
||||||
|
|
||||||
|
<!-- 选项列表 -->
|
||||||
|
<scroll-view scroll-y class="option-list">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in filteredOptions"
|
||||||
|
:key="index"
|
||||||
|
class="option-item"
|
||||||
|
@click="handleSelect(item)"
|
||||||
|
:class="actives==item.id?'actives':''"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
<view v-if="filteredOptions.length === 0" class="no-data">
|
||||||
|
{{$t('noresults')}}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -133,6 +142,10 @@
|
|||||||
return {
|
return {
|
||||||
id:'',
|
id:'',
|
||||||
followList:[],
|
followList:[],
|
||||||
|
actives:'',
|
||||||
|
searchKeyword: "", // 搜索关键词
|
||||||
|
selectedLabel: "", // 选中的值(显示在输入框中)
|
||||||
|
filteredOptions: [], // 过滤后的数据
|
||||||
showmap: false,
|
showmap: false,
|
||||||
showmagnitude: false,
|
showmagnitude: false,
|
||||||
showgrade: false,
|
showgrade: false,
|
||||||
@@ -184,7 +197,6 @@
|
|||||||
var that = this
|
var that = this
|
||||||
this.getChannel()
|
this.getChannel()
|
||||||
this.getMagnitude()
|
this.getMagnitude()
|
||||||
// this.getGrade()
|
|
||||||
this.carType()
|
this.carType()
|
||||||
this.area()
|
this.area()
|
||||||
this.customerdetailfn()
|
this.customerdetailfn()
|
||||||
@@ -207,7 +219,7 @@
|
|||||||
gomap(){
|
gomap(){
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/customer/maph5'
|
url: '/pages/customer/maph5?lat='+this.form.lat+'&lng='+this.form.lng
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -224,12 +236,6 @@
|
|||||||
that.defaultIndexqd=[index]
|
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) => {
|
that.carTypeList1.forEach((item,index) => {
|
||||||
if(item.id == that.form.car_type_id){
|
if(item.id == that.form.car_type_id){
|
||||||
that.car_type_name = item.name
|
that.car_type_name = item.name
|
||||||
@@ -242,13 +248,6 @@
|
|||||||
that.defaultIndexsj=[index]
|
that.defaultIndexsj=[index]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.areaList1.forEach((item,index) => {
|
|
||||||
if(item.id == that.form.country_id){
|
|
||||||
that.country_name = item.name
|
|
||||||
that.defaultIndexgj=[index]
|
|
||||||
console.log(that.country_name)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//客户详情
|
//客户详情
|
||||||
customerdetailfn(){
|
customerdetailfn(){
|
||||||
@@ -262,6 +261,8 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
that.datas = res.data.data
|
that.datas = res.data.data
|
||||||
that.form = res.data.data
|
that.form = res.data.data
|
||||||
|
this.actives = res.data.data.country_id
|
||||||
|
this.country_name = res.data.data.country_name
|
||||||
that.select()
|
that.select()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -332,7 +333,8 @@
|
|||||||
var list = res.data.data
|
var list = res.data.data
|
||||||
this.areaList1 = list
|
this.areaList1 = list
|
||||||
this.areaList = [list]
|
this.areaList = [list]
|
||||||
this.select()
|
this.filteredOptions = list;
|
||||||
|
// this.select()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//商机
|
//商机
|
||||||
@@ -364,18 +366,46 @@
|
|||||||
this.grade_name = val.value[0].name
|
this.grade_name = val.value[0].name
|
||||||
this.showgrade = false
|
this.showgrade = false
|
||||||
},
|
},
|
||||||
//国家切换事件
|
// //国家切换事件
|
||||||
areaChange(val){
|
// areaChange(val){
|
||||||
this.form.country_id = val.value[0].id
|
// this.form.country_id = val.value[0].id
|
||||||
this.country_name = val.value[0].name
|
// this.country_name = val.value[0].name
|
||||||
this.showarea = false
|
// this.showarea = false
|
||||||
},
|
// },
|
||||||
//偏好切换事件
|
//偏好切换事件
|
||||||
cartypesChange(val){
|
cartypesChange(val){
|
||||||
this.form.car_type_id = val.value[0].id
|
this.form.car_type_id = val.value[0].id
|
||||||
this.car_type_name = val.value[0].name
|
this.car_type_name = val.value[0].name
|
||||||
this.showcartype = false
|
this.showcartype = false
|
||||||
},
|
},
|
||||||
|
// 搜索处理函数
|
||||||
|
handleSearch() {
|
||||||
|
if (this.searchKeyword) {
|
||||||
|
console.log(this.searchKeyword)
|
||||||
|
this.filteredOptions = this.areaList1.filter((item) =>
|
||||||
|
item.name.includes(this.searchKeyword)
|
||||||
|
);
|
||||||
|
console.log(this.filteredOptions)
|
||||||
|
} else {
|
||||||
|
// 如果搜索框为空,显示全部数据
|
||||||
|
this.filteredOptions = this.areaList1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 选择选项
|
||||||
|
handleSelect(item) {
|
||||||
|
this.selectedLabel = item.name; // 回显选中的值
|
||||||
|
// this.searchKeyword = item.name
|
||||||
|
this.actives = item.id
|
||||||
|
// this.showPicker = false; // 关闭弹窗
|
||||||
|
console.log("选中的值:", item.id);
|
||||||
|
console.log("选中的值:", item.name);
|
||||||
|
},
|
||||||
|
arerfn(){
|
||||||
|
this.showarea = false; // 关闭弹窗
|
||||||
|
this.country_name = this.selectedLabel
|
||||||
|
this.form.country_id = this.actives
|
||||||
|
|
||||||
|
},
|
||||||
cancel(val){
|
cancel(val){
|
||||||
this[val] = false
|
this[val] = false
|
||||||
},
|
},
|
||||||
@@ -481,4 +511,49 @@
|
|||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
margin: 15px 4%;
|
margin: 15px 4%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.actives{
|
||||||
|
background-color: #dfdfdf;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 30px;
|
||||||
|
padding: 10px 15px 0px;
|
||||||
|
.qd{
|
||||||
|
color: #3471FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.popup-content {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-list {
|
||||||
|
max-height: 400rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item {
|
||||||
|
padding: 20rpx;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+43
-54
@@ -187,11 +187,12 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log(options);
|
console.log(options);
|
||||||
|
this.getlocahost()
|
||||||
this.id = options.id;
|
this.id = options.id;
|
||||||
this.form.customer_id = options.id;
|
this.form.customer_id = options.id;
|
||||||
var that = this
|
var that = this
|
||||||
this.getGrade()
|
this.getGrade()
|
||||||
this.getlocahost()
|
|
||||||
this.customerdetailfn()
|
this.customerdetailfn()
|
||||||
this.followlistfn()
|
this.followlistfn()
|
||||||
},
|
},
|
||||||
@@ -281,62 +282,50 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getlocahost(){
|
getlocahost() {
|
||||||
// 检查定位权限
|
if (navigator.geolocation) {
|
||||||
uni.getSetting({
|
navigator.geolocation.getCurrentPosition(
|
||||||
success: (res) => {
|
(position) => {
|
||||||
if (!res.authSetting['scope.userLocation']) {
|
console.log('当前位置的经度:' + position.coords.longitude);
|
||||||
// 未授权,请求权限
|
console.log('当前位置的纬度:' + position.coords.latitude);
|
||||||
uni.authorize({
|
this.getarrd(position.coords.longitude,position.coords.latitude)
|
||||||
scope: 'scope.userLocation',
|
this.error = '';
|
||||||
success: () => {
|
console.log("获取位置成功:", position);
|
||||||
this.getlocahost();
|
},
|
||||||
},
|
(error) => {
|
||||||
fail: () => {
|
this.error = this.getErrorMessage(error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '定位权限未授权',
|
title: this.error,
|
||||||
icon: 'none',
|
icon: 'none'
|
||||||
});
|
});
|
||||||
},
|
console.error("获取位置失败:", error);
|
||||||
});
|
},
|
||||||
} else {
|
{
|
||||||
// 已授权,直接获取定位
|
enableHighAccuracy: true,
|
||||||
this.getlocahost();
|
timeout: 10000,
|
||||||
}
|
maximumAge: 0
|
||||||
},
|
}
|
||||||
});
|
);
|
||||||
|
} else {
|
||||||
|
this.error = "浏览器不支持 Geolocation API";
|
||||||
|
uni.showToast({
|
||||||
|
title: this.error,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
console.error("浏览器不支持 Geolocation API");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getlocahost(){
|
getErrorMessage(error) {
|
||||||
|
switch (error.code) {
|
||||||
var that = this
|
case error.PERMISSION_DENIED:
|
||||||
uni.getLocation({
|
return "用户拒绝了地理位置权限";
|
||||||
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
|
case error.POSITION_UNAVAILABLE:
|
||||||
success: function (res) {
|
return "无法获取当前位置";
|
||||||
console.log('当前位置的经度:' + res.longitude);
|
case error.TIMEOUT:
|
||||||
console.log('当前位置的纬度:' + res.latitude);
|
return "获取位置超时";
|
||||||
that.getarrd(res.longitude,res.latitude)
|
default:
|
||||||
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码
|
return "未知错误";
|
||||||
// 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图)
|
}
|
||||||
},
|
|
||||||
fail: function (err) {
|
|
||||||
console.log('获取位置失败:', err);
|
|
||||||
},
|
|
||||||
complete: function () {
|
|
||||||
console.log('获取位置完成');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// uni.chooseLocation({
|
|
||||||
// success: function (res) {
|
|
||||||
// console.log('位置名称:' + res.name);
|
|
||||||
// console.log('详细地址:' + res.address);
|
|
||||||
// console.log('经度:' + res.longitude);
|
|
||||||
// console.log('纬度:' + res.latitude);
|
|
||||||
// },
|
|
||||||
// fail: function (err) {
|
|
||||||
// console.log('选择位置失败:', err);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
// 跟进记录
|
// 跟进记录
|
||||||
followlistfn(){
|
followlistfn(){
|
||||||
|
|||||||
+96
-51
@@ -31,6 +31,7 @@ export default {
|
|||||||
value: '',
|
value: '',
|
||||||
// 模糊匹配数据
|
// 模糊匹配数据
|
||||||
list: [],
|
list: [],
|
||||||
|
center: { lat:'', lng:''},
|
||||||
cityInfo:{
|
cityInfo:{
|
||||||
lat: '',
|
lat: '',
|
||||||
lng: '',
|
lng: '',
|
||||||
@@ -44,7 +45,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(e) {
|
||||||
|
if(e.lat&&e.lat!=''&&e.lat!=0){
|
||||||
|
this.center.lat = e.lat
|
||||||
|
this.center.lng = e.lng
|
||||||
|
}
|
||||||
|
console.log(e)
|
||||||
this.initMap()
|
this.initMap()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -92,63 +98,102 @@ export default {
|
|||||||
});
|
});
|
||||||
that.list =[]
|
that.list =[]
|
||||||
},
|
},
|
||||||
|
getErrorMessage(error) {
|
||||||
|
switch (error.code) {
|
||||||
|
case error.PERMISSION_DENIED:
|
||||||
|
return "用户拒绝了地理位置权限";
|
||||||
|
case error.POSITION_UNAVAILABLE:
|
||||||
|
return "无法获取当前位置";
|
||||||
|
case error.TIMEOUT:
|
||||||
|
return "获取位置超时";
|
||||||
|
default:
|
||||||
|
return "未知错误";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addmapmarkfn(lat,lng){
|
||||||
|
var that = this
|
||||||
|
that.map = new google.maps.Map(document.getElementById("map"),
|
||||||
|
{
|
||||||
|
center: { lat:lat, lng: lng},
|
||||||
|
zoom: 12,// 地图缩放参数
|
||||||
|
maxZoom: 18,// 最大缩放参数
|
||||||
|
minZoom: 4,// 最小缩放参数
|
||||||
|
disableDefaultUI: true// 禁用默认UI
|
||||||
|
}
|
||||||
|
)
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: { lat:lat, lng: lng},
|
||||||
|
map: that.map,
|
||||||
|
draggable: true, // 允许拖动标记
|
||||||
|
icon: {
|
||||||
|
url: 'https://now.guua.com/attachs/default/location_shop.png',
|
||||||
|
scaledSize: new google.maps.Size(30, 30),
|
||||||
|
origin: new google.maps.Point(0, 0),
|
||||||
|
anchor: new google.maps.Point(0, 0)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 监听标记拖动事件
|
||||||
|
marker.addListener('dragend', () => {
|
||||||
|
const position = marker.getPosition();
|
||||||
|
that.map.setCenter(position);
|
||||||
|
// 根据标记位置获取地址信息
|
||||||
|
const geocoder = new google.maps.Geocoder();
|
||||||
|
geocoder.geocode({ location: position }, (results, status) => {
|
||||||
|
if (status === 'OK' && results[0]) {
|
||||||
|
console.log(results)
|
||||||
|
console.log(position)
|
||||||
|
that.cityInfo.address = results[0].formatted_address;
|
||||||
|
that.cityInfo.lat = position.lat();
|
||||||
|
that.cityInfo.lng = position.lng();
|
||||||
|
that.value = results[0].formatted_address;
|
||||||
|
console.log(that.cityInfo)
|
||||||
|
} else {
|
||||||
|
alert('无法获取地址信息');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
initMap() {
|
initMap() {
|
||||||
var that = this
|
var that = this
|
||||||
loader
|
loader
|
||||||
.load()
|
.load()
|
||||||
.then((google) => {
|
.then((google) => {
|
||||||
uni.getLocation({
|
if(this.center.lat!=''){
|
||||||
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
|
that.addmapmarkfn(parseFloat(this.center.lat),parseFloat(this.center.lng))
|
||||||
success: function (res) {
|
}else{
|
||||||
console.log(res)
|
if (navigator.geolocation) {
|
||||||
that.map = new google.maps.Map(document.getElementById("map"),
|
navigator.geolocation.getCurrentPosition(
|
||||||
{
|
(position) => {
|
||||||
center: { lat:res.latitude, lng: res.longitude},
|
console.log('当前位置的经度:' + position.coords.longitude);
|
||||||
zoom: 12,// 地图缩放参数
|
console.log('当前位置的纬度:' + position.coords.latitude);
|
||||||
maxZoom: 18,// 最大缩放参数
|
that.addmapmarkfn(position.coords.latitude,position.coords.longitude)
|
||||||
minZoom: 4,// 最小缩放参数
|
this.error = '';
|
||||||
disableDefaultUI: true// 禁用默认UI
|
console.log("获取位置成功:", position);
|
||||||
}
|
},
|
||||||
)
|
(error) => {
|
||||||
var marker = new google.maps.Marker({
|
this.error = this.getErrorMessage(error);
|
||||||
position: { lat:res.latitude, lng: res.longitude},
|
uni.showToast({
|
||||||
map: that.map,
|
title: this.error,
|
||||||
draggable: true, // 允许拖动标记
|
icon: 'none'
|
||||||
icon: {
|
});
|
||||||
url: 'https://now.guua.com/attachs/default/location_shop.png',
|
console.error("获取位置失败:", error);
|
||||||
scaledSize: new google.maps.Size(30, 30),
|
},
|
||||||
origin: new google.maps.Point(0, 0),
|
{
|
||||||
anchor: new google.maps.Point(0, 0)
|
enableHighAccuracy: true,
|
||||||
|
timeout: 10000,
|
||||||
|
maximumAge: 0
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.error = "浏览器不支持 Geolocation API";
|
||||||
|
uni.showToast({
|
||||||
|
title: this.error,
|
||||||
|
icon: 'none'
|
||||||
});
|
});
|
||||||
// 监听标记拖动事件
|
console.error("浏览器不支持 Geolocation API");
|
||||||
marker.addListener('dragend', () => {
|
}
|
||||||
const position = marker.getPosition();
|
}
|
||||||
that.map.setCenter(position);
|
|
||||||
// 根据标记位置获取地址信息
|
|
||||||
const geocoder = new google.maps.Geocoder();
|
|
||||||
geocoder.geocode({ location: position }, (results, status) => {
|
|
||||||
if (status === 'OK' && results[0]) {
|
|
||||||
console.log(results)
|
|
||||||
console.log(position)
|
|
||||||
that.cityInfo.address = results[0].formatted_address;
|
|
||||||
that.cityInfo.lat = position.lat();
|
|
||||||
that.cityInfo.lng = position.lng();
|
|
||||||
that.value = results[0].formatted_address;
|
|
||||||
console.log(that.cityInfo)
|
|
||||||
} else {
|
|
||||||
alert('无法获取地址信息');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: function (err) {
|
|
||||||
console.log('获取位置失败:', err);
|
|
||||||
},
|
|
||||||
complete: function () {
|
|
||||||
console.log('获取位置完成');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tabsbg">
|
<view class="tabsbg">
|
||||||
<u-tabs :list="list1" lineColor="#fff" :scrollable="false" @click="tabclick" :inactiveStyle="{color: '#fff'}" :activeStyle="{color: '#fff',fontWeight: 'bold',transform: 'scale(1.05)'}"></u-tabs>
|
<u-tabs :list="list1" :current="current" lineColor="#fff" :scrollable="false" @click="tabclick" :inactiveStyle="{color: '#fff'}" :activeStyle="{color: '#fff',fontWeight: '500',transform: 'scale(1.05)'}"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<view class="">{{item.created_at}}</view>
|
<view class="">{{item.created_at}}</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<text class="medal" :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text>
|
<text class="medal" :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text>
|
||||||
<text class="tag" :style="{background:(item.follow == 0 ?'#3471FF' : item.follow == 1 ?'#27C89C': '#FF4040')}">{{item.follow_txt}}</text>
|
<text class="tag" :style="{background:(item.follow == 0 ?'#3471FF' : item.follow == 1 ?'#27C89C': '#FF4040')}">{{item.follow==0?$t('followup'):item.follow==1?$t('deal'):$t('lost')}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-line margin="20rpx 0px"></u-line>
|
<u-line margin="20rpx 0px"></u-line>
|
||||||
@@ -82,6 +82,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
current:0,
|
||||||
options1: [],
|
options1: [],
|
||||||
x: 300, //x坐标
|
x: 300, //x坐标
|
||||||
y: 550, //y坐标
|
y: 550, //y坐标
|
||||||
@@ -96,7 +97,14 @@
|
|||||||
datalist:[],
|
datalist:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(e) {
|
||||||
|
console.log(e)
|
||||||
|
if(e.tab){
|
||||||
|
this.follow=e.tab - 1
|
||||||
|
this.current = e.tab
|
||||||
|
this.datalist=[]
|
||||||
|
this.queryList(1, 10)
|
||||||
|
}
|
||||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
|
||||||
this.x = windowWidth-70
|
this.x = windowWidth-70
|
||||||
this.y = windowHeight-55
|
this.y = windowHeight-55
|
||||||
@@ -138,6 +146,18 @@
|
|||||||
id: 2
|
id: 2
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 0,
|
||||||
|
text: this.$t('tabbar.home')
|
||||||
|
})
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
text: this.$t('tabbar.customer')
|
||||||
|
})
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 2,
|
||||||
|
text: this.$t('tabbar.mine')
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchCli(){
|
searchCli(){
|
||||||
@@ -163,6 +183,7 @@
|
|||||||
}else{
|
}else{
|
||||||
this.follow=e.index - 1
|
this.follow=e.index - 1
|
||||||
}
|
}
|
||||||
|
this.datalist=[]
|
||||||
this.queryList(1, 10)
|
this.queryList(1, 10)
|
||||||
},
|
},
|
||||||
//客户列表数据
|
//客户列表数据
|
||||||
|
|||||||
+12
-3
@@ -35,15 +35,15 @@
|
|||||||
<text class="grid-num">{{statisticsdata.follow}}</text>
|
<text class="grid-num">{{statisticsdata.follow}}</text>
|
||||||
<text class="grid-text">{{$t('home.addgj')}}</text>
|
<text class="grid-text">{{$t('home.addgj')}}</text>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item>
|
<u-grid-item @click="custormerfn(1)">
|
||||||
<text class="grid-num">{{statisticsdata.customer_init}}</text>
|
<text class="grid-num">{{statisticsdata.customer_init}}</text>
|
||||||
<text class="grid-text">{{$t('followup')}}</text>
|
<text class="grid-text">{{$t('followup')}}</text>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item>
|
<u-grid-item @click="custormerfn(2)">
|
||||||
<text class="grid-num">{{statisticsdata.customero_fllow}}</text>
|
<text class="grid-num">{{statisticsdata.customero_fllow}}</text>
|
||||||
<text class="grid-text">{{$t('deal')}}</text>
|
<text class="grid-text">{{$t('deal')}}</text>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
<u-grid-item>
|
<u-grid-item @click="custormerfn(3)">
|
||||||
<text class="grid-num">{{statisticsdata.customer_deal}}</text>
|
<text class="grid-num">{{statisticsdata.customer_deal}}</text>
|
||||||
<text class="grid-text">{{$t('lost')}}</text>
|
<text class="grid-text">{{$t('lost')}}</text>
|
||||||
</u-grid-item>
|
</u-grid-item>
|
||||||
@@ -91,6 +91,9 @@
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
uni.removeStorageSync('location')
|
uni.removeStorageSync('location')
|
||||||
// this.getcustomerlist()
|
// this.getcustomerlist()
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
uni.setTabBarItem({
|
uni.setTabBarItem({
|
||||||
index: 0,
|
index: 0,
|
||||||
text: this.$t('tabbar.home')
|
text: this.$t('tabbar.home')
|
||||||
@@ -125,6 +128,12 @@
|
|||||||
cancellang() {
|
cancellang() {
|
||||||
this.showlang = false
|
this.showlang = false
|
||||||
},
|
},
|
||||||
|
//数据简报点击事件
|
||||||
|
custormerfn(item){
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/customer?tab='+item,// 替换为你要跳转的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
//语言切换事件
|
//语言切换事件
|
||||||
confirmlang(e) {
|
confirmlang(e) {
|
||||||
uni.setLocale(e.value[0].id)
|
uni.setLocale(e.value[0].id)
|
||||||
|
|||||||
+23
-10
@@ -18,7 +18,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="minemp">
|
<view class="minemp">
|
||||||
<view class="mineid">ID:{{userinfo.sn}}</view>
|
<view class="mineid">ID:{{userinfo.sn}}</view>
|
||||||
<!-- <view class="mp" @click="gomymp">{{$t('auth')}}</view> -->
|
<view class="mp" @click="gomymp">{{$t('navbar.businesscard')}}</view>
|
||||||
<!-- <view v-if="!isopenid" class="mp" @click="gomyauth">{{$t('auth')}}</view> -->
|
<!-- <view v-if="!isopenid" class="mp" @click="gomyauth">{{$t('auth')}}</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="sonContent" v-if="!isopenid" @click="gomyauth">
|
<view class="sonContent" v-if="!isopenid" @click="gomyauth">
|
||||||
<image class="son-img-bg" style="width: 30px; height: 30px;" src="/static/image/login/fenshu.png"></image>
|
<image class="son-img-bg" src="/static/image/mine/icon9.png"></image>
|
||||||
<span>{{$t('auth')}}</span>
|
<span>{{$t('auth')}}</span>
|
||||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@@ -64,11 +64,11 @@
|
|||||||
<span>{{$t('mine.logoff')}}</span>
|
<span>{{$t('mine.logoff')}}</span>
|
||||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <view class="sonContent" @click="navTo('/pages/mine/recyclebin')">
|
<view class="sonContent" @click="navTo('/pages/mine/recyclebin')">
|
||||||
<image class="son-img-bg" src="/static/image/mine/icon8.png"></image>
|
<image class="son-img-bg" src="/static/image/mine/icon8.png"></image>
|
||||||
<span>{{$t('mine.recyclebin')}}</span>
|
<span>{{$t('mine.recyclebin')}}</span>
|
||||||
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
<uni-icons type="right" class="icon" size="18"></uni-icons>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<view class="sonContent" @click="logout">
|
<view class="sonContent" @click="logout">
|
||||||
<image class="son-img-bg" src="/static/image/mine/icon7.png"></image>
|
<image class="son-img-bg" src="/static/image/mine/icon7.png"></image>
|
||||||
@@ -109,7 +109,20 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 0,
|
||||||
|
text: this.$t('tabbar.home')
|
||||||
|
})
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
text: this.$t('tabbar.customer')
|
||||||
|
})
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 2,
|
||||||
|
text: this.$t('tabbar.mine')
|
||||||
|
})
|
||||||
this.getuserinfo()
|
this.getuserinfo()
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getuserinfo(){
|
getuserinfo(){
|
||||||
@@ -127,7 +140,7 @@
|
|||||||
},
|
},
|
||||||
gomymp(){
|
gomymp(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/mine/webview'
|
url: '/pages/mine/businesscard'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gomyauth(){
|
gomyauth(){
|
||||||
@@ -215,14 +228,14 @@
|
|||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height:44px;
|
height:44px;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
height:30px;
|
height:34px;
|
||||||
}
|
}
|
||||||
.content{
|
.content{
|
||||||
padding:10px 15px 15px;
|
padding:10px 15px 15px;
|
||||||
.contop{
|
.contop{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0px 0px 30px;
|
// margin: 0px 0px 30px;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
color: white;
|
color: white;
|
||||||
.right{
|
.right{
|
||||||
@@ -244,7 +257,7 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #3471FF;
|
color: #3471FF;
|
||||||
padding: 1px 15px;
|
padding: 0px 12px;
|
||||||
border-radius: 5px 15px 15px 15px;
|
border-radius: 5px 15px 15px 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -283,7 +296,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
margin-top: 13%;
|
||||||
.sonTitle {
|
.sonTitle {
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
@@ -316,7 +329,7 @@
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 45%;
|
top: 50%;
|
||||||
margin-top: -20rpx;
|
margin-top: -20rpx;
|
||||||
left: 12px;
|
left: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000"
|
||||||
|
backgroundColor="#fff" :statusBar="true" :title="$t('navbar.businesscard')"></uni-nav-bar>
|
||||||
|
<view class="card">
|
||||||
|
<view class="img_top" ref="poster" id="poster">
|
||||||
|
<view class="name">
|
||||||
|
<view>刘亦菲</view>
|
||||||
|
<view>业务经理</view>
|
||||||
|
<view>13838225452</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="code" :class=" activeImg === share_one ? 'code_one' : activeImg === share_two ? 'code_two' : activeImg === share_three ? 'code_three' : 'code_one'">
|
||||||
|
<qrcode-vue :value="codeUrl" :size="70"></qrcode-vue>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="foot">
|
||||||
|
<button class="btn" @click="goDown">{{$t('submit')}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { request,showToast } from '@/api/apiT.js'
|
||||||
|
import html2canvas from 'html2canvas';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveImgFile(baseImg){
|
||||||
|
const bitmap = new plus.nativeObj.Bitmap('test')
|
||||||
|
bitmap.loadBase64Data(
|
||||||
|
baseImg,
|
||||||
|
function () {
|
||||||
|
const url = '_doc/' + new Date().getTime() + '.png' // url为时间戳命名方式
|
||||||
|
bitmap.save(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
overwrite: true // 是否覆盖
|
||||||
|
},
|
||||||
|
i => {
|
||||||
|
plus.gallery.save(
|
||||||
|
i.target,
|
||||||
|
function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: '图片保存至相册成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
bitmap.clear()
|
||||||
|
},
|
||||||
|
function (e) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '图片保存至相册失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
// console.log('图片保存至相册失败:' + JSON.stringify(e))
|
||||||
|
bitmap.clear()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '图片保存失败1',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
bitmap.clear()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '图片保存失败2',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
bitmap.clear()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
downloadImage(url, filename) {
|
||||||
|
// 创建一个隐藏的 <a> 标签
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.download = filename;
|
||||||
|
// 触发点击事件
|
||||||
|
link.click();
|
||||||
|
},
|
||||||
|
goDown(){
|
||||||
|
const element = document.getElementById('poster');
|
||||||
|
var that= this
|
||||||
|
html2canvas(element, {
|
||||||
|
backgroundColor: '#f5f5f5', //海报的背景颜色
|
||||||
|
useCORS: true // 允许跨域
|
||||||
|
}).then(canvas => {
|
||||||
|
// canvas 其实就是我们所讲的res 的意思 返回报文的意思
|
||||||
|
let baseImg = canvas.toDataURL('image/png')
|
||||||
|
uni.showModal({
|
||||||
|
title: '下载名片',
|
||||||
|
content: '确定下载当前名片图至相册嘛',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.downloadImage(baseImg, 'screenshot.png');
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.card{
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.img_top{
|
||||||
|
background-image: url('/static/image/mine/cardbg.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
width:690rpx;
|
||||||
|
height:1060rpx;
|
||||||
|
border-radius: 15px;
|
||||||
|
.name{
|
||||||
|
position: absolute;
|
||||||
|
top: 20%;
|
||||||
|
left: 10%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.foot{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0px;
|
||||||
|
width: 100%;
|
||||||
|
height: 90px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
background: linear-gradient(to right, #3471FF, #6776FF);
|
||||||
|
color: white;
|
||||||
|
border-radius: 50px;
|
||||||
|
width: 92%;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
margin: 15px 4%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+109
-19
@@ -57,7 +57,7 @@
|
|||||||
<u-divider text=""></u-divider>
|
<u-divider text=""></u-divider>
|
||||||
<view class="cell1">
|
<view class="cell1">
|
||||||
<view class="item">{{$t('customer.Country')}}</view>
|
<view class="item">{{$t('customer.Country')}}</view>
|
||||||
<view class="right select" @click="showarea = true">
|
<view class="right select" @click="showPicker = true">
|
||||||
<view class="" :class="['content2', { placeholder: !country_name }]">{{country_name || $t('customer.Countryinput')}}</view>
|
<view class="" :class="['content2', { placeholder: !country_name }]">{{country_name || $t('customer.Countryinput')}}</view>
|
||||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -66,16 +66,52 @@
|
|||||||
<view class="foot">
|
<view class="foot">
|
||||||
<button class="btn" @click="bcFn">{{$t('save')}}</button>
|
<button class="btn" @click="bcFn">{{$t('save')}}</button>
|
||||||
</view>
|
</view>
|
||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexgj" :show="showarea" @cancel="cancel('showarea')" @close="close('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker>
|
|
||||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexgs" :show="showcomp" @cancel="cancel('showcomp')" @close="close('showcomp')" :columns="company" keyName="name" @confirm="companyChange"></u-picker>
|
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexgs" :show="showcomp" @cancel="cancel('showcomp')" @close="close('showcomp')" :columns="company" keyName="name" @confirm="companyChange"></u-picker>
|
||||||
|
|
||||||
|
<u-popup closeOnClickOverlay :show="showPicker" mode="bottom" :round="10" @close="close('showPicker')">
|
||||||
|
<view class="text">
|
||||||
|
<view class="qx" @click="close('showPicker') ">{{$t('cancel')}}</view>
|
||||||
|
<view class="qd" @click="arerfn">{{$t('confirm')}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="popup-content">
|
||||||
|
<!-- 搜索框 -->
|
||||||
|
<u-input
|
||||||
|
v-model="searchKeyword"
|
||||||
|
:placeholder="$t('keyword')"
|
||||||
|
@input="handleSearch"
|
||||||
|
></u-input>
|
||||||
|
|
||||||
|
<!-- 选项列表 -->
|
||||||
|
<scroll-view scroll-y class="option-list">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in filteredOptions"
|
||||||
|
:key="index"
|
||||||
|
class="option-item"
|
||||||
|
@click="handleSelect(item)"
|
||||||
|
:class="actives==item.id?'actives':''"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
<view v-if="filteredOptions.length === 0" class="no-data">
|
||||||
|
{{$t('noresults')}}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick } from "vue"
|
||||||
import { request,showToast } from '@/api/apiT.js'
|
import { request,showToast } from '@/api/apiT.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loca:uni.getLocale(),
|
||||||
|
actives:'',
|
||||||
|
showPicker: false, // 控制选择器显示
|
||||||
|
searchKeyword: "", // 搜索关键词
|
||||||
|
selectedLabel: "", // 选中的值(显示在输入框中)
|
||||||
|
filteredOptions: [], // 过滤后的数据
|
||||||
showarea: false,
|
showarea: false,
|
||||||
showcomp: false,
|
showcomp: false,
|
||||||
country_name:'',
|
country_name:'',
|
||||||
@@ -83,8 +119,6 @@
|
|||||||
areaList:[],
|
areaList:[],
|
||||||
defaultIndexgj:[0],
|
defaultIndexgj:[0],
|
||||||
company_name:'',
|
company_name:'',
|
||||||
company:[],
|
|
||||||
company1:[],
|
|
||||||
defaultIndexgs:[0],
|
defaultIndexgs:[0],
|
||||||
imageStyles: {
|
imageStyles: {
|
||||||
border: true,
|
border: true,
|
||||||
@@ -99,6 +133,34 @@
|
|||||||
this.getinfo()
|
this.getinfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 搜索处理函数
|
||||||
|
handleSearch() {
|
||||||
|
var that = this
|
||||||
|
if (this.searchKeyword) {
|
||||||
|
console.log(this.searchKeyword)
|
||||||
|
this.filteredOptions = this.areaList1.filter((item) => item.name.includes(this.searchKeyword));
|
||||||
|
|
||||||
|
console.log(this.filteredOptions)
|
||||||
|
} else {
|
||||||
|
// 如果搜索框为空,显示全部数据
|
||||||
|
this.filteredOptions = this.areaList1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 选择选项
|
||||||
|
handleSelect(item) {
|
||||||
|
this.selectedLabel = item.name; // 回显选中的值
|
||||||
|
// this.searchKeyword = item.name
|
||||||
|
this.actives = item.id
|
||||||
|
// this.showPicker = false; // 关闭弹窗
|
||||||
|
console.log("选中的值:", item.id);
|
||||||
|
console.log("选中的值:", item.name);
|
||||||
|
},
|
||||||
|
arerfn(){
|
||||||
|
this.showPicker = false; // 关闭弹窗
|
||||||
|
this.country_name = this.selectedLabel
|
||||||
|
this.userinfo.country_id = this.actives
|
||||||
|
|
||||||
|
},
|
||||||
getinfo(){
|
getinfo(){
|
||||||
var that= this;
|
var that= this;
|
||||||
request({
|
request({
|
||||||
@@ -109,19 +171,13 @@
|
|||||||
res.data.data.position=''
|
res.data.data.position=''
|
||||||
}
|
}
|
||||||
that.userinfo = res.data.data;
|
that.userinfo = res.data.data;
|
||||||
|
this.actives = res.data.data.country_id
|
||||||
|
this.country_name = res.data.data.country_name
|
||||||
that.select1()
|
that.select1()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
select1(){
|
select1(){
|
||||||
var that=this;
|
var that=this;
|
||||||
that.areaList1.forEach((item,index) => {
|
|
||||||
if(item.id == that.userinfo.country_id){
|
|
||||||
that.country_name = item.name
|
|
||||||
that.defaultIndexgj=[index]
|
|
||||||
console.log(that.country_name)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
that.company1.forEach((item,index) => {
|
that.company1.forEach((item,index) => {
|
||||||
if(item.id == that.userinfo.sign){
|
if(item.id == that.userinfo.sign){
|
||||||
that.company_name = item.name
|
that.company_name = item.name
|
||||||
@@ -129,12 +185,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//国家切换事件
|
|
||||||
areaChange(val){
|
|
||||||
this.userinfo.country_id = val.value[0].id
|
|
||||||
this.country_name = val.value[0].name
|
|
||||||
this.showarea = false
|
|
||||||
},
|
|
||||||
//国家
|
//国家
|
||||||
area(){
|
area(){
|
||||||
request({
|
request({
|
||||||
@@ -143,7 +193,7 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
var list = res.data.data
|
var list = res.data.data
|
||||||
this.areaList1 = list
|
this.areaList1 = list
|
||||||
this.areaList = [list]
|
this.filteredOptions = list;
|
||||||
this.select1()
|
this.select1()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -311,4 +361,44 @@
|
|||||||
height: 35px;
|
height: 35px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
.actives{
|
||||||
|
background-color: #dfdfdf;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 30px;
|
||||||
|
padding: 10px 15px 0px;
|
||||||
|
.qd{
|
||||||
|
color: #3471FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.popup-content {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-list {
|
||||||
|
max-height: 400rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item {
|
||||||
|
padding: 20rpx;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+36
-55
@@ -7,25 +7,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<view class="contents" >
|
<view class="contents" >
|
||||||
<view class="colls" v-for="(item, index) in datalist" :key="index" >
|
<view class="colls" v-for="(item, index) in datalist" :key="index" >
|
||||||
<view class="" @click="detileClick(item)">
|
<view class="cont">
|
||||||
<view class="top">
|
<view class=""><text class="name">{{item.contacts}}</text><text>{{item.phone}}</text></view>
|
||||||
<view class="name">{{item.contacts}}</view>
|
<view class="btn" @click="restoreFn(item)"><text> {{$t('mine.restore')}}</text></view>
|
||||||
<view class="right">
|
|
||||||
<text class="medal" :style="{color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<u-line margin="20rpx 0px" color="#fff" :hairline="false"></u-line>
|
|
||||||
<view class="cont">
|
|
||||||
<view class="title">
|
|
||||||
<view class=""><text class="name">{{item.phone}}</text></view>
|
|
||||||
<view class="ststus">{{item.grade_txt}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="info"><text class="sex">{{item.sex_txt}}</text> | <text class="addr">{{item.country_name}}</text><text class="type">{{item.car_type_name}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="edt">
|
|
||||||
<view class="btn" @click="editFn"><text> {{$t('mine.restore')}}</text></view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -51,6 +35,7 @@
|
|||||||
data: {
|
data: {
|
||||||
page:pageNo,
|
page:pageNo,
|
||||||
per_page:10,
|
per_page:10,
|
||||||
|
recycle:'recycle'
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res.data)
|
console.log(res.data)
|
||||||
@@ -58,15 +43,38 @@
|
|||||||
var datas = res.data.data.list;
|
var datas = res.data.data.list;
|
||||||
this.$refs.paging.complete(datas);
|
this.$refs.paging.complete(datas);
|
||||||
}else{
|
}else{
|
||||||
// this.$refs.paging.complete(null);
|
|
||||||
// that.listlength=0
|
|
||||||
}
|
}
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
detileClick(item){
|
restoreFn(item){
|
||||||
uni.navigateTo({
|
var that=this
|
||||||
url: '/pages/mine/recyclebindetil?id='+item.id
|
uni.showModal({
|
||||||
|
title: this.$t('prompt'),
|
||||||
|
content: this.$t('restoremsg'),
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
request({
|
||||||
|
url:'customer/restore',
|
||||||
|
method:'post',
|
||||||
|
data: {
|
||||||
|
id:item.id,
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.data.message,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
if(res.data.code ==0){
|
||||||
|
setTimeout(() => {
|
||||||
|
that.queryList(1, 10)
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,39 +103,12 @@
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.cont{
|
.cont{
|
||||||
padding: 0px 15px 10px;
|
padding: 15px 12px;
|
||||||
font-size: 24rpx;
|
font-size: 28rpx;
|
||||||
.title{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
color: #222222;
|
|
||||||
}
|
|
||||||
.ststus{
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
.info,.desc{
|
|
||||||
color: #78758E;
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
.sex{
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
.addr{
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.type{
|
|
||||||
margin-left: 5px;
|
|
||||||
color: #3471FF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.edt{
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: right;
|
align-items: center;
|
||||||
padding-bottom: 10px;
|
justify-content: space-between;
|
||||||
padding-right: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn{
|
.btn{
|
||||||
background: linear-gradient(to right, #3471FF, #6776FF);
|
background: linear-gradient(to right, #3471FF, #6776FF);
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
@@ -1,333 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('details')"></uni-nav-bar>
|
|
||||||
<view class="content">
|
|
||||||
<view class="contents" >
|
|
||||||
<view class="top">
|
|
||||||
<view class="name">{{datas.contacts}}</view>
|
|
||||||
<view class="right">
|
|
||||||
<text class="medal" :style="{color:(datas.magnitude == 0 ?'#F5AB00' : datas.magnitude == 1 ?'#8495B8': '#9B7200')}">{{datas.magnitude_txt}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<u-line margin="20rpx 0px" color="#fff" :hairline="false"></u-line>
|
|
||||||
<view class="cont">
|
|
||||||
<view class="title">
|
|
||||||
<view class=""><text class="name">{{datas.phone}}</text></view>
|
|
||||||
<view class="ststus">渠道:{{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>
|
|
||||||
</view>
|
|
||||||
<view class="cell">
|
|
||||||
<view class="item">{{$t('customer.Cstomerfj')}}</view>
|
|
||||||
<view class="right select">
|
|
||||||
<view class="" :class="['content2', { placeholder: !datas.grade_txt }]">{{datas.grade_txt || $t('customer.Cstomerfjinput')}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<u-gap height="10" bgColor="#F6F6F6"></u-gap>
|
|
||||||
<view class="steps">
|
|
||||||
<view class="title">
|
|
||||||
<view class="">
|
|
||||||
{{$t('customer.followrecord')}} <text class="status" :style="{color:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow_txt}}</text>
|
|
||||||
</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">
|
|
||||||
<view slot="desc" class="desc">
|
|
||||||
<view class="" v-if="item.type==0">
|
|
||||||
<view class="">
|
|
||||||
<view class="">
|
|
||||||
{{$t('times')}} :{{item.created_at}}
|
|
||||||
</view>
|
|
||||||
<view class="">{{$t('address')}}:{{item.address}}</view>
|
|
||||||
<view class="">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<image :src="item.oss_picture" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="" v-else>
|
|
||||||
<view class="">
|
|
||||||
{{$t('times')}}:{{item.created_at}}
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<image :src="item.oss_picture" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-steps-item>
|
|
||||||
</u-steps>
|
|
||||||
<empty :list="followList"></empty>
|
|
||||||
</view>
|
|
||||||
<view class="zw"></view>
|
|
||||||
<view class="foot">
|
|
||||||
<button class="btn" @click="nextFn">{{$t('mine.restore')}}</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { request,showToast } from '@/api/apiT.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
id:'',
|
|
||||||
followList:[],
|
|
||||||
grade_name:'',
|
|
||||||
form: {
|
|
||||||
grade:'',
|
|
||||||
},
|
|
||||||
datas:''
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
console.log(options);
|
|
||||||
this.id = options.id;
|
|
||||||
var that = this
|
|
||||||
this.customerdetailfn()
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.followlistfn()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
leftClick(){
|
|
||||||
uni.navigateBack({})
|
|
||||||
},
|
|
||||||
gomap(){
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/customer/map'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//客户详情
|
|
||||||
customerdetailfn(){
|
|
||||||
var that=this;
|
|
||||||
request({
|
|
||||||
url:'customer/detail',
|
|
||||||
method:'get',
|
|
||||||
data: {
|
|
||||||
id:this.id,
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
that.datas = res.data.data
|
|
||||||
that.form = res.data.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 跟进记录
|
|
||||||
followlistfn(){
|
|
||||||
request({
|
|
||||||
url:'follow/list',
|
|
||||||
method:'get',
|
|
||||||
data: {
|
|
||||||
customer_id:this.id,
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
this.followList = res.data.data
|
|
||||||
console.log(res.data.data)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
nextFn(){
|
|
||||||
// request({
|
|
||||||
// url:'customer/save',
|
|
||||||
// method:'post',
|
|
||||||
// data:this.form
|
|
||||||
// }).then(res => {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: res.data.message,
|
|
||||||
// icon: 'none'
|
|
||||||
// });
|
|
||||||
// if(res.data.code ==0){
|
|
||||||
// setTimeout(() => {
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url: '/pages/index/customer',// 替换为你要跳转的页面路径
|
|
||||||
// });
|
|
||||||
// }, 1000);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.u-m-lr-10{
|
|
||||||
margin: 0px 10px;
|
|
||||||
}
|
|
||||||
.placeholder {
|
|
||||||
color: #999; /* 占位符颜色 */
|
|
||||||
}
|
|
||||||
textarea {
|
|
||||||
min-height: 200rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
|
|
||||||
margin-top: 15px;
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
.red{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
.zw{
|
|
||||||
height: 120px;
|
|
||||||
}
|
|
||||||
.uniui-right{
|
|
||||||
position: absolute;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
.cell{
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
justify-content:space-between;
|
|
||||||
padding: 18px 20px;
|
|
||||||
align-items: center;
|
|
||||||
font-weight: 500;
|
|
||||||
.item{
|
|
||||||
width: 90px;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
background: #f6f6f6;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
.arrowright{
|
|
||||||
margin-right: -15px;
|
|
||||||
}
|
|
||||||
.right{
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
.select{
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
.content{
|
|
||||||
padding: 10px 15px;
|
|
||||||
background: #FFFFFF;
|
|
||||||
.contents{
|
|
||||||
background-color:#F6F6F6;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
.edt{
|
|
||||||
display: flex;
|
|
||||||
justify-content: right;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
image{
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
margin-right: 5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn{
|
|
||||||
color: #3471FF;
|
|
||||||
text-align: right;
|
|
||||||
padding: 0px 15px 0px;
|
|
||||||
}
|
|
||||||
.top{
|
|
||||||
padding: 10px 15px 0px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
.tag{
|
|
||||||
color: white;
|
|
||||||
border-radius: 20px 0px 0px 20px;
|
|
||||||
padding: 3px 10px;
|
|
||||||
margin-right: -15px;
|
|
||||||
}
|
|
||||||
.right{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.name{
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
.cont{
|
|
||||||
padding: 0px 15px 10px;
|
|
||||||
font-size: 24rpx;
|
|
||||||
|
|
||||||
.title{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
color: #222222;
|
|
||||||
}
|
|
||||||
.ststus{
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
.info,.desc{
|
|
||||||
color: #78758E;
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
.sex{
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
.addr{
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.type{
|
|
||||||
margin-left: 5px;
|
|
||||||
color: #3471FF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.steps{
|
|
||||||
padding: 15px;
|
|
||||||
background: #fff;
|
|
||||||
image{
|
|
||||||
width: 44px;
|
|
||||||
height:44px;
|
|
||||||
}
|
|
||||||
.desc{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
.title{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
color: #666666;
|
|
||||||
font-size: 32rpx;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
.status{
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.btnjl{
|
|
||||||
background: linear-gradient(to right, #3471FF, #6776FF);
|
|
||||||
color: white;
|
|
||||||
padding: 4px 10px;
|
|
||||||
border-radius: 20px;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.foot{
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0px;
|
|
||||||
width: 100%;
|
|
||||||
height: 160rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.btn{
|
|
||||||
background: linear-gradient(to right, #3471FF, #6776FF);
|
|
||||||
color: white;
|
|
||||||
border-radius: 50px;
|
|
||||||
width: 92%;
|
|
||||||
margin-bottom: 40px;
|
|
||||||
margin: 15px 4%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 936 B |
Reference in New Issue
Block a user