产品审核: 已发布的价格

main
Lei OT 2 months ago
parent f94e46bcc1
commit 987b7d589a

@ -126,26 +126,26 @@ const PriceTable = ({ productType, dataSource, refresh }) => {
</RequireAuth>
) : null,
},
{
title: '',
key: 'action2',
width: '6rem',
className: 'bg-white',
onCell: (r, index) => ({ rowSpan: r.rowSpan }),
render: (_, r) => {
const showPublicBtn = null; // r.pendingQuotation ? <Popover title='' trigger={['click']}> <Button size='small' className='ml-2' onClick={() => { }}></Button></Popover> : null;
const btn2 = r.showPublicBtn ? (
<ProductQuotationLogPopover
method={'published'}
{...{ travel_agency_id, product_id: r.info.id, price_id: r.id, use_year }}
triggerProps={{ type: 'primary', ghost: true, size: 'small' }}
placement='bottom'
className='max-w-[1000px]'
/>
) : null;
return <div className='absolute bottom-2 right-1'>{btn2}</div>;
},
},
// {
// title: '',
// key: 'action2',
// width: '6rem',
// className: 'bg-white',
// onCell: (r, index) => ({ rowSpan: r.rowSpan }),
// render: (_, r) => {
// const showPublicBtn = null; // r.pendingQuotation ? <Popover title='' trigger={['click']}> <Button size='small' className='ml-2' onClick={() => { }}></Button></Popover> : null;
// const btn2 = r.showPublicBtn ? (
// <ProductQuotationLogPopover
// method={'published'}
// {...{ travel_agency_id, product_id: r.info.id, price_id: r.id, use_year }}
// triggerProps={{ type: 'primary', ghost: true, size: 'small' }}
// placement='bottom'
// className='max-w-[1000px]'
// />
// ) : null;
// return <div className='absolute bottom-2 right-1'>{btn2}</div>;
// },
// },
];
return (
<Table

@ -151,7 +151,7 @@ const useLogMethod = (method) => {
btnText: t('versionHistory'),
fetchData: async (params) => {
const data = await getPPLogAction(params);
return data;
return { data };
},
},
'published': {
@ -160,7 +160,7 @@ const useLogMethod = (method) => {
fetchData: async (params) => {
const { travel_agency_id, product_id, price_id, use_year } = params;
const data = await getPPRunningAction({ travel_agency_id, product_id_list: product_id, use_year });
return data?.[0]?.quotation || [];
return { data: data?.[0]?.quotation || [] };
},
},
};
@ -198,7 +198,7 @@ const ProductQuotationLogPopover = ({ method, triggerProps = {}, onOpenChange, .
const [loading, setLoading] = useState(false);
const getData = async () => {
setLoading(true);
const data = await fetchData({ travel_agency_id, product_id, price_id, use_year });
const { data } = await fetchData({ travel_agency_id, product_id, price_id, use_year });
setLogData(data);
invokeOpenChange(true);
setLoading(false);

Loading…
Cancel
Save