|
|
|
@ -13,8 +13,6 @@ import { PERM_PRODUCTS_OFFER_AUDIT, PERM_PRODUCTS_OFFER_PUT } from '@/config';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import VendorSelector from '@/components/VendorSelector';
|
|
|
|
|
import AuditStateSelector from '@/components/AuditStateSelector';
|
|
|
|
|
import NewProductModal from './NewProductModal';
|
|
|
|
|
import ContractRemarksModal from './ContractRemarksModal'
|
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
|
|
|
|
|
|
import AgencyContract from '../Print/AgencyContract_v0903';
|
|
|
|
@ -170,6 +168,23 @@ const Header = ({ refresh, ...props }) => {
|
|
|
|
|
<Button onClick={() => refresh(param)} type='text' className='text-primary round-none' icon={<ReloadOutlined />} />
|
|
|
|
|
</h2>
|
|
|
|
|
</div>
|
|
|
|
|
{/* todo: export, 审核完成之后才能导出 */}
|
|
|
|
|
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
|
|
|
|
|
<Button size='small' onClick={handleDownload}>{t('Export')} .docx</Button>
|
|
|
|
|
{/* <PrintContractPDF /> */}
|
|
|
|
|
</RequireAuth>
|
|
|
|
|
{/* {activeAgencyState === 0 && ( */}
|
|
|
|
|
<>
|
|
|
|
|
<RequireAuth subject={PERM_PRODUCTS_OFFER_PUT}>
|
|
|
|
|
<Popconfirm title={t('products:sureSubmitAudit')} onConfirm={handleSubmitForAudit} okText={t('Yes')} placement={'bottomLeft'}>
|
|
|
|
|
<Button size='small' type={'primary'} >
|
|
|
|
|
{t('Submit')}
|
|
|
|
|
{t('Audit')}
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
</RequireAuth>
|
|
|
|
|
</>
|
|
|
|
|
{/* )} */}
|
|
|
|
|
{showEditA && (
|
|
|
|
|
<Link className='px-2' to={isPermitted(PERM_PRODUCTS_OFFER_AUDIT) ? `/products/${activeAgency.travel_agency_id}/${pickYear}/${audit_state}/edit` : `/products/edit`}>
|
|
|
|
|
{t('Edit')}
|
|
|
|
@ -193,29 +208,6 @@ const Header = ({ refresh, ...props }) => {
|
|
|
|
|
{t('products:auditStateAction.Rejected')}
|
|
|
|
|
</Button>
|
|
|
|
|
</RequireAuth>
|
|
|
|
|
<ContractRemarksModal />
|
|
|
|
|
{/* todo: export, 审核完成之后才能导出 */}
|
|
|
|
|
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
|
|
|
|
|
<Button size='small' onClick={handleDownload}>{t('Export')} .docx</Button>
|
|
|
|
|
{/* <PrintContractPDF /> */}
|
|
|
|
|
</RequireAuth>
|
|
|
|
|
{/* 编辑 */}
|
|
|
|
|
<Divider type='vertical' />
|
|
|
|
|
{isEditPage && (
|
|
|
|
|
<NewProductModal />
|
|
|
|
|
)}
|
|
|
|
|
{/* {activeAgencyState === 0 && ( */}
|
|
|
|
|
<>
|
|
|
|
|
<RequireAuth subject={PERM_PRODUCTS_OFFER_PUT}>
|
|
|
|
|
<Popconfirm title={t('products:sureSubmitAudit')} onConfirm={handleSubmitForAudit} okText={t('Yes')} placement={'bottomLeft'}>
|
|
|
|
|
<Button size='small' type={'primary'} >
|
|
|
|
|
{t('Submit')}
|
|
|
|
|
{t('Audit')}
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
</RequireAuth>
|
|
|
|
|
</>
|
|
|
|
|
{/* )} */}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|