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
Apr 10, 2023
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 {
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
14
,
message
:
"长度不能超过14"
}
],
"gidgrp.rec.orcamt"
:[
{
type
:
"number"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
18
,
message
:
"整数位不能超过14位"
},
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
],
// "gidgrp.rec.orcamt": [
// {type: "number", required: false, message: "必输项"},
// {max: 18,message:"整数位不能超过14位"},
// {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
// ],
"gidgrp.rec.orcamt"
:
null
,
"gidgrp.blk.orcplc"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
140
,
message
:
"长度不能超过140"
}
],
"gidgrp.rec.acc"
:[
...
...
@@ -110,15 +111,15 @@ export default {
{
required
:
false
,
message
:
"输入正确的日期"
}
],
"gidgrp.ghd.remark"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
245
,
message
:
"长度不能超过245"
}
],
"gidgrp.rec.mannum"
:[
{
type
:
"string"
,
required
:
false
,
message
:
"必输项"
},
{
max
:
12
,
message
:
"长度不能超过12"
}
],
"gidgrp.blk.addinf"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
"gidgrp.blk.addinf"
:
[
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
700
,
message
:
"长度不能超过700"
}
],
"gidgrp.ghd.wahnum"
:[
...
...
@@ -157,7 +158,7 @@ export default {
{
pattern
:
/
(
^
\d
+$
)
|
(
^
\.\d{1,3}
$
)
|
(
^
\d
+
\.\d{1,3}
$
)
/
,
message
:
"小数位不能超过3位"
}
],
"gidgrp.blk.orcplcc"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
140
,
message
:
"长度不能超过140"
}
],
"gidgrp.rec.accc"
:[
...
...
@@ -183,7 +184,7 @@ export default {
{
required
:
false
,
message
:
"输入正确的日期"
}
],
"gidgrp.blk.addinfc"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
700
,
message
:
"长度不能超过700"
}
],
"gidgrp.blk.gidtxt"
:[
...
...
@@ -433,7 +434,7 @@ export default {
{
max
:
35
,
message
:
"长度不能超过35"
}
],
"gidgrp.blk.deltoadr"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
210
,
message
:
"长度不能超过210"
}
],
"gidgrp.blk.feetxt"
:[
...
...
@@ -449,7 +450,7 @@ export default {
{
max
:
65
,
message
:
"长度不能超过65"
}
],
"gidgrp.blk.trfcond"
:[
{
type
:
"string"
,
required
:
tru
e
,
message
:
"必输项"
},
{
type
:
"string"
,
required
:
fals
e
,
message
:
"必输项"
},
{
max
:
6630
,
message
:
"长度不能超过6630"
}
],
"gidgrp.rec.deloritxtc"
:[
...
...
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 @@
</c-col>
<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
label=
"合同标的"
prop=
"gidgrp.blk.covgodsrv"
...
...
@@ -99,7 +99,7 @@
></c-input>
</el-form-item>
</c-col>
<c-col
:span=
"17"
v-if=
"model.gitp.covgodsrvmodflg
!= ''
"
>
<c-col
:span=
"17"
v-if=
"model.gitp.covgodsrvmodflg"
>
<el-form-item
label=
"合同标的"
prop=
"gidgrp.blk.atxcovgodsrv"
...
...
@@ -107,7 +107,7 @@
<c-input
rows=
"6"
type=
"textarea"
v-model=
"model.gidgrp.blk.a
xt
covgodsrv"
v-model=
"model.gidgrp.blk.a
tx
covgodsrv"
maxlength=
"350"
show-word-limit
placeholder=
"请输入合同标的"
...
...
src/business/gitopn/views/Ovwp1.vue
View file @
51a44351
...
...
@@ -1124,7 +1124,7 @@
<c-col
:span=
"24"
>
<c-col
:span=
"17"
>
<c-form-item
v-if=
"model.gitp.swiftflg == 'Y' &&
model.gitp.exptxtmodflg == ''
"
v-if=
"model.gitp.swiftflg == 'Y' &&
!model.gitp.exptxtmodflg
"
label=
"到期条件"
prop=
"gidgrp.blk.exptxt"
>
...
...
@@ -1139,9 +1139,7 @@
></c-input>
</c-form-item>
<c-form-item
v-if=
"
model.gitp.swiftflg == 'Y' && model.gitp.exptxtmodflg == 'X'
"
v-if=
"model.gitp.swiftflg == 'Y' && model.gitp.exptxtmodflg"
label=
"到期条件"
prop=
"gidgrp.blk.atxexptxt"
>
...
...
src/business/gitopn/views/Preperp.vue
View file @
51a44351
...
...
@@ -75,9 +75,7 @@
<c-col
:span=
"24"
>
<el-form-item
label=
"交付地址"
prop=
"gidgrp.blk.deltoadr"
>
<c-input
:disabled=
"
model.gidgrp.rec.delto == '' && model.gidgrp.rec.purpos != ''
"
:disabled=
"model.gidgrp.rec.delto == '' && model.gidgrp.rec.purpos != ''"
rows=
"4"
type=
"textarea"
v-model=
"model.gidgrp.blk.deltoadr"
...
...
@@ -149,7 +147,7 @@
<c-col
:span=
"24"
>
<c-col
:span=
"17"
>
<el-form-item
v-if=
"
model.gitp.prepermodflg == ''
"
v-if=
"
!model.gitp.prepermodflg
"
label=
"演示说明"
prop=
"gidgrp.blk.preper"
>
...
...
@@ -164,7 +162,7 @@
></c-input>
</el-form-item>
<el-form-item
v-if=
"model.gitp.prepermodflg
== 'X'
"
v-if=
"model.gitp.prepermodflg"
label=
"演示说明"
prop=
"gidgrp.blk.atxpreper"
>
...
...
src/components/XmlFormatEditorNew.vue
View file @
51a44351
...
...
@@ -23,7 +23,7 @@ export default {
return
this
.
value
},
set
(
newVal
)
{
this
.
$emit
(
'input'
,
newVal
)
this
.
$emit
(
'input'
,
newVal
)
}
}
},
...
...
src/mixin/operationFunc.js
View file @
51a44351
...
...
@@ -8,82 +8,117 @@ export default {
},
methods
:
{
// 提交
async
handleSubmit
()
{
console
.
log
(
'提交'
,
this
.
model
);
let
params
=
{
...
this
.
model
,
gidgrp
:
{
...
this
.
model
.
gidgrp
,
...
this
.
model
.
gitp
},
transName
:
this
.
trnName
,
userId
:
window
.
sessionStorage
.
userId
||
'ZL'
,
}
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'
);
}
handleSubmit
()
{
this
.
handleCheck
().
then
(
async
()
=>
{
let
params
=
{
...
this
.
model
,
gidgrp
:
{
...
this
.
model
.
gidgrp
,
...
this
.
model
.
gitp
},
transName
:
this
.
trnName
,
userId
:
window
.
sessionStorage
.
userId
||
'ZL'
,
}
// 精简gidgrp
let
gidgrpKeysList
=
Object
.
keys
(
params
.
gidgrp
)
gidgrpKeysList
.
map
((
item
)
=>
{
if
(
params
.
gidgrp
[
item
].
pts
&&
!
params
.
gidgrp
[
item
].
pts
.
extkey
)
{
delete
params
.
gidgrp
[
item
]
}
})
// 精简cfagit
if
(
params
.
cfagit
.
cfaflg
!==
'1'
)
{
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
()
{
const
loading
=
this
.
loading
(
'正在校验数据'
);
const
rtnmsg
=
await
Api
.
post
(
`/service/
${
this
.
trnName
}
/checkAll`
,
{
...
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
)
handleCheck
()
{
return
new
Promise
((
resolve
)
=>
{
// 第二次点击校验时候,如果执行过后端接口校验,则需要先在rules中让之前后端校验通过,然后再把校验规则置为不校验即null
if
(
this
.
validEdRules
.
length
)
{
this
.
validEdRules
.
map
((
item
)
=>
{
if
(
!
keysList
.
includes
(
item
))
{
validSuccess
.
push
(
item
)
}
this
.
rules
[
item
]
=
[{
validator
:
(
rule
,
value
,
callback
)
=>
{
callback
()
}
}]
})
}
console
.
log
(
'validSuccess'
,
validSuccess
)
this
.
validEdRules
=
Object
.
keys
(
errorRules
)
keysList
.
map
((
ruleKey
)
=>
{
this
.
rules
[
ruleKey
]
=
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
errorRules
[
ruleKey
])
{
callback
(
new
Error
(
errorRules
[
ruleKey
]));
}
// 前端检验
this
.
$refs
[
'modelForm'
].
validate
(
async
(
validStatic
)
=>
{
if
(
validStatic
)
{
const
loading
=
this
.
loading
(
'正在校验数据'
);
const
rtnmsg
=
await
Api
.
post
(
`/service/
${
this
.
trnName
}
/checkAll`
,
{
...
this
.
model
,
transName
:
this
.
trnName
,
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
})
}
},
];
});
validSuccess
.
map
((
item
)
=>
{
this
.
rules
[
item
]
=
[{
validator
:
(
rule
,
value
,
callback
)
=>
{
callback
()
keysList
.
map
((
ruleKey
)
=>
{
this
.
rules
[
ruleKey
]
=
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
errorRules
[
ruleKey
])
{
callback
(
new
Error
(
errorRules
[
ruleKey
]));
}
}
},
];
});
// 后端校验
this
.
$refs
[
'modelForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'校验成功'
,
type
:
'success'
,
});
resolve
()
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'校验失败'
,
type
:
'error'
,
});
}
});
}
}]
})
console
.
log
(
'rules'
,
this
.
rules
);
this
.
$refs
[
'modelForm'
].
validate
((
valid
)
=>
{
console
.
log
(
'valid'
,
valid
);
if
(
valid
)
{
loading
.
close
();
}
else
{
this
.
$notify
({
title
:
'
成功
'
,
message
:
'校验
成功
'
,
type
:
'
success
'
,
title
:
'
失败
'
,
message
:
'校验
失败
'
,
type
:
'
error
'
,
});
}
});
}
loading
.
close
();
})
})
},
// 暂存
async
handleStash
()
{
...
...
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