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
78fe19a9
Commit
78fe19a9
authored
Dec 24, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缓存业务对账相关
parent
dc8b63c8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
4 deletions
+131
-4
add.tsx
src/pages/balance/businessReconciliation/readyAdd/add.tsx
+9
-4
index.tsx
...ce/businessRequestFunds/components/memberDrawer/index.tsx
+122
-0
No files found.
src/pages/balance/businessReconciliation/readyAdd/add.tsx
View file @
78fe19a9
import
React
,
{
useEffect
,
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
Form
,
Button
,
Row
,
Col
,
Input
,
Table
,
message
}
from
'antd'
;
import
{
Form
,
Button
,
Row
,
Col
,
Input
,
InputNumber
,
Table
,
message
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
CheckCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getIntl
,
history
,
Prompt
}
from
'umi'
;
...
...
@@ -155,7 +155,7 @@ const Add = () => {
let
_dataSource
=
[...
tabelSource
];
const
_i
=
_dataSource
.
findIndex
((
item
)
=>
item
.
productId
===
record
.
productId
);
let
_item
=
{
...
_dataSource
[
_i
]
};
_item
.
currentReconciliationQuantity
=
_val
;
_item
.
currentReconciliationQuantity
=
Number
(
_val
)
;
_item
.
currentMoney
=
_val
*
Number
(
record
.
price
);
_dataSource
[
_i
]
=
_item
;
setTabelSource
(
_dataSource
);
...
...
@@ -251,10 +251,15 @@ const Add = () => {
name=
{
`currentReconciliationQuantity_${record.orderNo}_${record.productId}`
}
style=
{
{
margin
:
0
}
}
rules=
{
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangshuliang'
})
}
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.qingshuruduizhangshuliang'
})
},
{
validator
:
(
_
,
value
)
=>
{
return
value
>
record
.
reconciliationQuantity
?
Promise
.
reject
(
new
Error
(
'不能大于待对账数量'
))
:
Promise
.
resolve
()
}
},
]
}
>
<
Input
type=
'number'
max=
{
record
.
reconciliationQuantity
}
value=
{
record
.
currentReconciliationQuantity
}
onChange=
{
(
e
)
=>
{
_changeNumbers
(
record
,
e
.
target
.
value
)
}
}
addonBefore=
"¥"
/>
<
Input
type=
'number'
max=
{
record
.
reconciliationQuantity
}
value=
{
record
.
currentReconciliationQuantity
}
onChange=
{
(
e
)
=>
{
_changeNumbers
(
record
,
e
.
target
.
value
)
}
}
/>
</
Form
.
Item
>
)
:
text
)
...
...
src/pages/balance/businessRequestFunds/components/memberDrawer/index.tsx
0 → 100644
View file @
78fe19a9
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 { getSettleAccountsBusinessReconciliationToReconciliationList } from '@/services/SettleV2Api'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
getIntl
}
from
'umi'
;
interface
MemberDrawerProps
{
visible
:
boolean
,
onClose
?:
()
=>
void
,
}
const
intl
=
getIntl
();
const
formActions
=
createFormActions
();
const
MemberDrawer
:
React
.
FC
<
MemberDrawerProps
>
=
(
props
:
MemberDrawerProps
)
=>
{
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
:
'会员Id'
,
key
:
'memberId'
,
dataIndex
:
'memberId'
,
},
{
title
:
'会员名称'
,
key
:
'memberName'
,
dataIndex
:
'memberName'
,
},
{
title
:
'会员类型'
,
key
:
'memberType'
,
dataIndex
:
'memberType'
,
},
{
title
:
'会员角色'
,
key
:
'memberRole'
,
dataIndex
:
'memberRole'
,
},
{
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
)
}
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'
,
},
},
}
}
}
}
}
components=
{
{
Submit
,
}
}
/>
}
/>
</
Drawer
>
);
}
export
default
MemberDrawer
;
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