4.11 项目经理和代理管理员的发票查看加遮罩
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { Button, Card } from 'antd';
|
||||
import { Button, Card, Spin } from 'antd';
|
||||
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
||||
import FileDown from '@/utils/Download';
|
||||
|
||||
@ -14,13 +14,18 @@ const Invoice: React.FC<any> = (props) => {
|
||||
const [viewInvoiceFormVisible, setViewInvoiceFormVisible] = useState<any>(false);
|
||||
//查看详情窗口record
|
||||
const [viewInvoiceValues, setViewInvoiceValues] = useState<any>({});
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
|
||||
const viewDetail = (invoiceId: String) => {
|
||||
setLoading(true);
|
||||
getInSingleInvoiceRecord(invoiceId).then((res: any) => {
|
||||
if (res?.success === true && res.data?.id !== null) {
|
||||
setViewInvoiceFormVisible(true);
|
||||
setViewInvoiceValues(res?.data);
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
|
||||
@ -165,68 +170,74 @@ const Invoice: React.FC<any> = (props) => {
|
||||
return (
|
||||
<>
|
||||
<Card title="我的发票列表" style={{ borderRadius: 6 }} bodyStyle={{ padding: '1px 24px 0px' }}>
|
||||
<div className="zjl-entrust confirm" style={{ height: window.innerHeight - 124, overflowY: 'auto' }}>
|
||||
<ProTable
|
||||
rowKey="invoiceId"
|
||||
size="small"
|
||||
actionRef={actionRef}//action触发后更新表格
|
||||
search={{
|
||||
defaultCollapsed: true,
|
||||
optionRender: (searchConfig, { form }) => {
|
||||
let params = ''
|
||||
for (const key in form?.getFieldsValue()) {
|
||||
let element = form?.getFieldsValue()[key];
|
||||
if (element != undefined) {
|
||||
params = params + '&' + key + '=' + element
|
||||
<Spin spinning={loading}>
|
||||
<div className="zjl-entrust confirm" style={{ height: window.innerHeight - 124, overflowY: 'auto' }}>
|
||||
<ProTable
|
||||
rowKey="invoiceId"
|
||||
size="small"
|
||||
actionRef={actionRef}//action触发后更新表格
|
||||
search={{
|
||||
defaultCollapsed: true,
|
||||
optionRender: (searchConfig, { form }) => {
|
||||
let params = ''
|
||||
for (const key in form?.getFieldsValue()) {
|
||||
let element = form?.getFieldsValue()[key];
|
||||
if (element != undefined) {
|
||||
params = params + '&' + key + '=' + element
|
||||
}
|
||||
}
|
||||
}
|
||||
return [
|
||||
<Button
|
||||
key="searchText"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form?.submit();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.searchText}
|
||||
</Button>,
|
||||
<Button
|
||||
key="resetText"
|
||||
onClick={() => {
|
||||
form?.resetFields();
|
||||
actionRef.current?.reset?.();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.resetText}
|
||||
</Button>,
|
||||
<FileDown
|
||||
key="downLoad"
|
||||
type="xlsx"
|
||||
apiUrl={`/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyAdminExportGetlist?n=${params}`}
|
||||
btnName="导出"
|
||||
method="GET"
|
||||
form={form}
|
||||
/>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
columns={columns}
|
||||
options={false}
|
||||
request={(params) =>
|
||||
getAgencyAdminGetPagelist({ ...params, pageNo: params.current }).then((res: any) => {
|
||||
const result = {
|
||||
data: res.data?.records,
|
||||
total: res.data?.total,
|
||||
success: res.success,
|
||||
pageSize: res.data?.size,
|
||||
current: res.data?.current
|
||||
}
|
||||
return result;
|
||||
})
|
||||
}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}
|
||||
/>
|
||||
</div>
|
||||
return [
|
||||
<Button
|
||||
key="searchText"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form?.submit();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.searchText}
|
||||
</Button>,
|
||||
<Button
|
||||
key="resetText"
|
||||
onClick={() => {
|
||||
form?.resetFields();
|
||||
actionRef.current?.reset?.();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.resetText}
|
||||
</Button>,
|
||||
<FileDown
|
||||
key="downLoad"
|
||||
type="xlsx"
|
||||
apiUrl={`/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyAdminExportGetlist?n=${params}`}
|
||||
btnName="导出"
|
||||
method="GET"
|
||||
form={form}
|
||||
/>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
columns={columns}
|
||||
options={false}
|
||||
loading={false}
|
||||
request={(params) => {
|
||||
setLoading(true);
|
||||
return getAgencyAdminGetPagelist({ ...params, pageNo: params.current }).then((res: any) => {
|
||||
const result = {
|
||||
data: res.data?.records,
|
||||
total: res.data?.total,
|
||||
success: res.success,
|
||||
pageSize: res.data?.size,
|
||||
current: res.data?.current
|
||||
}
|
||||
return result;
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}
|
||||
/>
|
||||
</div>
|
||||
</Spin>
|
||||
</Card>
|
||||
{
|
||||
viewInvoiceValues ? (
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { Button, Popconfirm, Card } from 'antd';
|
||||
import { Button, Popconfirm, Card, Spin } from 'antd';
|
||||
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
||||
import FileDown from '@/utils/Download';
|
||||
|
||||
@ -14,13 +14,18 @@ const Invoice: React.FC<any> = (props) => {
|
||||
const [viewInvoiceFormVisible, setViewInvoiceFormVisible] = useState<any>(false);
|
||||
//查看详情窗口record
|
||||
const [viewInvoiceValues, setViewInvoiceValues] = useState<any>({});
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
|
||||
const viewDetail = (invoiceId: String) => {
|
||||
setLoading(true);
|
||||
getInSingleInvoiceRecord(invoiceId).then((res: any) => {
|
||||
if (res?.success === true && res.data?.id !== null) {
|
||||
setViewInvoiceFormVisible(true);
|
||||
setViewInvoiceValues(res?.data);
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
|
||||
@ -187,68 +192,74 @@ const Invoice: React.FC<any> = (props) => {
|
||||
return (
|
||||
<>
|
||||
<Card title="我的发票列表" style={{ borderRadius: 6 }} bodyStyle={{ padding: '1px 24px 0px' }}>
|
||||
<div className="zjl-entrust confirm" style={{ height: window.innerHeight - 124, overflowY: 'auto' }}>
|
||||
<ProTable
|
||||
rowKey="invoiceId"
|
||||
size="small"
|
||||
actionRef={actionRef}//action触发后更新表格
|
||||
search={{
|
||||
defaultCollapsed: true,
|
||||
optionRender: (searchConfig, { form }) => {
|
||||
let params = ''
|
||||
for (const key in form?.getFieldsValue()) {
|
||||
let element = form?.getFieldsValue()[key];
|
||||
if (element != undefined) {
|
||||
params = params + '&' + key + '=' + element
|
||||
<Spin spinning={loading}>
|
||||
<div className="zjl-entrust confirm" style={{ height: window.innerHeight - 124, overflowY: 'auto' }}>
|
||||
<ProTable
|
||||
rowKey="invoiceId"
|
||||
size="small"
|
||||
actionRef={actionRef}//action触发后更新表格
|
||||
search={{
|
||||
defaultCollapsed: true,
|
||||
optionRender: (searchConfig, { form }) => {
|
||||
let params = ''
|
||||
for (const key in form?.getFieldsValue()) {
|
||||
let element = form?.getFieldsValue()[key];
|
||||
if (element != undefined) {
|
||||
params = params + '&' + key + '=' + element
|
||||
}
|
||||
}
|
||||
}
|
||||
return [
|
||||
<Button
|
||||
key="searchText"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form?.submit();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.searchText}
|
||||
</Button>,
|
||||
<Button
|
||||
key="resetText"
|
||||
onClick={() => {
|
||||
form?.resetFields();
|
||||
actionRef.current?.reset?.();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.resetText}
|
||||
</Button>,
|
||||
<FileDown
|
||||
key="downLoad"
|
||||
type="xlsx"
|
||||
apiUrl={`/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyExportGetlist?n=${params}`}
|
||||
btnName="导出"
|
||||
method="GET"
|
||||
form={form}
|
||||
/>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
columns={columns}
|
||||
options={false}
|
||||
request={(params) =>
|
||||
getAgencyGetPagelist({ ...params, pageNo: params.current }).then((res: any) => {
|
||||
const result = {
|
||||
data: res.data?.records,
|
||||
total: res.data?.total,
|
||||
success: res.success,
|
||||
pageSize: res.data?.size,
|
||||
current: res.data?.current
|
||||
}
|
||||
return result;
|
||||
})
|
||||
}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}
|
||||
/>
|
||||
</div>
|
||||
return [
|
||||
<Button
|
||||
key="searchText"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form?.submit();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.searchText}
|
||||
</Button>,
|
||||
<Button
|
||||
key="resetText"
|
||||
onClick={() => {
|
||||
form?.resetFields();
|
||||
actionRef.current?.reset?.();
|
||||
}}
|
||||
>
|
||||
{searchConfig?.resetText}
|
||||
</Button>,
|
||||
<FileDown
|
||||
key="downLoad"
|
||||
type="xlsx"
|
||||
apiUrl={`/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyExportGetlist?n=${params}`}
|
||||
btnName="导出"
|
||||
method="GET"
|
||||
form={form}
|
||||
/>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
columns={columns}
|
||||
options={false}
|
||||
loading={false}
|
||||
request={(params) => {
|
||||
setLoading(true);
|
||||
return getAgencyGetPagelist({ ...params, pageNo: params.current }).then((res: any) => {
|
||||
const result = {
|
||||
data: res.data?.records,
|
||||
total: res.data?.total,
|
||||
success: res.success,
|
||||
pageSize: res.data?.size,
|
||||
current: res.data?.current
|
||||
}
|
||||
return result;
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}
|
||||
/>
|
||||
</div>
|
||||
</Spin>
|
||||
</Card>
|
||||
{
|
||||
viewInvoiceValues ? (
|
||||
|
Reference in New Issue
Block a user