a265e32a by zhangmeng

Merge branch 'dev' of https://code.itechtop.cn/yangyang/dance-pc into dev

2 parents 03096861 5971defd
......@@ -48,9 +48,11 @@
<span v-if="language == 0">剩余房间数:{{ canOrderNum }}</span>
<span v-else>{{ canOrderNum }} Remaining rooms</span>
</div>
<div class="tip" v-if="language==1">If you need to make a hotel reservation, please fill in the full names of all required persons when booking the hotel. (For two or more people, please use ',')</div>
</el-form-item>
<el-form-item v-for="(n,index) in form.roomNum" :key="index" :label="language==1?`Name${index+1}`:`入住人${index+1}`" required>
<el-input v-model="rzUserArr[index]" :placeholder="language==0?'每间填一位住客姓名':'Each room fill in one name of the guest'"/>
<el-form-item v-for="(n,index) in form.roomNum" :key="index" :label="language==1?`Room${index+1}`:`入住人${index+1}`" required>
<el-input v-model="rzUserArr[index]" :placeholder="language==0?'请完整填写该房间所有的入住人姓名,以“,”符号分隔':'please fill in the name of the actual check-in person'"/>
</el-form-item>
<el-form-item :label="language==0?'预计到店':'Expected check-in'" required>
<el-select v-model="form.ddDate"
......@@ -482,11 +484,7 @@ function submit() {
}
})
}
} else {
ElMessage.warning(language.value == 0 ? '无可预订的房间' : 'No rooms available to book')
}
}).catch(err => {
ElMessage.warning(language.value == 0 ? '无可预订的房间' : 'No rooms available to book')
})
})
}
......
......@@ -242,6 +242,11 @@
<span class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span>
</div>
</el-col>
<el-col :lg="24">
<el-link v-if="form.viewStatus=='1'||form.viewStatus=='5'" type="primary" @click="exportPdf"><el-icon><Upload /></el-icon>
{{ language==0?'导出酒店预订单':'Export PDF' }}
</el-link>
</el-col>
</el-row>
</div>
</div>
......@@ -633,6 +638,21 @@ const unsubscribe = () => {
})
}
function exportPdf() {
var obj = {
orderId: orderId.value
}
if(language.value==0){
proxy.download('/ota/orderRoom/downRoomConfirmation', {
...obj
}, `订房确认书.pdf`)
} else {
proxy.download('/ota/orderRoom/downRoomConfirmation', {
...obj
}, `Hotel Reservation.pdf`)
}
}
</script>
......
......@@ -26,11 +26,13 @@
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">
<p>HOTEL RESERVATION</p>
</div></el-col>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">
<p>TRANSPORTATION RESERVATION</p>
</div></el-col>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">
<p>DINING RESERVATION</p>
......@@ -45,11 +47,13 @@
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">
<p>MAKEUP APPOINTMENT</p>
</div></el-col>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">
<p>PHOTOGRAPHY APPOINTMENT</p>
</div></el-col>
</div>
</el-col>
</el-row>
</div>
<order-remark ref="orderRemarkRef" @submit="goBooking"/>
......@@ -61,12 +65,14 @@ import {useRouter} from "vue-router";
const router = useRouter()
import OrderRemark from '@/viewsPc/components/orderRemark'
const {proxy} = getCurrentInstance()
import {useStorage} from "@vueuse/core/index";
import {ElMessage} from "element-plus";
import {getCurrentInstance} from "@vue/runtime-core";
import {computed, onMounted, watch} from "vue";
import {getBaseInfoByActiveId} from "@/apiPc/booking";
const props = defineProps({
matchId: {
type: String,
......@@ -74,45 +80,52 @@ const props = defineProps({
default: '0'
}
})
const language= useStorage('language',0)
const language = useStorage('language', 0)
const form = ref({})
const matchId = computed(()=>props.matchId);
const matchId = computed(() => props.matchId);
watch(matchId,(val)=>{
if(val && val!='0'){
getBaseInfoByActiveId(props.matchId).then(res=>{
watch(matchId, (val) => {
if (val && val != '0') {
getBaseInfoByActiveId(props.matchId).then(res => {
form.value = res.data || null
}).catch(err=>{
}).catch(err => {
console.log(err)
form.value = null
})
}
})
onMounted(()=>{
onMounted(() => {
})
function building() {
ElMessage.warning(language.value==0?'感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。':'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
return
}
function popRemark(type){
// debugger
if(!form.value){
function popRemark(type) {
if (!form.value) {
building()
return
}
if((form.value.isJdView == 0&&type=='1') || (form.value.isCarView == 0&&type=='2') || (form.value.isFoodView == 0&&type=='3') || (form.value.isMealView == 0&&type=='4') || (type=='5'&&form.value.isPhotoView == 0)){
if ((form.value.isJdView == 0 && type == '1')
|| (form.value.isCarView == 0 && type == '2')
|| (form.value.isFoodView == 0 && type == '3')
|| (form.value.isMealView == 0 && type == '4')
|| (form.value.isPhotoView == 0 && type == '5')
) {
building()
return
}
const params = {
matchId: props.matchId,
title: language.value == 0 ?'预订说明':'Booking Instructions',
title: language.value == 0 ? '预订说明' : 'Booking Instructions',
type: type
}
proxy.$refs['orderRemarkRef'].open(params)
}
function goBooking(n) {
switch (n) {
case 0:
......@@ -151,10 +164,19 @@ function goBooking(n) {
.itemBox {
padding: 20px 40px;
}
.itemBox_en{
.itemBox_en {
padding: 20px 40px;
p{margin: 0;height: 40px;line-height: 20px;display: flex;align-items: center;}
p {
margin: 0;
height: 40px;
line-height: 20px;
display: flex;
align-items: center;
}
}
.item {
box-shadow: 0px 0px 21px 0px rgba(41, 23, 101, 0.14);
margin: 10px 0;
......@@ -169,17 +191,39 @@ function goBooking(n) {
margin: 0 5%;
}
}
.item_en{box-shadow: 0px 0px 21px 0px rgba(41,23,101,0.14);margin: 40px 0 0;cursor: pointer;
display: flex;align-items: center;text-align: center;color: #333;
font-size: 18px; flex-direction: column;padding: 35px 10px 20px;
background:url("@/assets/dance/znbb.png") no-repeat left #FFFFFF;
.item_en {
box-shadow: 0px 0px 21px 0px rgba(41, 23, 101, 0.14);
margin: 40px 0 0;
cursor: pointer;
display: flex;
align-items: center;
text-align: center;
color: #333;
font-size: 18px;
flex-direction: column;
padding: 35px 10px 20px;
background: url("@/assets/dance/znbb.png") no-repeat left #FFFFFF;
background-size: cover;
position: relative;
border-radius: 15px;
img{position: absolute;top: -30px;transition: all 0.2s;}
&:hover{box-shadow: 0 0 10px #333;
img{transform: rotateY(180deg);}
p{color: #000;}
img {
position: absolute;
top: -30px;
transition: all 0.2s;
}
&:hover {
box-shadow: 0 0 10px #333;
img {
transform: rotateY(180deg);
}
p {
color: #000;
}
}
}
</style>
......
......@@ -94,7 +94,7 @@
</el-icon>
</a>
<!-- <el-button type="primary" @click="popMaster">青少年公益课</el-button>-->
<a class="zn-btn ml20 btn-q" @click="popMaster">青少年公益课</a>
<a class="zn-btn ml20 btn-q" @click="popMaster">青少年公益课报名</a>
</div>
</el-col>
<el-col :sm="24" :lg="14">
......
......@@ -85,12 +85,10 @@
<el-col :sm="24" :lg="10">
<div class="bgbg">
<h1 style="color: #fff">{{matchData?.name}}</h1>
<div>
<a class="zn-btn" @click="goGuide">
GUIDELINE
<el-icon><download /></el-icon>
<div style="margin-bottom: 30px">
<a class="zn-btn" style="font-size: 15px" @click="goGuide">GUIDELINE<el-icon><download /></el-icon>
</a>
<a class="zn-btn ml20 btn-q " @click="popMaster">Junior &Youth Camp <el-icon><Edit /></el-icon>
<a class="zn-btn ml20 btn-q" style="font-size: 15px" @click="popMaster">Junior &Youth Camp REGISTER<el-icon><Edit /></el-icon>
</a>
</div>
......
......@@ -7,7 +7,7 @@
<team-sign-step v-if="user.utype=='2'" :activeStep="1" :language="language"/>
</el-card>
<el-card class="mt20">
<el-card class="mt20" v-if="isNational">
<h3 class="text-center text-danger" v-if="language==0">是否添加随行人员,如果没有,请点击下一步,跳过此步骤</h3>
<h3 class="text-center text-danger" v-else>
Do you need to add accompanying persons? If not, please proceed to the next step.
......@@ -49,8 +49,8 @@
<div class="card-header">
<img src="@/assets/sign/tag02.png"/>
{{ language==0?'领队':'HEAD OF TEAM' }}
<!-- <span class="tip" v-if="language==0">(教练/领队,至少选择一项)</span>-->
<!-- <span class="tip" v-else>(Coach/Team Leader, select at least one)</span>-->
<span class="tip" v-if="language==0&&!isNational">(必选一位领队)</span>
<span class="tip" v-if="language==1&&!isNational">(Team Leader select at least one)</span>
</div>
</template>
<div class="chooseForm">
......@@ -313,10 +313,10 @@ function geren() {
}
function goNext() {
// if ((form.value.coachs.length < 1) && (form.value.leader.length < 1)) {
// ElMessage.warning(language.value==0?'至少选一个教练或领队':'Coach/Team Leader, select at least one')
// return
// }
if (!isNational.value && (form.value.leader.length == 0)) {
ElMessage.warning(language.value==0?'必选一位领队':'Team Leaders select at least one')
return
}
// (personAllList.value.coaches.length>=0 && form.value.coachs?.toString().length == 0)&&
// (personAllList.value.teamDoctors.length>=0 && form.value.doctor?.toString().length == 0)&&
// (personAllList.value.translators.length>=0 && form.value.translator?.toString().length == 0)&&
......
......@@ -620,7 +620,14 @@ function checkTwo(a,b) {
if(isNational.value){
ElMessage.warning(language.value == 0 ? '他们不是固定组合':'They\'re not a couple')
} else {
ElMessage.warning(language.value == 0 ? `${a.realName}/${b.realName} 已经和其他人组成舞伴,无法报名,请重新选择`:`${a.realName}/${b.realName} has already formed a dancer with another person, cannot sign up: please select again`)
ElMessageBox.confirm(language.value == 0 ? `${a.realName}/${b.realName} 已经和其他人组成舞伴,无法报名,请重新选择`:`${a.realName}/${b.realName} has already formed a dancer with another person, cannot sign up: please select again`,
language.value == 0 ? '提示' : 'Tips', {
confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
showCancelButton: false,
type: 'warning'
}).then(() => {
console.log('Confirm')
})
}
}
})
......
......@@ -8,7 +8,7 @@
<el-row :gutter="30" class="mt30">
<el-col :lg="12" class="touxiang">
<el-form-item prop="picUrl" :label="language==0?'个人照片':'photo'" required>
<el-form-item prop="picUrl" :label="language==0?'个人照片':'photo'" :required="form.labelArr.indexOf('0')>-1">
<ImageUpload2
v-model="form.picUrl" :crop-height="280" :crop-width="200" class="threeFour" :limit="1"
:is-show-tip="false"
......@@ -140,7 +140,7 @@ const data = reactive({
// regionId: [{ required: true, message: '必填', trigger: 'change' }],
birth: [{required: true, message: '必填', trigger: 'change'}],
// address: [{ required: true, message: '必填', trigger: 'blur' }],
picUrl: [{required: true, message: '必填', trigger: 'blur'}],
// picUrl: [{required: true, message: '必填', trigger: 'blur'}],
sex: [{required: true, message: '必填', trigger: 'change'}],
labelArr: [{required: true, message: '必填', trigger: 'change'}]
},
......@@ -153,7 +153,7 @@ const data = reactive({
// regionId: [{ required: true, message: 'required', trigger: 'change' }],
birth: [{required: true, message: 'required', trigger: 'change'}],
// address: [{ required: true, message: 'required', trigger: 'blur' }],
picUrl: [{required: true, message: 'required', trigger: 'blur'}],
// picUrl: [{required: true, message: 'required', trigger: 'blur'}],
sex: [{required: true, message: 'required', trigger: 'change'}],
labelArr: [{required: true, message: 'required', trigger: 'change'}]
},
......@@ -304,6 +304,10 @@ function giveBirthDay() {
function submitForm() {
proxy.$refs['dialogRef'].validate((valid) => {
if (valid) {
if(!form.value.picUrl&&form.value.labelArr.indexOf('0')>-1){
ElMessage.warning(language.value == 0 ? '请上传个人照片' :'Please upload your photo')
return
}
// 验证身份证号
if (form.value.idcType == 0 && !(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(form.value.idcCode))) {
ElMessage.warning('请输入正确的身份证号码')
......
......@@ -88,10 +88,11 @@ import OrderRemark from '@/viewsPc/components/orderRemark'
import {getBaseInfoByActiveId} from "@/apiPc/booking";
import {getCurrentInstance} from "@vue/runtime-core";
import {onMounted} from "vue";
const {proxy} = getCurrentInstance()
const router = useRouter()
const language= useStorage('language',0)
const language = useStorage('language', 0)
const props = defineProps({
matchId: {
type: String,
......@@ -100,38 +101,45 @@ const props = defineProps({
}
})
const form = ref({})
onMounted(()=>{
getBaseInfoByActiveId(props.matchId).then(res=>{
onMounted(() => {
getBaseInfoByActiveId(props.matchId).then(res => {
form.value = res.data || null
}).catch(err=>{
}).catch(err => {
form.value = null
console.log(err)
})
})
function building() {
ElMessage.warning(language.value==0?'感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。':'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
return
}
function popRemark(type){
if(!form.value){
function popRemark(type) {
if (!form.value) {
building()
return
}
if((form.value.isJdView == 0&&type=='1') || (form.value.isCarView == 0&&type=='2') || (form.value.isFoodView == 0&&type=='3')|| (form.value.isMealView == 0&&type=='4') || (type=='5'&&form.value.isPhotoView == 0)|| type=='0' ){
if ((form.value.isJdView == 0 && type == '1')
|| (form.value.isCarView == 0 && type == '2')
|| (form.value.isFoodView == 0 && type == '3')
|| (form.value.isMealView == 0 && type == '4')
|| (type == '5' && form.value.isPhotoView == 0)
|| (type == '0')) {
building()
return
}
const params = {
matchId: props.matchId,
title: language.value == 0 ?'预订说明':'Booking Instructions',
title: language.value == 0 ? '预订说明' : 'Booking Instructions',
type: type
}
proxy.$refs['orderRemarkRef'].open(params)
}
function goBooking(n) {
switch (n) {
case 0:
......@@ -164,5 +172,7 @@ function goBooking(n) {
</script>
<style scoped lang="scss">
h4{padding: 0 10px;}
h4 {
padding: 0 10px;
}
</style>
......
......@@ -25,12 +25,6 @@ const people = reactive({
message: languageFormat(language.value, "请输入证件号", "ID Numbe"),
});
// 使用正则验证身份证号码格式
const idCardRegex =
/^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[\dXx]$/;
if (!idCardRegex.test(people.form.idCard) && language.value == 0)
return ElMessage({ type: "warning", message: "身份证号格式不正确" });
addViewPeople(people.form).then((res) => {
ElMessage({
type: "success",
......@@ -59,7 +53,7 @@ const people = reactive({
:placeholder="language == 0 ? '请输入姓名' : 'Name'"
/>
</div>
<div>
<!-- <div>
<div class="label">
{{ languageFormat(language, "证件类型", "Type of Document") }}
</div>
......@@ -69,17 +63,17 @@ const people = reactive({
placeholder="Please input"
readonly
/>
</div>
</div> -->
</div>
<div class="form-item">
<div>
<div class="label">
{{ languageFormat(language, "身份证号", "Identity Card") }}
{{ languageFormat(language, "有效证件号", "Identity Card") }}
</div>
<el-input
v-model="people.form.idCard"
style="width: 570px"
:placeholder="language == 0 ? '请输入身份证号' : 'ID Number'"
:placeholder="language == 0 ? '请输入有效证件号' : 'ID Number'"
/>
</div>
</div>
......
......@@ -80,7 +80,7 @@ const startCheckSuccessListener = (orderSn, actId) => {
clearInterval(timer);
timer = null;
});
}, 3000);
}, 1500);
};
const detail = reactive({
......@@ -352,7 +352,7 @@ detail.fetchData();
>
<div>{{ it.name }}</div>
<div class="idcard">
{{ languageFormat(language, "身份证", "ID number") }}{{
{{ languageFormat(language, "证件号", "ID number") }}{{
it.idCard
}}
</div>
......
......@@ -68,7 +68,7 @@ audience.fetchData();
>
<div class="name">{{ it.name }}</div>
<div class="idcard">
{{ languageFormat(language, "身份证", "Identity Card") }}{{
{{ languageFormat(language, "证件号", "Identity Card") }}{{
it.idCard
}}
</div>
......
......@@ -82,8 +82,8 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
// target: 'http://192.168.1.118:8081/',
target: 'https://jijin.wtwuxicenter.com/stage-api',
target: 'http://192.168.1.118:8081/',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!