|
|
|
@ -9,7 +9,7 @@ import { groupBy } from '@/utils/commons';
|
|
|
|
|
|
|
|
|
|
const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const { travel_agency_id, use_year, audit_state } = useParams();
|
|
|
|
|
const { travel_agency_id, use_year } = params;
|
|
|
|
|
const productsTypes = useProductsTypes();
|
|
|
|
|
|
|
|
|
|
const [agencyProducts] = useProductsStore((state) => [state.agencyProducts]);
|
|
|
|
@ -78,7 +78,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
// className='mt-4'
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '综费项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem',
|
|
|
|
@ -128,7 +128,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '超公里项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem', maxWidth: '12rem', className: 'max-w-48',
|
|
|
|
@ -161,7 +161,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
<div>
|
|
|
|
|
特殊时段
|
|
|
|
|
<div>
|
|
|
|
|
{use_dates_start.replace(`${use_year}-`, '')}~{use_dates_end.replace(`${use_year}-`, '')}
|
|
|
|
|
{use_dates_start.replace(`${use_year}.`, '')}~{use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
@ -206,7 +206,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '车费项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem',
|
|
|
|
@ -230,7 +230,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
<div key={'ps'}>
|
|
|
|
|
特殊时段
|
|
|
|
|
<div>
|
|
|
|
|
{use_dates_start.replace(`${use_year}-`, '')}~{use_dates_end.replace(`${use_year}-`, '')}
|
|
|
|
|
{use_dates_start.replace(`${use_year}.`, '')}~{use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
@ -275,7 +275,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '包价线路项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem',
|
|
|
|
@ -291,15 +291,18 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
width: '9rem',
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
render: (_, { quote_season, use_dates_start, use_dates_end, rowSpan }) =>
|
|
|
|
|
quote_season === 'SS' ? (rowSpan > 1 ? (
|
|
|
|
|
quote_season === 'SS' ? ((rowSpan === 1) ? '' : (
|
|
|
|
|
<div>
|
|
|
|
|
平季<div>(除特殊时段外)</div>
|
|
|
|
|
<div>
|
|
|
|
|
{use_dates_start.replace(`${use_year}.`, '')}~{use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
) : '') : (
|
|
|
|
|
)) : (
|
|
|
|
|
<div>
|
|
|
|
|
特殊时段
|
|
|
|
|
<div>
|
|
|
|
|
{use_dates_start.replace(`${use_year}-`, '')}~{use_dates_end.replace(`${use_year}-`, '')}
|
|
|
|
|
{use_dates_start.replace(`${use_year}.`, '')}~{use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
@ -347,7 +350,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '导游项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem',
|
|
|
|
@ -365,7 +368,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
title: '成人',
|
|
|
|
|
dataIndex: [0, 'adult_cost'],
|
|
|
|
|
key: 'adult_cost',
|
|
|
|
|
width: '9rem',
|
|
|
|
|
width: '9rem', align: 'center',
|
|
|
|
|
render: (_, { SS }) => (
|
|
|
|
|
<div className='divide-x-0 divide-y divide-solid divide-stone-200'>
|
|
|
|
|
{(SS || []).length === 1 ? (
|
|
|
|
@ -391,7 +394,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
title: '儿童',
|
|
|
|
|
dataIndex: [0, 'child_cost'],
|
|
|
|
|
key: 'child_cost',
|
|
|
|
|
width: '9rem',
|
|
|
|
|
width: '9rem', align: 'center',
|
|
|
|
|
render: (_, { SS }) => (
|
|
|
|
|
<div className='divide-x-0 divide-y divide-solid divide-stone-200'>
|
|
|
|
|
{(SS || []).length === 1 ? (
|
|
|
|
@ -425,21 +428,19 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
title: '成人',
|
|
|
|
|
dataIndex: [0, 'adult_cost'],
|
|
|
|
|
key: 'adult_cost',
|
|
|
|
|
width: '9rem',
|
|
|
|
|
width: '9rem', align: 'center',
|
|
|
|
|
render: (_, { PS }) => (
|
|
|
|
|
<div className='divide-x-0 divide-y divide-solid divide-stone-200'>
|
|
|
|
|
{(PS || []).map((ele, pi) => (
|
|
|
|
|
<div key={pi} className='b'>
|
|
|
|
|
{ele.adult_cost}
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
ele.rows.map((d, di) => (
|
|
|
|
|
<div key={pi} className='flex justify-between divide-x divide-y-0 divide-solid divide-stone-200'>
|
|
|
|
|
<div className='flex-1 self-center'>
|
|
|
|
|
{ele.rows.map((d, di) => (
|
|
|
|
|
<div key={di}>
|
|
|
|
|
({d.use_dates_start.replace(`${use_year}-`, '')}~{d.use_dates_end.replace(`${use_year}-`, '')})
|
|
|
|
|
{d.use_dates_start.replace(`${use_year}.`, '')}~{d.use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
))
|
|
|
|
|
}
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
<span className='flex-1 self-center'>{ele.adult_cost}</span>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
@ -449,19 +450,19 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
title: '儿童',
|
|
|
|
|
dataIndex: [0, 'child_cost'],
|
|
|
|
|
key: 'child_cost',
|
|
|
|
|
width: '9rem',
|
|
|
|
|
width: '9rem', align: 'center',
|
|
|
|
|
render: (_, { PS }) => (
|
|
|
|
|
<div className='divide-x-0 divide-y divide-solid divide-stone-200'>
|
|
|
|
|
{(PS || []).map((ele, pi) => (
|
|
|
|
|
<div key={pi} className='b'>
|
|
|
|
|
{ele.child_cost}
|
|
|
|
|
<div>
|
|
|
|
|
<div key={pi} className='flex justify-between divide-x divide-y-0 divide-solid divide-stone-200'>
|
|
|
|
|
<div className='flex-1 self-center'>
|
|
|
|
|
{ele.rows.map((d, di) => (
|
|
|
|
|
<div key={di}>
|
|
|
|
|
({d.use_dates_start.replace(`${use_year}-`, '')}~{d.use_dates_end.replace(`${use_year}-`, '')})
|
|
|
|
|
{d.use_dates_start.replace(`${use_year}.`, '')}~{d.use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
<span className='flex-1 self-center'>{ele.child_cost}</span>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
@ -498,7 +499,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '景点项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem',
|
|
|
|
@ -546,6 +547,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
<>
|
|
|
|
|
旺季
|
|
|
|
|
<div className='flex justify-between divide-x divide-y-0 divide-solid divide-stone-200'>
|
|
|
|
|
<span className='flex-0 text-center w-32'>-</span>
|
|
|
|
|
<span className='flex-1'>成人</span>
|
|
|
|
|
<span className='flex-1'>儿童</span>
|
|
|
|
|
</div>
|
|
|
|
@ -560,17 +562,15 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
{(PS || []).map((ele, pi) => (
|
|
|
|
|
<div key={pi}>
|
|
|
|
|
<div className='flex justify-between divide-x divide-y-0 divide-solid divide-stone-200'>
|
|
|
|
|
<span className='flex-1'>{ele.adult_cost}</span>
|
|
|
|
|
<span className='flex-1'>{ele.child_cost}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div className='flex-0 text-center w-32'>
|
|
|
|
|
{ele.rows.map((d, di) => (
|
|
|
|
|
<div key={di}>
|
|
|
|
|
({d.use_dates_start.replace(`${use_year}-`, '')}~{d.use_dates_end.replace(`${use_year}-`, '')})
|
|
|
|
|
{d.use_dates_start.replace(`${use_year}.`, '')}~{d.use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
{/* <div>( {ele.rows.map((d) => `${d.use_dates_start.replace(`${use_year}-`, '')}~${d.use_dates_end.replace(`${use_year}-`, '')}`).join('; ')} )</div> */}
|
|
|
|
|
))}</div>
|
|
|
|
|
<span className='flex-1 self-center'>{ele.adult_cost}</span>
|
|
|
|
|
<span className='flex-1 self-center'>{ele.child_cost}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
@ -604,7 +604,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '餐费项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem',
|
|
|
|
@ -628,7 +628,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
<div>
|
|
|
|
|
特殊时段
|
|
|
|
|
<div>
|
|
|
|
|
{use_dates_start.replace(`${use_year}-`, '')}~{use_dates_end.replace(`${use_year}-`, '')}
|
|
|
|
|
{use_dates_start.replace(`${use_year}.`, '')}~{use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
@ -677,7 +677,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
rowClassName={cityRowHighlights}
|
|
|
|
|
columns={[
|
|
|
|
|
{
|
|
|
|
|
title: '项目',
|
|
|
|
|
title: '附加项目',
|
|
|
|
|
dataIndex: ['info', 'product_title'],
|
|
|
|
|
key: 'product_title',
|
|
|
|
|
width: '12rem', maxWidth: '12rem', className: 'max-w-48',
|
|
|
|
@ -701,7 +701,7 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
<div>
|
|
|
|
|
特殊时段
|
|
|
|
|
<div>
|
|
|
|
|
{use_dates_start.replace(`${use_year}-`, '')}~{use_dates_end.replace(`${use_year}-`, '')}
|
|
|
|
|
{use_dates_start.replace(`${use_year}.`, '')}~{use_dates_end.replace(`${use_year}.`, '')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
@ -727,13 +727,21 @@ const AgencyPreview = ({ params, ...props }) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const typeTableMap = {
|
|
|
|
|
// '6': { render: () => {} },
|
|
|
|
|
'6': { render: renderTable_6 },
|
|
|
|
|
// 'B': { render: () => {} },
|
|
|
|
|
'B': { render: renderTable_B },
|
|
|
|
|
// 'J': { render: () => {} },
|
|
|
|
|
'J': { render: renderTable_J },
|
|
|
|
|
// 'Q': { render: () => {} },
|
|
|
|
|
'Q': { render: renderTable_Q },
|
|
|
|
|
// '7': { render: () => {} },
|
|
|
|
|
'7': { render: renderTable_7 },
|
|
|
|
|
// 'R': { render: () => {} },
|
|
|
|
|
'R': { render: renderTable_R },
|
|
|
|
|
// '8': { render: () => {} },
|
|
|
|
|
'8': { render: renderTable_8 },
|
|
|
|
|
// 'D': { render: () => {} },
|
|
|
|
|
'D': { render: renderTable_D },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|