Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
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
vue-gjjs
Commits
c89d8dfd
Commit
c89d8dfd
authored
Jun 11, 2021
by
潘际乾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则校验
parent
854557dc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
24 deletions
+45
-24
commonProcess.js
src/mixin/commonProcess.js
+33
-12
Check.js
src/model/Ditopn/Check.js
+0
-0
Default.js
src/model/Ditopn/Default.js
+3
-3
Pattern.js
src/model/Ditopn/Pattern.js
+4
-3
Ovwp.vue
src/views/Business/Ditopn/Ovwp.vue
+4
-1
index.vue
src/views/Business/Ditopn/index.vue
+1
-5
No files found.
src/mixin/commonProcess.js
View file @
c89d8dfd
...
...
@@ -8,10 +8,10 @@ export default {
defFlag
:
true
}
},
// created: function () {},
created
()
{
mounted
()
{
if
(
!
this
.
isInDisplay
){
this
.
ruleWatcher
()
// this.ruleWatcher()
this
.
changeFormValidateDisabled
(
true
);
this
.
ruleCheck
()
}
},
...
...
@@ -25,7 +25,7 @@ export default {
const
that
=
this
;
Object
.
keys
(
that
.
defaultRules
).
forEach
(
key
=>
{
let
func
=
function
(){
if
(
!
that
.
defFlag
){
if
(
that
.
defFlag
){
that
.
defaultRules
[
key
].
apply
(
that
)
}
}
...
...
@@ -35,26 +35,47 @@ export default {
ruleCheck
()
{
if
(
!
this
.
pattern
)
return
const
keySet
=
new
Set
(
Object
.
keys
(
this
.
pattern
).
concat
(
Object
.
keys
(
this
.
checkRules
)))
const
keySet
=
new
Set
(
Object
.
keys
(
this
.
pattern
).
concat
(
Object
.
keys
(
this
.
checkRules
)
.
concat
(
Object
.
keys
(
this
.
defaultRules
))
))
const
res
=
{};
const
that
=
this
;
for
(
let
key
of
keySet
.
keys
())
{
const
rule
=
[]
if
(
th
is
.
pattern
[
key
]){
rule
.
push
(...
th
is
.
pattern
[
key
])
if
(
th
at
.
pattern
[
key
]){
rule
.
push
(...
th
at
.
pattern
[
key
])
}
if
(
this
.
checkRules
[
key
]){
for
(
let
j
=
0
;
j
<
this
.
checkRules
[
key
].
length
;
j
++
)
{
const
check
=
this
.
checkRules
[
key
][
j
];
const
triggerType
=
that
.
getTriggerType
(
key
)
if
(
that
.
checkRules
[
key
]){
for
(
let
j
=
0
;
j
<
that
.
checkRules
[
key
].
length
;
j
++
)
{
const
check
=
that
.
checkRules
[
key
][
j
];
rule
.
push
({
validator
:
check
.
bind
(
this
)
validator
:
check
.
bind
(
that
),
trigger
:
triggerType
})
}
}
if
(
that
.
defaultRules
[
key
])
{
rule
.
push
({
validator
:
that
.
defaultRules
[
key
].
bind
(
that
),
trigger
:
triggerType
})
}
if
(
rule
.
length
>
0
)
{
res
[
key
]
=
rule
;
}
}
this
.
rules
=
res
;
that
.
rules
=
res
;
},
getTriggerType
(
prop
)
{
const
fields
=
this
.
$refs
.
modelForm
.
fields
;
for
(
let
i
=
0
;
i
<
fields
.
length
;
i
++
)
{
const
field
=
fields
[
i
];
if
(
field
.
prop
===
prop
)
{
if
(
field
.
$children
[
1
].
$children
[
0
].
$el
.
className
.
startsWith
(
"el-select"
))
{
return
"change"
;
}
return
"blur"
;
}
}
},
changeFormValidateDisabled
(
flag
)
{
const
fields
=
this
.
$refs
.
modelForm
.
fields
...
...
src/model/Ditopn/Check.js
View file @
c89d8dfd
This diff is collapsed.
Click to expand it.
src/model/Ditopn/Default.js
View file @
c89d8dfd
...
...
@@ -214,16 +214,16 @@ function defaultLiaallButmissig() {
}
function
defaultDitpRevclauseButtxmsel
()
{
}
function
defaultDidgrpCbsNom1Cur
(
newVal
,
oldVal
)
function
defaultDidgrpCbsNom1Cur
(
rule
,
value
,
callback
)
{
const
that
=
this
;
that
.
model
.
didgrp
.
cbs
.
max
.
cur
=
newVal
;
// 摘要
that
.
executeDefault
(
"didgrp.rec.nam"
).
then
(
res
=>
{
that
.
model
.
didgrp
.
cbs
.
max
.
cur
=
value
;
that
.
model
.
didgrp
.
rec
.
nam
=
res
.
data
.
didgrp_rec_nam
;
})
}
function
defaultDidgrpCbsNom1Amt
(
newVal
,
oldVal
)
{
function
defaultDidgrpCbsNom1Amt
(
rule
,
value
,
callback
)
{
const
that
=
this
;
// 信用证最大金额
caculateMaxAmt
(
that
)
...
...
src/model/Ditopn/Pattern.js
View file @
c89d8dfd
...
...
@@ -41,8 +41,9 @@ export default {
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
3
,
message
:
"长度不能超过3"
}
],
"didgrp.cbs.nom1.cur"
:
[
{
required
:
true
,
message
:
"必输项"
},
],
"didgrp.cbs.nom1.amt"
:[
{
required
:
true
,
message
:
"必输项"
},
{
max
:
18
,
message
:
"整数位不能超过14位"
},
...
...
@@ -88,7 +89,7 @@ export default {
"didgrp.cbs.max.amt"
:[
{
type
:
"number"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
18
,
message
:
"整数位不能超过14位"
},
//
{max: 18,message:"整数位不能超过14位"},
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
],
"didgrp.apb.pts.bankno"
:[
...
...
src/views/Business/Ditopn/Ovwp.vue
View file @
c89d8dfd
...
...
@@ -54,7 +54,7 @@
<el-col
:span=
"6"
>
<el-form-item
label=
"信用证金额"
prop=
"didgrp.cbs.nom1.cur"
>
<c-select
v-model=
"model.didgrp.cbs.nom1.cur"
style=
"width:100%"
:readonly=
"true"
placeholder=
"请选择Currency
"
>
<c-select
v-model=
"model.didgrp.cbs.nom1.cur"
style=
"width:100%"
placeholder=
"请选择Currency"
@
blur=
"selectBlur
"
>
<el-option
v-for=
"item in codes.cur"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
...
...
@@ -417,6 +417,9 @@ export default {
this
.
model
.
didgrp
.
ben
.
adrelc
=
data
.
didgrp_ben_adrelc
;
this
.
model
.
didgrp
.
ben
.
pts
.
extkey
=
data
.
didgrp_ben_pts_extkey
;
})
},
selectBlur
(
e
)
{
console
.
log
(
e
)
}
},
created
:
function
(){
...
...
src/views/Business/Ditopn/index.vue
View file @
c89d8dfd
...
...
@@ -198,8 +198,8 @@ export default {
}
},
mounted
:
async
function
(){
this
.
changeFormValidateDisabled
(
true
);
console
.
log
(
"进入ditopn交易"
);
this
.
changeFormValidateDisabled
(
true
);
let
rtnmsg
=
await
this
.
init
()
if
(
rtnmsg
.
respCode
==
SUCCESS
)
{
...
...
@@ -210,10 +210,6 @@ export default {
if
(
this
.
isInDisplay
){
this
.
restoreDisplay
()
}
const
that
=
this
;
this
.
$nextTick
(()
=>
{
that
.
openWatch
(
false
);
})
}
else
{
...
...
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