This commit is contained in:
DL
2024-01-03 19:28:45 +08:00
parent 40909d5d9b
commit e32d56cf7a
24 changed files with 277 additions and 1307 deletions

View File

@@ -14,3 +14,10 @@ export const editUserAPI = (data) => request.post('user/user/edit',data)
* 退出 /api/front/login/logout
*/
export const logoutAPI = () => request.get('login/logout')
/*
* 获取商户客服信息 /api/front/merchant/customer/service/info/{id}
*/
export const onlineServiceAPI = (id) => request.get(`merchant/customer/service/info/${id}`)

View File

@@ -119,6 +119,7 @@
},
// 选择图片
chooseImage(){
console.log('进来了-chooseImage');
uni.chooseImage({
count: this.limit - this.PhotoSharinglist.length,
success: res => {
@@ -130,8 +131,12 @@
});
this.updata(list[i], list.length, i)
}
},
fail: (err) => {
console.log(err,'chooseImage');
}
})
console.log('走到下面了-chooseImage');
},
// 上传
updata(url, len, i) {

View File

@@ -67,32 +67,6 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/resubmit/resubmitDetail",
"style": {
"navigationBarTitleText": "维修预约",
"enablePullDownRefresh": false
}
},{
"path": "pages/resubmit/resubmitResult",
"style": {
"navigationBarTitleText": "维修预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/resubmit/resubmitTime",
"style": {
"navigationBarTitleText": "预约时间",
"enablePullDownRefresh": false
}
},

View File

@@ -110,6 +110,7 @@
uni.navigateTo({
url: '/pages/car/unbindResult'
})
this.$refs.uCode.reset();
})
.catch((err) => {
// console.log(err,'err-unbindCarAPI');
@@ -130,7 +131,7 @@
uni.showLoading({
title: '正在获取验证码'
})
// getPhoneCodeAPI()
getPhoneCodeAPI()
this.timer=setTimeout(() => {
uni.hideLoading();
uni.$u.toast('验证码已发送');

View File

@@ -14,7 +14,7 @@
<u-popup :show="show" :round="10" mode="bottom">
<view class="outsideview">
<view class="topview">
<image src="@/static/images/images/logo.png" mode="" shape="circle"></image>
<image src="@/static/images/images/logo.jpg" mode="" shape="circle"></image>
<!-- <view class="txt">用户协议与隐私政策</view> -->
<text class="txt">用户协议与隐私政策</text>
</view>
@@ -24,6 +24,12 @@
<a class='con_a' href="https://www.uviewui.com">隐私政策</a><a class='con_a'
href="https://www.uviewui.com">用户协议</a>
</view>
<!-- <view>
欢迎使用星桔EV小程序在您使用本小程序之前请您在您使用本小程序之前请您在您使用本小程序之前请您在您使用本小程序之前请您仔细阅读
<u-link href="https://uviewui.com/" text="《隐私政策》" color="#13AFA8"></u-link>
<u-link href="https://uviewui.com/" text="《用户协议》" color="#13AFA8"></u-link>
</view> -->
<view style="margin-top: 20rpx;">
<text class="foottxt">
请您在您使用本小程序之前请您在您使用本小程序之前请您仔细阅读

View File

@@ -168,10 +168,10 @@
this.listData.limit=res.data.limit
this.listData.page=res.data.page
this.total=res.data.total
console.log(res,'res-getOrderListAPI');
// console.log(res,'res-getOrderListAPI');
},
tabsClick(tab) {
console.log('tabsClick', tab);
// console.log('tabsClick', tab);
this.tabOrderType=tab.orderType
this.tabName=tab.name
this.getOrderList(tab.orderType)
@@ -186,23 +186,23 @@
this.getOrderList(this.tabOrderType)
this.$toast('取消工单成功')
this.cancelShow = false
console.log('确认-取消');
// console.log('确认-取消');
}
if (this.isBtn == 2) {
await deleteOrderAPI(this.isId)
this.getOrderList(this.tabOrderType)
this.$toast('删除工单成功')
this.cancelShow = false
console.log('确认-删除');
// console.log('确认-删除');
}
if (this.isBtn == 3) {
// 跳转重新填写
wx.setStorageSync('isItem',this.isItem)
uni.navigateTo({
url:'/pages/resubmit/resubmitDetail'
url:'/pages/repair/repairDetail'
})
this.cancelShow = false
console.log('确认-重新填写');
// console.log('确认-重新填写');
}
},
quxiaoBtn() {
@@ -225,7 +225,7 @@
this.isId=id
},
resubmitBtn(num,item) {
// console.log('重新提交');
// console.log(item,'重新提交');
this.cancelShow = true
this.title = '重新提交'
this.isSure = '重新填写工单'
@@ -235,6 +235,7 @@
// 去评价
toPushReview(obj){
console.log(obj,'去评价携带obj');
// wx.setStorageSync('Obj',obj)
wx.setStorageSync('Obj',obj)
uni.navigateTo({
url:'/pages/order/pushReview'

View File

@@ -1,7 +1,12 @@
<template>
<view class="myreview">
<!-- 发布评价 => 提交 -->
<!-- <view class="componview">
<u-transition :show="isShowView" mode="fade-down">
<view class="componview">
<image class="com_img" src="@/static/images/images/order_component.png" mode=""></image>
</view>
</u-transition>
<!-- <view class="componview" v-if="isShowView">
<image class="com_img" src="@/static/images/images/order_component.png" mode=""></image>
</view> -->
<view class="review_down" v-for="item in reviewList" :key="item.id">
@@ -37,6 +42,7 @@
<script>
import { getReviewListAPI } from '@/api/order'
import { times } from '../../uni_modules/uview-ui/libs/function/digit';
export default{
data(){
return{
@@ -45,9 +51,22 @@
limit:20,
page:1,
},
reviewList:[]
reviewList:[],
isShowView:false,
timer:null
}
},
onLoad(query) {
// console.log(query,'query-我的评价里面的');
this.isShowView=query.isShowView
if(query.isShowView){
this.timer=setInterval((res)=>{
// console.log(res,'定时器里面的');
this.isShowView=false
},3000)
}
},
onShow() {
this.getReviewList()
},
@@ -56,7 +75,11 @@
const review= await getReviewListAPI(this.reviewData)
console.log(review,'我的评价列表');
this.reviewList=review.data.list
}
},
},
// beforeDestroy
beforeDestroy() {
clearInterval(this.timer)
}
}
</script>

View File

@@ -131,15 +131,13 @@
},
methods:{
async getOrderDetail(){
console.log(this.orderIds,'this.orderIds[0]');
// const detail=await getOrderDetailAPI({orderSn:this.orderIds[0]})
// console.log(this.orderIds,'this.orderIds[0]');
const detail=await getOrderDetailAPI({orderSn:this.orderSn})
console.log(detail,'getOrderDetailAPI');
// console.log(detail,'getOrderDetailAPI');
this.detailList=detail.data
},
async quxiaoOrder(num){
if( num==1 ){
console.log('取消工单');
await cancelOrderAPI(this.detailList.id)
this.$toast('取消工单成功')
uni.navigateTo({
@@ -150,7 +148,6 @@
// console.log('工单-结束');
// }
if(num==3){
console.log('工单-删除');
await deleteOrderAPI(this.detailList.id)
this.$toast('删除工单成功')
uni.navigateTo({
@@ -158,7 +155,6 @@
});
}
if(num==4){
console.log('发布评价');
wx.setStorageSync('Obj',this.detailList)
uni.navigateTo({
url: `/pages/order/pushReview`,
@@ -171,8 +167,11 @@
// detailList.repairType==3?'事故维修':detailList.repairType==4?'退车接待':'你猜'}} </view>
wx.setStorageSync('isItem',this.detailList)
uni.navigateTo({
url: `/pages/resubmit/resubmitDetail`,
url: `/pages/repair/repairDetail`,
});
// uni.navigateTo({
// url: `/pages/resubmit/resubmitDetail`,
// });
}
}
}

View File

@@ -6,20 +6,25 @@
{{orderObj.repairType==1?'常规保养':orderObj.repairType==2?'故障维修'
:orderObj.repairType==3?'事故维修':orderObj.repairType==4?'退车':'暂无'}}
</view>
<view class="up_centre">
<view class="up_centre_l">
<text class="pingjia">评价 </text>
<u-rate :count="5" v-model="pushData.star" active-color="#F68D1F" inactive-color="#E4E4E4" :allowHalf='true'></u-rate>
<view class="l_score" v-if="pushData.star"> {{pushData.star}} </view>
</view>
</view>
<view class="text_area">
<u-textarea v-model="pushData.comment" placeholder="评价一下我们的服务怎么样吧~" count :maxlength='100' border='none' height='150'></u-textarea>
</view>
<u-form :rules="rules" :model="pushData" ref="uForm">
<u-form-item prop="star">
<view class="up_centre">
<view class="up_centre_l">
<text class="pingjia">评价 </text>
<u-rate :count="5" v-model="pushData.star" active-color="#F68D1F" inactive-color="#E4E4E4" :allowHalf='true'></u-rate>
<view class="l_score" v-if="pushData.star"> {{pushData.star}} </view>
</view>
</view>
</u-form-item>
<u-form-item prop="comment">
<view class="text_area">
<u-textarea v-model="pushData.comment" placeholder="评价一下我们的服务怎么样吧~" count :maxlength='100' border='none' height='150'></u-textarea>
</view>
</u-form-item>
</u-form>
<view class="up_down">
<imageUpload v-model="value" :uploadIcon='uploadIcon' :clearIcon='clearIcon'/>
</view>
</view>
<view class="line_view"></view>
@@ -56,13 +61,18 @@
star: null
},
value:'',
reviewList:[]
reviewList:[],
isShowView:true, //控制myReview
rules: {
comment: [ {required: true, message: '请填写评价', trigger: ['blur','change']} ],
star: [ { required: true, message: '请填写评分',trigger: ['blur','change']} ],
},
}
},
watch: {
value: {
handler(nV,oV) {
console.log(nV,oV,'value')
console.log(nV,oV,'value-nV,oV-pushviewL里面的')
this.pushData.pics.push(nV)
// console.log(this.pushData,'this.pushData');
},
@@ -72,6 +82,7 @@
onShow() {
// console.log(wx.getStorageSync('Obj'),'123456');
this.orderObj=wx.getStorageSync('Obj')
console.log(this.orderObj,'qu - ping - jia ');
this.getReviewList()
},
methods:{
@@ -86,15 +97,15 @@
if(this.orderObj.orderSn==item.orderSn){
this.$toast('已评价过')
uni.navigateTo({
url: '/pages/order/myReview'
url: `/pages/order/myReview`
});
}else{
this.pushData.id=this.orderObj.id
pushReviewAPI(this.pushData)
.then((res) => {
console.log(res,'then-res');
// console.log(res,'then-res');
uni.navigateTo({
url: '/pages/order/myReview'
url: `/pages/order/myReview?isShowView=${this.isShowView}`
});
})
.catch((err) => {

View File

@@ -89,7 +89,7 @@
// week: weeks[this.ofWeek-1]
});
}
console.log(daysOfWeek,'daysOfWeekdaysOfWeek');
// console.log(daysOfWeek,'daysOfWeekdaysOfWeek');
return daysOfWeek;
},
// 时间段
@@ -107,10 +107,11 @@
},
methods: {
async getTimeList(){
this.dateData.merId=this.checkIds[0]
const isItem = wx.getStorageSync('isItem') // 从order来
this.dateData.merId=this.checkIds[this.checkIds.length - 1] ? this.checkIds[this.checkIds.length - 1] : isItem.merId
// 当前时间
const res=await getTimeAPI()
console.log(res,'当前时间');
// console.log(res,'当前时间');
this.dateData.workingDay=res.data.day
this.ofWeek=res.data.dayOfWeek
this.getTime(res.data.day)
@@ -123,21 +124,21 @@
},
// 选择哪天
selectTimeBtn(str){
console.log(str,'点击选择');
// console.log(str,'点击选择');
this.onlySel=''
this.daysOfWeek.forEach(ele => {
console.log(ele,'elele');
// console.log(ele,'elele');
if(ele.day==str){
this.year=ele.year
this.month=ele.month
this.day=ele.day
}
});
console.log(this.year,'year',this.nowYear,'nowYear');
// console.log(this.year,'year',this.nowYear,'nowYear');
},
// 时间段
selectSlot(str){
console.log(str,'时间段');
// console.log(str,'时间段');
this.thisHour=str
this.onlySel=str
},

View File

@@ -158,6 +158,7 @@
url,
})
},
// 轮播图
async getCarousel(){
const res = await getCarouselAPI(this.carousel)
// console.log(res,'res--const');

View File

@@ -153,7 +153,7 @@
},
onLoad(query) {
console.log(query,'query-query-detail');
this.reId= +query.id
// this.reId= +query.id
this.dayTime.workingDay=query.workingDay
this.dayTime.workingTime=query.workingTime
},
@@ -165,9 +165,12 @@
},
methods: {
async getStoreList(){
console.log(this.checkIds[0],'this.checkIds[0]--detail');
console.log(this.homenum,'this.homenum--在repairdetail中');
this.createData.repairType=this.homenum
// console.log(this.homenum,'this.homenum--在repairdetail中');
// console.log(this.checkIds,'this.checkIds[0]--detail--1111111111111');
const isItem = wx.getStorageSync('isItem') // 从order来
this.reId=this.checkIds[this.checkIds.length - 1] ? this.checkIds[this.checkIds.length - 1] : isItem.merId
console.log(this.reId,'this.reId------detail里面的');
this.createData.repairType=this.homenum ? this.homenum : isItem.repairType
const res=await getStoreList(this.tabledata)
// console.log(res,'resssssssssss');
res.data.list.forEach(ele => {
@@ -175,20 +178,14 @@
if(ele.id==this.reId){
this.dataObj=ele
}
// if(ele.id==this.checkIds[0]){
// this.dataObj=ele
// }
});
// console.log(this.dataObj,'this.dataObj');
// 获取我的汽车
const car=await getMyCarAPI()
console.log(car,'carrrrr');
// console.log(car,'carrrrr');
this.formObj=car.data
// wx.getStorage({key:'carInfo',success:(res)=> {
// this.formObj=res.data
// }})
},
//选择时间
//选择时间
openTime() {
// this.$refs.chooseTime.open()
// this.popupShowTime = true
@@ -202,7 +199,7 @@
// 确认提交
groupSubmit() {
console.log('groupSubmit');
this.createData.merId=this.checkIds[0]
this.createData.merId=this.reId
this.createData.carId=this.formObj.id
this.createData.workingDay=this.dayTime.workingDay
this.createData.workingTime=this.dayTime.workingTime
@@ -211,13 +208,13 @@
reservationCreateAPI(this.createData)
.then((res) => {
console.log(res,'then-res');
// console.log(res,'then-res');
uni.navigateTo({
url: '/pages/repair/repairResult'
});
})
.catch((err) => {
console.log(err,'err');
// console.log(err,'err');
this.$toast(err)
});

View File

@@ -28,6 +28,10 @@
mineInfo:{}
}
},
onLoad() {
const obj=wx.getStorageSync('realName', this.userInfo)
console.log(obj,'obj-onLoad');
},
onShow() {
// this.getUserMenuData()
// this.getBranner()

View File

@@ -5,7 +5,7 @@
<view class="rect_all">
<view class="rect" @tap.stop @click="callphone">
<image class="icon" src="@/static/images/images/line_ptone.png" mode=""></image>
<view class="phone"> 123 4567 8987 </view>
<view class="phone"> {{ servicePhone }} </view>
</view>
<view class="quxiao" @tap.stop @click="quxiaoBtn"> 取消 </view>
</view>
@@ -15,13 +15,25 @@
</template>
<script>
import { onlineServiceAPI ,getMineInfoAPI } from '@/api/mine'
export default{
data(){
return{
show:true
show:true,
servicePhone:''
}
},
onShow() {
this.onlineService()
},
methods:{
async onlineService(){
const mineInfo=await getMineInfoAPI()
// console.log(mineInfo,'mineinfo');
const res=await onlineServiceAPI(mineInfo.data.id)
// console.log(res,'res-phone');
this.servicePhone=res.data.servicePhone
},
quxiaoBtn(){
this.show=false
uni.switchTab({
@@ -30,6 +42,9 @@
},
callphone(){
console.log('打电话');
uni.makePhoneCall({
phoneNumber:this.servicePhone
})
}
}
}

View File

@@ -1,7 +1,8 @@
<template>
<view class="setup">
<view class="au_img">
<image class="img" src="@/static/images/images/setuplogo.png" mode=""></image>
<!-- <image class="img" src="@/static/images/images/setuplogo.png" mode=""></image> -->
<image class="img" src="@/static/images/images/logo.jpg" mode=""></image>
</view>
<view class="au_card">
<view class="card_row" @click="toUserAgreePages(1)">
@@ -14,7 +15,7 @@
</view>
<view class="card_row">
<view class='rowl'> 版本号 </view>
<view class='rowr'> 1.0.1 </view>
<view class='rowr'> 1.0.0 </view>
</view>
</view>
</view>

View File

@@ -2,7 +2,8 @@
<view class="useragree">
<view class="title" v-if="setupnum==1"> 用户协议</view>
<view class="title" v-if="setupnum==2"> 隐私协议</view>
<rich-text nodes="{{htmlContent}}" />
<rich-text :nodes="htmlContent" />
<!-- <rich-text nodes="{{htmlContent}}" /> -->
<!-- <view class="content">
<view class="h1title"> 1.一级标题 </view>
<view class="">

View File

@@ -1,503 +0,0 @@
<template>
<view class="repairdeyail">
<view class="allview">
<view class="banner">
<image class="banner_img" :src="dataObj.backImage" mode=""></image>
<view class="banner_score">{{dataObj.starLevel}}</view>
</view>
<view class="content">
<view class="con_up">
<view class="up_left">
<view class="up_l_one"> {{dataObj.name}} </view>
<view class="up_l_two">
<view class='twotxt'>常规保养</view>
<view class='twotxt'>美容洗车</view>
</view>
<view class="up_l_three">
<view class="threeleft"> 营业时间 </view>
<view class="threeright"> {{dataObj.dayTime?dataObj.dayTime:'9:00-20:00'}} </view>
</view>
<view class="up_l_four line-one">
<text> {{dataObj.distance}}km </text> <text class="suxian"> | </text>
<text> {{dataObj.province + dataObj.city + dataObj.addressDetail}} </text>
</view>
</view>
<view class="up_right">
<view class="up_r_icon" @click.stop="callPhone(JSON.stringify(dataObj.phone))">
<image class="up_r_iconimg" src="@/static/images/images/phone_fill.png" mode=""></image>
</view>
<view class="up_r_icon">
<image class="up_r_iconimg" src="@/static/images/images/pos_icon.png" mode=""></image>
</view>
</view>
</view>
<view class="con_down">
<view class="cheview">
<view class="cheview_l"> 车辆 </view>
<view class="cheview_r">
<text slot="value" class="u-slot-value formtxt"> {{createData.repairType==1?'常规保养':'暂无'}} </text>
</view>
</view>
<view class="cheview" @click="popupShow = true">
<view class="cheview_l"> 预约信息 </view>
<view class="infoview_r">
<view class="r_txt"> {{formObj.carNo}} {{formObj.ownerName?formObj.ownerName:''}} </view>
<image class="r_icon" src="@/static/images/images/r_icon.png" mode=""></image>
</view>
</view>
<view class="cheview" @click="openTime">
<view class="cheview_l"> 预约时间 </view>
<view class="infoview_r">
<view class="r_txt"> {{dayTime.workingDay?dayTime.workingDay:''}} {{ dayTime.workingTime?dayTime.workingTime:'请填写' }} </view>
<image class="r_icon" src="@/static/images/images/r_icon.png" mode=""></image>
</view>
</view>
<view class="descview">
<view class="cheview_l"> 描述 </view>
<view class="descview_r">
<u-textarea v-model="createData.repairDescribe" placeholder="选填" border='none'></u-textarea>
</view>
</view>
</view>
</view>
</view>
<view class="con_btnview">
<view class="btnview_sure" @click="groupSubmit" shape="circle"> </view>
</view>
<!-- 预约信息 -->
<u-popup :show="popupShow" :round="16" mode="bottom" @close="popupShow = false" closeable='true'>
<view class="popuptxt">预约信息</view>
<view class="popview">
<view class="groupview">
<view class="grop_con"> 基本信息 </view>
<view class="carnum">
<view class="num_l"> 车牌 </view>
<view class="num_r">{{formObj.carNo}} </view>
</view>
<view class="carnum">
<view class="num_l"> 车型 </view>
<view class="num_r"> {{formObj.modelName}}</view>
</view>
<view class="carnum">
<view class="num_l"> 姓名 </view>
<view class="num_r"> {{formObj.ownerName}} </view>
</view>
<view class="carnum">
<view class="num_l"> 电话 </view>
<view class="num_r"> {{dataObj.phone}} </view>
</view>
</view>
<view class="popupbtn" @click="popupSubmit"> </view>
</view>
</u-popup>
</view>
</template>
<script>
import { reservationCreateAPI,getMyCarAPI } from '@/api/repair'
import { getOrderDetailAPI } from '@/api/order'
import { mapGetters } from 'vuex'
export default {
data() {
return {
popupShow: false,
dayTime: {
workingDay:'',
workingTime:''
},
dataObj:{},
formObj:{},
createData:{
carId: null,
merId: null,
repairDescribe: "",
repairType: 1,
workingDay: "",
workingTime: ""
},
orderSn:''
}
},
onLoad(query) {
console.log(query,'query-query');
this.dayTime.workingDay=query.workingDay
this.dayTime.workingTime=query.workingTime
},
computed: {
...mapGetters(['checkIds'])
},
onShow() {
this.getOrderDetail()
this.dataObj=wx.getStorageSync('isItem')
},
methods: {
async getOrderDetail(){
console.log(this.checkIds,'重新提交--detail中--merid');
// 获取我的汽车
const car=await getMyCarAPI()
console.log(car,'carrrrr');
this.formObj=car.data
},
//选择的时间
openTime() {
uni.navigateTo({
url: `/pages/resubmit/resubmitTime`
});
},
// 确认提交
groupSubmit() {
console.log('groupSubmit');
this.createData.merId=this.checkIds[0]
this.createData.carId=this.formObj.id
this.createData.workingDay=this.dayTime.workingDay
this.createData.workingTime=this.dayTime.workingTime
console.log(this.createData,'this.createData');
reservationCreateAPI(this.createData)
.then((res) => {
console.log(res,'then-res');
uni.navigateTo({
url: '/pages/repair/repairResult'
});
})
.catch((err) => {
console.log(err,'err');
this.$toast(err)
});
},
popupSubmit() {
console.log('预约信息');
},
callPhone(phoneNumber) {
console.log(phoneNumber);
uni.makePhoneCall({
phoneNumber
})
},
}
}
</script>
<style lang="scss" scoped>
.repairdeyail {
height: 100vh;
background-color: #f5f5f5;
.allview {
padding: 16rpx 24rpx;
background-color: #f5f5f5;
.banner {
// border: 1px solid red;
position: relative;
width: 702rpx;
height: 304rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
.banner_img {
width: 702rpx;
height: 304rpx;
}
.banner_score {
width: 136rpx;
height: 54rpx;
font-size: 36rpx;
line-height: 52rpx;
font-weight: 500;
text-align: center;
font-family: PingFang SC, PingFang SC;
color: #FFFFFF;
background: #F68D1F;
border-radius: 16rpx 0rpx 16rpx 0rpx;
opacity: 1;
position: absolute;
bottom: -27rpx;
right: 0;
}
}
.content {
.con_up {
// border: 1px solid red;
// width: 702rpx;
// height: 298rpx;
padding: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 10rpx;
// 左
.up_left {
.up_l_one {
font-size: 36rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
padding-bottom: 8rpx;
}
.up_l_two {
padding: 0 28rpx 24rpx 0rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #444444;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.twotxt {
padding: 4rpx 12rpx;
border-radius: 4rpx;
background-color: #efefef;
margin-right: 10rpx;
// flex: 0 0 30%;
margin-top: 10rpx;
}
}
.up_l_three {
display: flex;
padding-bottom: 24rpx;
.threeleft {
width: 120rpx;
height: 44rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 40rpx;
text-align: center;
font-family: PingFang SC, PingFang SC;
color: #13AFA8;
background: #E2F0EF;
border-radius: 4rpx 0rpx 0rpx 4rpx;
opacity: 1;
border: 2rpx solid #13AFA8;
}
.threeright {
width: 178rpx;
height: 44rpx;
font-size: 28rpx;
font-weight: 500;
line-height: 42rpx;
text-align: center;
color: #FFFFFF;
background: #13AFA8;
border-radius: 0rpx 4rpx 4rpx 0rpx;
opacity: 1;
font-family: PingFang SC, PingFang SC;
}
}
.up_l_four {
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #111111;
// border: 1px solid red;
width: 440rpx;
.suxian {
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #AAAAAA;
margin: 0 8rpx;
}
}
}
// 右 icon
.up_right {
display: flex;
.up_r_icon {
width: 48rpx;
height: 48rpx;
background-color: #13AFA8;
border-radius: 50%;
margin-left: 20rpx;
display: flex;
justify-content: center;
align-items: center;
}
.up_r_iconimg {
width: 48rpx;
height: 48rpx;
}
}
}
.con_down {
border: 1px solid #FFFFFF;
padding: 0 32rpx 32rpx 32rpx;
margin: 35rpx 0;
background-color: #fff;
border-radius: 10rpx;
.labeltxt {
display: block;
width: 160rpx;
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #444444;
line-height: 42rpx;
}
.formtxt {
display: block;
width: 128rpx;
height: 44rpx;
border-radius: 4rpx 4rpx 4rpx 4rpx;
opacity: 1;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
text-align: center;
background: #444444;
color: #FFFFFF;
line-height: 42rpx;
}
.cheview {
// border: 1px solid red;
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
border-bottom: 1rpx solid #EDEDED;
margin-top: 50rpx;
.r_icon {
width: 10rpx;
height: 20rpx;
margin-left: 8rpx;
}
.infoview_r {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.cheview_l {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #444444;
}
.descview {
margin-top: 50rpx;
}
}
}
.line-one {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
// border: 1px solid blue;
}
}
.con_btnview {
padding: 8rpx 24rpx;
width: 100%;
height: 112rpx;
background: #FFFFFF;
position: fixed;
left: 0;
bottom: 40rpx;
.btnview_sure {
height: 96rpx;
line-height: 96rpx;
text-align: center;
font-size: 34rpx;
color: #FFFFFF;
background-color: #13AFA8;
border-radius: 60rpx 60rpx 60rpx 60rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
}
}
.popuptxt {
height: 132rpx;
line-height: 130rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #222222;
text-align: center;
border-bottom: 1rpx solid #EDEDED;
}
.popview {
padding: 0 20rpx;
.groupview {
margin-bottom: 50rpx;
padding: 24rpx;
.grop_con {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 550;
color: #222222;
padding-top: 24rpx;
}
.carnum {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
border-bottom: 1rpx solid #EDEDED;
margin-top: 40rpx;
}
.num_l {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #444444;
}
.num_r {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #111111;
}
}
.popupbtn {
margin-top: 50rpx;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
color: #FFFFFF;
background-color: #13AFA8;
border-radius: 60rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
}
}
}
</style>

View File

@@ -1,133 +0,0 @@
<template>
<view class="resultall">
<view class="re_result">
<view class="conview">
<view class="imgview">
<image class="img" src="@/static/images/images/homeResult.png" mode=""></image>
</view>
<view class="txtview">
<view class="bigtxt">预约成功</view>
<view class="smalltxt">你的维修工单已经预约成功可在我的工单里面查看进度</view>
</view>
</view>
<view class="btnview">
<view class="btn_top" @click="toMyBtn">
我的工单
</view>
<view class="btn_bottom" @click="toHomePage">
返回首页
</view>
</view>
</view>
<!-- <u-button color='#13AFA8' shape="circle">我的工单</u-button>
<u-button color='#13AFA8' shape="circle" :plain="true" :hairline="false" >返回首页</u-button> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
toMyBtn() {
console.log('去我的工单');
uni.navigateTo({
url: `/pages/order/myOrder`
});
},
toHomePage() {
console.log('去首页');
uni.switchTab({
url: '/pages/home/index'
});
}
}
}
</script>
<style lang="scss" scoped>
.resultall {
background-color: #F5F5F5;
height: 100vh;
}
.re_result {
padding: 135rpx 50rpx 0 50rpx;
.conview {
// border: 1px solid blue ;
.imgview {
// border: 1px solid red ;
width: 500rpx;
height: 280rpx;
margin: 0 auto;
.img {
width: 500rpx;
height: 280rpx;
}
}
.txtview {
text-align: center;
margin-top: 40rpx;
.bigtxt {
font-size: 40rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #000000;
}
.smalltxt {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
margin-top: 15rpx;
}
}
}
.btnview {
margin-top: 64rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
.btn_top {
width: 264rpx;
height: 80rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
opacity: 1;
line-height: 78rpx;
text-align: center;
font-size: 34rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #fff;
background: #13AFA8;
}
.btn_bottom {
width: 264rpx;
height: 80rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
opacity: 1;
line-height: 78rpx;
text-align: center;
font-size: 34rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
margin-top: 20rpx;
color: #13AFA8;
}
}
}
</style>

View File

@@ -1,336 +0,0 @@
<template>
<view class="retime">
<view class="tabs">
<view class="time_up">
<view class="up_up"> {{month}} </view>
<view class="up_cen">
<view class="mon" v-for="item in daysOfWeek" :key="item.id">
<view :class="item.day==day?'mon_up_only':'mon_up'" @click="selectTimeBtn(item.day)"> {{item.day}} </view>
<view class="mon_down"> {{item.week}} </view>
</view>
</view>
</view>
<view class="time_slot">
<view :class="onlySel==item.workingTime?'ts_only':item.past ?'ts_grey':'ts'"
v-for="item in pastTimeSlots" :key="item.id"
@click="item.past ? null : selectSlot(item.workingTime)">
{{item.workingTime}}
</view>
</view>
<view class="selectedtime">
<view class="select">
<text class="sel_txt">已选择</text>
<view class="sel_down"> {{month}}{{day}} {{thisHour?thisHour:'请选时间'}} </view>
</view>
<view class="surebtn" @click="sureBtn"> 确认预约 </view>
</view>
</view>
</view>
</template>
<script>
import { getTimeAPI , getDateListAPI } from '@/api/repair'
import { mapGetters } from 'vuex'
export default {
data() {
return {
// timeSlot:[
// {id:1, nine:'9:00-9:30'},
// {id:2, nine:'9:30-10:00'},
// {id:3, nine:'10:00-10:30'},
// {id:4, nine:'10:30-11:00'},
// {id:5, nine:'11:00-11:30'},
// {id:6, nine:'11:30-12:00'},
// {id:7, nine:'13:30-14:00'},
// {id:8, nine:'14:00-14:30'},
// {id:9, nine:'14:30-15:00'},
// {id:10, nine:'15:00-15:30'},
// {id:11, nine:'15:30-16:00'},
// {id:12, nine:'16:30-17:00'},
// {id:13, nine:'17:00-17:30'},
// {id:14, nine:'20:30-21:00'},
// ],
onlySel:'',
// 获取时间块
dateData:{
merId:null,
workingDay:''
},
dateDataList:[],
ofWeek:null,
workingDay:'',
workingTime:'',
year:'',
month:'',
day:'',
thisHour:'',
nowDay:'',
nowYear:''
}
},
onShow() {
this.getTimeList()
},
computed: {
...mapGetters(['checkIds']),
daysOfWeek() {
const weeks = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
let daysOfWeek = [];
for (let i = 0; i < 7; i++) {
let d = new Date(this.dateData.workingDay);
d.setDate(d.getDate() + i);
daysOfWeek.push({
id:i+1,
year:d.getFullYear(),
month:d.getMonth()+1,
day: d.getDate(),
week: weeks[d.getDay()]
// week: weeks[this.ofWeek-1]
});
}
console.log(daysOfWeek,'daysOfWeekdaysOfWeek');
return daysOfWeek;
},
// 时间段
pastTimeSlots() {
const now = new Date(this.dateData.workingDay);
const nowMinutes = now.getHours() * 60 + now.getMinutes();
return this.dateDataList.map(slot => {
const end = slot.workingTime.split('-')[1];
const endMinutes = parseInt(end.split(':')[0]) * 60 + parseInt(end.split(':')[1]);
return this.day > this.nowDay || (this.year > this.nowYear) ?
{...slot} :
{...slot, past: nowMinutes > endMinutes};
});
}
},
methods: {
async getTimeList(){
console.log(this.checkIds,'重新提交--选择时间--merid');
this.dateData.merId=this.checkIds[0]
// 当前时间
const res=await getTimeAPI()
console.log(res,'当前时间');
this.dateData.workingDay=res.data.day
this.ofWeek=res.data.dayOfWeek
this.getTime(res.data.day)
// 时间块
// console.log(this.dateData,'获取时间块 接口');
const res1 = await getDateListAPI(this.dateData)
// console.log(res1,'获取时间块');
this.dateDataList=res1.data
},
// 选择哪天
selectTimeBtn(str){
console.log(str,'点击选择');
this.onlySel=''
this.daysOfWeek.forEach(ele => {
console.log(ele,'elele');
if(ele.day==str){
this.year=ele.year
this.month=ele.month
this.day=ele.day
}
});
console.log(this.year,'year',this.nowYear,'nowYear');
},
// 时间段
selectSlot(str){
console.log(str,'时间段');
this.thisHour=str
this.onlySel=str
},
getTime(dateTime){
const d = new Date(dateTime)
this.year=d.getFullYear()
this.month = d.getMonth() + 1
this.day = d.getDate()
this.nowDay = d.getDate()
this.nowYear=d.getFullYear()
},
sureBtn(){
this.workingDay =this.year+'-'+ this.month + '-' + this.day;
this.workingTime=this.thisHour
uni.navigateTo({
url: `/pages/resubmit/resubmitDetail?workingDay=${this.workingDay}&workingTime=${this.workingTime}`
});
}
}
}
</script>
<style lang="scss" scoped>
.selectedtime{
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
bottom: 50rpx;
width: 90%;
.select{
width: 40%;
height: 96rpx;
.sel_txt{
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
}
.sel_down{
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #111111;
margin-top: 8rpx;
}
}
.surebtn{
width: 60%;
height: 96rpx;
background: #13AFA8;
border-radius: 48rpx;
opacity: 1;
text-align: center;
line-height: 96rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
.time_slot{
// border: 1px solid red;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
margin-top: 72rpx;
.ts_grey{
width: 48%;
height: 64rpx;
text-align: center;
line-height: 64rpx;
background: #F5F5F5;
border-radius: 8rpx;
opacity: 1;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
margin-bottom: 32rpx;
}
.ts{
width: 48%;
height: 64rpx;
text-align: center;
line-height: 64rpx;
background: #F5F5F5;
border-radius: 8rpx;
opacity: 1;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #111111;
margin-bottom: 32rpx;
}
.ts_only{
width: 48%;
height: 64rpx;
text-align: center;
line-height: 62rpx;
background: #13AFA8;
border-radius: 8rpx;
opacity: 1;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-bottom: 32rpx;
}
}
.time_up{
// border: 1px solid red;
// display: flex;
// justify-content: space-between;
// align-items: center;
.up_up{
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #222222;
margin-bottom: 32rpx;
}
.up_cen{
// border: 1px solid blue;
display: flex;
justify-content: space-around;
align-items: center;
}
.mon{
margin: 0 auto;
.mon_up_grey{
width: 64rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
background: #F5F5F5;
border-radius: 52rpx;
opacity: 1;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
}
.mon_up_only{
width: 64rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
background: #13AFA8;
border-radius: 52rpx;
opacity: 1;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
.mon_up{
width: 64rpx;
height: 64rpx;
text-align: center;
line-height: 62rpx;
border-radius: 52rpx;
opacity: 1;
border: 2rpx solid #AAAAAA;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #111111;
}
.mon_down_grey{
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
margin-top: 10rpx;
}
.mon_down{
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #111111;
margin-top: 10rpx;
}
}
}
.retime {
height: 100vh;
padding: 32rpx;
background: #FFFFFF;
position: relative;
}
</style>

View File

@@ -50,24 +50,17 @@
}
},
onShow() {
// this.getcarInfo()
this.getMyCar()
},
methods: {
async getMyCar(){
const car= await getMyCarAPI()
const car= await getMyCarAPI() // 车辆信息
console.log(car,'car-info');
this.formObj=car.data
const user= await getUserInfoAPI()
console.log(user,'user-info');
const user= await getUserInfoAPI() // 用户信息
console.log(user,'user-info');
this.userInfo=user.data
},
// getcarInfo(){
// wx.getStorage({key:'carInfo',success:(res)=> {
// this.formObj=res.data
// console.log(res.data);
// }})
// },
toHomePage() {
uni.switchTab({
url: '/pages/home/index'

View File

@@ -1,9 +1,9 @@
<template>
<view class="realname">
<!-- 实名认证-完善资料 -->
<view class="toptxt" :show="isShow">
<view class="toptxt" v-if="isShow">
如果你是网约车司机请您完善资料!
<u-icon name="close" size="32rpx" @click="isShow=false"></u-icon>
<u-icon name="close" size="32rpx" @click="iconClick"></u-icon>
</view>
<view class="bgcview">
<view class="content">
@@ -16,15 +16,15 @@
<view class="formview">
<u-form labelPosition="left" :model="userInfo" :rules="rules" ref="uForm" label-width='190rpx'
:label-style="{'font-size':'30rpx',color:'#444444'}">
<u-form-item label="司机姓名" prop="userInfo.realName" border-bottom='true'>
<u-form-item label="司机姓名" prop="realName" border-bottom='true'>
<u-input v-model="userInfo.realName" border="none" inputAlign='right' placeholder="请输入您的姓名"
placeholderStyle='font-size:30rpx;color:#999999'></u-input>
</u-form-item>
<u-form-item label="手机号码" prop="userInfo.phone" border-bottom=' true'>
<u-form-item label="手机号码" prop="phone" border-bottom=' true'>
<u-input v-model="userInfo.phone" border="none" inputAlign='right' maxlength='11' placeholder="请输入您的手机号码"
placeholderStyle='font-size:30rpx;color:#999999'></u-input>
</u-form-item>
<u-form-item label="身份证号码" prop="userInfo.idCard" border-bottom='true'>
<u-form-item label="身份证号码" prop="idCard" border-bottom='true'>
<u-input v-model="userInfo.idCard" border="none" inputAlign='right' maxlength='18'
placeholder="请输入您的18位身份证号" placeholderStyle='font-size:30rpx;color:#999999'></u-input>
</u-form-item>
@@ -59,30 +59,20 @@
idCard: '',
qualificationImage: '',
},
// :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
rules: {
realName: {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
phone: [{
required: true,
message: '请填写手机号',
trigger: ['blur', 'change']
},
{
pattern: /^1[3-9]\d{9}$/,
message: '手机号不正确',
trigger: ['change', 'blur'],
}
realName: [ {required: true, message: '请填写姓名', trigger: ['blur','change']} ],
phone: [ { required: true, message: '请填写手机号',trigger: ['blur','change'] },
{ pattern: /^1[3-9]\d{9}$/, message: '手机号不正确',trigger:['blur','change'] },
// {
// validator: (rule, value, callback) => {
// return uni.$u.test.mobile(value);
// },
// message: '手机号码不正确',
// trigger: ['change','blur'],
// }
],
idCard: {
type: 'string',
required: true,
message: '请填写身份证号',
trigger: ['blur', 'change']
},
idCard: { required: true, message: '请填写身份证号', trigger: ['blur','change'] },
},
uploadIcon: '../../static/images/images/user_upload.png',
clearIcon: '../../static/images/images/user_clear.png',
@@ -104,12 +94,25 @@
}
},
methods: {
iconClick(){
// console.log('123');
this.isShow=false
},
async submit() {
console.log(this.userInfo, '提交所需数据');
await certificationAPI(this.userInfo)
this.$tab.navigateTo('/pages/user/userBinding')
// setStorageSync 改为 setStorage
wx.setStorage('realName', this.userInfo.realName)
// await certificationAPI(this.userInfo)
// this.$tab.navigateTo('/pages/user/userBinding')
certificationAPI(this.userInfo)
.then((res) => {
console.log(res,'then-res');
this.$tab.navigateTo('/pages/user/userBinding')
this.$toast('已提交')
wx.setStorageSync('realName', this.userInfo)
})
.catch((err) => {
console.log(err,'err');
this.$toast(err)
});
}
},
onReady() {},

View File

@@ -9,58 +9,42 @@
<view class="content">
<view class="form-box">
<u-form labelPosition="left" :model="formData" ref="uForm" label-width='190rpx'>
<u-form-item label="车牌号码" border-bottom='true'>
<u-form-item label="车牌号码" border-bottom='true' prop="carNo" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
<!-- <u-input v-model="formData.carNo" border="none" inputAlign='right'></u-input> -->
<view class="fcar_letter">
<view class="f_car_num" @click="keyboardShow=true">
<view class="fcn_l"> {{ formData.carNo.charAt(0) }} </view>
<view class="fcn_r">
<image class="fcn_r_img" src="@/static/images/images/user_down.png" mode=""></image>
<view class="fcar_letter" @click="keyboardShow=true">
<view class="f_car_num" >
<view class="fcn_l"> {{ formData.carNo.charAt(0) }} </view>
<view class="fcn_r">
<image class="fcn_r_img" src="@/static/images/images/user_down.png" mode=""></image>
</view>
</view>
<view class="letter_number">
<!-- <u-code-input v-model="area1" :maxlength="6" :size='30' :space='8'></u-code-input> -->
<view class="ln_one"> {{ formData.carNo.charAt(1) }} </view>
<view class="ln_point"> {{ formData.carNo.charAt(2) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(3) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(4) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(5) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(6) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(7) }} </view>
</view>
</view>
<view class="letter_number">
<!-- <u-code-input v-model="area1" :maxlength="6" :size='30' :space='8'></u-code-input> -->
<view class="ln_one"> {{ formData.carNo.charAt(1) }} </view>
<view class="ln_point"> {{ formData.carNo.charAt(2) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(3) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(4) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(5) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(6) }} </view>
<view class="ln_one"> {{ formData.carNo.charAt(7) }} </view>
</view>
</view>
</u-form-item>
<!-- <u-form-item label="车型" @click="carShow=true" border-bottom='true'>
<u-input v-model="formData.carType" border="none" inputAlign='right' placeholder="请选择车型"></u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="上传行驶证" border-bottom='true'>
<image-upload slot="right" v-model="formData.driveLicense" :uploadIcon='uploadIcon' :limit='1' :isPreviewImage='false' :imageWidth='112' :imageHeight='112'/>
</u-form-item>
<u-form-item label="解绑日期" @click="datetimeShow=true" border-bottom='true'>
<u-input v-model="formData.unbindTime" border="none" inputAlign='right' placeholder="请选择解绑日期"></u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="车辆类型" @click="typeShow=true" border-bottom='true'>
<u-input v-model="formData.category" border="none" inputAlign='right' placeholder="请选择(非必选)"></u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="所属公司" @click="comShow=true" border-bottom='true'>
<u-input v-model="formData.company" border="none" inputAlign='right' placeholder="请选择"></u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="车主姓名" border-bottom='true'>
<u-input v-model="formData.ownerName" border="none" inputAlign='right' placeholder="请填写"></u-input>
</u-form-item>
<u-form-item label="使用性质" @click="natureShow=true" border-bottom='true'>
<u-input v-model="formData.type" border="none" inputAlign='right' placeholder="请选择(非必选)"></u-input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> -->
<u-form-item label="车型" border-bottom='true'>
<view class="lr">
<view class="lr" v-if="carInfo.modelName">
{{carInfo.modelName?carInfo.modelName:'暂无'}}
</view>
<view class="lr" v-else>
<u--input
placeholder="请输入车型"
:readonly='true'
placeholderStyle=" color: #999999 "
suffixIcon="arrow-right"
suffixIconStyle="color: #999999"
border='none'
inputAlign='right'
></u--input>
</view>
</u-form-item>
<u-form-item label="上传行驶证" border-bottom='true'>
<view class="lr">
@@ -69,29 +53,84 @@
</view>
</u-form-item>
<u-form-item label="解绑日期" border-bottom='true'>
<view class="lr">
<view class="lr" v-if="carInfo.unbindTime">
{{carInfo.unbindTime?carInfo.unbindTime:'暂无'}}
</view>
<view class="lr" v-else>
<u--input
placeholder="请输入日期"
:readonly='true'
placeholderStyle=" color: #999999 "
suffixIcon="arrow-right"
suffixIconStyle="color: #999999"
border='none'
inputAlign='right'
></u--input>
</view>
</u-form-item>
<u-form-item label="车辆类型" border-bottom='true'>
<view class="lr">
<view class="lr" v-if="carInfo.category">
{{carInfo.category==1?'公户':carInfo.category==2?'私户':'暂无'}}
</view>
</u-form-item>
<u-form-item label="所属公司" border-bottom='true'>
<view class="lr">
{{carInfo.company?carInfo.company:'暂无'}}
<view class="lr" v-else>
<u--input
placeholder="请输入(非必选)"
:readonly='true'
placeholderStyle=" color: #999999 "
suffixIcon="arrow-right"
suffixIconStyle="color: #999999"
border='none'
inputAlign='right'
></u--input>
</view>
</u-form-item>
<u-form-item label="车主姓名" border-bottom='true'>
<view class="lr">
<u-form-item label="所属公司" border-bottom='true' v-if="carInfo.category==1 || Object.keys(carInfo).length==0">
<view class="lr" v-if="carInfo.category">
{{carInfo.company?carInfo.company:'暂无'}}
</view>
<view class="lr" v-else>
<u--input
placeholder="请输入公司"
:readonly='true'
placeholderStyle=" color: #999999 "
suffixIcon="arrow-right"
suffixIconStyle="color: #999999"
border='none'
inputAlign='right'
></u--input>
</view>
</u-form-item>
<u-form-item label="车主姓名" border-bottom='true' v-if="carInfo.category==2|| Object.keys(carInfo).length==0">
<view class="lr" v-if="carInfo.ownerName">
{{carInfo.ownerName?carInfo.ownerName:'暂无'}}
</view>
<view class="lr" v-else>
<u--input
placeholder="请输入"
:readonly='true'
placeholderStyle=" color: #999999 "
suffixIcon="arrow-right"
suffixIconStyle="color: #999999"
border='none'
inputAlign='right'
></u--input>
</view>
</u-form-item>
<u-form-item label="使用性质" border-bottom='true'>
<view class="lr">
<view class="lr" v-if="carInfo.type">
{{carInfo.type==1?'预约出租客运':carInfo.type==2?'非营运租赁':carInfo.type==3?'租赁':'暂无'}}
</view>
<view class="lr" v-else>
<u--input
placeholder="请输入(非必选)"
:readonly='true'
placeholderStyle=" color: #999999 "
suffixIcon="arrow-right"
suffixIconStyle="color: #999999"
border='none'
inputAlign='right'
></u--input>
</view>
</u-form-item>
</u-form>
</view>
@@ -101,71 +140,24 @@
<u-keyboard mode="car" @change="keyboardChange" @confirm='keyboardConfirmBtn'
:show="keyboardShow" @backspace="backspace" safeAreaInsetBottom autoChange @cancel="cancel" @close="carClose"
></u-keyboard>
<!-- :showCancel='false' :showConfirm='false' -->
<!-- 日期 -->
<!-- <u-datetime-picker ref="datetimePicker" :show="datetimeShow" v-model="datetimeValue" mode="date" title='请选择'
:formatter="formatter" @change="datetimeChange" @confirm='datetimeConfirmBtn'
@cancel="datetimeShow=false"></u-datetime-picker> -->
<!-- 车型 -->
<!-- <u-picker :show="carShow" :columns="carColumns" @change="carChange" @confirm='carConfirmBtn'
@cancel="carShow=false" title='请选择'></u-picker> -->
<!-- 车辆 -->
<!-- <u-picker :show="typeShow" :columns="typeColumns" keyName='label' @change="typeChange" @confirm='typeConfirmBtn'
@cancel="typeShow=false" title='请选择'></u-picker> -->
<!-- 公司 -->
<!-- <u-picker :show="comShow" :columns="comColumns" keyName='name' @change="comChange" @confirm='comConfirmBtn'
@cancel="comShow=false" title='请选择'></u-picker> -->
<!-- 性质 nature -->
<!-- <u-picker :show="natureShow" :columns="natureColumns" keyName='label' @change="natureChange" @confirm='natureConfirmBtn'
@cancel="natureShow=false" title='请选择'></u-picker> -->
</view>
</view>
</template>
<script>
import { userBindAPI,dpListAPI,getCarInfoAPI } from '@/api/user'
import { userBindAPI,getCarInfoAPI } from '@/api/user'
export default {
data() {
return {
top_bgImg: '../../../static/images/images/user_bgr.png',
uploadIcon: '../../static/images/images/user_travel.png',
imageUrls: '',
keyboardShow: false,
datetimeShow: false,
datetimeValue: Number(new Date()),
alltime:'',
// 车型-车辆-性质
carShow: false,
carValue: '',
carColumns: [
['UE5系列', 'UE6系列', 'UE7系列']
],
typeShow:false,
typeValue:'',
typeid:null,
typeColumns: [
[
{id:1,label:'公户车'},
{id:2,label:'私家车'},
]
],
comShow:false,
comValue:'',
comColumns: [],
natureShow:false,
natureValue: '',
natureColumns: [
[
{id:1,label:'预约出租客运'},
{id:2,label:'非营运'},
{id:3,label:'租赁'},
]
],
formData: {
carNo: "",
category: null,
@@ -176,43 +168,6 @@
unbindTime: ""
},
carInfo:{},
rules: {
'formData.ownerName': {
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
'formData.company': {
required: true,
message: '请填写公司',
trigger: ['blur', 'change']
},
'formData.carNo': {
required: true,
message: '请填写车牌号',
trigger: ['blur', 'change']
},
'formData.carType': {
required: true,
message: '请填写车型',
trigger: ['blur', 'change']
},
'formData.unbindTime': {
required: true,
message: '请填写日期',
trigger: ['blur', 'change']
},
'formData.type': {
required: true,
message: '请填写车辆类型',
trigger: ['blur', 'change']
},
'formData.category': {
required: true,
message: '请填写使用性质',
trigger: ['blur', 'change']
},
},
}
},
computed: {
@@ -229,7 +184,6 @@
}
},
onShow() {
this.getdpList()
},
watch:{
// formData:{
@@ -242,61 +196,44 @@
// }
},
methods: {
// 获取 dp 公司
async getdpList(){
const dp=await dpListAPI()
// console.log(dp,'dpppppp');
this.comColumns.push(dp.data)
console.log(this.comColumns,'this.comColumns');
},
async submit() {
// this.$refs.uForm.validate().then(res => {
// uni.$u.toast('校验通过')
// }).catch(errors => {
// uni.$u.toast('校验失败')
// })
// if(this.formData.type=='预约出租客运'){
// this.formData.type=1
// }else if(this.formData.type=='非营运'){
// this.formData.type=2
// }else if(this.formData.type=='租赁'){
// this.formData.type=3
// }
// if(this.formData.category=='公户车'){
// this.formData.category=1
// }else if(this.formData.category=='私家车'){
// this.formData.category=2
// }
// console.log(this.formData,'formdata');
const res=await userBindAPI(this.carInfo)
// this.formData.realName=wx.getStorageSync('realName')
uni.navigateTo({
url: '/pages/user/bindResult'
})
// wx.setStorageSync('formData',this.formData)
wx.setStorage({key:'carInfo',data:this.carInfo})
},
cancel() {
this.carClose()
this.formData.carNo=''
},
carClose() {
this.keyboardShow = false
},
// 点击确认
keyboardConfirmBtn() {
// console.log(this.formData,'this.formData');
// console.log(this.formData.carNo,'this.formData');
getCarInfoAPI({carNo: this.formData.carNo}).then(res => {
// console.log(res);
if(res.data) this.carInfo=res.data
else this.$u.toast('车辆信息不存在')
// if(res.data) this.carInfo=res.data
// else this.$u.toast('车辆信息不存在')
if(res.data){
this.carInfo=res.data
}else{
this.$u.toast('车辆信息不存在')
this.carInfo={}
}
}).finally(() => {
this.keyboardShow = false
this.$store.dispatch('CarNo', this.formData.carNo)
})
},
// 退格
// 退格
backspace() {
if(this.formData.carNo) this.formData.carNo = this.formData.carNo.substring(0, this.formData.carNo.length-1)
},
@@ -319,7 +256,7 @@
}
}
},
// 根据下标替换字符串
// 下标替换字符串
replaceStr (str, index, char) {
// console.log(str, index, char,'----str, index, char----');
const strAry = str.split('');
@@ -377,44 +314,6 @@
}
return num
},
// 车型
carChange(val){
this.carValue=val.value[0]
},
carConfirmBtn(){
this.formData.carType=this.carValue
this.carShow=false
},
// 车辆
typeChange(val){
console.log(val,'车辆');
this.typeValue=val.value[0].label
},
typeConfirmBtn(){
this.formData.category=this.typeValue
this.typeShow=false
},
change(e) {
console.log('change', e);
},
// 公司
comChange(val){
this.comValue=val.value[0].name
},
comConfirmBtn(){
this.formData.company=this.comValue
this.comShow=false
},
// 性质
natureChange(val){
console.log(val,'性质');
this.natureValue=val.value[0].label
},
natureConfirmBtn(){
this.formData.type=this.natureValue
this.natureShow=false
},
},
}
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 66 KiB

BIN
static/old_favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB