From 7b7d5faa0d1dc20a83fbdcfa58819ff2edf592bd Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 29 Jul 2025 16:32:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A7=E5=93=81=E5=AE=A1=E6=A0=B8:?= =?UTF-8?q?=20=E6=8B=92=E7=BB=9D=E7=9A=84=E4=BB=B7=E6=A0=BC:=20=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=20=E4=BB=B7=E6=A0=BC=E5=8E=86=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/products/Audit.jsx | 58 ++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/src/views/products/Audit.jsx b/src/views/products/Audit.jsx index 15988f2..cb8a113 100644 --- a/src/views/products/Audit.jsx +++ b/src/views/products/Audit.jsx @@ -68,11 +68,33 @@ const PriceTable = ({ productType, dataSource, refresh }) => { }; const columns = [ - { key: 'title', dataIndex: ['info', 'title'], width: '16rem', title: t('Title'), onCell: (r, index) => ({ rowSpan: r.rowSpan, }), className: 'bg-white', render: (text, r) => { - const title = text || r.lgc_details?.['2']?.title || r.lgc_details?.['1']?.title || ''; - const itemLink = isPermitted(PERM_PRODUCTS_OFFER_AUDIT) ? `/products/${travel_agency_id}/${use_year}/${audit_state}/edit` : isPermitted(PERM_PRODUCTS_OFFER_PUT) ? `/products/edit` : ''; - return
{isNotEmpty(itemLink) ?
setEditingProduct({info: r.info})}>{title}
: title}
; - } }, + { + key: 'title', + dataIndex: ['info', 'title'], + width: '16rem', + title: t('Title'), + onCell: (r, index) => ({ rowSpan: r.rowSpan }), + className: 'bg-white', + render: (text, r) => { + const title = text || r.lgc_details?.['2']?.title || r.lgc_details?.['1']?.title || ''; + const itemLink = isPermitted(PERM_PRODUCTS_OFFER_AUDIT) + ? `/products/${travel_agency_id}/${use_year}/${audit_state}/edit` + : isPermitted(PERM_PRODUCTS_OFFER_PUT) + ? `/products/edit` + : ''; + return ( +
+ {isNotEmpty(itemLink) ? ( +
setEditingProduct({ info: r.info })}> + {title} +
+ ) : ( + title + )} +
+ ); + }, + }, ...columnsSets(t), { key: 'state', @@ -86,20 +108,30 @@ const PriceTable = ({ productType, dataSource, refresh }) => { title: '', key: 'action', render: (_, r, ri) => - (Number(r.audit_state_id)) === 0 ? ( + [0, 3].includes(Number(r.audit_state_id)) ? ( - - - - setLogOpenPriceRow(open ? r.id : null)} /> + + {Number(r.audit_state_id) === 0 && ( + <> + + + + )} + setLogOpenPriceRow(open ? r.id : null)} + /> ) : null, }, { title: '', - key: 'action2', width: '6rem', className: 'bg-white', - onCell: (r, index) => ({ rowSpan: r.rowSpan, }), + key: 'action2', + width: '6rem', + className: 'bg-white', + onCell: (r, index) => ({ rowSpan: r.rowSpan }), render: (_, r) => { const showPublicBtn = null; // r.pendingQuotation ? : null; const btn2 = r.showPublicBtn ? ( @@ -113,7 +145,7 @@ const PriceTable = ({ productType, dataSource, refresh }) => { ) : null; return
{btn2}
; }, - } + }, ]; return (