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
zhouqian
vue-gjjs
Commits
5cf0986d
Commit
5cf0986d
authored
Oct 10, 2022
by
Wuyuqiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公共面板合并
parent
281f5ac8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
101 deletions
+135
-101
commonProcess.js
src/mixin/commonProcess.js
+134
-100
index.vue
src/views/Business/Litopn/index.vue
+1
-1
No files found.
src/mixin/commonProcess.js
View file @
5cf0986d
...
...
@@ -4,8 +4,31 @@ import commonGlobalSearch from "./commonGlobalSearch";
import
Utils
from
"~/utils"
import
_
from
"~/utils/Lodash.js"
;
const
tabNameToRulePathMapping
=
{
"setpan"
:
"setmod.setpan"
,
"glepan"
:
"setmod.glemod.glepan"
,
"docpan"
:
"trnmod.trndoc.docpan"
,
"doctre"
:
"trnmod.trndoc.doctre"
,
"cips"
:
"trnmod.cipmod.cips"
,
"cips2"
:
"trnmod.cipmod.cips"
,
"engp"
:
"liaall.engp"
,
"limitbody"
:
"liaall.limmod.limitbody"
,
"ccvpan"
:
"liaall.liaccv.ccvpan"
,
"detp1"
:
"setmod.setpan"
,
"actinf"
:
"recpan.actinf"
,
"libp"
:
"cnybop.libp"
,
"basp"
:
"bopmod.dbap.basp"
,
"basp1"
:
"bopmod.dbdp.basp"
,
"basp2"
:
"bopmod.dbdp.basp"
,
"basp3"
:
"bopmod.dbap.basp"
,
"incp"
:
"cnybop.incp"
,
"outp"
:
"cnybop.Outp"
,
"dbb"
:
"bopmod.dbbp.basp"
,
"dbe"
:
"bopmod.dbep.basp"
}
export
default
{
mixins
:
[
commonApi
,
commonDeclare
,
commonGlobalSearch
],
mixins
:
[
commonApi
,
commonDeclare
,
commonGlobalSearch
],
data
:
function
()
{
return
{
// 弹框回填
...
...
@@ -127,64 +150,75 @@ export default {
if
(
this
.
isInDisplay
)
{
return
}
const
name
=
tab
.
name
let
rulePath
;
if
(
name
===
"setpan"
)
{
rulePath
=
"setmod.setpan"
;
}
if
(
name
===
"glepan"
)
{
rulePath
=
"setmod.glemod.glepan"
;
}
if
(
name
===
"docpan"
)
{
rulePath
=
"trnmod.trndoc.docpan"
}
if
(
name
===
"doctre"
)
{
rulePath
=
"trnmod.trndoc.doctre"
}
if
(
name
===
"cips"
||
name
===
"cips2"
)
{
rulePath
=
"trnmod.cipmod.cips"
}
if
(
name
===
"engp"
)
{
rulePath
=
"liaall.engp"
}
if
(
name
===
"limitbody"
)
{
rulePath
=
"liaall.limmod.limitbody"
}
if
(
name
===
"ccvpan"
)
{
rulePath
=
"liaall.liaccv.ccvpan"
}
if
(
name
===
"detp1"
){
rulePath
=
"setmod.setpan"
}
if
(
name
===
"actinf"
){
rulePath
=
"recpan.actinf"
}
if
(
name
===
"libp"
){
rulePath
=
"cnybop.libp"
}
if
(
name
===
'basp'
){
rulePath
=
"bopmod.dbap.basp"
}
if
(
name
===
'basp1'
){
rulePath
=
"bopmod.dbdp.basp"
}
if
(
name
===
'basp2'
){
rulePath
=
"bopmod.dbdp.basp"
}
if
(
name
===
'basp3'
){
rulePath
=
"bopmod.dbap.basp"
}
if
(
name
===
'incp'
){
rulePath
=
"cnybop.incp"
}
if
(
name
===
'outp'
){
rulePath
=
"cnybop.Outp"
}
if
(
name
===
'dbb'
){
rulePath
=
"bopmod.dbbp.basp"
}
if
(
name
===
'dbe'
){
rulePath
=
"bopmod.dbep.basp"
let
name
=
tab
.
name
const
nms
=
name
.
split
(
","
)
const
arr
=
[]
for
(
let
i
=
0
;
i
<
nms
.
length
;
i
++
)
{
const
n
=
nms
[
i
];
const
path
=
tabNameToRulePathMapping
[
n
]
if
(
path
)
{
arr
.
push
(
path
)
}
}
let
rulePath
=
arr
.
join
(
","
);
// if (name.indexOf("setpan") > -1) {
// name = name.replace("setpan", "setmod.setpan");
// }
// if (name.indexOf("glepan") > -1) {
// name = name.replace("glepan", "setmod.glemod.glepan");
// }
// if (name === "docpan") {
// rulePath = "trnmod.trndoc.docpan"
// }
// if (name === "doctre") {
// rulePath = "trnmod.trndoc.doctre"
// }
// if (name === "cips" || name === "cips2") {
// rulePath = "trnmod.cipmod.cips"
// }
// if (name.indexOf("engp") > -1) {
// name = name.replace("engp", "liaall.engp")
// }
// if (name === "limitbody") {
// rulePath = "liaall.limmod.limitbody"
// }
// if (name === "ccvpan") {
// rulePath = "liaall.liaccv.ccvpan"
// }
// if (name === "detp1") {
// rulePath = "setmod.setpan"
// }
// if (name === "actinf") {
// rulePath = "recpan.actinf"
// }
// if (name === "libp") {
// rulePath = "cnybop.libp"
// }
// if (name === 'basp') {
// rulePath = "bopmod.dbap.basp"
// }
// if (name === 'basp1') {
// rulePath = "bopmod.dbdp.basp"
// }
// if (name === 'basp2') {
// rulePath = "bopmod.dbdp.basp"
// }
// if (name === 'basp3') {
// rulePath = "bopmod.dbap.basp"
// }
// if (name === 'incp') {
// rulePath = "cnybop.incp"
// }
// if (name === 'outp') {
// rulePath = "cnybop.Outp"
// }
// if (name === 'dbb') {
// rulePath = "bopmod.dbbp.basp"
// } if (name === 'dbe') {
// rulePath = "bopmod.dbep.basp"
// }
if
(
!!
rulePath
)
{
// if(rulePath == "setmod.setpan"){
// this.executeCustomRule(rulePath).then(res => {
...
...
@@ -193,11 +227,11 @@ export default {
// }
// })
// }else{
this
.
executeRule
(
rulePath
).
then
(
res
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
this
.
updateModel
(
res
.
data
)
}
})
this
.
executeRule
(
rulePath
).
then
(
res
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
this
.
updateModel
(
res
.
data
)
}
})
// }
}
},
...
...
@@ -207,7 +241,7 @@ export default {
* @param {any} selfCb 允许延时组数 参数
* @returns
*/
wrapper
(
params
,
delayCb
)
{
wrapper
(
params
,
delayCb
)
{
params
=
params
||
{}
const
fn
=
async
()
=>
{
const
that
=
this
;
...
...
@@ -223,24 +257,24 @@ export default {
}
return
fn
;
},
wrapperCustom
(
params
,
delayCb
)
{
params
=
params
||
{}
params
[
'isCustom'
]
=
true
const
fn
=
async
()
=>
{
const
that
=
this
;
const
data
=
await
new
Promise
(
resolve
=>
{
// 保证前一次请求结果赋值VO完成
setTimeout
(()
=>
{
delayCb
&&
delayCb
()
const
d
=
Utils
.
flatObject
(
that
.
customModel
)
resolve
(
d
)
},
0
)
})
params
[
'keys'
]
=
Object
.
keys
(
data
)
return
{
...
data
,
params
}
}
return
fn
;
},
wrapperCustom
(
params
,
delayCb
)
{
params
=
params
||
{}
params
[
'isCustom'
]
=
true
const
fn
=
async
()
=>
{
const
that
=
this
;
const
data
=
await
new
Promise
(
resolve
=>
{
// 保证前一次请求结果赋值VO完成
setTimeout
(()
=>
{
delayCb
&&
delayCb
()
const
d
=
Utils
.
flatObject
(
that
.
customModel
)
resolve
(
d
)
},
0
)
})
params
[
'keys'
]
=
Object
.
keys
(
data
)
return
{
...
data
,
params
}
}
return
fn
;
},
/**
* 用于手动的触发model里属性的 executeDefault
* @param {string} rule 执行的 rule path
...
...
@@ -249,15 +283,15 @@ export default {
defaultFunction
(
rule
,
value
)
{
Utils
.
defaultFunction
.
call
(
this
,
rule
,
value
)
},
/**
* 用于手动的触发model里属性的 event
* @param {string} rule 执行的 rule path
* @param {any} value 更改的值
*/
/**
* 用于手动的触发model里属性的 event
* @param {string} rule 执行的 rule path
* @param {any} value 更改的值
*/
eventFunction
(
rulePath
)
{
this
.
executeRule
(
rulePath
).
then
((
res
)
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
})
},
...
...
@@ -277,8 +311,8 @@ export default {
* @param {String} isCover 非机构双击后需要回填的字段值是覆盖还是叠加,部分覆盖值为对象,false为叠加,如{TXT:false},k值为modelUrl的k,如全部覆盖则isCover='T',如全部叠加则isCover='',默认全部覆盖
* @param {String} defaultColumn 选中列,默认第0列
*/
showGridPromptDialog
(
rulePath
,
columns
,
shadow
,
modelUrl
,
isCover
=
"T"
,
Dialog
=
'etyDialog'
,
defaultColumn
=
0
)
{
this
.
executeRule
(
rulePath
,
{
'EventType'
:
4
}).
then
((
res
)
=>
{
showGridPromptDialog
(
rulePath
,
columns
,
shadow
,
modelUrl
,
isCover
=
"T"
,
Dialog
=
'etyDialog'
,
defaultColumn
=
0
)
{
this
.
executeRule
(
rulePath
,
{
'EventType'
:
4
}).
then
((
res
)
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
if
(
res
.
data
.
params
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
...
...
@@ -296,31 +330,31 @@ export default {
}
}
}
this
.
$el
.
querySelectorAll
(
'input'
).
forEach
(
input
=>
input
.
blur
())
this
.
$el
.
querySelectorAll
(
'input'
).
forEach
(
input
=>
input
.
blur
())
})
},
/**
* 下拉框/多选框 改变时执行rule
* @param {String} rulePath 路径
*/
selectOrCheckboxRule
(
rulePath
)
{
this
.
executeRule
(
rulePath
).
then
((
res
)
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
})
selectOrCheckboxRule
(
rulePath
)
{
this
.
executeRule
(
rulePath
).
then
((
res
)
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
})
},
/**
* 机构回填
* @param {String} val 选种行的值(一般是首列)
* @param {String} rulePath 路径
*/
selectEty
(
val
,
rulePath
)
{
selectEty
(
val
,
rulePath
)
{
const
props
=
rulePath
.
replaceAll
(
"."
,
"_"
)
const
obj
=
{}
obj
[
props
]
=
val
;
Utils
.
copyValueFromVO
(
this
.
model
,
obj
);
this
.
executeRule
(
rulePath
,
{
"selectStatus"
:
1
}).
then
((
res
)
=>
{
this
.
executeRule
(
rulePath
,
{
"selectStatus"
:
1
}).
then
((
res
)
=>
{
if
(
res
.
respCode
==
SUCCESS
)
{
Utils
.
copyValueFromVO
(
this
.
model
,
res
.
data
);
}
...
...
@@ -351,7 +385,7 @@ export default {
* @param {Boolean} required 是否必填
*/
changeFormItemRequired
(
property
,
required
)
{
this
.
getRoot
().
pattern
[
property
][
0
].
required
=
required
this
.
getRoot
().
pattern
[
property
][
0
].
required
=
required
},
/**
* 在 A 交易中打开 B 交易视图(详情、开立...)。
...
...
src/views/Business/Litopn/index.vue
View file @
5cf0986d
...
...
@@ -83,7 +83,7 @@
</el-tab-pane>
<!--PD000027 -->
<el-tab-pane
label=
"费用/账务"
name=
"engp"
>
<el-tab-pane
label=
"费用/账务"
name=
"engp
,setpan,glepan
"
>
<c-content>
<m-engp
:model=
"model"
:codes=
"codes"
/>
</c-content>
...
...
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