Merge branch 'main' of github.com:hainatravel/GHHub

dev/2025b
Ycc 3 days ago
commit 21bda12098

@ -10,8 +10,8 @@ const HeaderWrapper = ({ children, header, loading, backTo, ...props }) => {
} = theme.useToken(); } = theme.useToken();
return ( return (
<> <>
<Spin spinning={loading || false}> <Spin spinning={loading || false} wrapperClassName='h-full [&_.ant-spin-container]:h-full' >
<Layout className=' bg-white'> <Layout className=' bg-white h-full'>
<Header className='header px-6 h-10 ' style={{ background: 'white' }}> <Header className='header px-6 h-10 ' style={{ background: 'white' }}>
<Flex justify={'space-between'} align={'center'} className='h-full'> <Flex justify={'space-between'} align={'center'} className='h-full'>
{/* {header} */} {/* {header} */}
@ -20,7 +20,7 @@ const HeaderWrapper = ({ children, header, loading, backTo, ...props }) => {
</Flex> </Flex>
</Header> </Header>
<Divider className='my-2' /> <Divider className='my-2' />
<Content className='' style={{ backgroundColor: colorBgContainer }}> <Content className='overflow-auto' style={{ backgroundColor: colorBgContainer }}>
{children || <Outlet />} {children || <Outlet />}
</Content> </Content>
</Layout> </Layout>

@ -98,7 +98,7 @@ function App() {
</FloatButton.Group> </FloatButton.Group>
{contextHolder} {contextHolder}
<ErrorBoundary> <ErrorBoundary>
<Layout className='min-h-screen'> <Layout className='min-h-screen h-dvh'>
<Header className='sticky top-0 z-10 w-full'> <Header className='sticky top-0 z-10 w-full'>
<Row gutter={{ md: 24 }} justify='end' align='middle'> <Row gutter={{ md: 24 }} justify='end' align='middle'>
<Col span={15}> <Col span={15}>
@ -159,7 +159,7 @@ function App() {
</Col> </Col>
</Row> </Row>
</Header> </Header>
<Content className='p-6 m-0 min-h-72 bg-white'> <Content className='p-6 m-0 min-h-72 bg-white overflow-auto'>
{needToLogin ? <>login...</> : <Outlet />} {needToLogin ? <>login...</> : <Outlet />}
</Content> </Content>
<Footer>China Highlights International Travel Service Co., LTD, Version: {BUILD_VERSION}</Footer> <Footer>China Highlights International Travel Service Co., LTD, Version: {BUILD_VERSION}</Footer>

@ -43,11 +43,11 @@ function Detail() {
backTo={false} backTo={false}
header={<Header title={activeAgency.travel_agency_name} refresh={handleGetAgencyProducts} handleNewProduct={() => setAddProductVisible(true)} />}> header={<Header title={activeAgency.travel_agency_name} refresh={handleGetAgencyProducts} handleNewProduct={() => setAddProductVisible(true)} />}>
<> <>
<Flex gap={10}> <Flex gap={10} className='h-full'>
{/* onNodeSelect={handleNodeSelect} */} {/* onNodeSelect={handleNodeSelect} */}
<ProductsTree className='basis-80 sticky top-16 overflow-y-auto shrink-0' style={{ height: 'calc(100vh - 150px)' }} /> <ProductsTree className='basis-80 sticky top-0 overflow-y-auto shrink-0' style1={{ height: 'calc(100vh - 150px)' }} />
<Divider type={'vertical'} className='mx-1 h-auto' /> <Divider type={'vertical'} className='mx-1 h-auto' />
<div className=' flex-auto '> <div className=' flex-auto overflow-auto '>
<ProductInfo /> <ProductInfo />
</div> </div>
</Flex> </Flex>

@ -400,7 +400,7 @@ const formValuesMapper = (values) => {
key: 'lgc_details', key: 'lgc_details',
transform: (value) => { transform: (value) => {
const valueArr = Object.values(value) const valueArr = Object.values(value)
.filter((_v) => !isEmpty(_v)) .filter((_v) => !isEmpty(_v.lgc))
.map((e) => ({ title: '', ...e, descriptions: e.descriptions || '' })); .map((e) => ({ title: '', ...e, descriptions: e.descriptions || '' }));
return valueArr; return valueArr;
}, },
@ -409,7 +409,7 @@ const formValuesMapper = (values) => {
key: 'lgc_details_mapped', key: 'lgc_details_mapped',
transform: (value) => { transform: (value) => {
const valueArr = Object.values(value) const valueArr = Object.values(value)
.filter((_v) => !isEmpty(_v)) .filter((_v) => !isEmpty(_v.lgc))
.map((e) => ({ title: '', ...e, descriptions: e.descriptions || '' })); .map((e) => ({ title: '', ...e, descriptions: e.descriptions || '' }));
return valueArr.reduce((r, c) => ({ ...r, [c.lgc]: c }), {}); return valueArr.reduce((r, c) => ({ ...r, [c.lgc]: c }), {});
}, },

@ -43,7 +43,7 @@ function Detail() {
]; ];
function detailTextRender(_, confirm) { function detailTextRender(_, confirm) {
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n\n'); const formattedText = confirm.PCI_ConfirmText;
return ( return (
<div className='whitespace-pre-line'> <div className='whitespace-pre-line'>
{formattedText} {formattedText}
@ -76,6 +76,8 @@ function Detail() {
const [confirmText, setConfirmText] = useState(''); const [confirmText, setConfirmText] = useState('');
const [newConfirmText, setNewConfirmText] = useState(''); const [newConfirmText, setNewConfirmText] = useState('');
const [dataLoading, setDataLoading] = useState(false); const [dataLoading, setDataLoading] = useState(false);
const [reservationPreviewUrl, setReservationPreviewUrl] = useState('');
const [nameCardPreviewUrl, setNameCardPreviewUrl] = useState('');
const { notification } = App.useApp(); const { notification } = App.useApp();
const { reservationId } = useParams(); const { reservationId } = useParams();
@ -93,9 +95,6 @@ function Detail() {
const nameCardUrl = const nameCardUrl =
`https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${travelAgencyId}&token=${loginToken}&FileType=2&v=${randomString}` `https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${travelAgencyId}&token=${loginToken}&FileType=2&v=${randomString}`
const reservationPreviewUrl = officeWebViewerUrl + encodeURIComponent(reservationUrl);
const nameCardPreviewUrl = officeWebViewerUrl + encodeURIComponent(nameCardUrl);
const showConfirmModal = (confirm) => { const showConfirmModal = (confirm) => {
setIsModalOpen(true); setIsModalOpen(true);
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n\n'); const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n\n');
@ -118,6 +117,10 @@ function Detail() {
useEffect(() => { useEffect(() => {
setDataLoading(true); setDataLoading(true);
setReservationPreviewUrl(officeWebViewerUrl + encodeURIComponent(reservationUrl))
setNameCardPreviewUrl(officeWebViewerUrl + encodeURIComponent(nameCardUrl))
getReservationDetail(reservationId) getReservationDetail(reservationId)
.catch(ex => { .catch(ex => {
notification.error({ notification.error({

Loading…
Cancel
Save