9d44b18e by 杨炀

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

# Conflicts:
#	vite.config.js
2 parents bafb8f2d 2c5c2b59
......@@ -174,9 +174,11 @@ import { useRouter, useRoute } from 'vue-router'
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
import { getVehicleByCheckIn } from '@/apiPc/booking'
import { computed } from 'vue'
const useStore = useUserStore()
const user = computed(() => useUserStore().user)
const { proxy } = getCurrentInstance()
const user = useUserStore().user
const router = useRouter()
const route = useRoute()
const language = useStorage('language', 0)
......@@ -245,6 +247,11 @@ async function changeSelectOut() {
}
async function handleSubmit(v) {
if (!user.value) {
useStore.setVisitor()
return
}
let checkOut = {}
let obj = {}
if (v == 0) {
......@@ -275,7 +282,7 @@ async function handleSubmit(v) {
}
const res = await booking.checkOrderPay('1')
if (!res.data) {
await proxy.$modal.confirm(language == 0 ? '您有未支付的订单,请前往支付!' : 'You have unpaid orders, please proceed to payment!')
await proxy.$modal.confirm(language.value == 0 ? '您有未支付的订单,请前往支付!' : 'You have unpaid orders, please proceed to payment!')
await router.push({
path: '/center/myReservation'
})
......@@ -292,7 +299,7 @@ async function handleSubmit(v) {
function goOrder(item, car) {
if (!user) {
if (!user.value) {
useUserStore().setReLogin()
return
}
......
......@@ -13,20 +13,6 @@
<div class="address">{{ TickForm.address }}</div>
</div>
<div class="info">
<div class="name">{{ TickForm2.ticketTypeName }}</div>
<div class="address">
{{ TickForm2.stadiumName }}
<span v-if="TickForm2.sessionType=='1000'">{{ language == 0 ? '日间场' : 'Day' }}</span>
<span v-else>{{ language == 0 ? '夜间场' : 'Night' }}</span>
{{ TickForm2.ticketName }}
</div>
<div v-if="TickForm2.ticketType=='0'" class="address">{{
language == 0 ? '剩余数量' : 'Remaining Quantity'
}}{{ leftCount }}
</div>
</div>
<div class="ticket_info mb20">
<div class="tit_box">
......@@ -153,9 +139,25 @@
</div>
</div>
</div>
<!-- 场馆布局图-->
<div class="rightBox">
<div class="info">
<div class="name">{{ TickForm2.ticketTypeName }}</div>
<div class="address">
{{ TickForm2.stadiumName }} |
<span v-if="TickForm2.sessionType=='1000'">{{ language == 0 ? '日间场' : 'Day' }}</span>
<span v-else>{{ language == 0 ? '夜间场' : 'Night' }}</span>
| {{ TickForm2.ticketName }}
</div>
<div v-if="TickForm2.ticketType=='0'" class="address">{{
language == 0 ? '剩余数量' : 'Remaining Quantity'
}}: {{ leftCount }}
</div>
</div>
</div>
<div style="margin-top: 95px">
<!-- 场馆布局图-->
<div style="margin-top: 30px">
<el-image
:preview-src-list="[fillImgUrl(tickImg)]"
:src="fillImgUrl(tickImg)"
......@@ -709,4 +711,15 @@ div {
width: 100%;
}
}
.rightBox {
.info {
background: rgba(69, 61, 234, 0.04);
border-radius: 8px;
border: 1px solid #d3d1f6;
padding: 20px 0 28px 33px;
margin-bottom: 20px;
margin-top: 30px;
}
}
</style>
......
<template>
<div>
<!-- top -->
<div class="container top father">
<div class="container top ">
<img :src="fillImgUrl(matchForm.ticketImg)" alt="" class="cover_img">
<div class="info">
<div class="title">{{ matchForm.name }}</div>
......@@ -176,7 +176,18 @@
>
{{ it.name }}
</div>
<div class="father">
<el-image
v-if="currTick?.images"
:src="fillImgUrl(currTick?.images) "
class="son"
fit="cover"
preview-teleported
style="width:190px;height: 135px"
/>
</div>
</div>
</div>
......@@ -222,15 +233,7 @@
</div>
</div>
<el-image
v-if="currTick?.images"
:preview-src-list="[fillImgUrl(currTick?.images)]"
:src="fillImgUrl(currTick?.images) "
class="son"
fit="cover"
preview-teleported
style="width:200px"
/>
</div>
</div>
......@@ -245,10 +248,14 @@
<div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes" />
<div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice" />
<el-dialog v-model="show" title="" width="1000px">
<div>
<el-dialog v-model="show" align-center title="" width="1000px">
<div style="padding: 20px">
<img :src="fillImgUrl(showUrl)" alt="" style="width: 100%">
</div>
<br>
<div style="text-align: center;">
<el-button size="large" type="primary" @click="show=false">{{ language == 0 ? '关 闭' : 'close' }}</el-button>
</div>
</el-dialog>
</div>
</div>
......@@ -401,6 +408,9 @@ function selectTick(v) {
selectForm.value.latstId = v.id
selectForm.value.price = v.price
selectForm.value.priceEn = v.priceEn
// console.log(v)
showUrl.value = v.images
show.value = true
}
function toSelectSeat() {
......@@ -778,8 +788,8 @@ getmatchData()
.son {
position: absolute;
bottom: 30px;
right: 50px;
top: 0;
left: 50px;
}
.remarks {
......
......@@ -133,7 +133,7 @@
</div>
<div class="text-right">
<el-button
v-if="(b.orderType == 0||b.orderType == 5)&&b.viewStatus!=0" class="mb10" plain round
v-if="(b.orderType == 0||b.orderType == 5||b.orderType==1)&&b.viewStatus!=0" class="mb10" plain round
size="small" type="success"
@click="Rebook(b)"
>
......@@ -234,6 +234,12 @@ function goDetail(b) {
function Rebook(row) {
console.log(row)
if (row.orderType == 1) {
return router.push({
path: `/booking/car/${row.activeId}`
})
}
if (row.orderType == 0) {
router.push({
name: 'hotelDetail',
......
......@@ -296,7 +296,7 @@ const data = reactive({
projectQuery: {}, tableType: 1,
currProjectId: '',
openTour: false,
isNational: false,
isNational: false, // 是否为国际赛
languageSource: '', singlePersonEntryLimit: '', doublePersonEntryLimit: ''
})
const {
......@@ -349,15 +349,16 @@ function getAthletesList() {
match.getGroupPersonList({ label: '0' }, groupId.value).then(res => {
athletesList.value = res.rows
if (!isNational.value) {
for (const ath of athletesList.value) {
if (isNational.value && !ath.phone) {
ath.disabled = true
} else {
ath.disabled = false
}
for (const ath of athletesList.value) {
if (!isNational.value) {
ath.disabled = false
ath.ocrFlag = 1
}
console.log(athletesList.value)
// if (isNational.value && !ath.phone) {
// ath.disabled = true
// } else {
// ath.disabled = false
// }
}
})
}
......@@ -525,18 +526,19 @@ function chooseSportman() {
}
function handelOption(id) {
const flag = choosedchoosed.value.some(v => v == id)
if (flag) {
const ocr = athletesList.value.find(v => v.id === id) || {}
if (ocr.disabled || ocr.ocrFlag == 0) {
choosedchoosed.value = choosedchoosed.value.filter(v => v != id)
return proxy.$modal.confirm(
language.value == 0
? '请到选手管理完善信息'
: 'You can complete athletes details through [Athlete Manage')
if (isNational.value) {
const flag = choosedchoosed.value.some(v => v == id)
if (flag) {
const ocr = athletesList.value.find(v => v.id === id) || {}
if (ocr.disabled || ocr.ocrFlag == 0) {
choosedchoosed.value = choosedchoosed.value.filter(v => v != id)
return proxy.$modal.confirm(
language.value == 0
? '请到选手管理完善信息'
: 'You can complete athletes details through [Athlete Manage')
}
}
}
getProjectList()
}
......
<template>
<el-dialog
v-model="show" :title="title" width="800px" append-to-body close-icon="CircleClose" center
:close-on-click-modal="false" class="pcloginpop"
destroy-on-close
v-model="show" :close-on-click-modal="false" :title="title" append-to-body center
class="pcloginpop"
close-icon="CircleClose" destroy-on-close
width="800px"
>
<!-- 随性人员-->
<div class="pd10"></div>
<el-form ref="dialogRef" :model="form" :rules="language==0?rules:rules_cn" label-width="160px" inline>
<!-- 随性人员-->
<div class="pd10" />
<el-form ref="dialogRef" :model="form" :rules="language==0?rules:rules_cn" inline label-width="160px">
<el-row :gutter="30">
<el-col :lg="24">
<el-form-item :label="language==0?'姓氏':'surname'" prop="xing" required>
<el-input v-model="form.xing"/>
<el-input v-model="form.xing" />
</el-form-item>
<el-form-item :label="language==0?'名':'name'" prop="ming" required>
<el-input v-model="form.ming"/>
<el-input v-model="form.ming" />
</el-form-item>
<!-- <el-form-item :label="language==0?'证件类型':'ID type'" prop="idcType" required>-->
<!-- <el-select v-model="form.idcType" style="width: 100%;">-->
......@@ -27,16 +29,16 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="language==0?'护照号':'PassPort Number'" prop="idcCode" required>
<el-input v-model="form.idcCode"/>
<el-input v-model="form.idcCode" />
</el-form-item>
<el-form-item :label="language==0?'护照文件':'Passport File'" required>
<file-upload v-model="form.passportUrl" :limit="1" :is-show-tip="false" :button-text="'Upload'"/>
<file-upload v-model="form.passportUrl" :button-text="'Upload'" :is-show-tip="false" :limit="1" />
</el-form-item>
<el-form-item :label="language==0?'出生日期':'Date of Birth'" prop="birth" required>
<el-date-picker
v-model="form.birth"
style="width: 100%;"
type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
v-model="form.birth"
format="YYYY-MM-DD"
style="width: 100%;" type="date" value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="language==0?'性别':'sex'" prop="sex">
......@@ -45,22 +47,22 @@
<el-radio value="1">{{ language == 0 ? '男' : 'male' }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="language==0?'主要会员角色':'roles'" prop="labelArr">
<el-select v-model="form.labelArr" multiple>
<el-option v-for="l in labels" :key="l.value" :value="l.value" :label="language==0?l.label:l.enlabel"/>
<el-option v-for="l in labels" :key="l.value" :label="language==0?l.label:l.enlabel" :value="l.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" class="btn-lineG w200px" round @click="submitForm">{{
language == 0 ? '确定' : 'Save'
}}
<el-button class="btn-lineG w200px" round type="primary" @click="submitForm">{{
language == 0 ? '确定' : 'Save'
}}
</el-button>
</div>
</template>
......@@ -68,16 +70,16 @@
</template>
<script setup>
import {reactive, ref, toRefs, watch} from 'vue'
import {getCurrentInstance, nextTick, onMounted} from '@vue/runtime-core'
import { reactive, ref, toRefs, watch } from 'vue'
import { getCurrentInstance, nextTick, onMounted } from '@vue/runtime-core'
import * as match from '@/apiPc/match'
import {ElMessage} from 'element-plus'
import {nationList} from '@/assets/js/data'
import { ElMessage } from 'element-plus'
import { nationList } from '@/assets/js/data'
import _ from 'lodash'
import cache from "@/plugins/cache";
import {useStorage} from "@vueuse/core/index";
import cache from '@/plugins/cache'
import { useStorage } from '@vueuse/core/index'
const language= useStorage('language',0)
const language = useStorage('language', 0)
const certificates = ref([
{
value: '0',
......@@ -92,42 +94,42 @@ const certificates = ref([
label: language.value == 0 ? '其他' : 'Other'
}
])
const {proxy} = getCurrentInstance()
const { proxy } = getCurrentInstance()
const emit = defineEmits(['submitForm'])
const data = reactive({
form: {
idcType: '1',
sex:'0'
sex: '0'
},
rules: {
xing: [{required: true, message: '必填', trigger: 'blur'}],
ming: [{required: true, message: '必填', trigger: 'blur'}],
idcCode: [{required: true, message: '必填', trigger: 'blur'}],
birth: [{required: true, message: '必填', trigger: 'change'}],
sex: [{required: true, message: '必填', trigger: 'change'}],
labelArr: [{required: true, message: '必填', trigger: 'blur'}]
xing: [{ required: true, message: '必填', trigger: 'blur' }],
ming: [{ required: true, message: '必填', trigger: 'blur' }],
idcCode: [{ required: true, message: '必填', trigger: 'blur' }],
birth: [{ required: true, message: '必填', trigger: 'change' }],
sex: [{ required: true, message: '必填', trigger: 'change' }],
labelArr: [{ required: true, message: '必填', trigger: 'blur' }]
},
rules_cn: {
xing: [{required: true, message: 'required', trigger: 'blur'}],
ming: [{required: true, message: 'required', trigger: 'blur'}],
idcCode: [{required: true, message: 'required', trigger: 'blur'}],
birth: [{required: true, message: 'required', trigger: 'change'}],
address: [{required: true, message: 'required', trigger: 'blur'}],
sex: [{required: true, message: 'required', trigger: 'change'}],
labelArr: [{required: true, message: 'required', trigger: 'blur'}]
xing: [{ required: true, message: 'required', trigger: 'blur' }],
ming: [{ required: true, message: 'required', trigger: 'blur' }],
idcCode: [{ required: true, message: 'required', trigger: 'blur' }],
birth: [{ required: true, message: 'required', trigger: 'change' }],
address: [{ required: true, message: 'required', trigger: 'blur' }],
sex: [{ required: true, message: 'required', trigger: 'change' }],
labelArr: [{ required: true, message: 'required', trigger: 'blur' }]
},
show: false,
labels: [
// {value: '0', label: '运动员', enlabel: 'Athletes'},
{value: '1', label: '教练', enlabel: 'Coach'},
{value: '2', label: '领队', enlabel: 'Head of team'},
{value: '4', label: '队医', enlabel: 'Team doctor'},
{value: '5', label: '翻译', enlabel: 'Interpreter'},
{value: '6', label: '官员', enlabel: 'Official'},
{value: '3', label: '其他', enlabel: 'Other'}
{ value: '1', label: '教练', enlabel: 'Coach' },
{ value: '2', label: '领队', enlabel: 'Head of team' },
{ value: '4', label: '队医', enlabel: 'Team doctor' },
{ value: '5', label: '翻译', enlabel: 'Interpreter' },
{ value: '6', label: '官员', enlabel: 'Official' },
{ value: '3', label: '其他', enlabel: 'Other' }
],
title: 'Add accompanying personnel',
cptId:''
cptId: ''
})
const {
form,
......@@ -157,7 +159,7 @@ const open = (params) => {
})
}
}
defineExpose({open})
defineExpose({ open })
watch(show, (value) => {
if (!value) {
form.value = {}
......@@ -172,7 +174,7 @@ function submitForm() {
ElMessage.warning('Please upload your passport file')
return
}
if(Array.isArray(form.value.passportUrl)){
if (Array.isArray(form.value.passportUrl)) {
form.value.passportUrl = form.value.passportUrl[0].url
}
proxy.$refs['dialogRef'].validate((valid) => {
......@@ -205,12 +207,12 @@ function cancel() {
<style lang="scss">
.threeFour {
width: 100%;
.el-upload--picture-card {
width: 120px;
height: 160px;
}
.el-upload-list--picture-card .el-upload-list__item {
width: 120px;
height: 160px;
......@@ -221,7 +223,7 @@ function cancel() {
font-size: 13px;
color: #999;
margin: 10px 0;
i {
color: red;
margin: 0 4px 0 0;
......@@ -233,7 +235,7 @@ function cancel() {
width: 320px;
height: 200px;
}
.el-upload-list--picture-card .el-upload-list__item {
width: 320px;
height: 200px;
......@@ -252,7 +254,7 @@ function cancel() {
width: 140px;
height: 200px;
}
}
.el-form--inline .el-form-item {
......@@ -265,7 +267,7 @@ function cancel() {
background: linear-gradient(#ed2c22, #fe6d45);
margin-right: 0;
height: 52px;
span {
color: #fff;
}
......
......@@ -420,6 +420,7 @@ function submitForm() {
}
function saveGroupMember() {
form.value.personId = null
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......
......@@ -493,6 +493,7 @@ function submitForm() {
// 团队
form.value.groupId = groupId.value
form.value.ocrFlag = '1'
form.value.personId = null
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......
......@@ -375,6 +375,7 @@ function submitForm() {
if (groupId.value != 0) {
// 团队
form.value.groupId = groupId.value
form.value.personId = null
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......
......@@ -346,6 +346,7 @@ function addPersonal() {
function addGroupMember() {
form.value.groupId = groupId
form.value.personId = null
match.savePersonForMyGroup(form.value).then(res => {
ElMessage.success(language.value == 0 ? '保存成功' : 'Save successful')
show.value = false
......
......@@ -97,7 +97,7 @@
<el-table-column :label="language==0?'操作':'Actions'" align="center" fixed="right" width="180">
<template #default="scope">
<el-button
v-if="(!isNational&&(!scope.row.phone))||scope.row.ocrFlag=='0'" link type="danger"
v-if="isNational&&scope.row.ocrFlag=='0'" link type="danger"
@click="editPerson(scope.row)"
>
{{ language == 0 ? '完善信息' : 'Complete' }}
......@@ -159,7 +159,7 @@ const data = reactive({
title: '选择运动员',
noPhotoCanSign: 0,
total: 0,
isNational: false
isNational: false// 是否国际赛
})
const { query, tableData, show, title, loading, noPhotoCanSign, total, isNational } = toRefs(data)
const certificates = ref([
......
......@@ -162,7 +162,7 @@ const ocrSuccess = (res) => {
if (res.data.msg) {
return proxy.$modal.msgWarning(res.data.msg
)
)
}
}
......
......@@ -889,8 +889,8 @@ async function handelGeRenNext() {
if (res.data == 2) {
await proxy.$modal.confirm(
language.value == 0
? '运动员的WDSF会员号已变更,是否更新?'
: 'The athlete`s WDSF membership number has been changed. Should it be updated?'
? '动员的wdsf信息已发生变更,是否更新?'
: 'The athlete`s WDSF details have changed. Update now?'
)
// 删除
await match.preCheckForPerson({ type: '2' })
......@@ -933,8 +933,8 @@ async function handelPreCheckForGroup(fn) {
if (res.data == 2) {
await proxy.$modal.confirm(
language.value == 0
? '运动员的WDSF会员号已变更,是否更新?'
: 'The athlete`s WDSF membership number has been changed. Should it be updated?')
? '动员的wdsf信息已发生变更,是否更新?'
: 'The athlete`s WDSF details have changed. Update now?')
await match.preCheckForGroup(groupId.value, '2')
// const flag = await getCheckOcr({ type: '2', groupId: groupId.value })
// if (flag) await fn()
......
......@@ -79,7 +79,9 @@
@response="ocrSuccess"
/>
<div class="tip">
<span v-if="language==0">请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span>
<span
v-if="language==0"
>请上传有效身份证件扫描件,用于核实身份信息、申请签证邀请函及购买保险等</span>
<span v-else>Please upload a scanned copy of your valid passport for verification of identity information,
application of visa invitation letter and purchasing insurance etc.</span>
</div>
......
......@@ -64,23 +64,26 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api/ztx-train': {
target: 'http://192.168.1.118:1896/stage-api',
// target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'http://192.168.1.118:1896/stage-api',
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-train/, '')
},
'/dev-api/ztx-match': {
target: 'http://192.168.1.118:8081',
// target: 'http://192.168.1.118:8081',
target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '')
},
'/dev-api/ztx-webSite': {
target: 'http://192.168.1.118:8081',
// target: 'http://192.168.1.118:8081',
target: 'https://jijin.wtwuxicenter.com/stage-api',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
// target: 'http://192.168.1.118:8081/',
// target: 'http://192.168.1.118:8081',
target: 'https://jijin.wtwuxicenter.com/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api/',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!