页面功能修改
This commit is contained in:
+133
-249
@@ -2,72 +2,31 @@
|
||||
<view>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.customerinfo')"></uni-nav-bar>
|
||||
<view class="content">
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.CustomerChannel')}}</view>
|
||||
<view class="right select" @click="showchannel = true">
|
||||
<!-- <input :placeholder="$t('customer.CustomerChannelinput')" disabled v-model="channel_name" /> -->
|
||||
<view class="" :class="['content2', { placeholder: !channel_name }]">{{channel_name || $t('customer.CustomerChannelinput')}}</view>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
<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>
|
||||
<text class="tag" :style="{background:(datas.follow == 0 ?'#3471FF' : datas.follow == 1 ?'#27C89C': '#FF4040')}">{{datas.follow_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 class="edt">
|
||||
<view class="btn" @click="editFn"><image src="/static/image/customer/edit.png" mode=""></image><text> {{$t('edtbtn')}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.Medal')}}</view>
|
||||
<view class="right select" @click="showmagnitude = true">
|
||||
<!-- <input :placeholder="$t('customer.Medalinput')" disabled v-model="magnitude_name" /> -->
|
||||
<view class="" :class="['content2', { placeholder: !magnitude_name }]">{{magnitude_name || $t('customer.Medalinput')}}</view>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.CustomerName')}} <text class="red">*</text></view>
|
||||
<view class="right">
|
||||
<input :placeholder="$t('customer.CustomerNameinput')" v-model="form.contacts" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('gender')}}</view>
|
||||
<view class="right">
|
||||
<u-radio-group v-model="form.sex">
|
||||
<u-radio :name="Number(0)">{{$t('gender0')}}</u-radio>
|
||||
<u-radio :name="Number(1)" class="u-m-lr-10">{{$t('gender1')}}</u-radio>
|
||||
<u-radio :name="Number(2)">{{$t('gender2')}}</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('mine.lxcall')}} <text class="red">*</text></view>
|
||||
<view class="right">
|
||||
<input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">Email</view>
|
||||
<view class="right">
|
||||
<input :placeholder="$t('customer.Emailinput')" v-model="form.email" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">WhatsApp</view>
|
||||
<view class="right">
|
||||
<input :placeholder="$t('customer.WhatsAppinput')" v-model="form.WhatsApp" />
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.Customerph')}}</view>
|
||||
<view class="right select" @click="showcartype = true">
|
||||
<!-- <input :placeholder="$t('customer.Customerphinput')" disabled v-model="car_type_name" /> -->
|
||||
<view class="" :class="['content2', { placeholder: !car_type_name }]">{{car_type_name || $t('customer.Customerphinput')}}</view>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.Cstomerfj')}}</view>
|
||||
<view class="right select" @click="showgrade = true">
|
||||
@@ -76,31 +35,6 @@
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.Country')}}</view>
|
||||
<view class="right select" @click="showarea = true">
|
||||
<!-- <input :placeholder="$t('customer.Countryinput')" disabled v-model="country_name" /> -->
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell">
|
||||
<view class="item">{{$t('customer.Company')}}</view>
|
||||
<view class="right select" @click="gomap">
|
||||
<!-- <input :placeholder="$t('customer.Companyinput')" type="text" disabled v-model="form.address"/> -->
|
||||
<view class="" :class="['content2', { placeholder: !address }]">{{address || $t('customer.Companyinput')}}</view>
|
||||
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
<view class="cell1">
|
||||
<view class="item">{{$t('customer.Remarks')}}</view>
|
||||
<view class="">
|
||||
<textarea auto-height v-model="form.describe" :placeholder="$t('customer.Remarksinputhd')"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-gap height="10" bgColor="#F6F6F6"></u-gap>
|
||||
<view class="steps">
|
||||
@@ -141,14 +75,10 @@
|
||||
<empty :list="followList"></empty>
|
||||
</view>
|
||||
<view class="zw"></view>
|
||||
<view class="foot">
|
||||
<!-- <view class="foot">
|
||||
<button class="btn" @click="nextFn">{{$t('submit')}}</button>
|
||||
</view>
|
||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexqd" :show="showchannel" @cancel="cancel('showchannel')" @close="close('showchannel')" :columns="channelList" keyName="name" @confirm="channelChange"></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>
|
||||
</view> -->
|
||||
<u-picker closeOnClickOverlay :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :defaultIndex="defaultIndexfj" :show="showgrade" @cancel="cancel('showgrade')" @close="close('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
|
||||
<u-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 :show="showmap" :round="10" mode="bottom" @close="mapclose">
|
||||
<view class="mapcont">
|
||||
@@ -178,40 +108,12 @@
|
||||
showcartype: false,
|
||||
showchannel: false,
|
||||
showarea: false,
|
||||
getGradeList:[],
|
||||
carTypeList:[],
|
||||
channelList:[],
|
||||
magnitudeList:[],
|
||||
getGradeList1:[],
|
||||
carTypeLis1:[],
|
||||
channelList1:[],
|
||||
magnitudeList1:[],
|
||||
areaList1:[],
|
||||
areaList:[],
|
||||
getGradeList:[],
|
||||
grade_name:'',
|
||||
car_type_name:'',
|
||||
country_name:'',
|
||||
channel_name:'',
|
||||
magnitude_name:'',
|
||||
defaultIndexqd:[0],
|
||||
defaultIndexsj:[0],
|
||||
defaultIndexph:[0],
|
||||
defaultIndexfj:[0],
|
||||
defaultIndexgj:[0],
|
||||
form: {
|
||||
contacts: '',
|
||||
sex: 0,
|
||||
phone: '',
|
||||
email: '',
|
||||
describe: '',
|
||||
grade:'',
|
||||
country_id:'',
|
||||
car_type_id:'',
|
||||
channel_id:'',
|
||||
magnitude:'',
|
||||
address:'',
|
||||
lat:'',
|
||||
lng:'',
|
||||
},
|
||||
datas:''
|
||||
|
||||
@@ -221,11 +123,7 @@
|
||||
console.log(options);
|
||||
this.id = options.id;
|
||||
var that = this
|
||||
this.getChannel()
|
||||
this.getMagnitude()
|
||||
this.getGrade()
|
||||
this.carType()
|
||||
this.area()
|
||||
this.customerdetailfn()
|
||||
|
||||
},
|
||||
@@ -250,36 +148,12 @@
|
||||
},
|
||||
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.country_name = item.name
|
||||
that.defaultIndexgj=[index]
|
||||
}
|
||||
})
|
||||
},
|
||||
//客户详情
|
||||
customerdetailfn(){
|
||||
@@ -321,17 +195,6 @@
|
||||
mapconfirm(){
|
||||
this.showmap = false
|
||||
},
|
||||
//渠道
|
||||
getChannel(){
|
||||
request({
|
||||
url:'customer/getChannel',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.channelList1 = list
|
||||
this.channelList = [list]
|
||||
})
|
||||
},
|
||||
//客户等级
|
||||
getGrade(){
|
||||
request({
|
||||
@@ -343,68 +206,31 @@
|
||||
this.getGradeList1 = list
|
||||
})
|
||||
},
|
||||
//偏好
|
||||
carType(){
|
||||
request({
|
||||
url:'carType/getAll',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.carTypeList1 = list
|
||||
this.carTypeList = [list]
|
||||
})
|
||||
},
|
||||
//国家
|
||||
area(){
|
||||
request({
|
||||
url:'area/getCountry',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.areaList1 = list
|
||||
this.areaList = [list]
|
||||
})
|
||||
},
|
||||
//商机
|
||||
getMagnitude(){
|
||||
request({
|
||||
url:'customer/getMagnitude',
|
||||
method:'get',
|
||||
}).then(res => {
|
||||
var list = res.data.data
|
||||
this.magnitudeList1 = list
|
||||
this.magnitudeList = [list]
|
||||
})
|
||||
},
|
||||
//商机切换事件
|
||||
magnitudeChange(val){
|
||||
this.form.magnitude = val.value[0].id
|
||||
this.magnitude_name = val.value[0].name
|
||||
this.showmagnitude = false
|
||||
},
|
||||
//通道切换事件
|
||||
channelChange(val){
|
||||
this.form.channel_id = val.value[0].id
|
||||
this.channel_name = val.value[0].name
|
||||
this.showchannel = false
|
||||
},
|
||||
//客户等级切换事件
|
||||
gradeHandler(val){
|
||||
this.form.grade = val.value[0].id
|
||||
this.grade_name = val.value[0].name
|
||||
this.showgrade = false
|
||||
},
|
||||
//国家切换事件
|
||||
areaChange(val){
|
||||
this.form.country_id = val.value[0].id
|
||||
this.country_name = val.value[0].name
|
||||
this.showarea = false
|
||||
},
|
||||
//偏好切换事件
|
||||
cartypesChange(val){
|
||||
this.form.car_type_id = val.value[0].id
|
||||
this.car_type_name = val.value[0].name
|
||||
this.showcartype = false
|
||||
request({
|
||||
url:'customer/grade',
|
||||
method:'post',
|
||||
data:{
|
||||
id:this.id,
|
||||
grade:this.form.grade
|
||||
}
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
// if(res.data.code ==0){
|
||||
// setTimeout(() => {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/customer',// 替换为你要跳转的页面路径
|
||||
// });
|
||||
// }, 1000);
|
||||
// }
|
||||
})
|
||||
},
|
||||
cancel(val){
|
||||
this[val] = false
|
||||
@@ -412,6 +238,11 @@
|
||||
close(val){
|
||||
this[val] = false
|
||||
},
|
||||
editFn(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/customer/editdetile?id='+this.id
|
||||
});
|
||||
},
|
||||
nextFn(){
|
||||
request({
|
||||
url:'customer/save',
|
||||
@@ -459,10 +290,6 @@
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
}
|
||||
.content{
|
||||
padding-top: 10px;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.cell{
|
||||
position: relative;
|
||||
display: flex;
|
||||
@@ -472,20 +299,14 @@
|
||||
font-weight: 500;
|
||||
.item{
|
||||
width: 90px;
|
||||
color: #666666;
|
||||
}
|
||||
background: #f6f6f6;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.arrowright{
|
||||
margin-right: -15px;
|
||||
}
|
||||
.cell1{
|
||||
font-size: 32rpx;
|
||||
padding: 18px 20px;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
.item{
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
.right{
|
||||
text-align: right;
|
||||
}
|
||||
@@ -494,6 +315,85 @@
|
||||
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;
|
||||
.medal{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.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;
|
||||
@@ -527,20 +427,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.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>
|
||||
|
||||
Reference in New Issue
Block a user