Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rbc-demo
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
王衍超
rbc-demo
Commits
dd97e8d1
Commit
dd97e8d1
authored
May 16, 2022
by
qiaoyanqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
按钮组扩展按钮自定义配置禁用
parent
90563ee3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
41 deletions
+67
-41
buttonGrouop.vue
...p/@gms/gms-plugin-billexpand/src/control/buttonGrouop.vue
+63
-37
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+4
-4
No files found.
develop/@gms/gms-plugin-billexpand/src/control/buttonGrouop.vue
View file @
dd97e8d1
...
@@ -149,48 +149,74 @@ export default {
...
@@ -149,48 +149,74 @@ export default {
})
})
},
},
getBillStateDisable
(
val
,
btnItem
)
{
getBillStateDisable
(
val
,
btnItem
)
{
if
(
!
val
)
return
false
console
.
log
(
this
.
define
.
btnGroupAction
[
btnItem
],
val
,
btnItem
);
let
approveState
=
null
if
(
//不走工作流的情况下,执行自定义的按钮禁用状态
if
(
this
.
workflowState
===
0
)
{
this
.
define
.
btnGroupAction
&&
approveState
=
this
.
context
.
bill
.
getMasterData
().
getValue
(
'billState'
)
this
.
define
.
btnGroupAction
[
btnItem
]
&&
this
.
define
.
btnGroupAction
[
btnItem
].
disArr
&&
this
.
define
.
btnGroupAction
[
btnItem
].
disArr
.
length
>
0
)
{
let
arr
=
this
.
define
.
btnGroupAction
[
btnItem
].
disArr
;
let
flag
=
false
;
//不禁用
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
valueArr
=
arr
[
i
].
value
.
split
(
";"
);
let
billField
=
this
.
context
.
bill
.
getMasterData
().
getValue
(
arr
[
i
].
key
.
split
(
'.'
)[
1
]);
if
(
valueArr
.
includes
(
billField
)){
flag
=
true
;
//禁用
break
;
}
}
return
flag
;
}
else
{
}
else
{
approveState
=
this
.
workflowState
if
(
!
val
)
return
false
;
}
let
approveState
=
null
;
let
disableState
=
val
.
split
(
';'
)
if
(
this
.
workflowState
===
0
)
{
// 配置工作流已提交未审批90, billReadOnly状态下可用
approveState
=
this
.
context
.
bill
// 主要用于保存在审批状态下可用,审批还能修改··
.
getMasterData
()
if
(
this
.
define
.
btnGroupAction
&&
this
.
define
.
btnGroupAction
[
btnItem
]
&&
this
.
define
.
btnGroupAction
[
btnItem
].
isApprove
)
{
.
getValue
(
"billState"
);
disableState
=
disableState
.
filter
(
item
=>
{
}
else
{
if
(
item
===
'90'
)
{
approveState
=
this
.
workflowState
;
return
false
}
let
disableState
=
val
.
split
(
";"
);
// 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改··
if
(
this
.
define
.
btnGroupAction
&&
this
.
define
.
btnGroupAction
[
btnItem
]
&&
this
.
define
.
btnGroupAction
[
btnItem
].
isApprove
)
{
disableState
=
disableState
.
filter
((
item
)
=>
{
if
(
item
===
"90"
)
{
return
false
;
}
else
{
return
true
;
}
});
}
const
getBillState
=
()
=>
{
if
(
this
.
tmpBill
.
state
===
""
)
{
return
disableState
.
includes
(
"billEdit"
);
}
else
if
(
this
.
tmpBill
.
state
===
"readOnly"
)
{
return
disableState
.
includes
(
"billReadOnly"
);
}
else
{
}
else
{
return
true
return
false
;
}
}
})
};
}
switch
(
approveState
)
{
const
getBillState
=
()
=>
{
case
90
:
// 待审批
if
(
this
.
tmpBill
.
state
===
''
)
{
return
disableState
.
includes
(
"90"
);
return
disableState
.
includes
(
'billEdit'
)
case
91
:
// 被驳回
}
else
if
(
this
.
tmpBill
.
state
===
'readOnly'
)
{
return
disableState
.
includes
(
"91"
)
||
getBillState
();
return
disableState
.
includes
(
'billReadOnly'
)
case
92
:
// 审批完成
}
else
{
return
disableState
.
includes
(
"92"
);
return
false
case
1
:
// 已暂存
return
disableState
.
includes
(
"1"
)
||
getBillState
();
case
2
:
// 已保存
return
disableState
.
includes
(
"2"
)
||
getBillState
();
default
:
return
getBillState
();
}
}
}
}
switch
(
approveState
)
{
case
90
:
// 待审批
return
disableState
.
includes
(
'90'
)
case
91
:
// 被驳回
return
disableState
.
includes
(
'91'
)
||
getBillState
()
case
92
:
// 审批完成
return
disableState
.
includes
(
'92'
)
case
1
:
// 已暂存
return
disableState
.
includes
(
'1'
)
||
getBillState
()
case
2
:
// 已保存
return
disableState
.
includes
(
'2'
)
||
getBillState
()
default
:
return
getBillState
()
}
},
},
},
},
}
}
...
...
develop/@gms/gms-plugin-billexpand/src/emcon.js
View file @
dd97e8d1
...
@@ -17,7 +17,7 @@ export default {
...
@@ -17,7 +17,7 @@ export default {
"layout"
:[]
"layout"
:[]
},
},
"value"
:
"Achievements"
,
"value"
:
"Achievements"
,
"path"
:
"
单据
/通用"
"path"
:
"
报销
/通用"
},
},
{
{
"title"
:
"Tab切换容器"
,
"title"
:
"Tab切换容器"
,
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
}]
}]
},
},
"value"
:
"linkShowDetail"
,
"value"
:
"linkShowDetail"
,
"path"
:
"
单据
/通用"
"path"
:
"
报销
/通用"
},
},
{
{
"title"
:
"按钮组扩展"
,
"title"
:
"按钮组扩展"
,
...
@@ -107,7 +107,7 @@ export default {
...
@@ -107,7 +107,7 @@ export default {
]
]
},
},
"value"
:
"buttonGroupControl"
,
"value"
:
"buttonGroupControl"
,
"path"
:
"
单据
/通用"
"path"
:
"
报销
/通用"
},
},
{
{
"title"
:
"用户选择"
,
"title"
:
"用户选择"
,
...
@@ -1793,7 +1793,7 @@ export default {
...
@@ -1793,7 +1793,7 @@ export default {
"value"
:
"copyBillAction"
"value"
:
"copyBillAction"
},
{
},
{
"discard"
:
false
,
"discard"
:
false
,
"path"
:
"
单据/缓存单据数据
"
,
"path"
:
"
报销/通用
"
,
"extends"
:
{
"extends"
:
{
"param"
:
[{
"param"
:
[{
"clearable"
:
true
,
"clearable"
:
true
,
...
...
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