Commit a37e1465 authored by youjie's avatar youjie

旅客信息

parent 97df7b02
......@@ -211,6 +211,11 @@ export default {
changePhoto: '修改头像',
photo: '头像',
photoTip: '*支持jpg,gif,png格式图片,且文件小于2M。',
cancel: '取消',
addPassenger: '新增旅客',
editPassenger: '修改旅客',
deleteSuccess: '删除成功',
idCard: '身份证号',
},
// HTTP 错误状态码
httpError: {
......
......@@ -705,6 +705,55 @@ class UserService {
)
return response as unknown as HttpResponse
}
/**
* 旅客列表
* @param tenantId 租户ID(可选)
*/
static async memberGuest(tenantId: string,data:any): Promise<HttpResponse> {
const response = await OtaRequest.get(
'/member-guest/paged',
data,
{
headers: tenantId ? {
'__tenant': tenantId
} : {}
}
)
return response as unknown as HttpResponse
}
/**
* 新增修改旅客
* @param tenantId 租户ID(可选)
*/
static async updateMemberGuest(tenantId: string,data:any): Promise<HttpResponse> {
const response = await OtaRequest.post(
'/member-guest/or-update',
data,
{
headers: tenantId ? {
'__tenant': tenantId
} : {}
}
)
return response as unknown as HttpResponse
}
/**
* 删除旅客
* @param tenantId 租户ID(可选)
*/
static async deleteMemberGuest(tenantId: string,id:any): Promise<HttpResponse> {
const response = await OtaRequest.delete(
`/member-guest/${id}`,
{},
{
headers: tenantId ? {
'__tenant': tenantId
} : {}
}
)
return response as unknown as HttpResponse
}
}
export default UserService
<template>
<div class="w-[977px] h-full flex flex-col flex-shrink-0 overflow-hidden">
<div class="w-[977px] h-full flex flex-col flex-shrink-0"
:class="[current!=3?'overflow-hidden':'']">
<a-spin :loading="loading">
<div class="flex">
<div v-for="(item,index) in TitleBars"
......@@ -12,49 +13,29 @@
</div>
</div>
<a-divider class="!m-[0]"/>
<a-scrollbar class="max-h-[735px] overflow-auto mt-[20px]"
ref="scrollContainer">
<a-scrollbar class="max-h-[735px] mt-[20px]"
ref="scrollContainer"
:class="[current!=3?'overflow-auto':'']">
<basicInfor v-if="current==1"></basicInfor>
<account v-if="current==2"></account>
<passengerList v-if="current==3"></passengerList>
</a-scrollbar>
</a-spin>
</div>
</template>
<script setup lang="ts">
import { ref,reactive, onMounted, watch } from 'vue'
import { ref, onMounted } from 'vue'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@/stores/user'
import { useSystemConfigStore } from '@/stores/index'
import { Message } from '@arco-design/web-vue'
import { query } from '@/utils/common'
import { useRouter } from 'vue-router'
import UserService from '@/services/UserService'
import providerTypeEnum from '@/utils/providerTypeEnum'
import account from "./components/accountCenter/account.vue"
import basicInfor from "./components/accountCenter/basicInfor.vue"
import passengerList from "./components/accountCenter/passengerList.vue"
const { t } = useI18n();
const router = useRouter()
const { params } = router.currentRoute.value
const userStore = useUserStore()
const systemConfigStore = useSystemConfigStore()
const systemConfig = reactive({
tenantId: systemConfigStore.tenantId || null,
distributorId: systemConfigStore.distributorId as any,
})
const loginType = ref(userStore.loginType)
const userInfor = ref<any>(userStore.personalInfor)
const loading = ref(true)
// 绑定Google账号
const googleButtonContainer = ref(null);
// 绑定账号信息
const WeChatInfor = ref(null as any)
const GoogleInfor = ref(null as any)
const LnlineInfor = ref(null as any)
// 打开微信绑定账号弹窗信息
const openInfo = ref({} as any)
const current = ref(1)
if(params&&params.type){
......
......@@ -246,7 +246,6 @@ const getAppIdRedirectUri = async () => {
// 获取微信绑定AppID 域名
const response = await userStore.getUserWechatAppIdAsync(systemConfig.tenantId?.toString() || '',providerTypeEnum.WECHAT.value)
if (response.status == 'SUCCESS') {
return
openInfo.value = response.data[0]
const { appId, redirectUri } = openInfo.value;
const redirect_url = redirectUri?redirectUri:'https://www.oytour.com/#/login'
......
......@@ -79,12 +79,26 @@
<a-select class="formData-input !w-[289px] mr-[30px]"
v-model="formData.residentialArea"
size="large"
:placeholder="t('personal.placeholder')">
<a-option v-for="item of AreaCodeList" :value="item.phoneCode" :label="item.name" />
:placeholder="t('personal.placeholder')"
allow-search>
<a-option v-for="item of AreaCodeList" :value="item.id" :label="item.name" />
</a-select>
</a-form-item>
</a-col>
<a-col :span="8"></a-col>
<a-col :span="8">
<a-form-item field="phoneCode" :label="t('login.phoneCode')">
<a-select class="formData-input !w-[289px] mr-[30px]"
v-model="formData.phoneCode"
size="large"
allow-search>
<a-option v-for="item of AreaCodeList" :value="item.phoneCode" :label="item.phoneCode" >
<span>{{ item.name }}</span>
<span>{{ item.phoneCode }}</span>
</a-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item field="phone" :label="t('login.bindingPhone')">
<a-input class="formData-input !w-[289px] mr-[30px]"
......@@ -92,7 +106,7 @@
:placeholder="t('login.bindingPhoneRequired')"
size="large">
<template #prefix>
<a-dropdown position="br" trigger.stop="click">
<!-- <a-dropdown position="br" trigger.stop="click">
<div class="flex items-center cursor-pointer">
<span class="text-[16px] font-bold w-[45px]">{{ formData.phoneCode?formData.phoneCode:t('login.phoneCode') }}</span>
<icon-down size="16" strokeLinejoin="miter" />
......@@ -104,13 +118,12 @@
:key="option.value"
@click.stop="handleAreaCodeChange(option.phoneCode)">
<div class="flex items-center space-x-3 px-2 py-1">
<!-- <span class="text-lg">{{ option.flag }}</span> -->
<span class="font-medium">{{ option.name }}</span>
<span class="text-[#A3A4A0] font-light">({{ option.phoneCode }})</span>
</div>
</a-doption>
</template>
</a-dropdown>
</a-dropdown> -->
</template>
</a-input>
......@@ -157,8 +170,6 @@ import CountryService from '@/services/CountryService'
import { useUserStore } from '@/stores/user'
import UploadService from '@/services/UploadService'
import type { FileItem } from '@arco-design/web-vue'
import { errorMonitor } from "events";
const { t } = useI18n();
......@@ -187,12 +198,10 @@ const formData = reactive({
name: '',//名
surName: '',//姓氏
birthday: null as any,//出生日期
isReceivePush: null as any,//勾選「我願意接收優惠與電子報」 1是
lineId: null as any,//LINE ID
phone: null as any,//手机号
phoneCode: null as any,//手机号国家码
photo: null as any,//头像
residentialArea: null as any,//居住地
residentialArea: null as any,//国籍
sex: null as any,//性别 1男 2女
wechatId: null as any,//微信ID
})
......@@ -318,7 +327,10 @@ const initPullDown = () =>{
const getSimples = async () => {
const result = await CountryService.getSimpleList(true)
if(result&&result.length>0){
AreaCodeList.value = result
AreaCodeList.value = result.map((item: any) => ({
...item,
phoneCode: item.phoneCode.indexOf('+')==-1?'+'+item.phoneCode:item.phoneCode,
}))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment