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
8bc2bb5d
Commit
8bc2bb5d
authored
Dec 11, 2018
by
gq777
Browse files
Options
Browse Files
Download
Plain Diff
'update'
parents
33c0200e
5c6a2a37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
170 additions
and
13 deletions
+170
-13
LeadPage.js
src/swift/LeadPage.js
+1
-1
index.js
src/swift/MT/index.js
+1
-1
SWFPage2.js
src/swift/SWFPage2.js
+0
-0
TagValidater.js
src/swift/TagValidater.js
+40
-1
T15A.js
src/swift/Tags/T15A.js
+7
-1
T15B.js
src/swift/Tags/T15B.js
+4
-1
T15C.js
src/swift/Tags/T15C.js
+4
-1
T15D.js
src/swift/Tags/T15D.js
+4
-1
T15E.js
src/swift/Tags/T15E.js
+4
-1
T17A.js
src/swift/Tags/T17A.js
+4
-0
index.js
src/swift/Tags/T23/index.js
+3
-2
T37K.js
src/swift/Tags/T37K.js
+85
-0
index.js
src/swift/Tags/index.js
+13
-3
No files found.
src/swift/LeadPage.js
View file @
8bc2bb5d
...
...
@@ -133,7 +133,7 @@ export class LeadPage extends Component
<
Col
span
=
{
3
}
/
>
<
Col
span
=
{
18
}
>
<
Table
columns
=
{
this
.
columns
}
dataSource
=
{
this
.
state
.
fil
?
mty
.
filter
(
item
=>
item
.
mty
.
startsWith
(
'mt'
+
this
.
state
.
fil
)
):
mty
}
/
>
<
Table
columns
=
{
this
.
columns
}
dataSource
=
{
this
.
state
.
fil
?
mty
.
filter
(
item
=>
item
.
mty
.
indexOf
(
'mt'
+
this
.
state
.
fil
)
==
0
):
mty
}
/
>
<
/Col
>
<
Col
span
=
{
3
}
/
>
...
...
src/swift/MT/index.js
View file @
8bc2bb5d
...
...
@@ -110,7 +110,7 @@ export default function MTFactory(mty)
return
MT600
if
(
mty
==
"mt700"
)
return
MT700
if
(
mty
==
"mt202
COV
"
)
if
(
mty
==
"mt202
cov
"
)
return
MT202COV
if
(
mty
==
"mt305"
)
return
MT305
...
...
src/swift/SWFPage2.js
View file @
8bc2bb5d
This diff is collapsed.
Click to expand it.
src/swift/TagValidater.js
View file @
8bc2bb5d
import
{
RegMap
}
from
'./TagRegMap'
export
function
TagV
(
tag
,
status
,
value
,
tno
,
mty
)
export
function
isTagValueEmpty
(
tag
,
tagValue
)
{
let
obj
=
tagValue
[
0
]
let
regobj
=
RegMap
[
tag
]
for
(
let
key
in
regobj
)
{
if
(
obj
[
key
])
return
false
}
return
true
}
export
function
TagV
(
tag
,
status
,
value
,
tno
,
mty
,
seqlist
,
countMap
=
{})
{
let
regobj
=
RegMap
[
tag
]
let
obj
=
value
[
0
]
let
mval
=
value
[
1
]
//计算状态 status,是否是必填的,要参考所在序列是否是必填,上一层序列计数,来决定当前序列是否必填
if
(
seqlist
&&
seqlist
.
length
&&
status
==
'M'
&&
isTagValueEmpty
(
tag
,
value
))
{
let
curseq
=
seqlist
[
seqlist
.
length
-
1
]
let
curcnt
=
countMap
[
curseq
.
seqlist
]
||
0
if
(
curseq
.
status
==
'O'
&&
curcnt
==
0
)
{
status
=
'O'
}
else
if
(
curseq
.
status
==
'M'
&&
curcnt
==
0
)
{
//验证上层是否有计数为O,且上层计数
for
(
let
i
=
seqlist
.
length
-
2
;
i
>=
0
;
i
--
)
{
let
itemseq
=
seqlist
[
i
]
let
itemcnt
=
countMap
[
itemseq
.
seqlist
]
||
0
if
(
itemcnt
>
0
)
break
if
(
itemseq
.
status
==
'O'
&&
itemcnt
==
0
)
status
=
'O'
}
}
}
let
errmsg
=
null
if
(
value
.
length
==
3
)
errmsg
=
value
[
2
]
||
{}
...
...
src/swift/Tags/T15A.js
View file @
8bc2bb5d
...
...
@@ -13,7 +13,12 @@ export default class T15A extends Component
tno
=
-
1
render
(){
return
(
<
Row
><
/Row>
)
return
(
<
Row
>
<
FormItem
>
<
h3
className
=
"ant-form-text"
>
New
Sequence
<
/h3
>
<
/FormItem
>
<
/Row>
)
}
}
\ No newline at end of file
src/swift/Tags/T15B.js
View file @
8bc2bb5d
...
...
@@ -17,7 +17,10 @@ export default class T15B extends Component
render
()
{
return
(
<
Row
>
<
FormItem
>
<
h3
className
=
"ant-form-text"
>
New
Sequence
<
/h3
>
<
/FormItem
>
<
/Row>
)
}
...
...
src/swift/Tags/T15C.js
View file @
8bc2bb5d
...
...
@@ -18,7 +18,10 @@ export default class T15C extends Component
{
return
(
<
Row
>
<
FormItem
>
<
h3
className
=
"ant-form-text"
>
New
Sequence
<
/h3
>
<
/FormItem
>
<
/Row>
)
}
...
...
src/swift/Tags/T15D.js
View file @
8bc2bb5d
...
...
@@ -18,7 +18,10 @@ export default class T15D extends Component
{
return
(
<
Row
>
<
FormItem
>
<
h3
className
=
"ant-form-text"
>
New
Sequence
<
/h3
>
<
/FormItem
>
<
/Row>
)
}
...
...
src/swift/Tags/T15E.js
View file @
8bc2bb5d
...
...
@@ -17,7 +17,10 @@ export default class T15E extends Component
render
()
{
return
(
<
Row
>
<
FormItem
>
<
h3
className
=
"ant-form-text"
>
New
Sequence
<
/h3
>
<
/FormItem
>
<
/Row>
)
}
...
...
src/swift/Tags/T17A.js
View file @
8bc2bb5d
...
...
@@ -2,9 +2,13 @@ import React, { Component } from 'react'
import
{
Form
,
Input
,
DatePicker
,
Row
,
Col
,
Button
,
Icon
,
Select
}
from
'antd'
;
import
{
InputSize
,
Currency
}
from
"./Utils"
import
YBIC
from
'./YBIC'
const
FormItem
=
Form
.
Item
;
const
Option
=
Select
.
Option
export
default
class
T17A
extends
Component
{
name
=
'17A'
...
...
src/swift/Tags/T23/index.js
View file @
8bc2bb5d
...
...
@@ -12,9 +12,9 @@ const code2 = ["ISSUE","REQUEST"]
export
default
function
(
props
)
{
let
{
mty
}
=
props
if
(
mty
s1
.
findIndex
(
m
=>
m
==
mty
)
>=
0
)
if
(
mty
==
'mt752'
)
return
<
T23_1
{...
props
}
SELCode
=
{
code1
}
/
>
if
(
mty
s2
.
findIndex
(
m
=>
m
==
mty
)
>=
0
)
if
(
mty
==
'mt760'
||
mty
==
'mt767'
)
return
<
T23_1
{...
props
}
SELCode
=
{
code2
}
/
>
return
<
T23_d
{...
props
}
/
>
}
\ No newline at end of file
src/swift/Tags/T37K.js
0 → 100644
View file @
8bc2bb5d
import
React
,{
Component
}
from
'react'
import
{
Form
,
Input
,
DatePicker
,
Row
,
Col
,
Button
,
Icon
,
Select
}
from
'antd'
;
import
{
InputSize
,
Currency
,
FormatAmount
}
from
"./Utils"
const
FormItem
=
Form
.
Item
;
const
Option
=
Select
.
Option
export
default
class
T37K
extends
Component
{
name
=
'37K'
desp
=
"(Currency)(Rate)"
pattern
=
"3!a12d"
tno
=
-
1
keys
=
[
1
,
2
]
onChange
=
(
index
,
value
)
=>
{
let
obj
=
{};
if
(
!
value
)
value
=
""
let
objtemp
=
this
.
props
.
value
objtemp
=
objtemp
&&
objtemp
.
length
?
objtemp
[
0
]
:
{}
objtemp
[
"s"
+
index
]
=
value
;
this
.
keys
.
forEach
(
i
=>
{
obj
[
's'
+
i
]
=
objtemp
[
's'
+
i
]
});
let
temp
=
FormatAmount
(
obj
.
s2
);
let
mval
=
`
${
obj
.
s1
}${
temp
}
`
.
replace
(
/
\/
/g
,
''
)
this
.
props
.
onValue
([
obj
,
mval
])
}
render
()
{
let
value
=
this
.
props
.
value
let
mval
=
value
&&
value
.
length
?
value
[
1
]
:
''
let
errmsg
=
value
&&
value
.
length
==
3
?
value
[
2
]:{}
value
=
value
&&
value
.
length
?
value
[
0
]
:
{}
return
(
<
Row
>
<
Col
style
=
{{
"minWidth"
:
'100px'
}}
span
=
{
3
}
>
<
FormItem
label
=
"Currency"
required
=
{
this
.
props
.
status
==
'M'
||
mval
?
'required'
:
null
}
help
=
{
errmsg
.
s2
}
validateStatus
=
{
errmsg
.
s2
?
'error'
:
null
}
>
<
Select
placeholder
=
"Currency"
showSearch
allowClear
=
{
true
}
optionFilterProp
=
"children"
notFoundContent
=
"Wrong Code"
style
=
{{
width
:
"100%"
}}
value
=
{
value
.
s1
}
onChange
=
{
val
=>
this
.
onChange
(
1
,
val
)}
>
{
Currency
.
map
(
cur
=><
Option
key
=
{
cur
}
value
=
{
cur
}
>
{
cur
}
<
/Option>
)
}
<
/Select
>
<
/FormItem
>
<
/Col
>
<
Col
span
=
{
12
}
>
<
FormItem
label
=
"Rate"
required
=
{
this
.
props
.
status
==
'M'
||
mval
?
'required'
:
null
}
help
=
{
errmsg
.
s2
}
validateStatus
=
{
errmsg
.
s2
?
'error'
:
null
}
>
<
Input
value
=
{
value
.
s2
}
onChange
=
{
e
=>
this
.
onChange
(
2
,
e
.
target
.
value
)}
maxLength
=
{
12
}
style
=
{{
imeMode
:
'disabled'
}}
placeholder
=
"Rate"
/>
<
/FormItem
>
<
/Col
>
<
/Row>
)
}
}
\ No newline at end of file
src/swift/Tags/index.js
View file @
8bc2bb5d
...
...
@@ -155,6 +155,7 @@ import T14S from './T14S'
import
T15A
from
'./T15A'
import
T94A
from
'./T94A'
import
T22C
from
'./T22C'
import
T17A
from
'./T17A'
import
T17E
from
'./T17E'
import
T17F
from
'./T17F'
import
T17H
from
'./T17H'
...
...
@@ -189,6 +190,8 @@ import T39M from './T39M'
import
T21A
from
'./T21A'
import
T14E
from
'./T14E'
import
T15B
from
'./T15B'
import
T15C
from
'./T15C'
import
T15D
from
'./T15D'
import
T30T
from
'./T30T'
import
T30V
from
'./T30V'
import
T29A
from
'./T29A'
...
...
@@ -257,12 +260,12 @@ import T33G from './T33G';
import
T71C
from
'./T71C'
;
import
T32F
from
'./T32F'
;
import
T26D
from
'./T26D'
;
import
T17R
from
'./T17R'
;
import
T32R
from
'./T32R'
;
import
T34J
from
'./T34J'
;
import
T33J
from
'./T33J'
;
import
T22Z
from
'./T22Z'
;
import
T37K
from
'./T37K'
;
import
T17R
from
'./T17R'
;
export
default
function
(
tag
,
props
,
onValue
){
...
...
@@ -425,6 +428,9 @@ export default function(tag,props,onValue){
case
"T21A"
:
return
<
T21A
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T14E"
:
return
<
T14E
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T15B"
:
return
<
T15B
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T15C"
:
return
<
T15C
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T15D"
:
return
<
T15D
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T30T"
:
return
<
T30T
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T30V"
:
return
<
T30V
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T29A"
:
return
<
T29A
{...
props
}
onValue
=
{
onValue
}
/>
;
...
...
@@ -441,6 +447,7 @@ export default function(tag,props,onValue){
case
"T15A"
:
return
<
T15A
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T94A"
:
return
<
T94A
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T22C"
:
return
<
T22C
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T17A"
:
return
<
T17A
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T17E"
:
return
<
T17E
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T17F"
:
return
<
T17F
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T17H"
:
return
<
T17H
{...
props
}
onValue
=
{
onValue
}
/>
;
...
...
@@ -527,11 +534,13 @@ export default function(tag,props,onValue){
case
"T71C"
:
return
<
T71C
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T32F"
:
return
<
T32F
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T26D"
:
return
<
T26D
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T17R"
:
return
<
T17R
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T32R"
:
return
<
T32R
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T34J"
:
return
<
T34J
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T33J"
:
return
<
T33J
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T22Z"
:
return
<
T22Z
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T37K"
:
return
<
T37K
{...
props
}
onValue
=
{
onValue
}
/>
;
case
"T17R"
:
return
<
T17R
{...
props
}
onValue
=
{
onValue
}
/>
;
}
}
\ No newline at end of file
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