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
51a44351
Commit
51a44351
authored
2 years ago
by
李少勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验问题联调
parent
8e91f078
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
91 deletions
+123
-91
check.js
src/business/gitopn/model/check.js
+14
-13
index.js
src/business/gitopn/model/index.js
+0
-0
Detp.vue
src/business/gitopn/views/Detp.vue
+3
-3
Ovwp1.vue
src/business/gitopn/views/Ovwp1.vue
+2
-4
Preperp.vue
src/business/gitopn/views/Preperp.vue
+3
-5
XmlFormatEditorNew.vue
src/components/XmlFormatEditorNew.vue
+1
-1
operationFunc.js
src/mixin/operationFunc.js
+100
-65
No files found.
src/business/gitopn/model/check.js
View file @
51a44351
...
@@ -78,13 +78,14 @@ export default {
...
@@ -78,13 +78,14 @@ export default {
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
14
,
message
:
"长度不能超过14"
}
{
max
:
14
,
message
:
"长度不能超过14"
}
],
],
"gidgrp.rec.orcamt"
:[
// "gidgrp.rec.orcamt": [
{
type
:
"number"
,
required
:
false
,
message
:
"必输项"
},
// {type: "number", required: false, message: "必输项"},
{
max
:
18
,
message
:
"整数位不能超过14位"
},
// {max: 18,message:"整数位不能超过14位"},
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
// {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
],
// ],
"gidgrp.rec.orcamt"
:
null
,
"gidgrp.blk.orcplc"
:[
"gidgrp.blk.orcplc"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
140
,
message
:
"长度不能超过140"
}
{
max
:
140
,
message
:
"长度不能超过140"
}
],
],
"gidgrp.rec.acc"
:[
"gidgrp.rec.acc"
:[
...
@@ -110,15 +111,15 @@ export default {
...
@@ -110,15 +111,15 @@ export default {
{
required
:
false
,
message
:
"输入正确的日期"
}
{
required
:
false
,
message
:
"输入正确的日期"
}
],
],
"gidgrp.ghd.remark"
:[
"gidgrp.ghd.remark"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
245
,
message
:
"长度不能超过245"
}
{
max
:
245
,
message
:
"长度不能超过245"
}
],
],
"gidgrp.rec.mannum"
:[
"gidgrp.rec.mannum"
:[
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
12
,
message
:
"长度不能超过12"
}
{
max
:
12
,
message
:
"长度不能超过12"
}
],
],
"gidgrp.blk.addinf"
:[
"gidgrp.blk.addinf"
:
[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
700
,
message
:
"长度不能超过700"
}
{
max
:
700
,
message
:
"长度不能超过700"
}
],
],
"gidgrp.ghd.wahnum"
:[
"gidgrp.ghd.wahnum"
:[
...
@@ -157,7 +158,7 @@ export default {
...
@@ -157,7 +158,7 @@ export default {
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
],
],
"gidgrp.blk.orcplcc"
:[
"gidgrp.blk.orcplcc"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
140
,
message
:
"长度不能超过140"
}
{
max
:
140
,
message
:
"长度不能超过140"
}
],
],
"gidgrp.rec.accc"
:[
"gidgrp.rec.accc"
:[
...
@@ -183,7 +184,7 @@ export default {
...
@@ -183,7 +184,7 @@ export default {
{
required
:
false
,
message
:
"输入正确的日期"
}
{
required
:
false
,
message
:
"输入正确的日期"
}
],
],
"gidgrp.blk.addinfc"
:[
"gidgrp.blk.addinfc"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
700
,
message
:
"长度不能超过700"
}
{
max
:
700
,
message
:
"长度不能超过700"
}
],
],
"gidgrp.blk.gidtxt"
:[
"gidgrp.blk.gidtxt"
:[
...
@@ -433,7 +434,7 @@ export default {
...
@@ -433,7 +434,7 @@ export default {
{
max
:
35
,
message
:
"长度不能超过35"
}
{
max
:
35
,
message
:
"长度不能超过35"
}
],
],
"gidgrp.blk.deltoadr"
:[
"gidgrp.blk.deltoadr"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
210
,
message
:
"长度不能超过210"
}
{
max
:
210
,
message
:
"长度不能超过210"
}
],
],
"gidgrp.blk.feetxt"
:[
"gidgrp.blk.feetxt"
:[
...
@@ -449,7 +450,7 @@ export default {
...
@@ -449,7 +450,7 @@ export default {
{
max
:
65
,
message
:
"长度不能超过65"
}
{
max
:
65
,
message
:
"长度不能超过65"
}
],
],
"gidgrp.blk.trfcond"
:[
"gidgrp.blk.trfcond"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
6630
,
message
:
"长度不能超过6630"
}
{
max
:
6630
,
message
:
"长度不能超过6630"
}
],
],
"gidgrp.rec.deloritxtc"
:[
"gidgrp.rec.deloritxtc"
:[
...
...
This diff is collapsed.
Click to expand it.
src/business/gitopn/model/index.js
View file @
51a44351
This diff is collapsed.
Click to expand it.
src/business/gitopn/views/Detp.vue
View file @
51a44351
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
</c-col>
</c-col>
<c-col
:span=
"24"
>
<c-col
:span=
"24"
>
<c-col
:span=
"17"
v-if=
"
model.gitp.covgodsrvmodflg == ''
"
>
<c-col
:span=
"17"
v-if=
"
!model.gitp.covgodsrvmodflg
"
>
<el-form-item
<el-form-item
label=
"合同标的"
label=
"合同标的"
prop=
"gidgrp.blk.covgodsrv"
prop=
"gidgrp.blk.covgodsrv"
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
></c-input>
></c-input>
</el-form-item>
</el-form-item>
</c-col>
</c-col>
<c-col
:span=
"17"
v-if=
"model.gitp.covgodsrvmodflg
!= ''
"
>
<c-col
:span=
"17"
v-if=
"model.gitp.covgodsrvmodflg"
>
<el-form-item
<el-form-item
label=
"合同标的"
label=
"合同标的"
prop=
"gidgrp.blk.atxcovgodsrv"
prop=
"gidgrp.blk.atxcovgodsrv"
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
<c-input
<c-input
rows=
"6"
rows=
"6"
type=
"textarea"
type=
"textarea"
v-model=
"model.gidgrp.blk.a
xt
covgodsrv"
v-model=
"model.gidgrp.blk.a
tx
covgodsrv"
maxlength=
"350"
maxlength=
"350"
show-word-limit
show-word-limit
placeholder=
"请输入合同标的"
placeholder=
"请输入合同标的"
...
...
This diff is collapsed.
Click to expand it.
src/business/gitopn/views/Ovwp1.vue
View file @
51a44351
...
@@ -1124,7 +1124,7 @@
...
@@ -1124,7 +1124,7 @@
<c-col
:span=
"24"
>
<c-col
:span=
"24"
>
<c-col
:span=
"17"
>
<c-col
:span=
"17"
>
<c-form-item
<c-form-item
v-if=
"model.gitp.swiftflg == 'Y' &&
model.gitp.exptxtmodflg == ''
"
v-if=
"model.gitp.swiftflg == 'Y' &&
!model.gitp.exptxtmodflg
"
label=
"到期条件"
label=
"到期条件"
prop=
"gidgrp.blk.exptxt"
prop=
"gidgrp.blk.exptxt"
>
>
...
@@ -1139,9 +1139,7 @@
...
@@ -1139,9 +1139,7 @@
></c-input>
></c-input>
</c-form-item>
</c-form-item>
<c-form-item
<c-form-item
v-if=
"
v-if=
"model.gitp.swiftflg == 'Y' && model.gitp.exptxtmodflg"
model.gitp.swiftflg == 'Y' && model.gitp.exptxtmodflg == 'X'
"
label=
"到期条件"
label=
"到期条件"
prop=
"gidgrp.blk.atxexptxt"
prop=
"gidgrp.blk.atxexptxt"
>
>
...
...
This diff is collapsed.
Click to expand it.
src/business/gitopn/views/Preperp.vue
View file @
51a44351
...
@@ -75,9 +75,7 @@
...
@@ -75,9 +75,7 @@
<c-col
:span=
"24"
>
<c-col
:span=
"24"
>
<el-form-item
label=
"交付地址"
prop=
"gidgrp.blk.deltoadr"
>
<el-form-item
label=
"交付地址"
prop=
"gidgrp.blk.deltoadr"
>
<c-input
<c-input
:disabled=
"
:disabled=
"model.gidgrp.rec.delto == '' && model.gidgrp.rec.purpos != ''"
model.gidgrp.rec.delto == '' && model.gidgrp.rec.purpos != ''
"
rows=
"4"
rows=
"4"
type=
"textarea"
type=
"textarea"
v-model=
"model.gidgrp.blk.deltoadr"
v-model=
"model.gidgrp.blk.deltoadr"
...
@@ -149,7 +147,7 @@
...
@@ -149,7 +147,7 @@
<c-col
:span=
"24"
>
<c-col
:span=
"24"
>
<c-col
:span=
"17"
>
<c-col
:span=
"17"
>
<el-form-item
<el-form-item
v-if=
"
model.gitp.prepermodflg == ''
"
v-if=
"
!model.gitp.prepermodflg
"
label=
"演示说明"
label=
"演示说明"
prop=
"gidgrp.blk.preper"
prop=
"gidgrp.blk.preper"
>
>
...
@@ -164,7 +162,7 @@
...
@@ -164,7 +162,7 @@
></c-input>
></c-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
v-if=
"model.gitp.prepermodflg
== 'X'
"
v-if=
"model.gitp.prepermodflg"
label=
"演示说明"
label=
"演示说明"
prop=
"gidgrp.blk.atxpreper"
prop=
"gidgrp.blk.atxpreper"
>
>
...
...
This diff is collapsed.
Click to expand it.
src/components/XmlFormatEditorNew.vue
View file @
51a44351
...
@@ -23,7 +23,7 @@ export default {
...
@@ -23,7 +23,7 @@ export default {
return
this
.
value
return
this
.
value
},
},
set
(
newVal
)
{
set
(
newVal
)
{
this
.
$emit
(
'input'
,
newVal
)
this
.
$emit
(
'input'
,
newVal
)
}
}
}
}
},
},
...
...
This diff is collapsed.
Click to expand it.
src/mixin/operationFunc.js
View file @
51a44351
...
@@ -8,82 +8,117 @@ export default {
...
@@ -8,82 +8,117 @@ export default {
},
},
methods
:
{
methods
:
{
// 提交
// 提交
async
handleSubmit
()
{
handleSubmit
()
{
console
.
log
(
'提交'
,
this
.
model
);
this
.
handleCheck
().
then
(
async
()
=>
{
let
params
=
{
let
params
=
{
...
this
.
model
,
...
this
.
model
,
gidgrp
:
{
gidgrp
:
{
...
this
.
model
.
gidgrp
,
...
this
.
model
.
gidgrp
,
...
this
.
model
.
gitp
...
this
.
model
.
gitp
},
},
transName
:
this
.
trnName
,
transName
:
this
.
trnName
,
userId
:
window
.
sessionStorage
.
userId
||
'ZL'
,
userId
:
window
.
sessionStorage
.
userId
||
'ZL'
,
}
}
delete
params
.
gitp
// 精简gidgrp
const
res
=
await
Api
.
post
(
`/service/
${
this
.
trnName
}
/save`
,
params
);
let
gidgrpKeysList
=
Object
.
keys
(
params
.
gidgrp
)
if
(
res
.
respCode
===
SUCCESS
)
{
gidgrpKeysList
.
map
((
item
)
=>
{
this
.
$notify
({
if
(
params
.
gidgrp
[
item
].
pts
&&
!
params
.
gidgrp
[
item
].
pts
.
extkey
)
{
title
:
'成功'
,
delete
params
.
gidgrp
[
item
]
message
:
'校验成功'
,
}
type
:
'success'
,
})
});
// 精简cfagit
this
.
$router
.
push
(
'/taskList'
)
if
(
params
.
cfagit
.
cfaflg
!==
'1'
)
{
this
.
$store
.
commit
(
"setTaskListTabVal"
,
'trnrel'
);
delete
params
.
cfagit
}
}
// 精简cnybop
if
(
params
.
cnybop
.
vouflg
!==
'1'
)
{
delete
params
.
cnybop
.
cnyvou
}
// gitp被放到了gidgrp
delete
params
.
gitp
const
res
=
await
Api
.
post
(
`/service/
${
this
.
trnName
}
/save`
,
params
);
if
(
res
.
respCode
===
SUCCESS
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'提交成功'
,
type
:
'success'
,
});
this
.
$router
.
push
(
'/taskList'
)
this
.
$store
.
commit
(
"setTaskListTabVal"
,
'trnrel'
);
}
})
},
},
// 检核
// 检核
async
handleCheck
()
{
handleCheck
()
{
const
loading
=
this
.
loading
(
'正在校验数据'
);
return
new
Promise
((
resolve
)
=>
{
const
rtnmsg
=
await
Api
.
post
(
`/service/
${
this
.
trnName
}
/checkAll`
,
{
// 第二次点击校验时候,如果执行过后端接口校验,则需要先在rules中让之前后端校验通过,然后再把校验规则置为不校验即null
...
this
.
model
,
transName
:
this
.
trnName
,
userId
:
window
.
sessionStorage
.
userId
||
'ZL'
,
});
if
(
rtnmsg
.
respCode
===
SUCCESS
)
{
let
errorRules
=
rtnmsg
.
data
;
let
keysList
=
Object
.
keys
(
errorRules
)
let
validSuccess
=
[]
console
.
log
(
'this.validEdRules'
,
this
.
validEdRules
)
if
(
this
.
validEdRules
.
length
)
{
if
(
this
.
validEdRules
.
length
)
{
this
.
validEdRules
.
map
((
item
)
=>
{
this
.
validEdRules
.
map
((
item
)
=>
{
if
(
!
keysList
.
includes
(
item
))
{
this
.
rules
[
item
]
=
[{
validSuccess
.
push
(
item
)
validator
:
(
rule
,
value
,
callback
)
=>
{
}
callback
()
}
}]
})
})
}
}
console
.
log
(
'validSuccess'
,
validSuccess
)
// 前端检验
this
.
validEdRules
=
Object
.
keys
(
errorRules
)
this
.
$refs
[
'modelForm'
].
validate
(
async
(
validStatic
)
=>
{
keysList
.
map
((
ruleKey
)
=>
{
if
(
validStatic
)
{
this
.
rules
[
ruleKey
]
=
[
const
loading
=
this
.
loading
(
'正在校验数据'
);
{
const
rtnmsg
=
await
Api
.
post
(
`/service/
${
this
.
trnName
}
/checkAll`
,
{
validator
:
(
rule
,
value
,
callback
)
=>
{
...
this
.
model
,
if
(
errorRules
[
ruleKey
])
{
transName
:
this
.
trnName
,
callback
(
new
Error
(
errorRules
[
ruleKey
]));
userId
:
window
.
sessionStorage
.
userId
||
'ZL'
,
}
});
if
(
rtnmsg
.
respCode
===
SUCCESS
)
{
let
errorRules
=
rtnmsg
.
data
;
let
keysList
=
Object
.
keys
(
errorRules
)
this
.
validEdRules
=
Object
.
keys
(
errorRules
)
// 二次点击校验让之前校验的规则置为null
if
(
this
.
validEdRules
.
length
)
{
this
.
validEdRules
.
map
((
item
)
=>
{
this
.
rules
[
item
]
=
null
})
}
}
},
keysList
.
map
((
ruleKey
)
=>
{
];
this
.
rules
[
ruleKey
]
=
[
});
{
validSuccess
.
map
((
item
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
this
.
rules
[
item
]
=
[{
if
(
errorRules
[
ruleKey
])
{
validator
:
(
rule
,
value
,
callback
)
=>
{
callback
(
new
Error
(
errorRules
[
ruleKey
]));
callback
()
}
}
},
];
});
// 后端校验
this
.
$refs
[
'modelForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'校验成功'
,
type
:
'success'
,
});
resolve
()
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'校验失败'
,
type
:
'error'
,
});
}
});
}
}
}]
loading
.
close
();
})
}
else
{
console
.
log
(
'rules'
,
this
.
rules
);
this
.
$refs
[
'modelForm'
].
validate
((
valid
)
=>
{
console
.
log
(
'valid'
,
valid
);
if
(
valid
)
{
this
.
$notify
({
this
.
$notify
({
title
:
'
成功
'
,
title
:
'
失败
'
,
message
:
'校验
成功
'
,
message
:
'校验
失败
'
,
type
:
'
success
'
,
type
:
'
error
'
,
});
});
}
}
});
})
}
})
loading
.
close
();
},
},
// 暂存
// 暂存
async
handleStash
()
{
async
handleStash
()
{
...
...
This diff is collapsed.
Click to expand it.
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