提交 3ec27180 编写于 作者: 刘英杰's avatar 刘英杰

v20240205 微信H5 上线初版

上级 6115ae74
<component name="ProjectDictionaryState">
<dictionary name="11211" />
</component>
\ No newline at end of file
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<script> <script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)')) CSS.supports('top: constant(a)'))
......
...@@ -6,7 +6,10 @@ import './uni.promisify.adaptor' ...@@ -6,7 +6,10 @@ import './uni.promisify.adaptor'
import uView from 'uview-ui' import uView from 'uview-ui'
import hooks from "./hooks/index.js" import hooks from "./hooks/index.js"
Vue.use(uView) Vue.use(uView)
// import Vconsole from 'vconsole'
//
// let vConsole = new Vconsole()
// Vue.use(vConsole)
// 如此配置即可 // 如此配置即可
uni.$u.config.unit = 'rpx' uni.$u.config.unit = 'rpx'
// 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置 // 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置
......
...@@ -161,4 +161,11 @@ export function PCLogin (data){ ...@@ -161,4 +161,11 @@ export function PCLogin (data){
data, data,
}) })
} }
export function GetAppointmentInfo (data){
return request({
url:`/api/Background/api/guest/GetAppointmentInfo?appointmentid=${data.appointmentid}`,
methods:'get',
data,
})
}
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/403/403",
"style" :
{
"navigationBarTitleText": "博物馆预约",
"enablePullDownRefresh": false
}
},
{ {
"path" : "pages/getWxCode/InitInfo", "path" : "pages/getWxCode/InitInfo",
"style" : "style" :
...@@ -14,7 +22,6 @@ ...@@ -14,7 +22,6 @@
{ {
"navigationStyle":"custom"// 去除顶部 导航栏 "navigationStyle":"custom"// 去除顶部 导航栏
} }
}, },
{ {
"path" : "pages/SSO/index", "path" : "pages/SSO/index",
...@@ -22,7 +29,6 @@ ...@@ -22,7 +29,6 @@
{ {
"navigationStyle":"custom"// 去除顶部 导航栏 "navigationStyle":"custom"// 去除顶部 导航栏
} }
}, },
{ {
"path": "pages/index/index", "path": "pages/index/index",
...@@ -46,7 +52,6 @@ ...@@ -46,7 +52,6 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{ ,{
"path" : "pages/official-appointment/index", "path" : "pages/official-appointment/index",
...@@ -61,7 +66,6 @@ ...@@ -61,7 +66,6 @@
{ {
"navigationStyle":"custom"// 去除顶部 导航栏 "navigationStyle":"custom"// 去除顶部 导航栏
} }
} }
,{ ,{
"path" : "pages/showQRcode/index", "path" : "pages/showQRcode/index",
...@@ -100,7 +104,6 @@ ...@@ -100,7 +104,6 @@
{ {
"navigationStyle":"custom"// 去除顶部 导航栏 "navigationStyle":"custom"// 去除顶部 导航栏
} }
}, },
{ {
"path" : "pages/getWechatCallbackCode/index", "path" : "pages/getWechatCallbackCode/index",
...@@ -108,9 +111,18 @@ ...@@ -108,9 +111,18 @@
{ {
"navigationStyle":"custom"// 去除顶部 导航栏 "navigationStyle":"custom"// 去除顶部 导航栏
} }
}
,{
"path" : "pages/passthroughDetail/index",
"style" :
{
"navigationStyle":"custom"// 去除顶部 导航栏
} }
}
], ],
"easycom": { "easycom": {
"autoscan": true, "autoscan": true,
......
<template>
<view style="display: flex;justify-content: center;align-items: center;width: 100vw;height: 100vh;">
<h3>系统正在维护中...</h3>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
padding: 3vw; padding: 3vw;
box-sizing: border-box; box-sizing: border-box;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
// let testurl = 'http://testdemo.frp.mdxxkj.com/#/ValidateOpenId' // let testurl = 'http://testdemo.frp.mdxxkj.com/#/ValidateOpenId'
let url = `${window.location.protocol+"//"+window.location.host}/museumAppointment/qth5/#/pages/getWechatCallbackCode/index` let url = `${window.location.protocol+"//"+window.location.host}/museumAppointment/qth5/#/pages/getWechatCallbackCode/index`
api.GetAppid().then((resp) => { api.GetAppid().then((resp) => {
// console.log("🚀🚀我请求Appid成功了🚀,",resp) // console.log("🚀🚀我请求Appid成功了,",resp)
let redirectPath = encodeURIComponent(url) let redirectPath = encodeURIComponent(url)
let path = let path =
"https://open.weixin.qq.com/connect/oauth2/authorize?" + "https://open.weixin.qq.com/connect/oauth2/authorize?" +
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
// let newPath = encodeURI(path) // let newPath = encodeURI(path)
location.replace(path); location.replace(path);
}).catch(error => { }).catch(error => {
this.$toast.fail ("获取code失败"); this.$toast.fail ("ȡcodeʧ");
}); });
}, },
}, },
......
.container { .container {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
--height:27%; --height:31%;
} }
.header{ .header{
height: 35%; height: 35%;
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
position: relative; position: relative;
max-width: 420px; max-width: 430px;
max-height:350px; max-height:350px;
} }
.content{ .content{
max-width: 420px; max-width: 430px;
max-height: 900px; max-height: 900px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
...@@ -43,15 +43,15 @@ ...@@ -43,15 +43,15 @@
box-sizing: border-box; box-sizing: border-box;
} }
.c-container-header{ .c-container-header{
height:20%; min-height:20%;
width: 100%; width: 100%;
} }
.c-container-content{ .c-container-content{
height:50%; height:50%;
width: 100%; width: 100%;
display: flex; /*display: flex;*/
align-content: space-around; /*align-content: space-around;*/
flex-wrap: wrap; /*flex-wrap: wrap;*/
} }
.c-container-content-top{ .c-container-content-top{
width: 100%; width: 100%;
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
.c-container-content-top-left,.c-container-content-top-right{ .c-container-content-top-left,.c-container-content-top-right{
width: 47%; width: 47%;
height: 100%; height: 100%;
background: url('../../static/images/newsktd.png'); background: url('../../static/images/0203_3.png');
background-size: 100% 100%; background-size: 100% 100%;
box-sizing: border-box; box-sizing: border-box;
border-radius: 5%; border-radius: 5%;
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
.c-container-content-center{ .c-container-content-center{
width: 100%; width: 100%;
height: var(--height); height: var(--height);
background: url('../../static/images/newgwjd.png'); background: url('../../static/images/0203_3.png');
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
.c-container-content-footer{ .c-container-content-footer{
width: 100%; width: 100%;
height: var(--height); height: var(--height);
background: url('../../static/images/newyyjl.png'); background: url('../../static/images/0203_4.png');
background-size: 100% 100%; background-size: 100% 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
border-radius: 20px; border-radius: 20px;
width: 90vw; width: 90vw;
height: 60vh; height: 70vh;
background:#F3F0EB; background:#F3F0EB;
min-height: 400px; min-height: 400px;
} }
...@@ -175,12 +175,13 @@ ...@@ -175,12 +175,13 @@
} }
.popupContainer-contaienr-content{ .popupContainer-contaienr-content{
width: 100%; width: 100%;
height: 80%; height: 82%;
line-height: 3.5vh; line-height: 3.5vh;
overflow-y: auto;
} }
.popupContainer-contaienr-footer{ .popupContainer-contaienr-footer{
width: 100%; width: 100%;
height: 12%; height: 10%;
display: flex;
align-items: center;
} }
<template> <template>
<view class="container"> <view class="container" >
<view class="header" > <view class="header" >
<swiper style="width: 100%;height: 110%;"> <swiper style="width: 100%;height: 110%;">
<swiper-item v-for="(item,index) in imageList" :key="index"> <swiper-item v-for="(item,index) in imageList" :key="index">
...@@ -17,58 +17,73 @@ ...@@ -17,58 +17,73 @@
<view class="c-container-header"> <view class="c-container-header">
<view style=" margin-top:3vh; font-size: 25px;font-family: '宋体';font-weight: 600;color:rgb(116, 96, 88);">琼台书院博物馆</view> <view style=" margin-top:3vh; font-size: 25px;font-family: '宋体';font-weight: 600;color:rgb(116, 96, 88);">琼台书院博物馆</view>
<view @click="show = true" v-html="object.introduction" style="font-size: 1.5vh; margin-top:1vh; ">入馆须知</view> <view @click="show = true" v-html="object.introduction" style="font-size: 1.5vh; margin-top:1vh; ">入馆须知</view>
<u-popup v-if="object.inform" :show="show" mode="center" round="40"> <u-popup v-if="object.inform" :show="show" mode="center" round="40" >
<slot> <!-- <slot>-->
<view class="popupContainer" style="">
<!-- </slot>-->
<view class="popupContainer" >
<view class="popupContainer-contaienr"> <view class="popupContainer-contaienr">
<view class="popupContainer-contaienr-header" > <view class="popupContainer-contaienr-header" >
<span class="popupContainer-contaienr-header-text">入馆须知</span> <span class="popupContainer-contaienr-header-text">入馆须知</span>
</view> </view>
<view v-html="object.inform" class="popupContainer-contaienr-content" ></view>
<view id="notice" v-html="object.inform" class="popupContainer-contaienr-content" ></view>
<view class="popupContainer-contaienr-footer" > <view class="popupContainer-contaienr-footer" >
<u-button color="#D89A7C" type="warning" text="我已悉知" @click="show = false"></u-button> <!-- :disabled="!noticeFlag"-->
<u-button color="#D89A7C" :disabled="!noticeFlag" type="warning" text="我已悉知" @click="show = false;"></u-button>
</view> </view>
</view> </view>
</view> </view>
</slot>
</u-popup> </u-popup>
</view> </view>
<view class="c-container-content"> <view class="c-container-content">
<view class="c-container-content-top"> <!-- <view class="c-container-content-top">-->
<view class="c-container-content-top-left" @click="tourist"> <!-- <view class="c-container-content-top-left" @click="tourist">-->
<view class="c-container-content-top-left-container"> <!-- <view class="c-container-content-top-left-container">-->
<view class="c-container-content-top-left-text"> <!-- <view class="c-container-content-top-left-text">-->
<span style="font-size: 21px">散客预约</span> <!-- <span style="font-size: 21px">散客预约</span>-->
</view> <!-- </view>-->
<view class="c-container-content-top-left-icon"> <!-- <view class="c-container-content-top-left-icon">-->
<image src="../../static/images/arrow.png" style="width: 70%;height: 50%;"></image> <!-- <image src="../../static/images/arrow.png" style="width: 70%;height: 50%;"></image>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="c-container-content-top-right" @click="team"> <!-- <view class="c-container-content-top-right" @click="team">-->
<view class="c-container-content-top-right-container"> <!-- <view class="c-container-content-top-right-container">-->
<view class="c-container-content-top-right-text"> <!-- <view class="c-container-content-top-right-text">-->
<span style="font-size: 21px">团队预约</span> <!-- <span style="font-size: 21px">团队预约</span>-->
</view> <!-- </view>-->
<view class="c-container-content-top-right-icon"> <!-- <view class="c-container-content-top-right-icon">-->
<image src="../../static/images/arrow.png" style="width: 70%;height: 50%;"></image> <!-- <image src="../../static/images/arrow.png" style="width: 70%;height: 50%;"></image>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="c-container-content-center" @click="office"> <view class="c-container-content-center" @click="tourist" style="margin-bottom: 20px;margin-top: 20px;">
<view class="c-container-content-center-container"> <view class="c-container-content-center-container">
<view class="c-container-content-center-text"> <view class="c-container-content-center-text">
<span style="font-size: 21px"> <span style="font-size: 21px">
公务接待预约 散客预约
</span> </span>
</view> </view>
<view class="c-container-content-center-icon"> <view class="c-container-content-center-icon">
<image src="../../static/images/arrow.png" style="width: 30%;height: 50%;"></image> <image src="../../static/images/0203_1.png" style="width: 30%;height: 50%;"></image>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="c-container-content-center" @click="office">-->
<!-- <view class="c-container-content-center-container">-->
<!-- <view class="c-container-content-center-text">-->
<!-- <span style="font-size: 21px">-->
<!-- 公务接待预约-->
<!-- </span>-->
<!-- </view>-->
<!-- <view class="c-container-content-center-icon">-->
<!-- <image src="../../static/images/arrow.png" style="width: 30%;height: 50%;"></image>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<view class="c-container-content-footer" @click="record"> <view class="c-container-content-footer" @click="record">
<view class="c-container-content-footer-container"> <view class="c-container-content-footer-container">
<view class="c-container-content-footer-text"> <view class="c-container-content-footer-text">
...@@ -77,7 +92,7 @@ ...@@ -77,7 +92,7 @@
</span> </span>
</view> </view>
<view class="c-container-content-footer-icon"> <view class="c-container-content-footer-icon">
<image src="../../static/images/arrow.png" style="width: 30%;height: 50%;"></image> <image src="../../static/images/0203_1.png" style="width: 30%;height: 50%;"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -95,6 +110,7 @@ ...@@ -95,6 +110,7 @@
export default { export default {
data() { data() {
return { return {
noticeFlag:false,
object:{}, object:{},
imageList:[], imageList:[],
show:true, show:true,
...@@ -103,9 +119,23 @@ ...@@ -103,9 +119,23 @@
// intro:"<p><span style=\"color: rgb(116, 96, 88);\">开放时间:自2023年6月起,周一闭馆整休</span></p><p><span style=\"color: rgb(116, 96, 88);\">周二至周日09:00(开馆) - 16:00(停止入馆) - 17:00(闭馆)</span></p><p><span style=\"color: rgb(116, 96, 88);\">节假日正常开馆。</span><span style=\"color: rgb(216, 154, 124);\">入馆须知&gt;&gt;</span></p>" // intro:"<p><span style=\"color: rgb(116, 96, 88);\">开放时间:自2023年6月起,周一闭馆整休</span></p><p><span style=\"color: rgb(116, 96, 88);\">周二至周日09:00(开馆) - 16:00(停止入馆) - 17:00(闭馆)</span></p><p><span style=\"color: rgb(116, 96, 88);\">节假日正常开馆。</span><span style=\"color: rgb(216, 154, 124);\">入馆须知&gt;&gt;</span></p>"
// //
} }
},
mounted() {
document.body.style.overflow = 'hidden'
}, },
onLoad() { onLoad() {
setTimeout(()=>{
//获取须知节点
const element = document.getElementById('notice');
if (element) {
console.log("🚀🚀获取到了element🚀,",element)
this.validateScroll(element);
}else {
this.noticeFlag = true
}
},1000)
this.GetUseCarouselList() this.GetUseCarouselList()
this.GetSysconfigurationInfoByWX() this.GetSysconfigurationInfoByWX()
}, },
...@@ -113,6 +143,38 @@ ...@@ -113,6 +143,38 @@
}, },
methods: { methods: {
validateScroll(element) {
if (!element) {
console.log("🚀!element🚀🚀,")
this.noticeFlag = true
return;
}
function isScrolledToBottom() {
//作差 判断是否到底部
const totalHeight = element.scrollHeight;
const currentScroll = element.scrollTop;
const clientHeight = element.clientHeight;
console.log("🚀触发到底了isScrolledToBottom🚀🚀,",totalHeight,currentScroll,clientHeight)
return totalHeight - currentScroll === clientHeight|| (totalHeight - currentScroll) - clientHeight < 3;
}
if (element.scrollHeight === element.clientHeight){
this.noticeFlag = true
console.log("🚀element.scrollHeight === element.clientHeight🚀🚀,",element.scrollHeight , element.clientHeight)
}else {
element.addEventListener('touchmove', () => {
console.log("🚀element.addEventListener('scroll',🚀🚀,",element.scrollHeight , element.clientHeight)
//监听notice节点scroll事件
if (isScrolledToBottom()) {
this.noticeFlag = true
}
})
}
},
GetSysconfigurationInfoByWX(){ GetSysconfigurationInfoByWX(){
api.GetSysconfigurationInfoByWX().then(res=>{ api.GetSysconfigurationInfoByWX().then(res=>{
this.object = res.response this.object = res.response
......
.container{ .container{
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: #F1EDE8; /*background: #F1EDE8;*/
background: #FFFBF7;
} }
.content{ .content{
width: 100%; width: 100%;
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
.loginImage{ .loginImage{
width: 80%; width: 80%;
height: 35%; height: 35%;
background: url("../../static/images/logo1.png"); background: url("../../static/images/redLogo.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.login{ .login{
......
.container{ .container{
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: #F1EDE8; background: #FFFBF7;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.loginImage{ .loginImage{
width: 80%; width: 80%;
height: 35%; height: 35%;
background: url("../../static/images/logo1.png"); background: url("../../static/images/redLogo.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.login{ .login{
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
height: 100vh; height: 100vh;
background-color: #F1EDE8; background-color: #F1EDE8;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.content{ .content{
max-width: 420px; max-width: 430px;
max-height:900px; max-height:900px;
padding: 15px; padding: 15px;
...@@ -203,8 +203,8 @@ ...@@ -203,8 +203,8 @@
width:100%; width:100%;
} }
.content-header-content-header-footer-rightItem{ .content-header-content-header-footer-rightItem{
max-width: 60px; /*max-width: 60px;*/
max-height: 65px; /*max-height: 65px;*/
width: 20%; width: 20%;
height: 100%; height: 100%;
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
margin-top: 3vw; margin-top: 3vw;
} }
.footer{ .footer{
max-width: 420px; max-width: 430px;
max-height:80px; max-height:80px;
width: 100%; width: 100%;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="content-header-content-header-footer-leftItem-top-right"> <view class="content-header-content-header-footer-leftItem-top-right">
<view class="content-header-content-header-footer-leftItem-top-right-item"> <view class="content-header-content-header-footer-leftItem-top-right-item">
<u-icon v-if="item.OkState === 3" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="item.OkState === 3" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else >{{['可订','禁售'][item.state]}}</span> <span v-else >{{['可订','已满'][item.state]}}</span>
</view> </view>
</view> </view>
</view> </view>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<view class="antemeridian-top"> <view class="antemeridian-top">
<view class="antemeridian-item"> <view class="antemeridian-item">
<u-icon v-if="lastAndAfternoonStatus === 3" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="lastAndAfternoonStatus === 3" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else> {{['可订','禁售'][itemObject.forestate]}}</span> <span v-else> {{['可订','已满'][itemObject.forestate]}}</span>
</view> </view>
</view> </view>
<view class="antemeridian"> <view class="antemeridian">
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<view class="antemeridian-top"> <view class="antemeridian-top">
<view class="antemeridian-item"> <view class="antemeridian-item">
<u-icon v-if="lastAndAfternoonStatus === 4" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="lastAndAfternoonStatus === 4" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else>{{['可订','禁售'][itemObject.aftestate]}}</span> <span v-else>{{['可订','已满'][itemObject.aftestate]}}</span>
</view> </view>
</view> </view>
<view class="pm"> <view class="pm">
...@@ -107,13 +107,15 @@ ...@@ -107,13 +107,15 @@
<u-input v-model="formDateValidate.name" class="input"></u-input> <u-input v-model="formDateValidate.name" class="input"></u-input>
</view> </view>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
身份证号 身份证号
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDateValidate.identify_num" class="input"></u-input> <u-input @blur="myFunction1" v-model="formDateValidate.identity_num" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
...@@ -191,7 +193,7 @@ ...@@ -191,7 +193,7 @@
</view> </view>
<view class="reasonList" > <view class="reasonList" >
<view class="r-h"> <view class="r-h">
参观事由 <span style="color: red;font-size: 16px">*</span>参观事由
</view> </view>
<view class="r-c"> <view class="r-c">
<u--textarea style="background-color: #F4ECE6;border: none;height: 10vh" v-model="formDateValidate.reason" :height="150" placeholder="请填写参观事由(主题教育、旅游、研学、会议、拍摄等)" ></u--textarea> <u--textarea style="background-color: #F4ECE6;border: none;height: 10vh" v-model="formDateValidate.reason" :height="150" placeholder="请填写参观事由(主题教育、旅游、研学、会议、拍摄等)" ></u--textarea>
...@@ -229,11 +231,13 @@ ...@@ -229,11 +231,13 @@
export default { export default {
data() { data() {
return { return {
zzIdentity_num:'',
aaa:1,
loading2:false, loading2:false,
formDateValidate:{ formDateValidate:{
unit:'',
name:'', name:'',
identify_num:'', identity_num:'',
mobile:'', mobile:'',
plate_number:'', plate_number:'',
num:1, num:1,
...@@ -263,7 +267,6 @@ ...@@ -263,7 +267,6 @@
} }
}, },
watch:{ watch:{
lastAndAfternoonStatus(newValue,oldValue){ lastAndAfternoonStatus(newValue,oldValue){
console.log(newValue); console.log(newValue);
}, },
...@@ -272,6 +275,48 @@ ...@@ -272,6 +275,48 @@
} }
}, },
methods: { methods: {
myFunction1(){
console.log("🚀🚀🚀,",123)
//输入框失焦点触发
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num)) {
this.zzIdentity_num = ''
}
if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num))) {
this.zzIdentity_num = '身份证格式异常,请检查身份证号码'
}
this.aaa ++
},
myFunction(index,key){
//输入框失焦点触发
let object = {
'identity_num':()=>{
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num)) {
this.peopleList[index].zzIdentity_num = ''
}
if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num))) {
this.peopleList[index].zzIdentity_num = '身份证格式异常,请检查身份证号码'
}
},
'mobile':()=>{
if (!/^1[3-9]\d{9}$/.test(this.peopleList[index].mobile)) {
this.peopleList[index].zzMobile = '手机号格式异常'
}else {
this.peopleList[index].zzMobile = ''
}
}
}
object[key]()
this.aaa ++
},
teamMuseum(e){ teamMuseum(e){
this.formDateValidate = { this.formDateValidate = {
...this.formDateValidate, ...this.formDateValidate,
...@@ -294,7 +339,15 @@ ...@@ -294,7 +339,15 @@
}) //立即预约 }) //立即预约
} }
} }
return object[e]() if(Object.keys(this.formDateValidate).filter(cur=>cur!=='users').every(cur=>{return this.formDateValidate[cur]!==''})&&this.peopleList.every(cur=>{return cur.name && cur.position})) {
console.log("🚀🚀🚀,",this.formDateValidate)
object[e]()
}
else {
console.log("🚀🚀🚀,",this.formDateValidate)
this.$u.toast('请完善表单')
}
}, },
valChange(e) { valChange(e) {
this.formDateValidate.num = e this.formDateValidate.num = e
...@@ -361,7 +414,7 @@ ...@@ -361,7 +414,7 @@
} }
}, },
mounted(){ mounted(){
api.getDate() api.getDate({type:2})
.then(res=>{ .then(res=>{
res.response.map((cur,index)=>{ res.response.map((cur,index)=>{
cur.week = hooks.week(dayjs(cur.date).day()) cur.week = hooks.week(dayjs(cur.date).day())
......
.container{
width: 100vw;
height: 100vh;
max-width: 430px;
}
.header{
width: 100%;
height: 44px;
background: #f6f3f3;
}
.contentFather{
display: flex;
justify-items: center;
background: #942119;
padding: 35px 20px 0px 20px;
width: 100%;
height: calc(100% - 114px);
box-sizing: border-box;
position: relative;
}
.content{
width: 100%;
height: 90%;
overflow-y: auto;
background: white;
border-radius: 15px;
display: flex;
padding: 5px;
flex-wrap: wrap;
align-content: flex-start;
}
.c-header-radius-icon{
top: 0;
left: 20px;
position: absolute;
width: 90%;
height: 100px;
border-radius: 0 0 170px 170px/0 0 100px 100px; /* 弧线在下方 */
background-color: #942119;
}
.c-header-radius-icon-text{
width: 100%;
height: 100%;
display: flex;
justify-content: space-around;
align-items: center;
font-family: 楷体;
font-size: 45px;
color: white;
font-weight: 600;
}
.visitor{
width: 100%;
min-height: 300px;
background: white;
padding: 10px;
display: flex;
flex-wrap: wrap;
}
.footer{
width: 100%;
height: 70px;
display: flex;
align-items: center;
justify-items: center;
background: #f6f3f3;
box-shadow: #4c4c4c;
}
.text{
font-size: 16px;
font-family: 楷体;
}
<template>
<view class="container">
<view class="header">
<view style="width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;">通行凭证</view>
<!-- <u-navbar-->
<!-- title="通行凭证"-->
<!-- @leftClick="leftClick"-->
<!-- :autoBack="true"-->
<!-- leftText="返回"-->
<!-- bgColor="#f6f3f3"-->
<!-- style="background: #f6f3f3;"-->
<!-- >-->
<!-- </u-navbar>-->
</view>
<view class="contentFather">
<view class="content">
<view class="c-header-radius-icon">
<span class="c-header-radius-icon-text">
通行证
</span>
</view>
<view style="width: 100%;height: 110px;display:flex;justify-content: center;align-items: flex-end; padding: 1px">
<span style="margin-bottom: 10px;font-weight: 600;color: #942119;font-family: 楷体">{{time}}</span>
</view>
<span class="text">来访人员</span>
<view style="width: 100%;height: 1px;background: #888888"></view>
<view class="visitor">
<view v-for="(item,index) in array" :key="index" style="width: 100%;" >
<view v-if="item.title!=='开始时间'&&item.title!=='结束时间'&&item.title!=='参观场次'" style="width: 100%;min-height: 10px;display: flex;flex-wrap: wrap; ">
<view style="display: flex;align-items: center; width: 10%;min-height: 100%"><u-icon color="#942119" :name="item.icon"></u-icon></view>
<view style="display: flex;align-items: center; width: 90%;min-height: 100%">{{item.value}}</view>
</view>
<view v-if="item.title==='参观场次'" style="width: 100%;min-height: 10px;display: flex;flex-wrap: wrap; ">
<view style="display: flex;align-items: center; width: 10%;min-height: 100%"><u-icon color="#942119" :name="item.icon"></u-icon></view>
<view style="display: flex;align-items: center; width: 90%;min-height: 100%">
参观场次:<span style="color: #942119">{{item.value}}</span>
</view>
</view>
<view v-if="item.title==='开始时间'" style="width: 100%;min-height: 10px;display: flex;flex-wrap: wrap; ">
<view style="display: flex;align-items: center; width: 10%;min-height: 100%"><u-icon color="#942119" :name="item.icon"></u-icon></view>
<view style="display: flex;align-items: center; width: 90%;min-height: 100%">
来访时间:<span style="color: #942119">{{item.value}}</span>
</view>
</view>
<view v-if="item.title==='结束时间'" style="width: 100%;min-height: 10px;display: flex;flex-wrap: wrap; ">
<view style="display: flex;align-items: center; width: 10%;min-height: 100%"><u-icon color="#942119" :name="item.icon"></u-icon></view>
<view style="display: flex;align-items: center; width: 90%;min-height: 100%">
结束时间:<span style="color: #942119">{{item.value}}</span>
</view>
</view>
</view>
</view>
<span class="text">同行人员</span>
<view style="width: 100%;height: 1px;background: #888888"></view>
<view v-for="(item,index) in userArray" :key="index" style="width: 100%;min-height: 100px; padding: 10px">
<view style="width: 100%;min-height: 30px;display: flex;">
<view style="display: flex;align-items: center;width: 10%;height: 100%"><u-icon color="#942119" name="account-fill"></u-icon></view>
<view style="display: flex;align-items: center;width: 90%;height: 100%">{{item.name}}</view>
</view>
<view style="width: 100%;min-height: 30px;display: flex; ">
<view style="display: flex;align-items: center;width: 10%;height: 100%"><u-icon color="#942119" name="coupon-fill"></u-icon></view>
<view style="display: flex;align-items: center;width: 90%;height: 100%">{{item.identity_num}}</view>
</view>
<!-- <view style="width: 100%;min-height: 50px;display: flex; padding: 10px">-->
<!-- <view style="width: 30%;height: 100%">职位</view>-->
<!-- <view style="width: 70%;height: 100%">{{item.position}}</view>-->
<!-- </view>-->
<view style="width: 100%;min-height: 30px;display: flex; ">
<view style="display: flex;align-items: center;width: 10%;height: 100%"><u-icon color="#942119" name="phone-fill"></u-icon></view>
<view style="display: flex;align-items: center;width: 90%;height: 100%">{{item.mobile}}</view>
</view>
<view style="width: 100%;background: #F6F3F3;height: 30px;"></view>
</view>
</view>
<!-- <view class="content">-->
<!-- <view v-for="(item,index) in array" :key="index">-->
<!-- <view style="width: 100%;min-height: 50px;display: flex; padding: 10px">-->
<!-- <view style=" width: 30%;min-height: 100%">{{item.title}}</view>-->
<!-- <view style=" width: 70%;min-height: 100%">{{item.value}}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view style="width: 100%;background: #F6F3F3;height: 30px;"></view>-->
<!-- <view v-for="(item,index) in userArray" :key="index" style="width: 100%;min-height: 250px;">-->
<!-- <view style="width: 100%;min-height: 50px;display: flex; padding: 10px">-->
<!-- <view style="width: 30%;height: 100%">姓名</view>-->
<!-- <view style="width: 70%;height: 100%">{{item.name}}</view>-->
<!-- </view>-->
<!-- <view style="width: 100%;min-height: 50px;display: flex; padding: 10px">-->
<!-- <view style="width: 30%;height: 100%">身份证号</view>-->
<!-- <view style="width: 70%;height: 100%">{{item.identity_num}}</view>-->
<!-- </view>-->
<!-- &lt;!&ndash; <view style="width: 100%;min-height: 50px;display: flex; padding: 10px">&ndash;&gt;-->
<!-- &lt;!&ndash; <view style="width: 30%;height: 100%">职位</view>&ndash;&gt;-->
<!-- &lt;!&ndash; <view style="width: 70%;height: 100%">{{item.position}}</view>&ndash;&gt;-->
<!-- &lt;!&ndash; </view>&ndash;&gt;-->
<!-- <view style="width: 100%;min-height: 50px;display: flex; padding: 10px">-->
<!-- <view style="width: 30%;height: 100%">手机号码</view>-->
<!-- <view style="width: 70%;height: 100%">{{item.mobile}}</view>-->
<!-- </view>-->
<!-- <view style="width: 100%;background: #F6F3F3;height: 30px;"></view>-->
<!-- </view>-->
<!-- </view>-->
</view>
<view class="footer">
<u-button color="#942119" shape="circle" @click="leftClick" type="primary" style="width: 130px" text="返回"></u-button>
</view>
</view>
</template>
<script>
import * as api from '../../network/utils'
import * as hooks from '../../hooks/index'
import dayjs from "dayjs";
export default {
data() {
return {
timer:'',
time:'',
array:[],
userArray:[],
}
},
methods: {
leftClick() {
uni.navigateTo({
url:'/pages/record-appointment/index'
})
}
},
onHide(){
clearInterval(this.timer)
},
onLoad(e){
this.timer = setInterval(()=>{
this.time = dayjs().format('YYYY年MM月DD日 HH:mm:ss ')
},1000)
console.log("🚀🚀🚀,",)
// be648888-5f1b-4d88-a76c-b41a2bced4d6
api.GetAppointmentInfo({appointmentid:e.appointmentid}).then(res=>{
this.array = [
{title:'领队名称',value:res.response.name,icon:'account-fill'},
{title:'身份证号码',value:res.response.identity_num,icon:'coupon-fill'},
{title:'手机号码',value:res.response.mobile,icon:'phone-fill'},
{title:'入馆时间',value:res.response.museum_date,icon:'calendar-fill'},
{title:'参观场次',value:['','上午','下午'][res.response.moment]+' '+(res.response.begin_time.split(' ')[1]||'无')+'-'+(res.response.end_time.split(' ')[1]||'无'),icon:'clock-fill'},
// {title:'时段',value:['','上午','下午'][res.response.moment],icon:'clock-fill'},
// {title:'开始时间',value:res.response.begin_time,icon:'clock-fill'},
// {title:'结束时间',value:res.response.end_time,icon:'clock-fill'},
// {title:'入馆状态',value:['未入馆','已入馆'][res.response.museum_state]},
// {title:'使用状态',value:['已取消','待使用','已使用','预约变更'][res.response.employ_state]},
{title:'同行人数量',value:res.response.num+'人',icon:'man-add-fill'},
{title:'预约类型',value:['散客预约','团队预约','公务预约'][res.response.type],icon:'bookmark-fill'},
// {title:'审批状态',value:['不通过','待审批','已审批'][res.response.approval_state]},
// {title:'审批意见',value:res.response.approval_remark},
// {title:'单位名称',value:res.response.unit},
// {title:'变更原因',value:res.response.change_remark},
{title:'参观事由',value:res.response.reason,icon:'edit-pen-fill'},
]
this.userArray = res.response.users
// let object = {
// '0':()=>this.array = [
// {title:'领队名称',value:res.response.name},
// {title:'身份证号码',value:res.response.identity_num},
// {title:'手机号码',value:res.response.mobile},
//
// {title:'入馆时间',value:res.response.museum_date},
// {title:'时段',value:['上午','下午'][res.response.moment]},
// {title:'开始时间',value:res.response.begin_time},
// {title:'结束时间',value:res.response.end_time},
// {title:'入馆状态',value:['未入馆','已入馆'][res.response.museum_state]},
// {title:'使用状态',value:['已取消','待使用','已使用','预约变更'][res.response.employ_state]},
//
// {title:'同行人数量',value:res.response.num},
// {title:'预约类型',value:['散客预约','团队预约','公务预约'][res.response.type]},
//
// {title:'审批状态',value:['不通过','待审批','已审批'][res.response.approval_state]},
// {title:'审批意见',value:res.response.approval_remark},
//
// {title:'单位名称',value:res.response.unit},
// {title:'变更原因',value:res.response.change_remark},
// {title:'参观事由',value:res.response.reason},
// ]
// }
// this.array = [
// {title:'审批状态',value:['不通过','待审批','已审批'][res.response.approval_state]},
// {title:'审批意见',value:res.response.approval_remark},
//
// {title:'领队名称',value:res.response.name},
// {title:'身份证号码',value:res.response.identity_num},
// {title:'手机号码',value:res.response.mobile},
//
// {title:'入馆时间',value:res.response.museum_date},
// {title:'时段',value:['上午','下午'][res.response.moment]},
//
// {title:'车辆信息',value:res.response.plate_number},
// {title:'同行人数量',value:res.response.num},
// {title:'预约类型',value:['散客预约','团队预约','公务预约'][res.response.type]},
// {title:'单位名称',value:res.response.unit},
// {title:'入馆状态',value:['未入馆','已入馆'][res.response.museum_state]},
// {title:'使用状态',value:['已取消','待使用','已使用','预约变更'][res.response.employ_state]},
// {title:'变更原因',value:res.response.change_remark},
// {title:'开始时间',value:res.response.begin_time},
// {title:'结束时间',value:res.response.end_time},
// {title:'参观事由',value:res.response.reason},
// ]
// "users": [
// {
// "userid": "b3d53d1c-98e2-431f-bdfa-faeaf574871c",
// "appointment_id": "be648888-5f1b-4d88-a76c-b41a2bced4d6",
// "name": "刘英杰",
// "identity_num": "460000********0000",
// "position": null,
// "mobile": "17000000000",
// "createtime": "2023-09-18 00:00"
// }
// ]
})
}
}
</script>
<style>
@import "index.css";
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
background: #F2EEE9; background: #F2EEE9;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
min-height:44px; min-height:44px;
} }
.content{ .content{
max-width: 420px; max-width: 430px;
max-height:900px; max-height:900px;
padding: 25px; padding: 25px;
......
...@@ -95,10 +95,10 @@ ...@@ -95,10 +95,10 @@
value:2, value:2,
}, { }, {
name: '预约过期', name: '预约过期',
value:3, value:4,
}, { }, {
name: '预约变更', name: '预约变更',
value:4, value:3,
}], }],
} }
}, },
...@@ -139,8 +139,11 @@ ...@@ -139,8 +139,11 @@
}, },
accessCertificate(item){ accessCertificate(item){
// uni.navigateTo({
// url:`/pages/showQRcode/index?appointmentId=${item.appointmentid}`
// })
uni.navigateTo({ uni.navigateTo({
url:`/pages/showQRcode/index?appointmentId=${item.appointmentid}` url:`/pages/passthroughDetail/index?appointmentid=${item.appointmentid}`
}) })
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
overflow-y: auto; overflow-y: auto;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
......
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
height: 100vh; height: 100vh;
background-color: #F1EDE8; background-color: #F1EDE8;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.content{ .content{
padding: 15px; padding: 15px;
max-width: 420px; max-width: 430px;
max-height:900px; max-height:900px;
width: 100%; width: 100%;
height:91%; height:91%;
/*padding: 5vw;*/ /*padding: 5vw;*/
...@@ -199,8 +198,8 @@ ...@@ -199,8 +198,8 @@
width:100%; width:100%;
} }
.content-header-content-header-footer-rightItem{ .content-header-content-header-footer-rightItem{
max-width: 60px; /*max-width: 60px;*/
max-height: 65px; /*max-height: 65px;*/
width: 20%; width: 20%;
height: 100%; height: 100%;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="content-header-content-header-footer-leftItem-top-right"> <view class="content-header-content-header-footer-leftItem-top-right">
<view class="content-header-content-header-footer-leftItem-top-right-item"> <view class="content-header-content-header-footer-leftItem-top-right-item">
<u-icon v-if="item.OkState === 3" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="item.OkState === 3" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else >{{['可订','禁售'][item.state]}}</span> <span v-else >{{['可订','已满'][item.state]}}</span>
</view> </view>
</view> </view>
</view> </view>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<view class="antemeridian-top"> <view class="antemeridian-top">
<view class="antemeridian-item"> <view class="antemeridian-item">
<u-icon v-if="lastAndAfternoonStatus === 3" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="lastAndAfternoonStatus === 3" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else> {{['可订','禁售'][itemObject.forestate]}}</span> <span v-else> {{['可订','已满'][itemObject.forestate]}}</span>
</view> </view>
</view> </view>
<view class="antemeridian"> <view class="antemeridian">
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<view class="antemeridian-top"> <view class="antemeridian-top">
<view class="antemeridian-item"> <view class="antemeridian-item">
<u-icon v-if="lastAndAfternoonStatus === 4" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="lastAndAfternoonStatus === 4" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else>{{['可订','禁售'][itemObject.aftestate]}}</span> <span v-else>{{['可订','已满'][itemObject.aftestate]}}</span>
</view> </view>
</view> </view>
<view class="pm"> <view class="pm">
...@@ -114,13 +114,14 @@ ...@@ -114,13 +114,14 @@
<u-input v-model="formDateValidate.name" class="input"></u-input> <u-input v-model="formDateValidate.name" class="input"></u-input>
</view> </view>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
领队身份证号 领队身份证号
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="formDateValidate.identity_num" class="input"></u-input> <u-input @blur="myFunction1" v-model="formDateValidate.identity_num" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="zzIdentity_num">*{{zzIdentity_num}}</span>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
...@@ -175,13 +176,14 @@ ...@@ -175,13 +176,14 @@
<u-input v-model="item.name" class="input"></u-input> <u-input v-model="item.name" class="input"></u-input>
</view> </view>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
身份证号 身份证号
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="item.identity_num" class="input"></u-input> <u-input @blur="myFunction(index,'identity_num')" v-model="item.identity_num" class="input"></u-input>
</view> </view>
<span style="color: red" v-if="item.zzIdentity_num">*{{item.zzIdentity_num}}</span>
</view> </view>
<view class="delete-button" v-if=" peopleList.length" @click="deleteAddPeole(index)"> <view class="delete-button" v-if=" peopleList.length" @click="deleteAddPeole(index)">
<view class="delete-button-close"> <view class="delete-button-close">
...@@ -199,7 +201,7 @@ ...@@ -199,7 +201,7 @@
</view> </view>
<view class="reasonList" > <view class="reasonList" >
<view class="r-h"> <view class="r-h">
参观事由 <span style="color: red;font-size: 16px">*</span>参观事由
</view> </view>
<view class="r-c" > <view class="r-c" >
<u--textarea style="background-color: #F4ECE6;border: none;height: 10vh" :height="150" v-model="formDateValidate.reason" placeholder="请填写参观事由(主题教育、旅游、研学、会议、拍摄等)" ></u--textarea> <u--textarea style="background-color: #F4ECE6;border: none;height: 10vh" :height="150" v-model="formDateValidate.reason" placeholder="请填写参观事由(主题教育、旅游、研学、会议、拍摄等)" ></u--textarea>
...@@ -244,6 +246,8 @@ ...@@ -244,6 +246,8 @@
data() { data() {
return { return {
aaa:1,
zzIdentity_num:'',
loading1:false, loading1:false,
loading2:false, loading2:false,
formDateValidate:{ formDateValidate:{
...@@ -258,7 +262,7 @@ ...@@ -258,7 +262,7 @@
value:0, value:0,
zhidingriqi:true, zhidingriqi:true,
watchDateListState:'', watchDateListState:'',
maxDate: `${year}-${month}-${date +6}`, maxDate: `${year}-${month}-${date + 6}`,
mode: 'single', mode: 'single',
calendar:false, calendar:false,
specifyDateState:'',// 指定日期打勾状态 specifyDateState:'',// 指定日期打勾状态
...@@ -288,6 +292,46 @@ ...@@ -288,6 +292,46 @@
} }
}, },
methods: { methods: {
myFunction1(){
//输入框失焦点触发
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num)) {
this.zzIdentity_num = ''
}
if (!(card15.test(this.formDateValidate.identity_num) || card18.test(this.formDateValidate.identity_num))) {
this.zzIdentity_num = '身份证格式异常,请检查身份证号码'
}
this.aaa ++
},
myFunction(index,key){
//输入框失焦点触发
let object = {
'identity_num':()=>{
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num)) {
this.peopleList[index].zzIdentity_num = ''
}
if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num))) {
this.peopleList[index].zzIdentity_num = '身份证格式异常,请检查身份证号码'
}
},
'mobile':()=>{
if (!/^1[3-9]\d{9}$/.test(this.peopleList[index].mobile)) {
this.peopleList[index].zzMobile = '手机号格式异常'
}else {
this.peopleList[index].zzMobile = ''
}
}
}
object[key]()
this.aaa ++
},
teamMuseum(e){ teamMuseum(e){
this.formDateValidate = { this.formDateValidate = {
...this.formDateValidate, ...this.formDateValidate,
...@@ -300,7 +344,6 @@ ...@@ -300,7 +344,6 @@
bookNow:async () => { bookNow:async () => {
//立即预约 //立即预约
this.loading1 = true this.loading1 = true
if (this.peopleList.length >= 9) api.TeamOrOfficialCreate(this.formDateValidate).then((res)=>{ if (this.peopleList.length >= 9) api.TeamOrOfficialCreate(this.formDateValidate).then((res)=>{
this.loading1 = false; this.loading1 = false;
...@@ -336,7 +379,12 @@ ...@@ -336,7 +379,12 @@
}) })
} }
} }
return object[e]() if(Object.keys(this.formDateValidate).filter(cur=>cur!=='users').every(cur=>{return this.formDateValidate[cur]!==''})&&this.peopleList.every(cur=>{return cur.name && cur.identity_num})) {
object[e]()
}
else {
this.$u.toast('请完善表单')
}
}, },
valChange(e) { valChange(e) {
...@@ -405,7 +453,7 @@ ...@@ -405,7 +453,7 @@
} }
}, },
mounted(){ mounted(){
api.getDate() api.getDate({type:1})
.then(res=>{ .then(res=>{
res.response.map((cur,index)=>{ res.response.map((cur,index)=>{
cur.week = hooks.week(dayjs(cur.date).day()) cur.week = hooks.week(dayjs(cur.date).day())
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
background-color: #F1EDE8; background-color: #F1EDE8;
max-width: 420px; max-width: 430px;
max-height:1000px; max-height:1000px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.content{ .content{
max-width: 420px; max-width: 430px;
max-height:900px; max-height:900px;
padding: 15px; padding: 15px;
...@@ -68,28 +68,28 @@ ...@@ -68,28 +68,28 @@
} }
.content-header-content-footer-footer-leftItem{ .content-header-content-footer-footer-leftItem{
width: 24%; width: 48%;
height: 65%; height: 65%;
border-radius: 5px; border-radius: 5px;
border: #d89a7c solid 1px; border: #d89a7c solid 1px;
} }
.content-header-content-footer-footer-leftItem2{ .content-header-content-footer-footer-leftItem2{
width: 24%; width: 48%;
height: 65%; height: 65%;
border-radius: 5px; border-radius: 5px;
border: #d89a7c solid 1px; border: #d89a7c solid 1px;
background-color: #d5c4b9; background-color: #d5c4b9;
} }
.content-header-content-footer-footer-rightItem{ .content-header-content-footer-footer-rightItem{
width: 24%; width: 48%;
height: 65%; height: 65%;
border-radius: 5px; border-radius: 5px;
border: #d89a7c solid 1px; border: #d89a7c solid 1px;
margin-left: 10px; margin-left: 10px;
} }
.content-header-content-footer-footer-rightItem2{ .content-header-content-footer-footer-rightItem2{
width: 24%; width: 48%;
height: 65%; height: 65%;
border-radius: 5px; border-radius: 5px;
border: #d89a7c solid 1px; border: #d89a7c solid 1px;
...@@ -161,8 +161,8 @@ ...@@ -161,8 +161,8 @@
box-sizing: border-box; box-sizing: border-box;
} }
.content-header-content-header-footer-leftItem1{ .content-header-content-header-footer-leftItem1{
max-height: 60px; /*max-height: 60px;*/
max-width: 78px; /*max-width: 78px;*/
width: 24%; width: 24%;
height: 100%; height: 100%;
...@@ -207,8 +207,8 @@ ...@@ -207,8 +207,8 @@
width:100%; width:100%;
} }
.content-header-content-header-footer-rightItem{ .content-header-content-header-footer-rightItem{
max-width: 60px; /*max-width: 60px;*/
max-height: 65px; /*max-height: 65px;*/
width: 20%; width: 20%;
height: 100%; height: 100%;
......
...@@ -17,12 +17,13 @@ ...@@ -17,12 +17,13 @@
<view class="content-header-content-header-footer-leftItem-top-left"> <view class="content-header-content-header-footer-leftItem-top-left">
<span class="dataText" v-if="index === 0">今天</span> <span class="dataText" v-if="index === 0">今天</span>
<span class="dataText" v-if="index === 1">明天</span> <span class="dataText" v-if="index === 1">明天</span>
<span class="dataText" v-if="index === 2">{{item.week}}</span> <span class="dataText" v-if="index === 2">后天</span>
<!-- <span class="dataText" v-if="index === 2">{{item.week}}</span>-->
</view> </view>
<view class="content-header-content-header-footer-leftItem-top-right"> <view class="content-header-content-header-footer-leftItem-top-right">
<view class="content-header-content-header-footer-leftItem-top-right-item"> <view class="content-header-content-header-footer-leftItem-top-right-item">
<u-icon v-if="item.OkState === 3" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="item.OkState === 3" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else >{{['可订','禁售'][item.state]}}</span> <span v-else >{{['可订','已满'][item.state]}}</span>
</view> </view>
</view> </view>
</view> </view>
...@@ -69,7 +70,7 @@ ...@@ -69,7 +70,7 @@
<view class="antemeridian-top"> <view class="antemeridian-top">
<view class="antemeridian-item"> <view class="antemeridian-item">
<u-icon v-if="lastAndAfternoonStatus === 3" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="lastAndAfternoonStatus === 3" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else> {{['可订','禁售'][itemObject.forestate]}}</span> <span v-else> {{['可订','已满'][itemObject.forestate]}}</span>
</view> </view>
</view> </view>
<view class="antemeridian"> <view class="antemeridian">
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
<view class="antemeridian-top"> <view class="antemeridian-top">
<view class="antemeridian-item"> <view class="antemeridian-item">
<u-icon v-if="lastAndAfternoonStatus === 4" color="#ffffff" name="checkbox-mark"></u-icon> <u-icon v-if="lastAndAfternoonStatus === 4" color="#ffffff" name="checkbox-mark"></u-icon>
<span v-else>{{['可订','禁售'][itemObject.aftestate]}}</span> <span v-else>{{['可订','已满'][itemObject.aftestate]}}</span>
</view> </view>
</view> </view>
<view class="pm"> <view class="pm">
...@@ -92,33 +93,50 @@ ...@@ -92,33 +93,50 @@
</view> </view>
</view> </view>
<view class="content-footer"> <view class="content-footer">
<view ref="people-list" v-for="(item,index) in peopleList" :key="index" class="content-footer-container"> <view ref="people-list" v-for="(item,index) in peopleList" :key="index" class="content-footer-container">
<view class="c-f-h"> <view class="c-f-h">
参观人员{{index+1}} 参观人员{{index+1}}
</view> </view>
<view class="c-f-f" style="background-color: #F4ECE6"> <view class="c-f-f" style="background-color: #F4ECE6">
<!-- <u-form style="width: 100%;" :model="item" :ref="'uForm'+index" labelWidth="80px">-->
<!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="姓名" prop="name">-->
<!-- <u-input class="c-f-f-i-t input" v-model="item.name" />-->
<!-- </u-form-item>-->
<!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="身份证号" prop="identify_num">-->
<!-- <u-input class="c-f-f-i-t input" v-model="item.identify_num" />-->
<!-- </u-form-item>-->
<!-- <u-form-item label-style="{'color':'red'}" label-position="top" label="手机号码" prop="mobile">-->
<!-- <u-input class="c-f-f-i-t input" v-model="item.mobile" />-->
<!-- </u-form-item>-->
<view class="c-f-f-i" > <view class="c-f-f-i" >
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
姓名 <span style="color: red">*</span>姓名
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="item.name" class="input"></u-input> <u-input v-model="item.name" class="input"></u-input>
</view> </view>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i" :key="aaa">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
身份证号 <span style="color: red">*</span>身份证号
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="item.identify_num" class="input"></u-input> <u-input @blur="myFunction(index,'identity_num')" v-model="item.identity_num" class="input"></u-input>
<view v-if="item.zzIdentity_num" style="color: red">*{{item.zzIdentity_num}}</view>
</view> </view>
</view> </view>
<view class="c-f-f-i"> <view class="c-f-f-i">
<view class="c-f-f-i-t"> <view class="c-f-f-i-t">
手机号码 <span style="color: red">*</span>手机号码
</view> </view>
<view class="c-f-f-i-f"> <view class="c-f-f-i-f">
<u-input v-model="item.mobile" class="input"></u-input> <u-input @blur="myFunction(index,'mobile')" v-model="item.mobile" class="input"></u-input>
<view v-if="item.zzMobile" style="color: red">*{{item.zzMobile}}</view>
</view> </view>
</view> </view>
<view class="delete-button" v-if=" peopleList.length >1" @click="deleteAddPeole(index)"> <view class="delete-button" v-if=" peopleList.length >1" @click="deleteAddPeole(index)">
...@@ -127,6 +145,7 @@ ...@@ -127,6 +145,7 @@
</view> </view>
</view> </view>
<!-- </u-form>-->
</view> </view>
</view> </view>
...@@ -158,18 +177,43 @@ ...@@ -158,18 +177,43 @@
import * as api from '../../network/utils.js'; import * as api from '../../network/utils.js';
import dayjs from "dayjs" import dayjs from "dayjs"
import * as hooks from '../../hooks/index.js' import * as hooks from '../../hooks/index.js'
const d = new Date() import Login from "../login/index.vue";
const year = d.getFullYear()
let month = d.getMonth() + 1
month = month < 10 ? `0${month}` : month
const date = d.getDate()
export default { export default {
data() { data() {
return { return {
aaa:1,
rules: {
'name': {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
'identify_num': {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
'mobile': {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
},
loading:false, loading:false,
zhidingriqi:true, zhidingriqi:true,
watchDateListState:'', watchDateListState:'',
maxDate: `${year}-${month}-${date +6}`, dateCount:7,
// maxDate: `${year}-${month}-${date + this.dateCount -1}`,
maxDate:'',
year:'',
month:'',
date:'',
mode: 'single', mode: 'single',
calendar:false, calendar:false,
specifyDateState:'',// 指定日期打勾状态 specifyDateState:'',// 指定日期打勾状态
...@@ -189,10 +233,16 @@ ...@@ -189,10 +233,16 @@
name:'', name:'',
mobile:'', mobile:'',
identity_num:'', identity_num:'',
} }
] ]
} }
}, },
computed:{
dateListLength(){
return this.dateList.length
}
},
watch:{ watch:{
lastAndAfternoonStatus(newValue,oldValue){ lastAndAfternoonStatus(newValue,oldValue){
...@@ -202,31 +252,77 @@ ...@@ -202,31 +252,77 @@
console.log(newValue); console.log(newValue);
} }
}, },
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
onReady() {
// this.peopleList.forEach((cur,index)=>{
// this.$refs['uForm'+index].setRules(this.rules);
// })
},
methods: { methods: {
myFunction(index,key){
//输入框失焦点触发
let object = {
'identity_num':()=>{
const card15 =
/^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 =
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if (card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num)) {
this.peopleList[index].zzIdentity_num = ''
}
if (!(card15.test(this.peopleList[index].identity_num) || card18.test(this.peopleList[index].identity_num))) {
this.peopleList[index].zzIdentity_num = '身份证格式异常,请检查身份证号码'
}
},
'mobile':()=>{
if (!/^1[3-9]\d{9}$/.test(this.peopleList[index].mobile)) {
this.peopleList[index].zzMobile = '手机号格式异常'
}else {
this.peopleList[index].zzMobile = ''
}
}
}
object[key]()
this.aaa ++
},
// moment 1 上午 2 下午 class ->string // moment 1 上午 2 下午 class ->string
async bookNow() { async bookNow() {
var a = false;
this.peopleList.forEach((cur,index)=>{
if(cur.name==='' || cur.identity_num===''|| cur.mobile==='') a = true
})
if (a){
this.$u.toast('表单存在未填写数据')
}else {
this.loading = true this.loading = true
let data = { let data = {
moment:this.lastAndAfternoonStatus === 3 ? '1':'2', moment: this.lastAndAfternoonStatus === 3 ? '1' : '2',
museum_date:this.itemObject.initDate, museum_date: this.itemObject.initDate,
num:this.peopleList.length, num: this.peopleList.length,
users:this.peopleList, users: this.peopleList,
} }
const res = await api.GuestCreate(data) const res = await api.GuestCreate(data)
this.$u.toast(res.msg) this.$u.toast(res.msg)
this.loading = false this.loading = false
if(res.code === 1) setTimeout(()=>{ if (res.code === 1) setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url:'/pages/record-appointment/index' url: '/pages/record-appointment/index'
}) })
},1000) }, 1000)
}
}, },
formatter(day) { formatter(day) {
//预约日历遍历
this.dateList.forEach((cur,index)=>{ this.dateList.forEach((cur,index)=>{
if(cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0) if(cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0)
{ {
day.bottomInfo = '可订' day.bottomInfo = '可订'
}else if( cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 0){ }else if( cur.date === dayjs(day.date).format('MM月DD日') && cur.state === 1){
day.disabled = true day.disabled = true
} }
}) })
...@@ -283,10 +379,11 @@ ...@@ -283,10 +379,11 @@
}) })
} }
}, },
mounted(){ async mounted() {
api.getDate() //获取日期
.then(res=>{ await api.getDate({type: 0})
res.response.map((cur,index)=>{ .then(res => {
res.response.map((cur, index) => {
cur.week = hooks.week(dayjs(cur.date).day()) cur.week = hooks.week(dayjs(cur.date).day())
cur.initDate = cur.date cur.initDate = cur.date
cur.date = dayjs(cur.date).format('MM月DD日') cur.date = dayjs(cur.date).format('MM月DD日')
...@@ -295,6 +392,13 @@ ...@@ -295,6 +392,13 @@
}) })
//可定日期的便利
const d = new Date()
this.year = d.getFullYear()
this.month = d.getMonth() + 1
this.month = this.month < 10 ? `0${this.month}` : this.month
this.date = d.getDate()
this.maxDate = `${this.year}-${this.month}-${this.date + this.dateList.length - 1}`
}, },
onLoad(){ onLoad(){
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或