Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
17f2dae8
Commit
17f2dae8
authored
Dec 28, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 业务请款增加组件
parent
7991e464
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
355 additions
and
0 deletions
+355
-0
index.tsx
.../businessRequestFunds/components/contractDrawer/index.tsx
+172
-0
index.tsx
...inessRequestFunds/components/requestFundsDrawer/index.tsx
+183
-0
No files found.
src/pages/balance/businessRequestFunds/components/contractDrawer/index.tsx
0 → 100644
View file @
17f2dae8
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
// import { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/SettleV2Api'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
getIntl
}
from
'umi'
;
interface
ContractDrawerProps
{
visible
:
boolean
,
onClose
?:
()
=>
void
,
}
const
intl
=
getIntl
();
const
formActions
=
createFormActions
();
const
ContractDrawer
:
React
.
FC
<
ContractDrawerProps
>
=
(
props
:
ContractDrawerProps
)
=>
{
const
{
visible
,
onClose
}
=
props
;
const
ref
=
useRef
<
any
>
({})
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
}
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationToReconciliationList
(
_params
)
return
data
;
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'合同编号'
,
key
:
'memberId'
,
dataIndex
:
'memberId'
,
},
{
title
:
'合同摘要'
,
key
:
'memberName'
,
dataIndex
:
'memberName'
,
},
{
title
:
'合同生效时间'
,
key
:
'memberType'
,
dataIndex
:
'memberType'
,
},
{
title
:
'合同失效时间'
,
key
:
'memberRole'
,
dataIndex
:
'memberRole'
,
},
{
title
:
'合同金额'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
},
{
title
:
'合同剩余金额'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
}];
const
handleSelectChange
=
(
record
,
selected
,
selectedRow
,
nativeEvent
)
=>
{
setSelectedRowKeys
([
record
.
id
]);
};
return
(
<
Drawer
title=
{
'选择采购合同'
}
placement=
{
'right'
}
onClose=
{
onClose
}
visible=
{
visible
}
key=
{
'right'
}
width=
{
'50%'
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'balance.quxiao'
})
}
</
Button
>
<
Button
onClick=
{
onClose
}
type=
"primary"
>
{
'确定'
}
</
Button
>
</
div
>
}
>
<
StandardTable
keepAlive=
{
false
}
// fetchTableData={params => loadingTableData(params)}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
rowSelection=
{
{
type
:
'radio'
,
selectedRowKeys
:
selectedRowKeys
,
onSelect
:
handleSelectChange
,
}
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'applyNo'
,
FORM_FILTER_PATH
,
)
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
"x-component-props"
:
{
grid
:
true
},
properties
:
{
memberName
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入会员名称'
,
align
:
'flex-start'
,
},
},
}
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
justifyContent
:
'flex-end'
},
colStyle
:
{
marginRight
:
16
,
},
},
properties
:
{
"applyAbstract"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'balance.qingshuruqingkuandanzhaiyao'
}),
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
,
}
}
/>
}
/>
</
Drawer
>
);
}
export
default
ContractDrawer
;
src/pages/balance/businessRequestFunds/components/requestFundsDrawer/index.tsx
0 → 100644
View file @
17f2dae8
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
createFormActions
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
// import { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/SettleV2Api'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
getIntl
}
from
'umi'
;
interface
RequestFundsDrawerProps
{
visible
:
boolean
,
onClose
?:
()
=>
void
,
}
const
intl
=
getIntl
();
const
formActions
=
createFormActions
();
const
RequestFundsDrawer
:
React
.
FC
<
RequestFundsDrawerProps
>
=
(
props
:
RequestFundsDrawerProps
)
=>
{
const
{
visible
,
onClose
}
=
props
;
const
ref
=
useRef
<
any
>
({})
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
loadingTableData
=
async
(
params
)
=>
{
const
_params
=
{
...
params
}
const
{
data
}
=
await
getSettleAccountsBusinessReconciliationToReconciliationList
(
_params
)
return
data
;
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'单据号'
,
key
:
'memberId'
,
dataIndex
:
'memberId'
,
},
{
title
:
'单据摘要'
,
key
:
'memberName'
,
dataIndex
:
'memberName'
,
},
{
title
:
'单据类型'
,
key
:
'memberType'
,
dataIndex
:
'memberType'
,
},
{
title
:
'单据时间'
,
key
:
'memberRole'
,
dataIndex
:
'memberRole'
,
},
{
title
:
'单据状态'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
},
{
title
:
'单据金额'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
},
{
title
:
'已付款'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
},
{
title
:
'已请款待付款'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
},
{
title
:
'待请款'
,
key
:
'memberLevel'
,
dataIndex
:
'memberLevel'
,
}];
const
handleSelectChange
=
(
record
,
selected
,
selectedRow
,
nativeEvent
)
=>
{
setSelectedRowKeys
([
record
.
id
]);
};
return
(
<
Drawer
title=
{
'选择待请款单据'
}
placement=
{
'right'
}
onClose=
{
onClose
}
visible=
{
visible
}
key=
{
'right'
}
width=
{
'50%'
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'balance.quxiao'
})
}
</
Button
>
<
Button
onClick=
{
onClose
}
type=
"primary"
>
{
'确定'
}
</
Button
>
</
div
>
}
>
<
StandardTable
keepAlive=
{
false
}
// fetchTableData={params => loadingTableData(params)}
columns=
{
columns
}
currentRef=
{
ref
}
rowKey=
"id"
rowSelection=
{
{
type
:
'radio'
,
selectedRowKeys
:
selectedRowKeys
,
onSelect
:
handleSelectChange
,
}
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'applyNo'
,
FORM_FILTER_PATH
,
)
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
"x-component-props"
:
{
grid
:
true
},
properties
:
{
memberName
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入单据号'
,
align
:
'flex-start'
,
},
},
}
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
justifyContent
:
'flex-end'
},
colStyle
:
{
marginRight
:
16
,
},
},
properties
:
{
"applyAbstract"
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入单据摘要'
,
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
,
}
}
/>
}
/>
</
Drawer
>
);
}
export
default
RequestFundsDrawer
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment