perf: 产品审核: 价格历史: 地接查看 权限

main
Lei OT 2 months ago
parent aea6b4ee55
commit a8fb0bbded

@ -109,21 +109,23 @@ const PriceTable = ({ productType, dataSource, refresh }) => {
key: 'action',
render: (_, r, ri) =>
[-1, 0, 3].includes(Number(r.audit_state_id)) ? (
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
<>
<Space className='w-full [&>*:last-child]:ms-auto'>
{Number(r.audit_state_id) === 0 && (
<>
<Button onClick={() => handleAuditPriceItem('2', r, ri)}></Button>
<Button onClick={() => handleAuditPriceItem('3', r, ri)}></Button>
</>
)}
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
{Number(r.audit_state_id) === 0 && (
<div className='flex gap-2'>
<Button onClick={() => handleAuditPriceItem('2', r, ri)}></Button>
<Button onClick={() => handleAuditPriceItem('3', r, ri)}></Button>
</div>
)}
</RequireAuth>
<ProductQuotationLogPopover
method={'history'}
{...{ travel_agency_id, product_id: r.info.id, price_id: r.id, use_year }}
onOpenChange={(open) => setLogOpenPriceRow(open ? r.id : null)}
/>
</Space>
</RequireAuth>
</>
) : null,
},
// {
@ -183,11 +185,11 @@ const TypesPanels = (props) => {
r.concat(
c.quotation.map((q, i) => ({
...q,
weekdays: q.weekdays
.split(',')
.filter(Boolean)
.map((w) => t(`weekdaysShort.${w}`))
.join(', '),
// weekdays: q.weekdays
// .split(',')
// .filter(Boolean)
// .map((w) => t(`weekdaysShort.${w}`))
// .join(', '),
info: c.info,
lgc_details: c.lgc_details.reduce((rlgc, clgc) => ({...rlgc, [clgc.lgc]: clgc}), {}),
rowSpan: i === 0 ? c.quotation.length : 0,

@ -141,10 +141,15 @@ export const columnsSets = (t, colorize = true) => [
: '';
const preValue = ifCompare && ifData ? <div className='text-muted line-through '>{_weekdays}</div> : null;
const editCls = ifCompare && ifData ? 'text-danger' : '';
const weekdaysTxt = weekdays
.split(',')
.filter(Boolean)
.map((w) => t(`common:weekdaysShort.${w}`))
.join(', ');
return (
<div>
{preValue}
<span className={editCls}>{text || t('Unlimited')}</span>
<span className={editCls}>{weekdaysTxt || t('Unlimited')}</span>
</div>
);
},

Loading…
Cancel
Save