Files
crm-uni/pages/customer/add.vue
T
2025-03-14 16:55:12 +08:00

181 lines
4.7 KiB
Vue

<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" title="信息录入"></uni-nav-bar>
<view class="content">
<view class="cell">
<view>客户称呼 <text class="red">*</text></view>
<view class="right">
<input placeholder="输入客户称呼" v-model="form.name" />
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell">
<view>性别</view>
<view class="right">
<u-radio-group v-model="form.gender">
<u-radio name="男">男</u-radio>
<u-radio name="女">女</u-radio>
</u-radio-group>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell">
<view>联系方式 <text class="red">*</text></view>
<view class="right">
<input placeholder="输入联系方式" v-model="form.phone" />
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell">
<view>客户偏好</view>
<view class="right select" @click="showbrand = true">
<input placeholder="选择客户偏好" disabled v-model="brandname" />
<u-picker :show="showbrand" @cancel="cancel('showbrand')" :columns="brandList" keyName="name" @confirm="changeHandler"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell">
<view>客户等级</view>
<view class="right select" @click="showtype = true">
<input placeholder="选择客户等级" disabled v-model="vehicle_type" />
<u-picker :show="showtype" @cancel="cancel('showtype')" :columns="typesList" keyName="name" @confirm="typesChange"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell">
<view>国家地区</view>
<view class="right select" @click="showenergy = true">
<input placeholder="选择国家地区" disabled v-model="vehicle_energy" />
<u-picker :show="showenergy" @cancel="cancel('showenergy')" :columns="energyList" keyName="name" @confirm="energyChange"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell">
<view>首次跟进</view>
<view class="right">
<input placeholder="首次跟进" type="digit" v-model="form.mileage"/>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell1">
<view>详细情况</view>
<view class="">
<textarea auto-height v-model="form.condition_desc" placeholder="详细情况..."/>
</view>
</view>
<u-gap height="100" bgColor="#fff"></u-gap>
</view>
<view class="foot">
<button class="btn" @click="nextFn">提交</button>
</view>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
// import ldSelect from '@/components/ld-select/ld-select.vue'
export default {
data() {
return {
brandList:[],
energyList:[],
typesList:[],
form: {
name: '',
gender: '男',
phone: '',
preference: '赵野军',
level: '初步接触',
region: '',
firstFollow: '2025-03-11 12:00:01',
details: ''
}
}
},
onLoad() {
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
this.x = windowWidth-70
this.y = windowHeight-185
},
methods: {
leftClick(){
uni.navigateBack({})
},
}
}
</script>
<style lang="scss">
textarea {
min-height: 200rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
margin-top: 15px;
background-color: #F6F6F6;
padding: 15px;
border-radius: 10px;
}
.u-divider{
margin: 0px 0px !important;
}
.uniui-right{
position: absolute;
top: 2px;
}
.red{
color: red;
}
.content{
padding-top: 10px;
background: #FFFFFF;
height: calc(100vh - 44px);
}
.cell{
position: relative;
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-size: 32rpx;
font-weight: 500;
font-size: 32rpx;
color: #666666;
}
.arrowright{
margin-right: -15px;
}
.cell1{
font-size: 32rpx;
padding: 18px 20px;
align-items: center;
font-weight: 500;
color: #666666;
}
.right{
text-align: right;
color: #222222;
}
.select{
display: flex;
position: relative;
margin-right: 10px;
}
.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>