Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swifteditor
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
fukai
swifteditor
Commits
abd2310d
Commit
abd2310d
authored
Mar 24, 2025
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发报行可编辑,支持设置渠道,修改T61
parent
91535d23
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
12 deletions
+66
-12
swift_action.js
src/store/modules/swift/swift_action.js
+6
-0
swift_reducer.js
src/store/modules/swift/swift_reducer.js
+4
-1
swift_state.js
src/store/modules/swift/swift_state.js
+3
-1
types.js
src/store/types.js
+1
-1
Result.js
src/swift/Result.js
+4
-3
SWFPage2.js
src/swift/SWFPage2.js
+29
-6
T61.js
src/swift/Tags/T61.js
+19
-0
No files found.
src/store/modules/swift/swift_action.js
View file @
abd2310d
...
...
@@ -27,3 +27,8 @@ export function updateSwiftMessage(swift_message)
{
return
{
type
:
types
.
SWIFT_UPDATE_SWIFT_MESSAGE
,
payload
:{
swift_message
}}
}
export
function
updateChannel
(
channel
)
{
return
{
type
:
types
.
SWIFT_UPDATE_CHANNEL
,
payload
:{
channel
}}
}
\ No newline at end of file
src/store/modules/swift/swift_reducer.js
View file @
abd2310d
...
...
@@ -29,6 +29,8 @@ export default createReducer(initialState, {
[
`
${
types
.
SWIFT_UPDATE_SWIFT_MESSAGE
}
`
]:
(
state
,{
swift_message
})
=>
{
return
objectAssign
({},
state
,{
swift_message
})
},
[
`
${
types
.
SWIFT_UPDATE_CHANNEL
}
`
]:
(
state
,{
channel
})
=>
{
return
objectAssign
({},
state
,{
channel
})
},
})
\ No newline at end of file
src/store/modules/swift/swift_state.js
View file @
abd2310d
...
...
@@ -4,6 +4,7 @@ const InitState = {
rcv_bic_info
:{
rcv_bic
:
''
,
err_msg
:
''
},
snd_bic_info
:{
snd_bic
:
''
,
err_msg
:
''
},
swift_message_tree
:
null
,
extra
:{}
extra
:{},
channel
:
'SWT'
}
export
default
InitState
\ No newline at end of file
src/store/types.js
View file @
abd2310d
...
...
@@ -32,5 +32,5 @@ export default keyMirror({
SWIFT_UPDATE_GEN_TYP
:
null
,
SWIFT_INIT_TREE_VALUE
:
null
,
SWIFT_UPDATE_SWIFT_MESSAGE
:
null
,
SWIFT_UPDATE_CHANNEL
:
null
})
src/swift/Result.js
View file @
abd2310d
...
...
@@ -32,7 +32,8 @@ const Step = Steps.Step;
smhinr
:
this
.
props
.
extra
.
smhinr
||
''
,
user
:
this
.
props
.
extra
.
mctid
||
"NONE"
,
sf2msg
:
this
.
props
.
swift_message
,
msgtre
:
tempStr
msgtre
:
tempStr
,
channel
:
this
.
props
.
channel
}
ServiceAPI
.
saveMessage
(
// {
...
...
@@ -108,9 +109,9 @@ const Step = Steps.Step;
}
const
mapStateToProps
=
(
state
)
=>
{
const
{
swift_message
,
extra
,
snd_bic_info
,
swift_message_tree
}
=
state
.
swift
;
const
{
swift_message
,
extra
,
snd_bic_info
,
swift_message_tree
,
channel
}
=
state
.
swift
;
return
{
swift_message
,
extra
,
sndkey
:
snd_bic_info
.
snd_bic
,
swift_message_tree
swift_message
,
extra
,
sndkey
:
snd_bic_info
.
snd_bic
,
swift_message_tree
,
channel
};
};
...
...
src/swift/SWFPage2.js
View file @
abd2310d
import
React
,{
Component
}
from
'react'
import
{
bindActionCreators
}
from
'redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
updateTreeValue
,
updateRcvBic
,
updateSndBic
,
initSwiftMessageTree
,
updateSwiftMessage
}
from
'../store/modules/swift/swift_action'
;
import
{
updateTreeValue
,
updateRcvBic
,
updateSndBic
,
initSwiftMessageTree
,
updateSwiftMessage
,
updateChannel
}
from
'../store/modules/swift/swift_action'
;
import
ServiceAPI
from
'./ServiceAPI'
import
MessageValidater
from
'./MessageValidater'
...
...
@@ -21,10 +21,14 @@ import YBIC from './Tags/YBIC'
import
TempSaver
from
'./TemplateSave'
import
moment
from
'moment'
import
{
Random
}
from
"random-js"
const
Option
=
Select
.
Option
;
const
Step
=
Steps
.
Step
;
const
random
=
new
Random
();
const
formItemLayout
=
{
labelCol
:
{
span
:
6
},
...
...
@@ -148,12 +152,19 @@ export class SWFPage extends Component
gpistr
=
''
let
s119
=
''
let
header3
=
''
let
day
=
new
Date
()
let
dayWrapper
=
moment
(
day
)
let
ref
=
mty
+
dayWrapper
.
format
(
"X"
)
+
random
.
string
(
1
);
if
(
mty
==
'202COV'
)
{
mty
=
'202'
//s119=':119:COV\r\n' 锦州
s119
=
'{119:COV}'
header3
=
`{3:
${
s119
}
}`
header3
=
`{3:
${
s119
}
{108:
${
ref
}
}}`
}
else
{
header3
=
`{3:{108:
${
ref
}
}}`
}
//锦州 message = `:MT:${mty}\r\n:IO:${this.props.rcv_bic_info.rcv_bic}\r\n:II:${this.props.snd_bic_info.snd_bic}\r\n:MP:N\r\n${s119}${gpistr}:EOH:\r\n${message}\r\n-\r\n`
//南商
...
...
@@ -395,7 +406,7 @@ export class SWFPage extends Component
<
/Col
>
<
Col
span
=
{
8
}
>
<
SNDBIC
flag
=
{
false
}
snd_bic
=
{
""
}
err_msg
=
{
snd_bic_info
.
err_msg
}
onChange
=
{(
val
,
msg
)
=>
{
snd_bic_info
.
snd_bic
=
val
;
snd_bic_info
.
err_msg
=
msg
}}
/
>
<
SNDBIC
flag
=
{
false
}
snd_bic
=
{
snd_bic_info
.
snd_bic
}
err_msg
=
{
snd_bic_info
.
err_msg
}
onChange
=
{(
val
,
msg
)
=>
{
snd_bic_info
.
snd_bic
=
val
;
snd_bic_info
.
err_msg
=
msg
}}
/
>
<
/Col
>
<
/Row
>
<
Row
style
=
{{}}
>
...
...
@@ -446,6 +457,18 @@ export class SWFPage extends Component
<
/Affix
>
<
/Col
>
<
/Row
>
<
Row
>
<
Col
span
=
{
3
}
>
<
/Col
>
<
Col
span
=
{
8
}
>
<
FormItem
required
label
=
"Target Channel"
{...
formItemLayout
}
>
<
Select
size
=
"large"
value
=
{
this
.
props
.
channel
}
style
=
{{
width
:
140
}}
onChange
=
{
channel
=>
{
this
.
props
.
actions
.
updateChannel
(
channel
)}}
>
<
Option
value
=
'SWT'
>
Swift
<
/Option
>
<
Option
value
=
'ARS'
>
Arxan
<
/Option
>
<
/Select
>
<
/FormItem
>
<
/Col
>
<
/Row
>
<
h2
style
=
{{
textAlign
:
'center'
}}
>
{
title
.
indexOf
(
"MT"
)
==
0
?
title
:
`
${
mty
.
toUpperCase
()}
${
title
}
`
}
<
/h2
>
...
...
@@ -475,15 +498,15 @@ export class SWFPage extends Component
}
const
mapStateToProps
=
(
state
)
=>
{
const
{
swift_message
,
rcv_bic_info
,
snd_bic_info
,
swift_message_tree
,
extra
}
=
state
.
swift
;
const
{
swift_message
,
rcv_bic_info
,
snd_bic_info
,
swift_message_tree
,
extra
,
channel
}
=
state
.
swift
;
return
{
swift_message
,
rcv_bic_info
,
snd_bic_info
,
swift_message_tree
,
extra
swift_message
,
rcv_bic_info
,
snd_bic_info
,
swift_message_tree
,
extra
,
channel
};
};
function
mapDispatchToProps
(
dispatch
)
{
return
{
actions
:
bindActionCreators
({
updateTreeValue
,
updateRcvBic
,
updateSndBic
,
initSwiftMessageTree
,
updateSwiftMessage
},
dispatch
)
actions
:
bindActionCreators
({
updateTreeValue
,
updateRcvBic
,
updateSndBic
,
initSwiftMessageTree
,
updateSwiftMessage
,
updateChannel
},
dispatch
)
};
}
...
...
src/swift/Tags/T61.js
View file @
abd2310d
...
...
@@ -150,6 +150,7 @@ export default class T61 extends Component
help
=
{
errmsg
.
s7
}
validateStatus
=
{
errmsg
.
s7
?
'error'
:
null
}
>
{
value
.
s6
!=
'S'
?
<
Select
placeholder
=
"Identification Code"
...
...
@@ -218,6 +219,24 @@ export default class T61 extends Component
<
Option
value
=
"VDA"
>
VDA
-
Value
Date
Adjustment
<
/Option
>
<
Option
value
=
"WAR"
>
WAR
-
Warrant
<
/Option
>
<
/Select
>
:
<
Select
placeholder
=
"Identification Code"
showSearch
allowClear
=
{
true
}
optionFilterProp
=
"children"
notFoundContent
=
"Wrong Code"
style
=
{{
width
:
"100%"
}}
value
=
{
value
.
s7
}
onChange
=
{
val
=>
this
.
onChange
(
7
,
val
)}
>
<
Option
value
=
"103"
>
103
<
/Option
>
<
Option
value
=
"202"
>
202
<
/Option
>
<
Option
value
=
"900"
>
900
<
/Option
>
<
Option
value
=
"910"
>
910
<
/Option
>
<
Option
value
=
"199"
>
199
<
/Option
>
<
/Select
>
}
<
/FormItem
>
<
/Col
>
<
Col
span
=
{
12
}
>
...
...
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