Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
psbc_remit
Overview
Overview
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
qianyuheng
psbc_remit
Commits
31d6d072
Commit
31d6d072
authored
Jul 31, 2020
by
YuMengShuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模拟数据
parent
b7c63ed3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
22 deletions
+68
-22
Jieshouhui.js
src/views/Business/Pcysel/views/Jieshouhui.js
+22
-9
index.js
src/views/Business/Pcysel/views/index.js
+4
-8
BottomBtn.js
src/views/Public/BottomBtn.js
+42
-5
No files found.
src/views/Business/Pcysel/views/Jieshouhui.js
View file @
31d6d072
...
...
@@ -14,11 +14,13 @@ import { Link, withRouter } from 'react-router-dom'
import
Ptspta1
from
'@/views/Public/Ptspta1'
import
Business
from
'@/views/Public/Business'
import
moment
from
'moment'
import
mLitsel
from
'../model'
import
mPcysel
from
'../model'
import
BottomBtn
from
'@/views/Public/BottomBtn'
const
{
Pre
,
Next
,
StepWrapper
}
=
Steps
const
CodeTable
=
CodeTableFactory
.
getInstance
()
const
confirm
=
Modal
.
confirm
@
withRouter
@
inject
(
'UserContext'
)
@
inject
(
'i18n'
)
...
...
@@ -29,15 +31,21 @@ export default class JieshouhuiScreen extends Page {
constructor
(
props
)
{
super
(
props
)
this
.
model
=
new
m
Lit
sel
()
this
.
model
=
new
m
Pcy
sel
()
this
.
bind
=
Bind
.
bind
(
this
)
this
.
model
.
litmod_selflg
=
props
.
flg
this
.
state
=
{
selectedInr
:
""
selectedInr
:
""
,
dataSource
:[]
}
}
componentDidMount
()
{
this
.
setState
(
{
dataSource
:
global
.
dataSources
}
)
super
.
componentDidMount
()
if
(
this
.
props
.
flg
==
"0"
)
{
...
...
@@ -49,9 +57,10 @@ export default class JieshouhuiScreen extends Page {
render
:
(
val
,
row
,
index
)
=>
{
return
(
<
div
>
<
a
onClick
=
{()
=>
{
this
.
link
(
'fcyame'
,
row
.
inr
)}}
>
修改
<
/a
>
<
a
onClick
=
{()
=>
{
this
.
com
.
link
(
'fcyame'
,
val
,
row
,
index
)}}
>
修改
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
onClick
=
{()
=>
{
this
.
link
(
'fcydel'
,
row
.
inr
)}}
>
删除
<
/a>
{
/* <a onClick={()=>{this.link('fcydel',row.inr)}}>删除</a> */
}
<
a
onClick
=
{()
=>
{
this
.
com
.
onDelete
(
val
,
row
,
index
)}}
>
删除
<
/a>
<
/div
>
)
...
...
@@ -70,9 +79,11 @@ export default class JieshouhuiScreen extends Page {
render
:
(
val
,
row
,
index
)
=>
{
return
(
<
div
>
<
a
onClick
=
{()
=>
{
this
.
link
(
'lcyame'
,
row
.
inr
)}}
>
修改
<
/a
>
{
/* <a onClick={()=>{this.link('lcyame',row.inr)}}>修改</a> */
}
<
a
onClick
=
{()
=>
{
this
.
com
.
link
(
'lcyame'
,
val
,
row
,
index
)}}
>
修改
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
onClick
=
{()
=>
{
this
.
link
(
'lcydel'
,
row
.
inr
)}}
>
删除
<
/a>
{
/* <a onClick={()=>{this.link('lcydel',row.inr)}}>删除</a> */
}
<
a
onClick
=
{()
=>
{
this
.
com
.
link
(
'lcydel'
,
val
,
row
,
index
)}}
>
删除
<
/a>
<
/div
>
)
}
...
...
@@ -87,7 +98,8 @@ export default class JieshouhuiScreen extends Page {
//交易跳转函数,若参数inr存在,则赋值给this.lidinr,此时为闭卷或者到单,不存在则为信用证其他
//调用后台查询是否符合跳转前提(前手交易是否复核),根据返回值决定是否带参跳转至pathname交易
async
link
(
pathname
,
inr
){
async
link
(
pathname
,
inr
){
if
(
inr
){
this
.
lidinr
=
inr
}
...
...
@@ -237,11 +249,12 @@ export default class JieshouhuiScreen extends Page {
rowKey
=
"inr"
size
=
"middle"
onRow
=
{
row
=>
({
onClick
:()
=>
this
.
onSelcon
(
row
.
inr
)})
}
columns
=
{
this
.
litmod_lidlstHeader
}
dataSource
=
{
this
.
model
.
litmod_lidlst
}
dataSource
=
{
this
.
state
.
dataSource
}
rowClassName
=
{
this
.
rowClass
}
/
>
<
/Col
>
<
/Row
>
<
BottomBtn
_this
=
{
this
}
wrappedComponentRef
=
{
ref
=>
(
this
.
com
=
ref
)}
css
=
{{
display
:
'none'
}}
/
>
<
/div
>
)
}
...
...
src/views/Business/Pcysel/views/index.js
View file @
31d6d072
...
...
@@ -33,7 +33,7 @@ export default class PcyselScreen extends Page
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
flag
:
true
flag
:
true
,
}
this
.
model
=
new
mPcysel
()
}
...
...
@@ -43,13 +43,7 @@ export default class PcyselScreen extends Page
/*
*添加初始化代码
*/
const
rtnmsg
=
await
Api
.
post
(
'pcysel/init'
,{
data
:
this
.
model
})
if
(
rtnmsg
.
retcod
==
SUCCESS
)
{
const
{
data
}
=
rtnmsg
Object
.
assign
(
this
.
model
,
data
)
}
// Object.assign(this.model, );
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!
this
.
loadDisplay
()
&&
this
.
model
.
openMonitor
&&
this
.
model
.
openMonitor
()
//开启校验
}
...
...
@@ -60,6 +54,8 @@ export default class PcyselScreen extends Page
//交易内实现
renderPage
(){
return
(
<
Card
title
=
"结售汇"
size
=
"small"
className
=
"transTitle"
>
<
Steps
>
...
...
src/views/Public/BottomBtn.js
View file @
31d6d072
...
...
@@ -3,7 +3,10 @@ import { Row, Col } from 'antd';
import
{
ConfirmButton
,
Button
,
Label
}
from
'@/components/Common-Library'
import
{
observable
}
from
'mobx'
import
{
inject
,
observer
}
from
'mobx-react'
import
{
Link
,
withRouter
}
from
'react-router-dom'
global
.
dataSources
=
[]
global
.
dataSources1
=
[]
@
withRouter
@
observer
export
default
class
BottomBtn
extends
Component
{
constructor
(){
...
...
@@ -25,29 +28,63 @@ export default class BottomBtn extends Component{
onSav
=
()
=>
{
//点击按钮第一时间让按钮处于等待状态,防止多次点击触发事件
this
.
savLoading
=
true
// if(this.props.history.location.query){
// console.log(this.props.history.location.query.model)
// this.state.dataSource=this.props.history.location.query.model
// console.log(this.state.dataSource)
// }
// if(this.props.dataSource &&!(this.props.dataSource instanceof Array)){
// console.log(this.props.dataSource)
// global.dataSources.push(this.props.dataSource)
// console.log( global.dataSources)
// this.setState({
// dataSource: global.dataSources
// })
// }
if
(
this
.
props
.
_this
.
model
&&!
(
this
.
props
.
_this
.
model
instanceof
Array
)){
global
.
dataSources
.
push
(
this
.
props
.
_this
.
model
)
}
this
.
props
.
history
.
push
({
pathname
:
'pcysel'
,
query
:
{
model
:
this
.
props
.
_this
.
model
}
})
setTimeout
(()
=>
{
this
.
savLoading
=
false
},
3000
)
}
onDelete
=
(
val
,
row
,
index
)
=>
{
console
.
log
(
val
)
global
.
dataSources
.
splice
(
global
.
dataSources
.
indexOf
(
val
),
1
);
console
.
log
(
row
)
console
.
log
(
index
)
}
async
link
(
pathname
,
val
,
row
,
index
){
this
.
onDelete
(
val
,
row
,
index
)
if
(
val
){
this
.
lidinr
=
val
}
// const rtnmsg = await Api.post('litsel/cfgfil_isnext', { data: this.model, params: { objinr:this.lidinr, objtyp:"lid"} })
// if (rtnmsg.retcod == SUCCESS) {
this
.
props
.
history
.
push
({
pathname
,
query
:
{
lidinr
:
this
.
lidinr
}
});
// }else{
// Notification.error({ message: `${rtnmsg.retmsg}` })
// }
}
render
(){
return
(
<
Row
type
=
"flex"
justify
=
"center"
>
<
Col
>
<
div
className
=
"button0"
>
<
div
className
=
"button0"
style
=
{
this
.
props
.
css
}
>
<
div
className
=
'button2'
>
<
ConfirmButton
type
=
"primary"
onOK
=
{
this
.
onRtn
}
onOK1
=
{
this
.
onRtnPed
}
message
=
"确定退出?"
isped
=
{
true
}
disabled
=
{
this
.
props
.
disabled
}
>
<
Label
itext
=
"退出"
/>
<
/ConfirmButton
>
<
/div
>
<
div
className
=
'button2'
>
<
div
className
=
'button2'
style
=
{
this
.
props
.
css
}
>
<
ConfirmButton
type
=
"primary"
onOK
=
{
this
.
onSav
}
icon
=
"save"
...
...
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