Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
shenshaokai
jinfa-admin
Commits
bf85dc0e
Commit
bf85dc0e
authored
May 05, 2022
by
前端-许冠华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220518' into 'v2-220518'
feat: 修改请款单保存修改调错接口和适用会员checkbox勾选的问题 See merge request linkseeks-design/pro-admin!52
parents
d63d04a8
28c95204
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
add.tsx
src/pages/systemManage/invoiceProcessEng/add.tsx
+6
-3
index.tsx
...Manage/invoiceProcessEng/components/invoiceType/index.tsx
+20
-5
No files found.
src/pages/systemManage/invoiceProcessEng/add.tsx
View file @
bf85dc0e
...
...
@@ -7,7 +7,7 @@ import ProcessEngLayout from './components/processEng';
import
ProcessSelectLayout
from
'./components/processSelect'
;
import
InvoiceTypeLayout
from
'./components/invoiceType'
;
import
useFields
from
'./useFields'
;
import
{
getSettleAccountsBusinessApplyAmountProcessGet
,
postSettleAccountsBusinessApplyAmountProcessSave
,
postSettleAccountsBusinessApplyAmountProcess
Status
Update
}
from
'@/services/SettleV2Api'
;
import
{
getSettleAccountsBusinessApplyAmountProcessGet
,
postSettleAccountsBusinessApplyAmountProcessSave
,
postSettleAccountsBusinessApplyAmountProcessUpdate
}
from
'@/services/SettleV2Api'
;
export
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -58,19 +58,20 @@ const AddInvoiceProcessEng: React.FC<{}> = () => {
const
handleSubmit
=
()
=>
{
let
fetchApi
=
(
path
===
'edit'
?
postSettleAccountsBusinessApplyAmountProcess
Status
Update
:
postSettleAccountsBusinessApplyAmountProcessSave
)
let
fetchApi
=
(
path
===
'edit'
?
postSettleAccountsBusinessApplyAmountProcessUpdate
:
postSettleAccountsBusinessApplyAmountProcessSave
)
form
.
validateFields
().
then
(
values
=>
{
setLoading
(
true
)
const
params
=
{
...
values
,
allMembers
:
values
.
allMembers
===
1
?
true
:
false
,
members
:
values
.
members
.
map
(
_item
=>
{
members
:
values
?.
members
?
.
map
(
_item
=>
{
return
{
memberId
:
_item
.
memberId
,
roleId
:
_item
.
roleId
,
}
})
}
values
.
allMembers
===
1
&&
delete
params
.
members
;
delete
values
.
allMembers
;
delete
values
.
members
;
path
===
'edit'
&&
(
params
.
processId
=
processId
)
...
...
@@ -80,6 +81,8 @@ const AddInvoiceProcessEng: React.FC<{}> = () => {
return
}
history
.
goBack
()
}).
catch
(()
=>
{
setLoading
(
false
)
})
})
}
...
...
src/pages/systemManage/invoiceProcessEng/components/invoiceType/index.tsx
View file @
bf85dc0e
...
...
@@ -64,7 +64,16 @@ const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
if
(
res
.
code
!==
1000
)
{
return
}
resolve
(
res
.
data
)
let
data
=
{
data
:
res
.
data
.
data
.
map
(
_item
=>
{
return
{
...
_item
,
mrId
:
`
${
_item
.
memberId
}
_
${
_item
.
roleId
}
`
}
}),
totalCount
:
res
.
data
.
totalCount
}
resolve
(
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
...
...
@@ -97,8 +106,14 @@ const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
message
.
error
(
res
.
message
);
return
}
setMember
(
res
.
data
);
form
.
setFieldsValue
({
'members'
:
res
.
data
})
let
_members
=
res
.
data
.
map
(
_item
=>
{
return
{
...
_item
,
mrId
:
`
${
_item
.
memberId
}
_
${
_item
.
roleId
}
`
}
})
setMember
(
_members
);
form
.
setFieldsValue
({
'members'
:
_members
})
onFieldsChange
(
form
)
})
}
...
...
@@ -168,9 +183,9 @@ const InvoiceTypeLayout: React.FC<InvoiceTypeProps> = (props: any) => {
title=
'选择适用会员'
mode=
'checkbox'
tableProps=
{
{
rowKey
:
'
i
d'
,
rowKey
:
'
mrI
d'
,
}
}
customKey=
'
i
d'
customKey=
'
mrI
d'
fetchData=
{
handleFetchData
}
onClose=
{
()
=>
toggle
(
false
)
}
onOk=
{
handleConfirm
}
...
...
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