Commit 0f5d50f9 authored by tjy's avatar tjy

替换单据列表页schema

parent 0c88c142
......@@ -169,61 +169,56 @@ const Bills: React.FC<{}> = () => {
onChange: (selectedRowKeys: any, selectedRows: any) => {},
};
const controllerBtns = (
<Space>
<Button
type="primary"
icon={<PlusOutlined />}
onClick={() =>
history.push(
'/memberCenter/tranactionAbility/stockSellStorage/addBills',
)
}
>
新建
</Button>
<Button onClick={() => setVisibleModal(true)}>导入</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
</Space>
);
return (
<PageHeaderWrapper>
<Card>
<StandardTable
columns={columns}
currentRef={ref}
tableProps={{ rowKey: 'key' }}
tableProps={{ rowKey: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<Row justify="space-between">
<Col>
<Space>
<Button
type="primary"
icon={<PlusOutlined />}
onClick={() =>
history.push(
'/memberCenter/tranactionAbility/stockSellStorage/addBills',
)
}
>
新建
</Button>
<Button
style={{ margin: '12px' }}
onClick={() => setVisibleModal(true)}
>
导入
</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
</Space>
</Col>
<Col>
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'search',
FORM_FILTER_PATH,
);
}}
schema={billsSchema}
/>
</Col>
</Row>
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'search',
FORM_FILTER_PATH,
);
}}
schema={billsSchema}
/>
}
/>
<UploadModal
......
......@@ -8,12 +8,28 @@ export const billsSchema: ISchema = {
type: 'object',
'x-component': 'mega-layout',
properties: {
search: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
topLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
placeholder: '搜索',
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
search: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
'x-component-props': {
placeholder: '请输入仓位名称',
},
},
},
},
[FORM_FILTER_PATH]: {
......@@ -21,7 +37,10 @@ export const billsSchema: ISchema = {
'x-component': 'mega-layout',
visible: false,
'x-component-props': {
inline: true,
grid: true,
full: true,
autoRow: true,
columns: 8,
},
properties: {
invoicesNo: {
......@@ -305,7 +324,7 @@ export const getBillsDetailSchema = params => {
},
}
: {};
const billsDetailSchema: ISchema = {
type: 'object',
properties: {
......
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