Commit dd8b6ebd authored by 卢均锐's avatar 卢均锐

feat: 缓存业务对账及业务请款相关

parent 1842bf1d
...@@ -254,7 +254,7 @@ const Add = () => { ...@@ -254,7 +254,7 @@ const Add = () => {
{ required: true, message: intl.formatMessage({ id: 'balance.qingshuruduizhangshuliang' }) }, { required: true, message: intl.formatMessage({ id: 'balance.qingshuruduizhangshuliang' }) },
{ {
validator: (_, value) => { validator: (_, value) => {
return value > record.reconciliationQuantity ? Promise.reject(new Error('不能大于待对账数量')) : Promise.resolve() return value > record.reconciliationQuantity ? Promise.reject(new Error('不能大于待对账数量')) : Promise.resolve()
} }
}, },
]} ]}
...@@ -356,6 +356,7 @@ const Add = () => { ...@@ -356,6 +356,7 @@ const Add = () => {
components={ components={
<Form <Form
{...layout} {...layout}
requiredMark={_editAble}
form={form} form={form}
> >
<Card id='basicLayout' title={intl.formatMessage({ id: 'balance.jibenxinxi' })}> <Card id='basicLayout' title={intl.formatMessage({ id: 'balance.jibenxinxi' })}>
...@@ -395,9 +396,9 @@ const Add = () => { ...@@ -395,9 +396,9 @@ const Add = () => {
style={{ style={{
marginBottom: '24px', marginBottom: '24px',
}} }}
icon={<PlusOutlined />}
onClick={() => { setDrawerVisible(true) }} onClick={() => { setDrawerVisible(true) }}
> >
<PlusOutlined />
{intl.formatMessage({ id: 'balance.xuanze' })} {intl.formatMessage({ id: 'balance.xuanze' })}
</Button> : null} </Button> : null}
<Table dataSource={tabelSource} columns={_editAble ? columnsEdit : columns} scroll={{ x: 1300 }} pagination={false} /> <Table dataSource={tabelSource} columns={_editAble ? columnsEdit : columns} scroll={{ x: 1300 }} pagination={false} />
......
import React, { useRef, useState } from 'react' import React, { useRef, useState } from 'react'
import { Card, Typography, Space, Button, Popconfirm, Dropdown, Menu } from 'antd' import { Card, Typography, Space, Button, Popconfirm, Dropdown, Menu, message } from 'antd'
import { CaretDownOutlined } from '@ant-design/icons' import { CaretDownOutlined } from '@ant-design/icons'
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import StandardTable from '@/components/StandardTable'; import StandardTable from '@/components/StandardTable';
...@@ -35,6 +35,7 @@ const ReadyAdd: React.FC = () => { ...@@ -35,6 +35,7 @@ const ReadyAdd: React.FC = () => {
_params.createTimeEnd = formatTimeString(Number(params.createTimeEnd), 'YYYY-MM-DD'); _params.createTimeEnd = formatTimeString(Number(params.createTimeEnd), 'YYYY-MM-DD');
} }
const { data } = await postSettleAccountsBusinessReconciliationToSaveReconciliationList(_params) const { data } = await postSettleAccountsBusinessReconciliationToSaveReconciliationList(_params)
message.destroy();
return data return data
} }
...@@ -89,9 +90,9 @@ const ReadyAdd: React.FC = () => { ...@@ -89,9 +90,9 @@ const ReadyAdd: React.FC = () => {
<Dropdown overlay={() => ( <Dropdown overlay={() => (
<Menu onClick={(e) => handleMenuClick(e, record)}> <Menu onClick={(e) => handleMenuClick(e, record)}>
<Menu.Item key="1">{intl.formatMessage({ id: 'balance.bianji' })}</Menu.Item> <Menu.Item key="1">{intl.formatMessage({ id: 'balance.bianji' })}</Menu.Item>
<Popconfirm title={intl.formatMessage({ id: 'balance.quedingyaotijiaoma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchDelete(record.reconciliationId)}> {record.status === 1 && <Popconfirm title={intl.formatMessage({ id: 'balance.quedingyaotijiaoma' })} okText={intl.formatMessage({ id: 'balance.shi' })} cancelText={intl.formatMessage({ id: 'balance.fou' })} onConfirm={() => fetchDelete(record.reconciliationId)}>
<Menu.Item key="2">{intl.formatMessage({ id: 'balance.shanchu' })}</Menu.Item> <Menu.Item key="2">{intl.formatMessage({ id: 'balance.shanchu' })}</Menu.Item>
</Popconfirm> </Popconfirm>}
</Menu> </Menu>
)}> )}>
<Button type='link'>{intl.formatMessage({ id: 'balance.gengduo' })}<CaretDownOutlined /></Button> <Button type='link'>{intl.formatMessage({ id: 'balance.gengduo' })}<CaretDownOutlined /></Button>
......
...@@ -4,6 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface'; ...@@ -4,6 +4,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import StandardTable from '@/components/StandardTable'; import StandardTable from '@/components/StandardTable';
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch' import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit' import Submit from '@/components/NiceForm/components/Submit'
import NiceForm from '@/components/NiceForm' import NiceForm from '@/components/NiceForm'
...@@ -11,9 +12,11 @@ import StatusTag from '@/components/StatusTag'; ...@@ -11,9 +12,11 @@ import StatusTag from '@/components/StatusTag';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat' import { priceFormat } from '@/utils/numberFomat'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'; import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationList, getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationExport } from '@/services/SettleV2Api' import { getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationList, getSettleAccountsBusinessReconciliationItemReconciliationStatus, getSettleAccountsBusinessReconciliationTeamworkBuyerReconciliationExport } from '@/services/SettleV2Api'
import { createFormActions } from '@formily/antd' import { createFormActions } from '@formily/antd'
import { getIntl, Link } from 'umi'; import { getIntl, Link } from 'umi';
import { fetchOptions } from '../../common';
const intl = getIntl(); const intl = getIntl();
const { Text } = Typography; const { Text } = Typography;
...@@ -28,9 +31,6 @@ const Search: React.FC = () => { ...@@ -28,9 +31,6 @@ const Search: React.FC = () => {
const loadingTableData = async (params) => { const loadingTableData = async (params) => {
const _params = { ...params }; const _params = { ...params };
if (!params.reconciliationNo) {
delete _params.reconciliationNo;
}
if (params.createTimeStart) { if (params.createTimeStart) {
_params.createTimeStart = formatTimeString(Number(params.createTimeStart), 'YYYY-MM-DD'); _params.createTimeStart = formatTimeString(Number(params.createTimeStart), 'YYYY-MM-DD');
} }
...@@ -103,6 +103,10 @@ const Search: React.FC = () => { ...@@ -103,6 +103,10 @@ const Search: React.FC = () => {
'reconciliationNo', 'reconciliationNo',
FORM_FILTER_PATH, FORM_FILTER_PATH,
) )
useAsyncSelect(
'status',
fetchOptions(getSettleAccountsBusinessReconciliationItemReconciliationStatus),
);
}} }}
schema={{ schema={{
type: 'object', type: 'object',
...@@ -162,13 +166,7 @@ const Search: React.FC = () => { ...@@ -162,13 +166,7 @@ const Search: React.FC = () => {
placeholder: intl.formatMessage({ id: 'balance.qingxuanzezhuangtai' }), placeholder: intl.formatMessage({ id: 'balance.qingxuanzezhuangtai' }),
allowClear: true, allowClear: true,
}, },
enum: [ enum: []
{ label: intl.formatMessage({ id: 'balance.suoyou' }), value: '' },
{ label: intl.formatMessage({ id: 'balance.daiqueren' }), value: 1 },
{ label: intl.formatMessage({ id: 'balance.querenbutongguo' }), value: 2 },
{ label: intl.formatMessage({ id: 'balance.daiqingkuan' }), value: 3 },
{ label: intl.formatMessage({ id: 'balance.yiqingkuan' }), value: 4 },
]
}, },
"[createTimeStart,createTimeEnd]": { "[createTimeStart,createTimeEnd]": {
type: 'string', type: 'string',
......
...@@ -8,7 +8,7 @@ import { GlobalConfig } from '@/global/config' ...@@ -8,7 +8,7 @@ import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat'; import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { getSettleAccountsBusinessReconciliationDetailReconciliation, getSettleAccountsBusinessReconciliationReconciliationRowList, postSettleAccountsBusinessReconciliationUpdateReconciliation, postSettleAccountsBusinessReconciliationSaveReconciliation, postSettleAccountsBusinessReconciliationGenerateReconciliation } from '@/services/SettleV2Api' import { getSettleAccountsBusinessReconciliationItemPayType } from '@/services/SettleV2Api'
import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/detail'; import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/detail';
import Card from '@/pages/transaction/purchaseAbility/components/card'; import Card from '@/pages/transaction/purchaseAbility/components/card';
...@@ -35,6 +35,8 @@ const Add = () => { ...@@ -35,6 +35,8 @@ const Add = () => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]); const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]); const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [payWayData, setPayWayData] = useState<any>([]);
const [payWay, setPayWay] = useState<number>(1);
const [dataSource, setDataSource] = useState<any>({}); const [dataSource, setDataSource] = useState<any>({});
const [tabelSource, setTabelSource] = useState<any>([]); const [tabelSource, setTabelSource] = useState<any>([]);
const [ids, setIds] = useState<any>([]); const [ids, setIds] = useState<any>([]);
...@@ -69,6 +71,97 @@ const Add = () => { ...@@ -69,6 +71,97 @@ const Add = () => {
) )
} }
const _extraItem = useMemo(() => {
switch (payWay) {
case 1: return null;
case 2: return (
<>
<Col>
<Form.Item
>
月份
</Form.Item>
</Col>
<Col>
<Form.Item
name='payMonth'
rules={[{ required: true, message: '请选择月份' }]}
>
<Select placeholder={'请选择'} />
</Form.Item>
</Col>
<Col>
<Form.Item
>
付款
</Form.Item>
</Col>
<Col>
<Form.Item
name='payDate'
rules={[{ required: true, message: '请选择付款日' }]}
>
<Select placeholder={'请选择'} />
</Form.Item>
</Col>
</>
)
case 3:
return (
<>
<Col>
<Form.Item
>
账期
</Form.Item>
</Col>
<Col>
<Form.Item
name='payDate'
rules={[{ required: true, message: '请选择账期' }]}
>
<Input placeholder={'请输入账期'} addonAfter={'天'} />
</Form.Item>
</Col>
</>
)
case 4:
return (
<>
<Col>
<Form.Item
>
付款
</Form.Item>
</Col>
<Col>
<Form.Item
name='payDate'
rules={[{ required: true, message: '请选择付款日' }]}
>
<Select placeholder={'请选择'} />
</Form.Item>
</Col>
</>
)
}
}, [payWay])
useEffect(() => {
getSettleAccountsBusinessReconciliationItemPayType().then((res) => {
if (res.code === 1000) {
setPayWayData(res.data);
}
})
}, [])
const _handlePayWay = (e: any) => {
const _value = e.target.value;
form.setFieldsValue({ payWay: _value })
setPayWay(_value);
}
return ( return (
<div style={{ margin: '-24px -24px 0' }}> <div style={{ margin: '-24px -24px 0' }}>
<PeripheralLayout <PeripheralLayout
...@@ -79,6 +172,9 @@ const Add = () => { ...@@ -79,6 +172,9 @@ const Add = () => {
<Form <Form
{...layout} {...layout}
form={form} form={form}
initialValues={{
payWay: 1
}}
> >
<Card id='basicLayout' title={intl.formatMessage({ id: 'balance.jibenxinxi' })}> <Card id='basicLayout' title={intl.formatMessage({ id: 'balance.jibenxinxi' })}>
<Row gutter={[8, 8]} justify="space-between"> <Row gutter={[8, 8]} justify="space-between">
...@@ -87,7 +183,7 @@ const Add = () => { ...@@ -87,7 +183,7 @@ const Add = () => {
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label='单据摘要' label='单据摘要'
name='reconciliationAbstract' name='applyAbstract'
rules={[{ required: true, message: '请输入单据摘要' }]} rules={[{ required: true, message: '请输入单据摘要' }]}
> >
<Input placeholder={'请输入单据摘要'} maxLength={60} /> <Input placeholder={'请输入单据摘要'} maxLength={60} />
...@@ -97,7 +193,7 @@ const Add = () => { ...@@ -97,7 +193,7 @@ const Add = () => {
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label='请款类型' label='请款类型'
name='reconciliationtype' name='applyType'
rules={[{ required: true, message: '请选择请款类型' }]} rules={[{ required: true, message: '请选择请款类型' }]}
> >
<Select placeholder={'请选择请款类型'} /> <Select placeholder={'请选择请款类型'} />
...@@ -108,7 +204,7 @@ const Add = () => { ...@@ -108,7 +204,7 @@ const Add = () => {
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label='预计付款日期' label='预计付款日期'
name='reconciliationDate' name='expectPayTime'
rules={[{ required: true, message: '请选择预计付款日期' }]} rules={[{ required: true, message: '请选择预计付款日期' }]}
> >
<DatePicker placeholder={'请选择预计付款日期'} style={{ width: '100%' }} /> <DatePicker placeholder={'请选择预计付款日期'} style={{ width: '100%' }} />
...@@ -119,23 +215,32 @@ const Add = () => { ...@@ -119,23 +215,32 @@ const Add = () => {
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label='付款方式' label='付款方式'
name='reconciliationWay' name='payWay'
rules={[{ required: true, message: '请选择付款方式' }]} rules={[{ required: true, message: '请选择付款方式' }]}
> >
<Radio.Group> <Radio.Group onChange={_handlePayWay}>
<Radio.Button value="1">现结</Radio.Button> {payWayData?.map((item) => <Radio.Button value={item.id} key={`radioButton_${item.id}`}>{item.text}</Radio.Button>)}
<Radio.Button value="2">月结</Radio.Button>
<Radio.Button value="3">帐期(按天)</Radio.Button>
<Radio.Button value="4">帐期(按月)</Radio.Button>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
{payWay !== 1 && <Row gutter={[8, 8]}>
<Col span={24}>
<Form.Item
label=' '
style={{ margin: 0 }}
>
<Row gutter={[8, 8]}>
{_extraItem}
</Row>
</Form.Item>
</Col>
</Row>}
<Row gutter={[8, 8]}> <Row gutter={[8, 8]}>
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label='支付方式' label='支付方式'
name='reconciliationtPayWay' name='moneyPayWay'
rules={[{ required: true, message: '请选择支付方式' }]} rules={[{ required: true, message: '请选择支付方式' }]}
> >
<Select placeholder={'请选择支付方式'} /> <Select placeholder={'请选择支付方式'} />
...@@ -146,7 +251,7 @@ const Add = () => { ...@@ -146,7 +251,7 @@ const Add = () => {
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label='请款备注' label='请款备注'
name='remarks' name='remark'
rules={[{ required: true, message: '请输入请款备注' }]} rules={[{ required: true, message: '请输入请款备注' }]}
> >
<Input placeholder={'请输入请款备注'} maxLength={80} /> <Input placeholder={'请输入请款备注'} maxLength={80} />
...@@ -192,7 +297,6 @@ const Add = () => { ...@@ -192,7 +297,6 @@ const Add = () => {
¥ 10,000.00 ¥ 10,000.00
</Form.Item> </Form.Item>
</Row> </Row>
</Col> </Col>
</Row> </Row>
</Card> </Card>
...@@ -218,9 +322,9 @@ const Add = () => { ...@@ -218,9 +322,9 @@ const Add = () => {
style={{ style={{
marginBottom: '24px', marginBottom: '24px',
}} }}
icon={<PlusOutlined />}
onClick={() => { setDrawerVisible(true) }} onClick={() => { setDrawerVisible(true) }}
> >
<PlusOutlined />
{intl.formatMessage({ id: 'balance.xuanze' })} {intl.formatMessage({ id: 'balance.xuanze' })}
</Button> </Button>
</> : null} </> : null}
......
...@@ -126,10 +126,14 @@ const Admin: React.FC = () => { ...@@ -126,10 +126,14 @@ const Admin: React.FC = () => {
const handleMenuClick = (e: any, record: any) => { const handleMenuClick = (e: any, record: any) => {
if (e.key === '1') { if (e.key === '1') {
history.push(`/memberCenter/balance/businessReconciliation/readyAdd/edit?id=${record.reconciliationId}&no=${record.reconciliationNo}`) history.push(`/memberCenter/balance/businessRequestFunds/admin/edit?id=${record.reconciliationId}&no=${record.reconciliationNo}`)
} }
} }
const handleAdd = () => {
history.push(`/memberCenter/balance/businessRequestFunds/admin/add`)
}
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
...@@ -170,6 +174,7 @@ const Admin: React.FC = () => { ...@@ -170,6 +174,7 @@ const Admin: React.FC = () => {
'x-component-props': { 'x-component-props': {
placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanhao' }), placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanhao' }),
align: 'flex-end', align: 'flex-end',
allowClear: true,
}, },
}, },
} }
...@@ -191,12 +196,14 @@ const Admin: React.FC = () => { ...@@ -191,12 +196,14 @@ const Admin: React.FC = () => {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanzhaiyao' }), placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanzhaiyao' }),
allowClear: true,
} }
}, },
"payee": { "payee": {
type: 'string', type: 'string',
"x-component-props": { "x-component-props": {
placeholder: intl.formatMessage({ id: 'balance.qingshurufukuanfang' }) placeholder: intl.formatMessage({ id: 'balance.qingshurufukuanfang' }),
allowClear: true,
} }
}, },
"[createTimeStart,createTimeEnd]": { "[createTimeStart,createTimeEnd]": {
...@@ -204,6 +211,7 @@ const Admin: React.FC = () => { ...@@ -204,6 +211,7 @@ const Admin: React.FC = () => {
"x-component": "dateSelect", "x-component": "dateSelect",
"x-component-props": { "x-component-props": {
placeholder: intl.formatMessage({ id: 'balance.danjushijianquanbu' }), placeholder: intl.formatMessage({ id: 'balance.danjushijianquanbu' }),
allowClear: true,
} }
}, },
"[expectPayTimeStart,expectPayTimeEnd]": { "[expectPayTimeStart,expectPayTimeEnd]": {
...@@ -211,6 +219,7 @@ const Admin: React.FC = () => { ...@@ -211,6 +219,7 @@ const Admin: React.FC = () => {
"x-component": "daterange", "x-component": "daterange",
"x-component-props": { "x-component-props": {
placeholder: [intl.formatMessage({ id: 'balance.yujifukuankaishishijian' }), intl.formatMessage({ id: 'balance.yujifukuanjieshushijian' })], placeholder: [intl.formatMessage({ id: 'balance.yujifukuankaishishijian' }), intl.formatMessage({ id: 'balance.yujifukuanjieshushijian' })],
allowClear: true,
} }
}, },
submit: { submit: {
...@@ -227,7 +236,7 @@ const Admin: React.FC = () => { ...@@ -227,7 +236,7 @@ const Admin: React.FC = () => {
Submit, Submit,
controllerBtns: () => ( controllerBtns: () => (
<Space> <Space>
<Button type='primary' size='middle' icon={<PlusOutlined />}>新增</Button> <Button type='primary' size='middle' icon={<PlusOutlined />} onClick={handleAdd}>新增</Button>
</Space> </Space>
), ),
}} }}
......
import React, { useRef, useState } from 'react'
import { Card, Typography, Space, Button } from 'antd'
import { ColumnType } from 'antd/lib/table/interface';
import StandardTable from '@/components/StandardTable';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import Submit from '@/components/NiceForm/components/Submit'
import NiceForm from '@/components/NiceForm'
import StatusTag from '@/components/StatusTag';
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { getSettleAccountsBusinessApplyAmountTeamworkVendorApplyAmountList, getSettleAccountsBusinessApplyAmountItemApplyAmountStatus } from '@/services/SettleV2Api'
import { createFormActions } from '@formily/antd'
import { getIntl, Link } from 'umi';
import { fetchOptions } from '../../common';
const intl = getIntl();
const { Text } = Typography;
// 请款单查询
const formActions = createFormActions();
const Search: React.FC = () => {
const ref = useRef<any>({})
const loadingTableData = async (params) => {
const _params = { ...params };
if (params.createTimeStart) {
_params.createTimeStart = formatTimeString(Number(params.createTimeStart), 'YYYY-MM-DD');
}
if (params.createTimeEnd) {
_params.createTimeEnd = formatTimeString(Number(params.createTimeEnd), 'YYYY-MM-DD');
}
const { data } = await getSettleAccountsBusinessApplyAmountTeamworkVendorApplyAmountList(_params)
return data
}
const columns: ColumnType<any>[] = [{
title: intl.formatMessage({ id: 'balance.qingkuandanhao' }),
key: 'applyNo',
dataIndex: 'applyNo',
render: (text: any, record: any) => (
<Link to={`search/preivew?id=${record.id}&no=${text}`}>{text}</Link>
)
}, {
title: intl.formatMessage({ id: 'balance.danjuzhaiyao' }),
key: 'applyAbstract',
dataIndex: 'applyAbstract',
render: (text: any, record: any) => (
<Space direction='vertical' style={{ width: 300 }}>
<Text type='secondary'>{text}</Text>
</Space>
)
}, {
title: intl.formatMessage({ id: 'balance.qingkuanleixing' }),
key: 'applyType',
dataIndex: 'applyType',
}, {
title: intl.formatMessage({ id: 'balance.qingkuanfang' }),
key: 'payer',
dataIndex: 'payer',
}, {
title: intl.formatMessage({ id: 'balance.shoukuanfang' }),
key: 'payee',
dataIndex: 'payee',
}, {
title: intl.formatMessage({ id: 'balance.qingkuanjine' }),
key: 'applyAmount',
dataIndex: 'applyAmount',
render: (text: any, record: any) => ${priceFormat(text)}`,
width: 180
}, {
title: intl.formatMessage({ id: 'balance.yujifukuanriqi' }),
key: 'expectPayTime',
dataIndex: 'expectPayTime',
render: (text: any, record: any) => formatTimeString(text, 'YYYY-MM-DD HH:mm'),
width: 180
}, {
title: intl.formatMessage({ id: 'balance.danjushijian' }),
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => formatTimeString(text, 'YYYY-MM-DD HH:mm'),
width: 180
}, {
title: intl.formatMessage({ id: 'balance.waibuzhuangtai' }),
key: 'status',
dataIndex: 'status',
render: (text: any, record: any) => <StatusTag type='default' title={record.status} />
}];
return (
<PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => loadingTableData(params)}
columns={columns}
currentRef={ref}
rowKey="id"
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
)
useAsyncSelect(
'status',
fetchOptions(getSettleAccountsBusinessApplyAmountItemApplyAmountStatus),
);
}}
schema={{
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'mega-layout',
"x-component-props": {
grid: true
},
properties: {
applyNo: {
type: 'string',
"x-component": 'Search',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanhao' }),
align: 'flex-start',
allowClear: true,
},
},
}
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
justifyContent: 'flex-start'
},
colStyle: {
marginRight: 16,
},
},
properties: {
"applyAbstract": {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'balance.qingshuruqingkuandanzhaiyao' }),
allowClear: true,
}
},
"status": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'balance.qingxuanzezhuangtai' }),
allowClear: true,
},
enum: []
},
"[createTimeStart,createTimeEnd]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: intl.formatMessage({ id: 'balance.danjushijianquanbu' }),
allowClear: true,
}
},
"[expectPayTimeStart,expectPayTimeEnd]": {
type: 'string',
"x-component": "daterange",
"x-component-props": {
placeholder: [intl.formatMessage({ id: 'balance.yujifukuankaishishijian' }), intl.formatMessage({ id: 'balance.yujifukuanjieshushijian' })],
allowClear: true,
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: intl.formatMessage({ id: 'balance.chaxun' }),
},
},
},
}
}
}}
components={{
Submit,
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default Search
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment