Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
f3126363
Commit
f3126363
authored
Apr 15, 2021
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改驳回原因的问题
parent
7fb2c753
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
27 deletions
+70
-27
index.jsx
src/pages/settleManage/index.jsx
+30
-27
index.jsx
src/pages/settleManage/remarkModal/index.jsx
+40
-0
No files found.
src/pages/settleManage/index.jsx
View file @
f3126363
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
Input
,
Button
,
Popconfirm
,
notification
}
from
'
antd
'
;
import
{
Button
,
Popconfirm
,
notification
}
from
'
antd
'
;
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
actionStatus
,
settleStatus
}
from
'
./data
'
;
import
style
from
'
./style.less
'
;
import
{
query
,
updateStatus
,
download
,
docQuery
}
from
'
./service
'
;
import
FileModal
from
'
./fileModal
'
;
import
UploadModal
from
'
./uploadModal
'
;
import
RemarkModal
from
'
./remarkModal
'
;
const
{
TextArea
}
=
Input
;
export
default
()
=>
{
const
protable
=
useRef
();
const
[
refuse
,
setRefuse
]
=
useState
(
''
);
const
remarkRef
=
useRef
(
);
const
[
showViewFile
,
setShowViewFile
]
=
useState
(
false
);
const
[
viewFileData
,
setViewFileData
]
=
useState
([]);
const
[
showViewUpload
,
setShowViewUpload
]
=
useState
(
false
);
const
[
settlementNoV
,
setSettlementNo
]
=
useState
(
''
);
const
[
remarkShow
,
setRemarkShow
]
=
useState
(
false
);
const
[
rowInfo
,
setRowInfo
]
=
useState
({});
const
reload
=
()
=>
{
if
(
protable
?.
current
?.
reload
)
{
protable
.
current
.
reload
();
}
};
const
confirmText
=
'
您是否已确认结算金额是否正确?确认后无法撤回
'
;
const
confirmAction
=
async
(
r
,
isRefuse
)
=>
{
const
confirmAction
=
async
(
r
,
isRefuse
,
refuse
)
=>
{
if
(
isRefuse
&&
!
refuse
)
{
notification
.
error
({
message
:
'
请输入拒绝原因
'
});
return
;
...
...
@@ -37,9 +39,6 @@ export default () => {
reload
();
}
};
const
refuseContent
=
({
target
:
{
value
}
})
=>
{
setRefuse
(
value
);
};
const
uploadInvoice
=
({
settlementNo
})
=>
{
setSettlementNo
(
settlementNo
);
setShowViewUpload
(
true
);
...
...
@@ -48,15 +47,19 @@ export default () => {
// type 1非财务 2财务
download
({
settlementNo
,
type
:
1
});
};
const
clearRefuseContent
=
()
=>
{
setRefuse
(
''
);
const
clearRefuseContent
=
r
=>
{
setRowInfo
(
r
);
if
(
remarkRef
.
current
.
init
)
{
remarkRef
.
current
.
reset
();
}
setRemarkShow
(
true
);
};
const
viewAccessory
=
async
({
settlementNo
})
=>
{
const
data
=
await
docQuery
(
settlementNo
);
setViewFileData
(
data
);
setShowViewFile
(
true
);
};
const
refuseNode
=
()
=>
<
TextArea
rows=
{
4
}
onChange=
{
refuseContent
}
value=
{
refuse
}
/>;
const
tableRenderBtn
=
r
=>
(
<
div
>
<
p
>
...
...
@@ -66,28 +69,20 @@ export default () => {
onConfirm=
{
()
=>
confirmAction
(
r
)
}
okText=
"确认"
cancelText=
"取消"
disabled=
{
r
.
settlementStatus
!==
2
}
>
<
Button
disabled=
{
r
.
settlementStatus
!==
2
}
type=
"primary"
className=
"mr10"
>
<
Button
type=
"primary"
className=
"mr10"
disabled=
{
r
.
settlementStatus
!==
2
}
>
确认
</
Button
>
</
Popconfirm
>
<
Popconfirm
icon=
{
null
}
placement=
"topLeft"
title=
{
refuseNode
()
}
onConfirm=
{
()
=>
confirmAction
(
r
,
true
)
}
okText=
"确认"
cancelText=
"取消"
<
Button
type=
"primary"
onClick=
{
()
=>
clearRefuseContent
(
r
)
}
className=
"mr10"
disabled=
{
r
.
settlementStatus
!==
2
}
>
<
Button
disabled=
{
r
.
settlementStatus
!==
2
}
type=
"primary"
onClick=
{
clearRefuseContent
}
className=
"mr10"
>
拒绝
</
Button
>
</
Popconfirm
>
拒绝
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
uploadInvoice
(
r
)
}
disabled=
{
r
.
settlementStatus
!==
6
}
>
上传发票
</
Button
>
...
...
@@ -192,6 +187,14 @@ export default () => {
reload
();
}
}
/>
<
RemarkModal
visible=
{
remarkShow
}
submit=
{
remark
=>
{
confirmAction
(
rowInfo
,
true
,
remark
);
}
}
onCancel=
{
()
=>
setRemarkShow
(
false
)
}
ref=
{
remarkRef
}
/>
</
PageHeaderWrapper
>
);
};
src/pages/settleManage/remarkModal/index.jsx
0 → 100644
View file @
f3126363
import
{
Modal
,
Input
}
from
'
antd
'
;
import
React
,
{
Component
}
from
'
react
'
;
const
{
TextArea
}
=
Input
;
// eslint-disable-next-line react/prefer-stateless-function
class
fileModal
extends
Component
{
state
=
{
remarks
:
''
,
};
inputChange
=
({
target
:
{
value
}
})
=>
{
this
.
setState
({
remarks
:
value
});
};
reset
=
()
=>
{
this
.
setState
({
remarks
:
''
});
};
render
()
{
const
{
visible
}
=
this
.
props
;
return
(
<
Modal
title=
"驳回原因"
visible=
{
visible
}
onOk=
{
()
=>
{
this
.
props
.
submit
(
this
.
state
.
remarks
);
}
}
onCancel=
{
this
.
props
.
onCancel
}
width=
"500px"
>
<
div
>
<
TextArea
value=
{
this
.
state
.
remarks
}
rows=
{
4
}
onChange=
{
this
.
inputChange
}
/>
</
div
>
</
Modal
>
);
}
}
export
default
fileModal
;
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