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
839b2d5c
Commit
839b2d5c
authored
Sep 08, 2021
by
潘际乾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组织机构、联行信息弹框回填
parent
fdd133cd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
244 additions
and
13 deletions
+244
-13
GridEtyPromptDialog.vue
src/components/GridEtyPromptDialog.vue
+182
-0
index.js
src/components/index.js
+2
-0
Check.js
src/model/Ditopn/Check.js
+1
-1
Detp1.vue
src/views/Business/Ditopn/Detp1.vue
+0
-0
Ovwp.vue
src/views/Business/Ditopn/Ovwp.vue
+59
-12
No files found.
src/components/GridEtyPromptDialog.vue
0 → 100644
View file @
839b2d5c
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"show"
custom-class=
"grid-ety"
:highlight-current-row=
"true"
width=
"60%"
:before-close=
"beforeClose"
>
<el-table
:data=
"tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
border
@
row-dblclick=
"selectEty"
>
<el-table-column
v-for=
"(item,idx) in tableColumn"
:key=
"idx"
:property=
"item.prop"
:label=
"item.label"
:width=
"item.width"
>
</el-table-column>
</el-table>
<el-pagination
layout=
"prev, pager, next, total, jumper"
:total=
"tableData.length"
:page-sizes=
"pageSizes"
:page-size=
"pageSize"
:current-page=
"currentPage"
@
current-change=
"currentChange"
>
</el-pagination>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
[
"title"
,
"columnStr"
,
"data"
,
"type"
,
"rulePath"
],
data
()
{
return
{
show
:
false
,
currentPage
:
1
,
pageSizes
:
[
5
,
10
,
20
,
30
,
40
,
50
,
100
],
pageSize
:
5
}
},
computed
:
{
tableColumn
()
{
if
(
this
.
type
===
"extkey"
)
{
return
this
.
dealExtKeyTableColumn
()
}
else
if
(
this
.
type
===
"bankno"
)
{
return
this
.
dealBanknoTableColumn
()
}
return
[]
},
tableData
()
{
if
(
this
.
type
===
"extkey"
)
{
return
this
.
dealExtKeyTableData
()
}
else
if
(
this
.
type
===
"bankno"
)
{
return
this
.
dealBanknoTableData
()
}
return
[]
}
},
methods
:
{
dealExtKeyTableColumn
()
{
const
columnArr
=
[]
const
lines
=
this
.
columnStr
.
split
(
"
\
r
\
n"
)
// 1 7:1 QuoteBranch codeQuote 150 50\r\n
const
etyReg
=
/Quote
(\w
*
\s?\w
*
)
Quote/
const
obj
=
{}
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
const
line
=
lines
[
i
];
if
(
etyReg
.
test
(
line
))
{
const
gs
=
line
.
match
(
etyReg
)
const
columnName
=
gs
[
1
]
const
newLine
=
line
.
replace
(
gs
[
0
],
"_"
)
const
colPropArr
=
newLine
.
split
(
" "
)
const
positionArr
=
colPropArr
[
1
].
split
(
":"
)
if
(
!
obj
[
positionArr
[
0
]])
{
obj
[
positionArr
[
0
]]
=
[]
}
obj
[
positionArr
[
0
]].
push
({
idx
:
colPropArr
[
0
],
prop
:
columnName
,
width
:
colPropArr
[
3
]
})
}
}
for
(
const
k
in
obj
)
{
if
(
Object
.
hasOwnProperty
.
call
(
obj
,
k
))
{
const
o
=
obj
[
k
];
const
tableColumn
=
o
.
map
(
item
=>
item
.
prop
).
join
(
"
\
n"
)
columnArr
.
push
({
prop
:
tableColumn
,
label
:
tableColumn
,
// width: o[0].width,
width
:
"auto"
,
index
:
k
,
children
:
o
})
}
}
return
columnArr
.
sort
((
a
,
b
)
=>
{
return
parseInt
(
a
.
index
)
-
parseInt
(
b
.
index
)
})
},
dealExtKeyTableData
()
{
const
arr
=
[]
for
(
let
i
=
0
;
i
<
this
.
data
.
length
;
i
++
)
{
const
d
=
this
.
data
[
i
];
const
items
=
d
.
split
(
"
\
t"
)
const
it
=
{}
for
(
let
j
=
0
;
j
<
this
.
tableColumn
.
length
;
j
++
)
{
const
column
=
this
.
tableColumn
[
j
];
it
[
column
[
'prop'
]]
=
column
.
children
.
map
(
c
=>
items
[
c
[
'idx'
]]
||
" "
).
join
(
"
\
n"
)
}
it
[
'IDX'
]
=
i
arr
.
push
(
it
)
}
return
arr
},
dealBanknoTableColumn
()
{
const
columnArr
=
[]
const
lines
=
this
.
columnStr
.
split
(
"
\
r
\
n"
)
// 0 1 \"联行行号\"120\r\n
const
etyReg
=
/
\"([^\"]
*
)\"
/
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
const
line
=
lines
[
i
];
if
(
etyReg
.
test
(
line
))
{
const
gs
=
line
.
match
(
etyReg
)
const
columnName
=
gs
[
1
]
const
newLine
=
line
.
replace
(
gs
[
0
],
"_ "
)
const
colPropArr
=
newLine
.
split
(
" "
)
columnArr
.
push
({
idx
:
colPropArr
[
0
],
prop
:
columnName
,
label
:
columnName
,
// width: colPropArr[3],
width
:
"auto"
,
})
}
}
return
columnArr
},
dealBanknoTableData
()
{
const
arr
=
[]
for
(
let
i
=
0
;
i
<
this
.
data
.
length
;
i
++
)
{
const
d
=
this
.
data
[
i
];
const
items
=
d
.
split
(
"
\
t"
)
const
it
=
{}
for
(
let
j
=
0
;
j
<
this
.
tableColumn
.
length
;
j
++
)
{
const
column
=
this
.
tableColumn
[
j
];
it
[
column
[
'prop'
]]
=
items
[
column
[
'idx'
]]
}
it
[
'IDX'
]
=
i
arr
.
push
(
it
)
}
return
arr
},
currentChange
(
currentPage
)
{
this
.
currentPage
=
currentPage
;
},
selectEty
(
row
,
column
,
event
)
{
const
str
=
this
.
data
[
row
.
IDX
]
let
v
=
""
;
if
(
this
.
type
===
'extkey'
)
{
v
=
str
.
split
(
"
\
t"
)[
4
].
trim
()
}
else
if
(
this
.
type
===
'bankno'
)
{
v
=
str
.
split
(
"
\
t"
)[
0
].
trim
()
}
this
.
$emit
(
"select-ety"
,
v
,
this
.
rulePath
)
this
.
show
=
false
;
this
.
currentPage
=
1
;
},
beforeClose
(
done
)
{
this
.
show
=
false
;
this
.
currentPage
=
1
;
done
()
}
}
}
</
script
>
<
style
>
.grid-ety
.el-table
.cell
{
white-space
:
pre-wrap
;
}
</
style
>
\ No newline at end of file
src/components/index.js
View file @
839b2d5c
...
@@ -11,6 +11,7 @@ import Checkbox from './Checkbox.vue'
...
@@ -11,6 +11,7 @@ import Checkbox from './Checkbox.vue'
import
Table
from
"./Table"
import
Table
from
"./Table"
import
IStreamTable
from
"./IStreamTable.vue"
import
IStreamTable
from
"./IStreamTable.vue"
import
IStreamTableDocpan
from
"./IStreamTableDocpan.vue"
import
IStreamTableDocpan
from
"./IStreamTableDocpan.vue"
import
GridEtyPromptDialog
from
"./GridEtyPromptDialog.vue"
import
Radio
from
"./Radio"
import
Radio
from
"./Radio"
import
InputNumber
from
"./InputNumber"
import
InputNumber
from
"./InputNumber"
import
PrintButton
from
"./PrintButton"
import
PrintButton
from
"./PrintButton"
...
@@ -51,6 +52,7 @@ export default {
...
@@ -51,6 +52,7 @@ export default {
Vue
.
component
(
"c-table"
,
Table
)
Vue
.
component
(
"c-table"
,
Table
)
Vue
.
component
(
"c-istream-table"
,
IStreamTable
)
Vue
.
component
(
"c-istream-table"
,
IStreamTable
)
Vue
.
component
(
"c-istream-table-docpan"
,
IStreamTableDocpan
)
Vue
.
component
(
"c-istream-table-docpan"
,
IStreamTableDocpan
)
Vue
.
component
(
"c-grid-ety-prompt-dialog"
,
GridEtyPromptDialog
)
Vue
.
component
(
"c-radio"
,
Radio
)
Vue
.
component
(
"c-radio"
,
Radio
)
Vue
.
component
(
"c-input-number"
,
InputNumber
)
Vue
.
component
(
"c-input-number"
,
InputNumber
)
Vue
.
component
(
"c-print-button"
,
PrintButton
)
Vue
.
component
(
"c-print-button"
,
PrintButton
)
...
...
src/model/Ditopn/Check.js
View file @
839b2d5c
...
@@ -823,7 +823,7 @@ function checkDidgrpApcPtsDihdigN1002(rule, value, callback) {
...
@@ -823,7 +823,7 @@ function checkDidgrpApcPtsDihdigN1002(rule, value, callback) {
*/
*/
function
checkDidgrpAdvPtsExtkeyN100
(
rule
,
value
,
callback
)
{
function
checkDidgrpAdvPtsExtkeyN100
(
rule
,
value
,
callback
)
{
const
that
=
this
;
const
that
=
this
;
that
.
exe
cuteRule
(
"didgrp.adv.pts.extkey"
).
then
(
res
=>
{
that
.
exe
uteCheck
(
"didgrp.adv.pts.extkey"
).
then
(
res
=>
{
//TODO
//TODO
callback
()
callback
()
})
})
...
...
src/views/Business/Ditopn/Detp1.vue
View file @
839b2d5c
This diff is collapsed.
Click to expand it.
src/views/Business/Ditopn/Ovwp.vue
View file @
839b2d5c
...
@@ -681,6 +681,15 @@
...
@@ -681,6 +681,15 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-col>
</el-col>
<c-grid-ety-prompt-dialog
ref=
"etyDialog"
:title=
"gridPromptDialog.title"
:columnStr=
"gridPromptDialog.columnStr"
:data=
"gridPromptDialog.data"
:type=
"gridPromptDialog.type"
:rulePath=
"gridPromptDialog.rulePath"
v-on:select-ety=
"selectEty"
>
</c-grid-ety-prompt-dialog>
</el-row>
</el-row>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -705,6 +714,13 @@ export default {
...
@@ -705,6 +714,13 @@ export default {
},
},
jigomcFlag
:
false
,
jigomcFlag
:
false
,
trade
:
""
,
trade
:
""
,
gridPromptDialog
:
{
title
:
''
,
columnStr
:
''
,
data
:
[],
type
:
''
,
rulePath
:
''
}
};
};
},
},
methods
:
{
methods
:
{
...
@@ -715,7 +731,16 @@ export default {
...
@@ -715,7 +731,16 @@ export default {
if
(
res
.
respCode
=
"AAAAAA"
){
if
(
res
.
respCode
=
"AAAAAA"
){
//失去焦点,避免多次触发
//失去焦点,避免多次触发
document
.
getElementById
(
'extkey'
).
blur
();
document
.
getElementById
(
'extkey'
).
blur
();
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
if
(
res
.
data
.
params
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
else
{
this
.
$refs
.
etyDialog
.
show
=
true
this
.
gridPromptDialog
.
title
=
res
.
data
.
title
this
.
gridPromptDialog
.
columnStr
=
res
.
data
.
columns
this
.
gridPromptDialog
.
data
=
res
.
data
.
vals
.
rows
this
.
gridPromptDialog
.
type
=
'extkey'
this
.
gridPromptDialog
.
rulePath
=
'didgrp.apl.pts.extkey'
}
}
}
}
}
);
);
...
@@ -723,8 +748,17 @@ export default {
...
@@ -723,8 +748,17 @@ export default {
benExtkeyEvent
()
{
benExtkeyEvent
()
{
Api
.
post
(
"ditopn/executeRule/didgrp.ben.pts.extkey"
,
Utils
.
getRequestDataFn
.
call
(
this
)).
then
(
Api
.
post
(
"ditopn/executeRule/didgrp.ben.pts.extkey"
,
Utils
.
getRequestDataFn
.
call
(
this
)).
then
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
respCode
=
"AAAAAA"
){
if
(
res
.
respCode
=
"AAAAAA"
){
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
if
(
res
.
data
.
params
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
else
{
this
.
$refs
.
etyDialog
.
show
=
true
this
.
gridPromptDialog
.
title
=
res
.
data
.
title
this
.
gridPromptDialog
.
columnStr
=
res
.
data
.
columns
this
.
gridPromptDialog
.
data
=
res
.
data
.
vals
.
rows
this
.
gridPromptDialog
.
type
=
'extkey'
this
.
gridPromptDialog
.
rulePath
=
'didgrp.ben.pts.extkey'
}
}
}
}
}
);
);
...
@@ -738,15 +772,15 @@ export default {
...
@@ -738,15 +772,15 @@ export default {
Api
.
post
(
"ditopn/executeRule/didgrp.beb.pts.bankno"
,
Utils
.
getRequestDataFn
.
call
(
this
)).
then
(
Api
.
post
(
"ditopn/executeRule/didgrp.beb.pts.bankno"
,
Utils
.
getRequestDataFn
.
call
(
this
)).
then
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
respCode
=
"AAAAAA"
){
if
(
res
.
respCode
=
"AAAAAA"
){
if
(
JSON
.
stringify
(
res
.
fieldErrors
)
!=
'{}'
)
{
if
(
res
.
data
.
params
)
{
this
.
$notify
({
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
title
:
'提示'
,
}
else
{
message
:
res
.
fieldErrors
[
'didgrp.beb.pts.bankno'
],
this
.
$refs
.
etyDialog
.
show
=
true
type
:
'error'
this
.
gridPromptDialog
.
title
=
res
.
data
.
title
});
this
.
gridPromptDialog
.
columnStr
=
res
.
data
.
columns
}
else
{
this
.
gridPromptDialog
.
data
=
res
.
data
.
vals
.
rows
this
.
jigomcFlag
=
true
;
this
.
gridPromptDialog
.
type
=
'bankno'
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
this
.
gridPromptDialog
.
rulePath
=
'didgrp.beb.pts.bankno'
}
}
}
}
}
}
...
@@ -772,6 +806,19 @@ export default {
...
@@ -772,6 +806,19 @@ export default {
}
}
);
);
},
},
selectEty
(
val
,
rulePath
)
{
const
props
=
rulePath
.
replaceAll
(
"."
,
"_"
)
const
obj
=
{}
obj
[
props
]
=
val
;
Utils
.
copyValueFromVO
(
this
.
model
,
obj
);
Api
.
post
(
`ditopn/executeRule/
${
rulePath
}
`
,
Utils
.
getRequestDataFn
.
call
(
this
)).
then
(
(
res
)
=>
{
if
(
res
.
respCode
=
"AAAAAA"
){
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
}
);
}
},
},
created
:
function
()
{},
created
:
function
()
{},
computed
:{
computed
:{
...
...
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