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
5b20c91c
Commit
5b20c91c
authored
Feb 18, 2022
by
袁成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 更新bc_input feat: 关联用户组件
parent
346986cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
8 deletions
+93
-8
userSelect.vue
...lop/@gms/gms-plugin-billexpand/src/control/userSelect.vue
+57
-0
bc_input.js
...p/@gms/gms-plugin-billexpand/src/control/util/bc_input.js
+14
-7
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+19
-0
mcon.js
develop/@gms/gms-plugin-billexpand/src/mcon.js
+3
-1
No files found.
develop/@gms/gms-plugin-billexpand/src/control/userSelect.vue
0 → 100644
View file @
5b20c91c
<
template
>
<div>
<Select
v-model=
"value"
clearable
:disabled=
"state=='readOnly'"
@
on-change=
"onBlur"
>
<Option
v-for=
"item in userList"
:value=
"item.id"
:key=
"item.id"
:disabled=
"!item.enabled"
>
{{
item
.
fullname
}}
</Option>
</Select>
</div>
</
template
>
<
script
>
import
input
from
'./util/bc_input'
export
default
{
mixins
:
[
input
],
data
()
{
return
{
userList
:
[]
}
},
mounted
()
{
this
.
getUserList
()
},
methods
:
{
getUserList
()
{
// 获取当前单位下的用户
let
orgCode
=
''
try
{
orgCode
=
nros
.
userContext
.
userInfo
.
loginUnit
}
catch
(
error
)
{
this
.
$Message
.
error
(
error
)
}
GMS
.
$http
.
get
(
`/nvwa-user/v1/user/orgCode/
${
orgCode
}
`
)
.
then
((
res
)
=>
{
const
{
data
}
=
res
this
.
userList
=
data
})
.
catch
((
err
)
=>
{
console
.
log
(
'error'
,
err
)
})
}
}
}
</
script
>
<
style
lang=
'less'
scoped
>
</
style
>
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/control/util/bc_input.js
View file @
5b20c91c
...
...
@@ -200,7 +200,7 @@ export default {
if
(
config
.
formulas
[
key
]
===
"false"
){
this
[
`setControl
${
key
}
`
]
&&
this
[
`setControl
${
key
}
`
]();
}
else
{
this
.
context
.
bill
.
getControlState
(
key
,
this
.
define
.
name
);
this
.
context
.
bill
.
getControlState
(
key
,
this
.
define
.
name
,
this
.
define
.
config
.
field
);
}
}
}
...
...
@@ -260,18 +260,25 @@ export default {
this
.
addControlStateListener
();
}
if
(
!
this
.
context
.
bill
.
getGlobalParam
(
'_old_action_status'
)){
if
(
this
.
context
.
controlState
===
'readOnly'
){
this
.
state
=
'readOnly'
;
}
else
if
(
!
this
.
context
.
bill
.
getGlobalParam
(
'_old_action_status'
)){
this
.
getControlState
(
this
.
define
.
config
);
}
}
}.
bind
(
this
));
if
(
this
.
define
.
config
.
field
==
'gams_inspectionentry.inspector'
){
console
.
log
(
this
.
define
,
'this.define'
)
}
},
created
(){
this
.
getContentStatus
();
if
(
this
.
define
.
config
.
formulas
){
let
_fieldNameRelation
=
this
.
context
.
bill
.
getGlobalParam
(
'_field_name_relation_'
)
||
{};
_fieldNameRelation
[
this
.
define
.
config
.
field
]
=
{
name
:
this
.
define
.
name
,
editable
:
this
.
define
.
config
.
formulas
.
editable
};
this
.
context
.
bill
.
setGlobalParam
(
'_field_name_relation_'
,
_fieldNameRelation
);
}
else
{
let
_fieldNameRelation
=
this
.
context
.
bill
.
getGlobalParam
(
'_field_name_relation_'
)
||
{};
_fieldNameRelation
[
this
.
define
.
config
.
field
]
=
{
name
:
this
.
define
.
name
,
editable
:
true
};
this
.
context
.
bill
.
setGlobalParam
(
'_field_name_relation_'
,
_fieldNameRelation
);
}
this
.
getContentStatus
();
},
props
:
{
define
:
{
...
...
develop/@gms/gms-plugin-billexpand/src/emcon.js
View file @
5b20c91c
...
...
@@ -46,6 +46,25 @@ export default {
"path"
:
"单据/通用"
},
{
"title"
:
"用户选择"
,
"description"
:
""
,
"discard"
:
false
,
"dynamicComponent"
:
'billForm'
,
"extends"
:
{
"config"
:
[
{
"key"
:
"field"
,
"type"
:
"field"
,
"ref"
:
"BillClassVO.attributes"
,
"disableReload"
:
false
,
"title"
:
"关联字段"
},
]
},
"value"
:
"userSelectControl"
,
"path"
:
"资产/通用"
},
{
"value"
:
"ButtonControl"
,
"discard"
:
false
,
"path"
:
"资产/通用"
,
...
...
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
5b20c91c
...
...
@@ -69,6 +69,7 @@ import buttonGroupControl from './control/buttonGrouop'
import
rbcBasedataTree
from
'./control/baseDataSelect/index.vue'
import
newsDetail
from
'./components-control/news-detail.vue'
import
queryDate
from
'./control/query-date.vue'
import
userSelectControl
from
'./control/userSelect.vue'
//formula
import
GetMdByFormerCode
from
'./formula/GetMdByFormerCode'
import
GetBrowserVersion
from
'./formula/GetBrowserVersion'
...
...
@@ -257,7 +258,8 @@ export default {
buttonGroupControl
,
ApprovalUserControl
,
WorkflowTrack
,
rbcBasedataTree
rbcBasedataTree
,
userSelectControl
},
formula
:
{
SubTableSetBaseData
,
...
...
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