地图页面 及页面加语言编译
This commit is contained in:
+101
-47
@@ -1,103 +1,103 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" title="客户资料"></uni-nav-bar>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('customer.customerinfo')"></uni-nav-bar>
|
||||
<view class="content">
|
||||
<view class="cell">
|
||||
<view>渠道</view>
|
||||
<view>{{$t('customer.CustomerChannel')}}</view>
|
||||
<view class="right select" @click="showchannel = true">
|
||||
<input placeholder="选择渠道" disabled v-model="channel_name" />
|
||||
<input :placeholder="$t('customer.CustomerChannelinput')" disabled v-model="channel_name" />
|
||||
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexqd" :show="showchannel" @cancel="cancel('showchannel')" :columns="channelList" keyName="name" @confirm="channelChange"></u-picker>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>客户商机</view>
|
||||
<view>{{$t('customer.Medal')}}</view>
|
||||
<view class="right select" @click="showmagnitude = true">
|
||||
<input placeholder="选择客户商机" disabled v-model="magnitude_name" />
|
||||
<input :placeholder="$t('customer.Medalinput')" disabled v-model="magnitude_name" />
|
||||
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexsj" :show="showmagnitude" @cancel="cancel('showmagnitude')" :columns="magnitudeList" keyName="name" @confirm="magnitudeChange"></u-picker>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>客户名称 <text class="red">*</text></view>
|
||||
<view>{{$t('customer.CustomerName')}} <text class="red">*</text></view>
|
||||
<view class="right">
|
||||
<input placeholder="输入名称" v-model="form.contacts" />
|
||||
<input :placeholder="$t('customer.CustomerNameinput')" v-model="form.contacts" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>性别</view>
|
||||
<view>{{$t('gender')}}</view>
|
||||
<view class="right">
|
||||
<u-radio-group v-model="form.sex">
|
||||
<u-radio name="0">未知</u-radio>
|
||||
<u-radio name="1">男</u-radio>
|
||||
<u-radio name="2">女</u-radio>
|
||||
<u-radio name="0">{{$t('gender0')}}</u-radio>
|
||||
<u-radio name="1">{{$t('gender1')}}</u-radio>
|
||||
<u-radio name="2">{{$t('gender2')}}</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>联系方式 <text class="red">*</text></view>
|
||||
<view>{{$t('customer.lxcall')}} <text class="red">*</text></view>
|
||||
<view class="right">
|
||||
<input placeholder="输入联系方式" v-model="form.phone" />
|
||||
<input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>Email</view>
|
||||
<view class="right">
|
||||
<input placeholder="输入Email" v-model="form.email" />
|
||||
<input :placeholder="$t('customer.Emailinput')" v-model="form.email" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>WhatsApp</view>
|
||||
<view class="right">
|
||||
<input placeholder="输入WhatsApp" v-model="form.WhatsApp" />
|
||||
<input :placeholder="$t('customer.WhatsAppinput')" v-model="form.WhatsApp" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>客户偏好</view>
|
||||
<view>{{$t('customer.Customerph')}}</view>
|
||||
<view class="right select" @click="showcartype = true">
|
||||
<input placeholder="选择客户偏好" disabled v-model="car_type_name" />
|
||||
<input :placeholder="$t('customer.Customerphinput')" disabled v-model="car_type_name" />
|
||||
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')":defaultIndex="defaultIndexph" :show="showcartype" @cancel="cancel('showcartype')" :columns="carTypeList" keyName="name" @confirm="cartypesChange"></u-picker>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>客户分级</view>
|
||||
<view>{{$t('customer.Cstomerfj')}}</view>
|
||||
<view class="right select" @click="showgrade = true">
|
||||
<input placeholder="选择客户分级" disabled v-model="grade_name" />
|
||||
<input :placeholder="$t('customer.Cstomerfjinput')" disabled v-model="grade_name" />
|
||||
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexfj" :show="showgrade" @cancel="cancel('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>国家</view>
|
||||
<view>{{$t('customer.Country')}}</view>
|
||||
<view class="right select" @click="showarea = true">
|
||||
<input placeholder="选择国家" disabled v-model="country_name" />
|
||||
<input :placeholder="$t('customer.Cstomerfjinput')" disabled v-model="country_name" />
|
||||
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexgj" :show="showarea" @cancel="cancel('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view>公司</view>
|
||||
<view class="right select" @click="showmap = true">
|
||||
<input placeholder="去定位" type="text" disabled v-model="form.address"/>
|
||||
<view>{{$t('customer.Company')}}</view>
|
||||
<view class="right select" @click="gomap">
|
||||
<input :placeholder="$t('customer.Companyinput')" type="text" disabled v-model="form.address"/>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell1">
|
||||
<view>备注(非必填)</view>
|
||||
<view>{{$t('customer.Remarks')}}</view>
|
||||
<view class="">
|
||||
<textarea auto-height v-model="form.describe" placeholder="请输入备注内容~"/>
|
||||
<textarea auto-height v-model="form.describe" :placeholder="$t('customer.Remarksinputhd')"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -105,10 +105,10 @@
|
||||
<view class="steps">
|
||||
<view class="title">
|
||||
<view class="">
|
||||
跟进记录 <text class="status">跟进中</text>
|
||||
{{$t('customer.followrecord')}} <text class="status" :style="{color:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow_txt}}</text>
|
||||
</view>
|
||||
<view class="btnjl" @click="followupFn">
|
||||
添加记录
|
||||
{{$t('navbar.addfollow')}}
|
||||
</view>
|
||||
</view>
|
||||
<u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot>
|
||||
@@ -117,10 +117,10 @@
|
||||
<view class="" v-if="item.type==0">
|
||||
<view class="">
|
||||
<view class="">
|
||||
时间:{{item.created_at}}
|
||||
{{$t('times')}} :{{item.created_at}}
|
||||
</view>
|
||||
<view class="">地址:{{item.address}}</view>
|
||||
<view class="">拜访内容:{{item.audio_text}}</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>
|
||||
@@ -128,7 +128,7 @@
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="">
|
||||
时间:{{item.created_at}}
|
||||
{{$t('times')}}:{{item.created_at}}
|
||||
</view>
|
||||
<view class="">
|
||||
<image :src="item.oss_picture" mode=""></image>
|
||||
@@ -141,9 +141,9 @@
|
||||
</view>
|
||||
<view class="zw"></view>
|
||||
<view class="foot">
|
||||
<button class="btn" @click="nextFn">提交</button>
|
||||
<button class="btn" @click="nextFn">{{$t('submit')}}</button>
|
||||
</view>
|
||||
<u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose">
|
||||
<!-- <u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose">
|
||||
<view class="mapcont">
|
||||
<view class="header">
|
||||
<view class="cancel" @click="mapclose">取消</view>
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</u-popup> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user