对接部分接口

This commit is contained in:
浅念
2025-03-17 17:43:41 +08:00
parent f24b70c8e9
commit 328311fe2a
10 changed files with 536 additions and 211 deletions
+3 -1
View File
@@ -85,7 +85,9 @@
min-height: 100% !important;
height: auto !important;
}
.u-popup__content{
border-radius: 20px 20px 0px 0px;
}
.uni-top-window uni-tabbar .uni-tabbar {
background-color: #fff !important;
}
+3 -2
View File
@@ -1,6 +1,7 @@
const baseUrl = "https://api.collect.hs.hnzhwlkj.club/"; //这里放置url域名32044
// const baseUrl = "https://api.collect.hs.hnzhwlkj.club/"; //这里放置url域名32044
// const baseUrl = "http://192.168.0.72:8083/api/v1/"; //这里放置url域名32044
// const baseUrl = "https://114.215.24.240:8106/api/v1/"; //这里放置url域名32044
const baseUrl = "http://192.168.50.4:8787/"; //这里放置url域名32044
// const baseUrl = "/api/"; //这里放置url域名32044
export function request(options){//封装的requset
let { url,data,method } = options;
data = data || {},
+10
View File
@@ -68,5 +68,15 @@ export default {
gender2:'女',
Region:'国家地区',
Regioninputhd:'去选择',
login:'登录',
threelogin:'第三方登录',
account:'账号',
password:'密码',
fgpassword:'忘记密码',
Facebook:'飞书',
email:'邮箱',
phone:'手机号',
agreeMsg:'我已经阅读并同意',
and:'和',
}
+19 -7
View File
@@ -2,20 +2,25 @@
<view class="">
<view class="contents" v-for="(item, index) in list" :key="index" @click="handleItemClick(item)">
<view class="top">
<view class="">2025.03.11 12:00</view>
<view class="tag">{{$t('followup')}}</view>
<view class="">{{item.created_at}}</view>
<view class="right">
<!-- <text class="medal" :style="color:(item.magnitude == 0 ?'#F5AB00' : item.magnitude == 1 ?'#8495B8': '#9B7200')}">{{item.magnitude_txt}}</text> -->
<text class="medal" >{{item.magnitude_txt}}</text>
<text class="tag">{{$t('followup')}}</text>
</view>
</view>
<u-divider text="" :hairline="true"></u-divider>
<u-line margin="20rpx 0px"></u-line>
<view class="cont">
<view class="title">
<view class=""><text class="name">刘德华</text><text class="phone">138****2264</text></view>
<view class="ststus">初步接触</view>
<view class=""><text class="name">{{item.contacts}}</text><text class="phone">{{item.phone}}</text></view>
<view class="ststus">{{item.grade_txt}}</view>
</view>
<view class="info"><text class="sex">男</text> | <text class="addr">迪拜</text><text class="type">越野车</text>
</view>
<slot name="footer">
<view class="desc">{{item.describe}}</view>
<!-- <slot name="footer">
<text></text>
</slot>
</slot> -->
<!-- <slot name="footertab">
<view class="desc1">
<view class="" @click="phoneClick(item)"><image src="/static/image/customer/phone.png" mode=""></image> 呼叫</view>
@@ -62,6 +67,13 @@
padding: 3px 10px;
margin-right: -15px;
}
.right{
display: flex;
align-items: center;
.medal{
margin-right: 10px;
}
}
}
.cont{
padding: 0px 15px 10px;
+195 -35
View File
@@ -3,36 +3,62 @@
<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>客户称呼</view>
<view class="right">
<input placeholder="输入称呼" v-model="form.contacts" />
<view>渠道</view>
<view class="right select" @click="showchannel = true">
<input placeholder="选择渠道" disabled v-model="channel_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :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-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>客户商机</view>
<view class="right select" @click="showmagnitude = true">
<input placeholder="选择客户商机" disabled v-model="magnitude_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :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 class="right">
<input placeholder="输入名称" v-model="form.contacts" />
</view>
</view>
<u-line></u-line>
<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 v-model="form.sex">
<u-radio name="0">未知</u-radio>
<u-radio name="1">男</u-radio>
<u-radio name="2">女</u-radio>
</u-radio-group>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<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>
<u-line></u-line>
<view class="cell">
<view>Email</view>
<view class="right">
<input placeholder="输入Email" v-model="form.email" />
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>WhatsApp</view>
<view class="right">
<input placeholder="输入WhatsApp" v-model="form.WhatsApp" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>客户偏好</view>
<view class="right select" @click="showcartype = true">
@@ -41,78 +67,133 @@
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>客户等级</view>
<view>客户分级</view>
<view class="right select" @click="showgrade = true">
<input placeholder="选择客户等级" disabled v-model="grade_name" />
<input placeholder="选择客户分级" disabled v-model="grade_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :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-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>国家地区</view>
<view class="right select" @click="showenergy = true">
<input placeholder="选择国家地区" disabled v-model="country_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showenergy" @cancel="cancel('showenergy')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker>
<view>国家</view>
<view class="right select" @click="showarea = true">
<input placeholder="选择国家" disabled v-model="country_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :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-divider text=""></u-divider>
<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"/>
<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">
<input placeholder="首次跟进" type="digit" v-model="form.mileage"/>
<input placeholder="首次跟进" type="text" v-model="form.mileage"/>
</view>
</view>
<u-divider text=""></u-divider>
</view> -->
<u-line></u-line>
<view class="cell1">
<view>详细情况</view>
<view>备注(非必填)</view>
<view class="">
<textarea auto-height v-model="form.describe" placeholder="详细情况..."/>
<textarea auto-height v-model="form.describe" placeholder="请输入备注内容~"/>
</view>
</view>
<u-gap height="100" bgColor="#fff"></u-gap>
</view>
<view class="foot">
<button class="btn" @click="nextFn">提交</button>
<button class="btn" @click="saveFn">提交</button>
</view>
<u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose">
<view class="mapcont">
<view class="header">
<view class="cancel" @click="mapclose">取消</view>
<view class="title">地图位置</view>
<view class="confirm" @click="mapconfirm">确定</view>
</view>
<view class="map">
</view>
</view>
</u-popup>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
// import ldSelect from '@/components/ld-select/ld-select.vue'
export default {
data() {
return {
showmap: false,
showmagnitude: false,
showgrade: false,
showcartype: false,
showenergy: false,
showchannel: false,
showarea: false,
getGradeList:[],
carTypeList:[],
channelList:[],
magnitudeList:[],
areaList:[],
grade_name:'',
car_type_name:'',
country_name:'',
channel_name:'',
magnitude_name:'',
form: {
contacts: '',
gender: '男',
sex: '0',
phone: '',
email: '',
describe: '',
grade:'',
country_id:'',
car_type_id:''
car_type_id:'',
channel_id:'',
magnitude:'',
address:'',
}
}
},
onLoad() {
this.getChannel()
this.getMagnitude()
this.getGrade()
this.carType()
this.area()
},
methods: {
leftClick(){
uni.navigateBack({})
},
mapclose(){
this.showmap = false
},
mapconfirm(){
this.showmap = false
},
//渠道
getChannel(){
request({
url:'customer/getChannel',
method:'get',
}).then(res => {
var list = res.data.data
this.channelList = [list]
})
},
//客户等级
getGrade(){
request({
url:'customer/getGrade',
@@ -122,6 +203,7 @@
this.getGradeList = [list]
})
},
//偏好
carType(){
request({
url:'carType/getAll',
@@ -131,33 +213,93 @@
this.carTypeList = [list]
})
},
//国家
area(){
request({
url:'area/getAll',
url:'area/getCountry',
method:'get',
}).then(res => {
var list = res.data.data
this.areaList = [list]
})
},
//商机
getMagnitude(){
request({
url:'customer/getMagnitude',
method:'get',
}).then(res => {
var list = res.data.data
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].brand_id
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].energy_id
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].energy_id
this.form.car_type_id = val.value[0].id
this.car_type_name = val.value[0].name
this.showcartype = false
},
cancel(val){
this[val] = false
},
//提交保存
saveFn(){
if(this.form.contacts==''){
uni.showToast({
title:'客户名称不能为空',
icon: 'none'
});
return false
}
if(this.form.phone==''){
uni.showToast({
title:'联系方式不能为空',
icon: 'none'
});
return false
}
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>
@@ -182,8 +324,6 @@
}
.content{
padding-top: 10px;
background: #FFFFFF;
height: calc(100vh - 44px);
}
.cell{
position: relative;
@@ -231,4 +371,24 @@
margin-bottom: 40px;
margin: 15px 4%;
}
.mapcont{
.header{
line-height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
.cancel{
width: 20%;
color: #999999;
}
.confirm{
width: 20%;
color: #3471FF;
}
}
.map{
height: 350px;
}
}
</style>
+34 -10
View File
@@ -3,12 +3,20 @@
<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>客户称呼</view>
<view class="right">
<input placeholder="输入称呼" v-model="form.contacts" />
<view>渠道</view>
<view class="right select" @click="showcartype = true">
<input placeholder="选择渠道" disabled v-model="car_type_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :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-divider text=""></u-divider>
<view class="cell">
<view>客户名称</view>
<view class="right">
<input placeholder="输入客户名称" v-model="form.contacts" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>性别</view>
<view class="right">
@@ -18,21 +26,28 @@
</u-radio-group>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<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>
<u-line></u-line>
<view class="cell">
<view>Email</view>
<view class="right">
<input placeholder="输入Email" v-model="form.email" />
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>WhatsApp</view>
<view class="right">
<input placeholder="输入WhatsApp" v-model="form.WhatsApp" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>客户偏好</view>
<view class="right select" @click="showcartype = true">
@@ -41,7 +56,7 @@
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>客户等级</view>
<view class="right select" @click="showgrade = true">
@@ -50,7 +65,16 @@
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>国家</view>
<view class="right select" @click="showenergy = true">
<input placeholder="选择国家" disabled v-model="country_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showenergy" @cancel="cancel('showenergy')" :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="showenergy = true">
@@ -58,7 +82,7 @@
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell1">
<view>备注(非必填)</view>
<view class="">
+152 -89
View File
@@ -5,56 +5,56 @@
<view class="cell">
<view>跟进方式</view>
<view class="right">
<u-radio-group v-model="form.followType">
<u-radio-group v-model="form.type">
<u-radio name="1">在线跟进</u-radio>
<u-radio name="2">拜访</u-radio>
<u-radio name="0">拜访</u-radio>
</u-radio-group>
</view>
</view>
<u-divider text=""></u-divider>
<u-line></u-line>
<view class="cell">
<view>跟进时间</view>
<view class="right" @click="show = true">
<input placeholder="跟进时间" v-model="form.firstFollow" />
<input placeholder="跟进时间" v-model="form.firstFollowtime" />
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell1" v-if="form.followType==1">
<u-line></u-line>
<view class="cell1" v-if="form.type==1">
<view>上传跟进最后聊天截图</view>
<view>
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select" @delete="delfn('front_45_degree')">
<view style="margin-top: 10px;">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select" @delete="delfn('picture')">
<image src="/static/image/customer/upimg.png" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</view>
<view class="cell" v-if="form.followType==2">
<view class="cell" v-if="form.type==0">
<view>当前位置</view>
<view class="right">
<input placeholder="输入当前位置" v-model="form.phone" />
<input placeholder="输入当前位置" v-model="form.address" />
</view>
</view>
<u-divider text="" v-if="form.followType==2"></u-divider>
<view class="cell1" v-if="form.followType==2">
<u-line v-if="form.type==0"></u-line>
<view class="cell1" v-if="form.type==0">
<view>当前位置拍照上传</view>
<view style="margin-top: 10px;">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select1" @delete="delfn('front_45_degree')">
<uni-file-picker fileMediatype="image" limit="1" :del-icon="false" disable-preview @select="select1" @delete="delfn('picture')">
<image src="/static/image/customer/upimg.png" mode="" class="addimg"></image>
</uni-file-picker>
</view>
</view>
<u-divider text="" v-if="form.followType==2"></u-divider>
<view class="cell1" v-if="form.followType==2">
<u-line v-if="form.type==0"></u-line>
<view class="cell1" v-if="form.type==0">
<view>拜访内容</view>
<view class="yuyin">
<textarea auto-height v-model="form.bf_desc" placeholder="拜访内容..."/>
<textarea auto-height v-model="form.audio_text" placeholder="拜访内容..."/>
<image src="/static/image/customer/yuyin.png" mode="" @tap="startRecognizebd"></image>
</view>
</view>
<u-divider text="" v-if="form.followType==2"></u-divider>
<view class="cell1" v-if="form.followType==2">
<u-line v-if="form.type==0"></u-line>
<view class="cell1" v-if="form.type==0">
<view>备注(非必填)</view>
<view class="yuyin">
<textarea auto-height v-model="form.mom_desc" placeholder="详细情况..."/>
<textarea auto-height v-model="form.remark" placeholder="详细情况..."/>
<image src="/static/image/customer/yuyin.png" mode="" @tap="startRecognize"></image>
</view>
</view>
@@ -64,51 +64,37 @@
<view class="title">
跟进记录 <text class="status">跟进中</text>
</view>
<u-steps current="0" direction="column" dot>
<u-steps-item title="在线跟进">
<view slot="desc">
<view class="">
时间:2025-03-11 12:00:01
</view>
<view class="">
<image src="/static/image/customer/addr.png" mode=""></image>
</view>
</view>
</u-steps-item>
<u-steps-item title="拜访跟进">
<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="">
<view class="" v-if="item.type==0">
<view class="">
时间:2025-03-11 12:00:01
<view class="">
时间:{{item.created_at}}
</view>
<view class="">地址:{{item.address}}</view>
<view class="">拜访内容:{{item.audio_text}}</view>
</view>
<view class="">地址:迪拜某某地方</view>
<view class="">拜访内容:讨论需求</view>
</view>
<view class="">
<image src="/static/image/customer/addr.png" mode=""></image>
</view>
</view>
</u-steps-item>
<u-steps-item title="拜访跟进">
<view slot="desc" class="desc">
<view class="">
<view class="">
时间:2025-03-11 12:00:01
<image :src="item.oss_picture" mode=""></image>
</view>
<view class="">地址:迪拜某某地方</view>
<view class="">拜访内容:讨论需求</view>
</view>
<view class="">
<image src="/static/image/customer/addr.png" mode=""></image>
<view class="" v-else>
<view class="">
时间:{{item.created_at}}
</view>
<view class="">
<image :src="item.oss_picture" mode=""></image>
</view>
</view>
</view>
</u-steps-item>
</u-steps>
<!-- <empty :list="brandList"></empty> -->
<empty :list="followList"></empty>
</view>
<u-gap height="100" bgColor="#fff"></u-gap>
<view class="foot">
<button class="btn1" @click="nextFn">下次跟进提醒</button>
<button class="btn1" @click="shownexttime=true">下次跟进提醒</button>
<button class="btn" @click="nextFn">提交</button>
</view>
<u-datetime-picker
@@ -119,6 +105,13 @@
@cancel="cancel"
@change="change"
></u-datetime-picker>
<u-datetime-picker
:show="shownexttime"
v-model="nexttime"
mode="datetime"
@confirm="confirmnext"
@cancel="cancelnext"
></u-datetime-picker>
</view>
</template>
<script>
@@ -127,49 +120,99 @@
export default {
data() {
return {
brandList:[],
energyList:[],
typesList:[],
id:'',
show:false,
firstFollow: '2025-03-11 12:00:01',
shownexttime:false,
firstFollow: Number(new Date()),
nexttime: Number(new Date()),
followList:[],
form: {
name: '',
followType: '1',
phone: '',
preference: '赵野军',
level: '初步接触',
region: '',
firstFollow: '2025-03-11 12:00:01',
details: '',
bf_desc:'',
mom_desc:'',
customer_id:'',
type: '1',
address: '',
lat: '',
lng: '',
firstFollowtime:'',
audio_text:'',
remark:'',
picture:''
}
}
},
onLoad() {
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
this.x = windowWidth-70
this.y = windowHeight-185
onLoad(options) {
console.log(options);
this.id = options.id;
this.form.customer_id = options.id;
var that = this
this.getlocahost()
this.followlistfn()
},
methods: {
leftClick(){
uni.navigateBack({})
},
// 获取当前位置
getlocahost(){
uni.getLocation({
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码
// 这里调用 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(){
request({
url:'follow/list',
method:'get',
data: {
customer_id:this.id,
}
}).then(res => {
this.followList = res.data.data.list
console.log(res.data.data)
})
},
//保存跟进
nextFn(){
},
cancel() {
this.show = false
},
confirm(e) {
this.show = false
this.form.firstFollow = this.result(e.value, e.mode)
console.log(this.result(e.value, e.mode))
console.log(this.form.firstFollow )
},
change(e) {
// console.log('change', e)
request({
url:'follow/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/index',// 替换为你要跳转的页面路径
// });
// }, 1000);
}
})
},
result(time, mode) {
const timeFormat = uni.$u.timeFormat
@@ -186,6 +229,26 @@
return ''
}
},
cancel() {
this.show = false
},
confirm(e) {
this.show = false
this.form.firstFollowtime = this.result(e.value, e.mode)
console.log(this.result(e.value, e.mode))
},
cancelnext() {
this.shownexttime = false
},
confirmnext(e) {
this.shownexttime = false
this.nexttime = this.result(e.value, e.mode)
console.log(this.nexttime)
},
change(e) {
// console.log('change', e)
},
delfn(name){
console.log(name)
that.carinfo[name] =''
@@ -193,26 +256,26 @@
uploadfn(imgUrl,name){
var that = this;
uni.uploadFile({
url: 'https://api.collect.hs.hnzhwlkj.club/upload',
url: 'http://192.168.50.4:8787/upload',
filePath: imgUrl,
name: 'image',
name: 'files',
header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
that.carinfo[name] = path.data.image_name
console.log(that.carinfo)
that.form[name] = path.data.path
console.log(that.form)
}
});
},
select(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_45_degree')
this.uploadfn(imgUrl,'picture')
},
select1(e){
const tempFilePaths = e.tempFilePaths;
const imgUrl=tempFilePaths[0]
this.uploadfn(imgUrl,'front_45_degree')
this.uploadfn(imgUrl,'picture')
},
async startRecognizebd () {
// #ifdef APP-PLUS
+50 -33
View File
@@ -14,31 +14,33 @@
</view>
</view>
</view>
<view class="list">
<view class="contents" v-for="(item, index) in datalist" :key="index" >
<view class="" @click="godetile(item)">
<view class="top">
<view class="">2025.03.11 12:00</view>
<view class="tag">{{$t('followup')}}</view>
</view>
<u-divider text="" :hairline="true"></u-divider>
<view class="cont">
<view class="title">
<view class=""><text class="name">刘德华</text><text class="phone">138****2264</text></view>
<view class="ststus">初步接触</view>
<z-paging ref="paging" v-model="datalist" @query="queryList" style="margin-top: 100px;" empty-view-text='暂无数据!'>
<view class="list">
<view class="contents" v-for="(item, index) in datalist" :key="index" >
<view class="" @click="godetile(item)">
<view class="top">
<view class="">{{item.created_at}}</view>
<view class="tag">{{$t('followup')}}</view>
</view>
<view class="info"><text class="sex">男</text> | <text class="addr">迪拜</text><text class="type">越野车</text>
<u-line margin="20rpx 0px"></u-line>
<view class="cont">
<view class="title">
<view class=""><text class="name">{{item.contacts}}</text><text class="phone">{{item.phone}}</text></view>
<view class="ststus">{{item.grade_txt}}</view>
</view>
<view class="info"><text class="sex">男</text> | <text class="addr">迪拜</text><text class="type">越野车</text>
</view>
</view>
</view>
</view>
<view class="desc1">
<view class="" @click="callPhone(item)"><image src="/static/image/customer/phone.png" mode=""></image> {{$t('call')}}</view>
<view class="" @click="editClick(item)"><image src="/static/image/customer/edit.png" mode=""></image> {{$t('followup')}}</view>
<view class="" @click="delClick(item)"><image src="/static/image/customer/trash.png" mode=""></image> {{$t('delete')}}</view>
<view class="desc1">
<view class="" @click="callPhone(item)"><image src="/static/image/customer/phone.png" mode=""></image> {{$t('call')}}</view>
<view class="" @click="editClick(item)"><image src="/static/image/customer/edit.png" mode=""></image> {{$t('followup')}}</view>
<view class="" @click="delClick(item)"><image src="/static/image/customer/trash.png" mode=""></image> {{$t('delete')}}</view>
</view>
</view>
</view>
</view>
</z-paging>
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm" title="客户筛选" keyName="label"></u-picker>
<u-popup :show="showts" :closeOnClickOverlay="false" :round="20" mode="center">
<view class="popupcontent">
@@ -63,7 +65,7 @@
</template>
<script>
// import { request,showToast } from '@/api/apiT.js'
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
@@ -84,35 +86,49 @@
id: 3
}]
],
datalist:[
{id:1,phone:'17839087603'},
{id:2,phone:'18437931136'},
{id:3,phone:'18339827479'},
{id:4,phone:'17839087603'}
],
datalist:[],
}
},
onLoad() {
const { windowWidth, windowHeight } = uni.getSystemInfoSync();
this.x = windowWidth-70
this.y = windowHeight-25
this.y = windowHeight-55
},
methods: {
searchCli(){
},
close() {
// console.log('close');
this.show= false
},
confirm(e) {
// console.log('confirm', e);
this.show = false
},
cancel() {
// console.log('cancel');
this.show = false
},
//客户列表数据
queryList(pageNo, pageSize) {
var that = this;
request({
url:'customer/list',
method:'get',
data: {
page:pageNo,
per_page:10
}
}).then(res => {
console.log(res.data)
if(res.data.code ==0){
var datas = res.data.data.list;
this.$refs.paging.complete(datas);
}else{
// this.$refs.paging.complete(null);
// that.listlength=0
}
uni.stopPullDownRefresh();
})
},
godetile(item){
console.log(item)
uni.navigateTo({
@@ -142,7 +158,7 @@
},
editClick(item){
uni.navigateTo({
url: '/pages/customer/followup'
url: '/pages/customer/followup?id='+item.id
});
},
delClick(item){
@@ -165,6 +181,7 @@
background-image: url("/static/image/customer/bg.png");
background-size: 100%;
background-repeat: no-repeat;
height: calc(100vh - 50px);
}
.navbar{
height: 44px;
@@ -211,7 +228,7 @@
.list{
padding: 15px;
overflow: auto;
height: calc(100vh-140px);
// height: calc(100vh - 350rpx);
.contents{
background-color: #FFFFFF;
border-radius: 10px;
+58 -29
View File
@@ -1,5 +1,6 @@
<template>
<view class="content">
<z-paging ref="paging" v-model="datalist" @query="queryList" style="background: #F3F3F3;" empty-view-text='暂无数据!'>
<view class="contop">
<view class="changeyy" @click="showlang = true" >
<image src="/static/image/change.png" mode=""></image>{{$t('home.langbtn')}}
@@ -21,11 +22,7 @@
</view>
</view>
<view class="cont">
<u-grid :border="false" col="4">
<u-grid-item>
<text class="grid-num">20</text>
<text class="grid-text">{{$t('home.addxs')}}</text>
</u-grid-item>
<u-grid :border="false">
<u-grid-item>
<text class="grid-num">20</text>
<text class="grid-text">{{$t('home.addkh')}}</text>
@@ -41,35 +38,36 @@
</u-grid>
</view>
</view>
<view class="userlist">
<u-sticky offset-top="-44">
<u-tabs :list="list1" :scrollable="false"></u-tabs>
<u-sticky offset-top="-44" >
<view class="tabsbg">
<u-tabs :list="list1" :scrollable="false"></u-tabs>
</view>
</u-sticky>
<view class="list">
<userlist :list="datalist" @click="godetile">
<template v-slot:footer>
<view class="desc">客户想要性价比高,偏爱宝马</view>
</template>
<template v-slot:footertab>
<view></view>
</template>
</userlist>
</view>
<view class="list">
<userlist :list="datalist" @click="godetile">
</userlist>
</view>
</view>
</z-paging>
<u-datetime-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="show" v-model="value1" @confirm="confirm" @cancel="cancel" mode="year-month"></u-datetime-picker>
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showlang" :columns="columns" @cancel="cancellang" @confirm="confirmlang" :title="$t('home.langbtn')" keyName="label"></u-picker>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
import userlist from '@/components/userlist/index.vue';
// import { request,showToast } from '@/api/apiT.js'
export default {
components: {
userlist
},
data() {
return {
headerBgColor: 'transparent', // 初始背景色为透明
home: this.$t('tabbar.home'),
value0: 0,
show: false,
@@ -77,12 +75,7 @@
value1: Number(new Date()),
timevalue:this.result(Number(new Date())),
time:this.result(Number(new Date())),
datalist:[
{id:1},
{id:2},
{id:3},
{id:4}
],
datalist:[],
columns:[
[{
label: '中文',
@@ -109,16 +102,22 @@
}
},
onLoad() {
// this.getcustomerlist()
},
methods: {
confirm(e) {
// console.log('confirm', e);
this.show = false
// 处理滚动事件
onPageScroll(event) {
const scrollTop = event.scrollTop || 0;
if (scrollTop > 310) { // 吸顶条件
this.headerBgColor = '#E6EDFF'; // 吸顶时设置背景色
} else {
this.headerBgColor = 'transparent'; // 取消吸顶时恢复背景色
}
},
cancellang() {
// console.log('cancel');
this.showlang = false
},
//语言切换事件
confirmlang(e) {
this.$i18n.locale = e.value[0].id
this.showlang = false
@@ -146,6 +145,10 @@
text: this.$t('tabbar.mine')
})
},
//日期选择组件
confirm(e) {
this.show = false
},
cancel() {
this.show = false
},
@@ -159,6 +162,28 @@
this.time=timeFormat(time, 'yyyy-mm')
return timeFormat(time, 'yyyy-mm')
},
//客户列表数据
queryList(pageNo, pageSize) {
var that = this;
request({
url:'customer/list',
method:'get',
data: {
page:pageNo,
per_page:10
}
}).then(res => {
console.log(res.data)
if(res.data.code ==0){
var datas = res.data.data.list;
this.$refs.paging.complete(datas);
}else{
// this.$refs.paging.complete(null);
// that.listlength=0
}
uni.stopPullDownRefresh();
})
},
godetile(item){
console.log(item)
uni.navigateTo({
@@ -174,6 +199,10 @@
width: 18px;
height: 18px;
}
.tabsbg{
border-radius: 16px 16px 0px 0px;
background:linear-gradient(to bottom, #E6EDFF, #eaeffa);
}
.changeyy{
padding: 10px 15px;
border-radius: 50px;
@@ -250,7 +279,7 @@
}
.grid-text{
color: #222222;
font-size: 20rpx;
font-size: 24rpx;
}
}
+12 -5
View File
@@ -8,12 +8,13 @@
<view class="inputs_button">
<view class="inputs">
<view class="account">
<input type="number" v-model="email" :adjust-position="false" placeholder="手机号" />
<input type="text" v-model="email" placeholder="账号" />
</view>
<view class="password">
<u--input
type="password"
placeholder="请输入内容"
placeholder="密码"
v-model="password"
border="none"
></u--input>
</view>
@@ -46,6 +47,7 @@
</view>
<view class="pact">
<radio :checked="pactChecked" activeBackgroundColor="#3264ed" activeBorderColor="#3264ed"
borderColor="#3264ed" color="#fff" @click="pactChange" />
<view>我已经阅读并同意<text @click="toPact">《用户协议》</text>和<text @click="toPact">《隐私协议》</text></view>
</view>
</view>
@@ -58,8 +60,8 @@
export default {
data() {
return {
email: "",
password: "",
email: "1696136552@qq.com",
password: "123456",
pactChecked: false,
}
},
@@ -67,6 +69,9 @@
},
methods: {
pactChange() {
this.pactChecked = !this.pactChecked
},
login() {
if(this.email==''){
uni.showToast({
@@ -102,9 +107,11 @@
uni.showToast({
title: res.data.msg,
icon: 'none'
});
});token
} else if (res.data.code == 0) {
//存取session
uni.setStorageSync('token', res.data.data.token);
//返回数据接收成功
uni.reLaunch({
url: '/pages/index/index',// 替换为你要跳转的页面路径