|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view class="ysec">
|
|
<view class="ysec">
|
|
- <uni-forms ref="form" :value="user" >
|
|
|
|
|
|
+ <uni-forms ref="form" class="forms" :value="user" >
|
|
<view class="yttit">查询预约</view>
|
|
<view class="yttit">查询预约</view>
|
|
<view class="ysecbox">
|
|
<view class="ysecbox">
|
|
<uni-forms-item name="phonenumber" label="预约电话">
|
|
<uni-forms-item name="phonenumber" label="预约电话">
|
|
@@ -24,7 +24,7 @@
|
|
</uni-forms>
|
|
</uni-forms>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<view class="searchlist" v-if="listflag">
|
|
<view class="searchlist" v-if="listflag">
|
|
- <y-list :datalist="list" :wtdt="wtdt" :type="type" @getDetail='getDetail'></y-list>
|
|
|
|
|
|
+ <y-list :datalist="list" :wtdt="wtdt" :type="type" :adrlist="adrlist" @getDetail='getDetail'></y-list>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -35,6 +35,7 @@
|
|
import { getReservatListNoPage } from "@/api/mine/order.js"
|
|
import { getReservatListNoPage } from "@/api/mine/order.js"
|
|
import {sendSmsFn} from "@/api/login.js"
|
|
import {sendSmsFn} from "@/api/login.js"
|
|
import yList from "@/components/order/list.vue"
|
|
import yList from "@/components/order/list.vue"
|
|
|
|
+ import {getDictionaryFn} from "@/api/mine/register.js"
|
|
export default {
|
|
export default {
|
|
components:{yList},
|
|
components:{yList},
|
|
data() {
|
|
data() {
|
|
@@ -54,11 +55,13 @@
|
|
listflag:false,
|
|
listflag:false,
|
|
backflag:false,
|
|
backflag:false,
|
|
codeflag: false,
|
|
codeflag: false,
|
|
|
|
+ adrlist:[],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
},
|
|
},
|
|
onLoad:function(){
|
|
onLoad:function(){
|
|
|
|
+ this.init()
|
|
uni.$on('refreshrelist',(e) => {
|
|
uni.$on('refreshrelist',(e) => {
|
|
this.reachflag=true;
|
|
this.reachflag=true;
|
|
this.pageNum=1;
|
|
this.pageNum=1;
|
|
@@ -88,6 +91,19 @@
|
|
reset() {
|
|
reset() {
|
|
this.$refs.verify.initialization()
|
|
this.$refs.verify.initialization()
|
|
},
|
|
},
|
|
|
|
+ init(){
|
|
|
|
+ // 记录来源
|
|
|
|
+ getDictionaryFn('jluly').then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ this.adrlist = res.data.map(v => {
|
|
|
|
+ return {
|
|
|
|
+ dictLabel: v.dictLabel,
|
|
|
|
+ dictValue: v.dictValue
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getDetail(data){
|
|
getDetail(data){
|
|
// var s=base64.encode(data)
|
|
// var s=base64.encode(data)
|
|
this.$tab.navigateTo('/a/code?id='+data)
|
|
this.$tab.navigateTo('/a/code?id='+data)
|
|
@@ -132,10 +148,19 @@
|
|
},1000)
|
|
},1000)
|
|
},
|
|
},
|
|
getDataFn(){
|
|
getDataFn(){
|
|
|
|
+ if (!this.phonenumber) {
|
|
|
|
+ that.$toast("请输入手机号")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
|
|
|
|
+ if (this.phonenumber && !regphone.test(this.phonenumber)) {
|
|
|
|
+ that.$toast("请输入正确的手机号")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
var params={
|
|
var params={
|
|
visitPhone:this.phonenumber,
|
|
visitPhone:this.phonenumber,
|
|
- pageSize:this.pageSize,
|
|
|
|
- pageNum: this.pageNum,
|
|
|
|
|
|
+ // pageSize:this.pageSize,
|
|
|
|
+ // pageNum: this.pageNum,
|
|
}
|
|
}
|
|
getReservatListNoPage(params).then(res=>{
|
|
getReservatListNoPage(params).then(res=>{
|
|
this.reset()
|
|
this.reset()
|
|
@@ -146,7 +171,8 @@
|
|
var len=list.length;
|
|
var len=list.length;
|
|
if(len==1&&!this.backflag&&this.pageNum==1){
|
|
if(len==1&&!this.backflag&&this.pageNum==1){
|
|
var id=list[0].reservatId
|
|
var id=list[0].reservatId
|
|
- this.$tab.navigateTo('/a/code?id='+base64.encode(id))
|
|
|
|
|
|
+ // this.$tab.navigateTo('/a/code?id='+base64.encode(id))
|
|
|
|
+ this.$tab.navigateTo('/a/code?id='+id)
|
|
}else{
|
|
}else{
|
|
if (res.rows.length < this.pageSize) {
|
|
if (res.rows.length < this.pageSize) {
|
|
this.reachflag = false
|
|
this.reachflag = false
|
|
@@ -211,14 +237,16 @@
|
|
// page {
|
|
// page {
|
|
// background-color: #f5f5f5;
|
|
// background-color: #f5f5f5;
|
|
// }
|
|
// }
|
|
- .ysec{padding-top: 10rpx;
|
|
|
|
- .rbtn{width: 680rpx;height: 90rpx;background: $com-cd3;border-radius: 42rpx;text-align: center;line-height: 90rpx;font-size: 28rpx;font-weight: bold;color: #FFFEFE;margin: 70rpx auto 0;}
|
|
|
|
|
|
+ .ysec{display: flex;flex-direction: column;height: 100vh;box-sizing: border-box;min-height: 800rpx;overflow: auto;
|
|
|
|
+ .forms{flex: 0 0 auto;}
|
|
|
|
+ .rbtn{width: 680rpx;height: 90rpx;background: $com-cd3;border-radius: 42rpx;text-align: center;line-height: 90rpx;font-size: 28rpx;font-weight: bold;color: #FFFEFE;margin: 60rpx auto 0;}
|
|
.yttit{font-size: 28rpx;font-weight: bold;background-color: #f1f1f1;color: $com-cd3;min-height: 72rpx;display: flex;align-items: center;padding: 0rpx 60rpx;box-sizing: border-box;position: relative;
|
|
.yttit{font-size: 28rpx;font-weight: bold;background-color: #f1f1f1;color: $com-cd3;min-height: 72rpx;display: flex;align-items: center;padding: 0rpx 60rpx;box-sizing: border-box;position: relative;
|
|
&::before{content: '';width: 6rpx;height: 34rpx;background: $com-cd3;border-radius: 4rpx;position: absolute;top: 50%;transform: translateY(-50%);left: 34rpx;}
|
|
&::before{content: '';width: 6rpx;height: 34rpx;background: $com-cd3;border-radius: 4rpx;position: absolute;top: 50%;transform: translateY(-50%);left: 34rpx;}
|
|
}
|
|
}
|
|
.ysecbox{padding:0 34rpx;background: #ffffff;}
|
|
.ysecbox{padding:0 34rpx;background: #ffffff;}
|
|
}
|
|
}
|
|
.searchlist{
|
|
.searchlist{
|
|
|
|
+ flex: 1;overflow: auto;
|
|
padding: 0 30rpx;margin-top: 30rpx;
|
|
padding: 0 30rpx;margin-top: 30rpx;
|
|
}
|
|
}
|
|
.line{width: 2rpx;height: 24rpx;background: #CDCDCD;margin: 0 24rpx;}
|
|
.line{width: 2rpx;height: 24rpx;background: #CDCDCD;margin: 0 24rpx;}
|