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
873ed2e6
Commit
873ed2e6
authored
May 13, 2022
by
乔延琦
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop-yangchen' into 'develop'
Develop yangchen See merge request GFP/RBC/rbc-frontend!176
parents
11b981b5
daf1dbd8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
671 additions
and
2 deletions
+671
-2
package.json
develop/@gms/gms-plugin-billexpand/package.json
+2
-0
gh_agreeActionDemo.js
...-billexpand/src/actions/labourUnion/gh_agreeActionDemo.js
+45
-0
IntroduceInputControl.vue
...s-plugin-billexpand/src/control/IntroduceInputControl.vue
+0
-1
approvalOpinionControl.vue
...-plugin-billexpand/src/control/approvalOpinionControl.vue
+465
-0
dynamic-from-common.less
...ugin-billexpand/src/control/util/dynamic-from-common.less
+26
-0
SubjectControl.vue
...-billexpand/src/control/vxeTableExpand/SubjectControl.vue
+97
-0
VxeSubjectControl.js
...illexpand/src/control/vxeTableExpand/VxeSubjectControl.js
+29
-0
mcon.js
develop/@gms/gms-plugin-billexpand/src/mcon.js
+3
-1
plugin.js
develop/@gms/gms-plugin-billexpand/src/plugin.js
+4
-0
No files found.
develop/@gms/gms-plugin-billexpand/package.json
View file @
873ed2e6
...
...
@@ -9,6 +9,8 @@
},
"dependencies"
:
{
"@rbc/icon"
:
"^0.0.1"
,
"@yhs/components"
:
"^1.1.0-SNAPSHOT"
,
"@yhs/icon"
:
"^1.1.0-SNAPSHOT"
,
"core-js"
:
"^3.6.5"
,
"currency.js"
:
"^1.2.2"
,
"element-ui"
:
"^2.15.6"
,
...
...
develop/@gms/gms-plugin-billexpand/src/actions/labourUnion/gh_agreeActionDemo.js
0 → 100644
View file @
873ed2e6
import
approvalUserControl
from
'../../control/approvalOpinionControl.vue'
export
default
{
execute
:
function
(
bill
,
param
)
{
/* 审批组件值发生改变时 会触发事件on-change */
let
title
=
'审批意见'
GMS
.
$hideContainer
.
$Modal
.
confirm
({
width
:
700
,
top
:
100
,
render
:
(
h
)
=>
{
return
h
(
approvalUserControl
,
{
props
:
{
title
,
},
on
:
{
'on-change'
:
(
val
)
=>
{
console
.
log
(
'on-change'
,
val
)
}
}
}
)
},
onOk
:
()
=>
{
console
.
log
(
'OK'
)
},
onCancel
:
()
=>
{
console
.
log
(
'cancel'
)
}
});
},
approvalLogical
:
function
(
bill
,
param
)
{
},
executeApproval
:
function
(
bill
,
param
)
{
},
isApproverEqulloginer
:
function
(
bill
,
param
)
{
}
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/control/IntroduceInputControl.vue
View file @
873ed2e6
...
...
@@ -162,7 +162,6 @@ export default {
});
window
.
open
(
routeData
.
href
,
"_blank"
);
});
},
executeAction
()
{
this
.
context
.
bill
.
executeAction
(
this
.
button
.
config
.
action
);
...
...
develop/@gms/gms-plugin-billexpand/src/control/approvalOpinionControl.vue
0 → 100644
View file @
873ed2e6
<
template
>
<div>
<div
class=
"suggestion-wrapper"
>
<div
class=
"label"
>
{{
title
}}
</div>
<div
class=
"options"
>
<span
@
click=
"openEditModal"
><span
data-v-7fbfe69a=
""
></span
><svg
data-v-7fbfe69a=
""
aria-hidden=
"true"
class=
"icon"
>
<use
data-v-7fbfe69a=
""
xlink:href=
"#icon-a-16_BILLEXPAND_C_RBC_EDIT"
></use></svg
></span>
<span
@
click=
"handleAdd"
><span
data-v-7fbfe69a=
""
></span
><svg
data-v-7fbfe69a=
""
aria-hidden=
"true"
class=
"icon"
>
<use
data-v-7fbfe69a=
""
xlink:href=
"#icon-a-16_BILLEXPAND_A_RBC_ADD"
></use></svg
></span>
</div>
<div
class=
"input-wrapper"
>
<Input
v-model=
"value"
type=
"textarea"
:placeholder=
"请输入您的意见或在下方选择常用意见"
:maxlength=
"240"
/>
<div
class=
"suggestion-button-wrapper"
>
<ConfirmPopover
v-for=
"suggestion in suggestionOption"
:key=
"suggestion.code"
v-model=
"suggestion.visible"
@
cancle=
"suggestion.visible = false"
@
confirm=
"
() =>
{
handleDelete([suggestion]);
suggestion.visible = false;
}
"
>
<div
class=
"suggestion-button"
:style=
"
{
background: `${themeColor}15`,
border: `1px solid ${themeColor}29`,
}"
v-show="suggestion.id"
@click="handleSelectSuggestion(suggestion)"
@mouseover="currentHoverSuggestion = suggestion"
@mouseout="currentHoverSuggestion = null"
>
<div
class=
"text"
:style=
"
{ color: themeColor }">
{{
suggestion
.
spyj
}}
</div>
<div
@
click
.
stop=
"$set(suggestion, 'visible', true)"
v-show=
"suggestion === currentHoverSuggestion"
class=
"delete-icon"
>
<Icon
type=
"md-close-circle"
/>
</div>
</div>
</ConfirmPopover>
</div>
</div>
</div>
<el-dialog
v-if=
"suggestionOptionModal"
title=
"常用意见列表"
:visible
.
sync=
"suggestionOptionModal"
width=
"60%"
:modal=
"false"
custom-class=
"suggestion-option-modal"
>
<div
slot=
"title"
class=
"header"
>
编辑常用意见
</div>
<div
class=
"suggestion-modal-toolbar"
>
<div
v-if=
"suggestionOption.length > 0"
>
共
{{
suggestionOption
.
length
}}
条审批意见
</div>
<div
class=
"button-wrapper"
>
<Button
style=
"margin-right: 5px"
size=
"small"
@
click=
"addNewRow"
>
添加意见
</Button
>
<Poptip
confirm
:transfer=
"true"
title=
"是否删除选中项?"
@
on-ok=
"handleBatchDelete"
>
<Button
size=
"small"
>
批量删除
</Button>
</Poptip>
</div>
</div>
<Table
ref=
"suggestionTable"
size=
"small"
:columns=
"suggestionTableColumns"
border
:max-height=
"400"
:data=
"suggestionOption"
@
on-selection-change=
"handleSelectionChange"
>
<template
slot-scope=
"
{ row }" slot="spyj">
<div
v-show=
"currentEditSuggestion.code != row.code"
@
click=
"handleClickRow(row)"
>
{{
row
.
spyj
}}
</div>
<Input
v-model=
"currentEditSuggestion.spyj"
v-show=
"currentEditSuggestion.code === row.code"
:ref=
"'input-' + row.code"
@
on-blur=
"handleInputBlur(row)"
type=
"textarea"
:maxlength=
"240"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
<Button
:class=
"index
<
1
?
''
:
'
suggestion-edit-button
'"
:disabled=
"index
<
1
"
size=
"small"
type=
"text"
@
click=
"setOrder(row, -1)"
>
上移
</Button>
<Button
:class=
"
index >= suggestionOption.length - 1
? ''
: 'suggestion-edit-button'
"
:disabled=
"index >= suggestionOption.length - 1"
size=
"small"
type=
"text"
@
click=
"setOrder(row, 1)"
>
下移
</Button>
<Poptip
confirm
:transfer=
"true"
title=
"确定要删除本条意见吗?"
@
on-ok=
"handleDelete([row])"
popper-class=
"suggestion-edit-table-popper"
>
<Button
class=
"suggestion-edit-button"
size=
"small"
type=
"text"
>
删除
</Button
>
</Poptip>
</
template
>
</Table>
</el-dialog>
</div>
</template>
<
script
>
const
TABLE_NAME
=
"MD_SPYJ"
;
import
ConfirmPopover
from
"./approval-user-control/confirm-popover"
;
export
default
{
name
:
"ApprovalUserControl"
,
components
:
{
ConfirmPopover
,
},
props
:
[
"title"
],
data
()
{
return
{
value
:
""
,
suggestionOptionModal
:
false
,
reviewParam
:
{},
taskId
:
null
,
currentEditSuggestion
:
{},
suggestionOption
:
[],
suggestionTableColumns
:
[
{
type
:
"selection"
,
width
:
50
,
align
:
"center"
,
},
{
title
:
"序号"
,
width
:
60
,
align
:
"center"
,
key
:
"index"
,
},
{
title
:
"审批意见"
,
slot
:
"spyj"
,
},
{
title
:
"操作"
,
slot
:
"action"
,
maxWidth
:
160
,
},
],
selectedSuggestion
:
[],
themeColor
:
"#5369D8"
,
currentHoverSuggestion
:
null
,
};
},
watch
:
{
value
(
newV
)
{
this
.
$emit
(
"on-change"
,
newV
);
},
},
mounted
()
{
this
.
getSuggestionOptions
();
},
methods
:
{
openEditModal
()
{
this
.
suggestionOptionModal
=
true
;
},
genCode
()
{
return
`
${
Date
.
now
()}${
Math
.
random
().
toString
(
36
).
slice
(
-
8
)}
`
;
},
/**
* @param {object} row
* @param {1 | -1} direction - 1下移,-1上移
*/
async
setOrder
(
row
,
direction
)
{
// index 是从1开始的,,,,
if
(
row
.
index
+
direction
>
this
.
suggestionOption
.
length
||
row
.
index
+
direction
<=
0
)
return
;
const
neighborRow
=
this
.
suggestionOption
[
row
.
index
+
direction
-
1
];
await
window
.
GAMS
.
Util
.
invokeServer
({
path
:
"bpm/bill/action/updateOrder"
,
type
:
"POST"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
(
[
row
,
neighborRow
].
map
((
o
)
=>
{
const
ans
=
{
...
o
};
delete
ans
.
index
;
return
ans
;
})
),
});
await
this
.
getSuggestionOptions
();
},
addNewRow
()
{
this
.
currentEditSuggestion
=
{
code
:
this
.
genCode
(),
};
this
.
suggestionOption
.
push
(
this
.
currentEditSuggestion
);
this
.
$nextTick
(()
=>
{
this
.
focusInput
(
this
.
currentEditSuggestion
.
code
);
});
},
focusInput
(
code
)
{
this
.
$refs
[
`input-
${
code
}
`
]
&&
this
.
$refs
[
`input-
${
code
}
`
].
focus
();
},
handleInputBlur
(
row
)
{
this
.
saveSuggestion
();
},
handleClickRow
(
row
)
{
this
.
currentEditSuggestion
=
row
;
this
.
$nextTick
(()
=>
{
this
.
focusInput
(
row
.
code
);
});
},
handleBatchDelete
()
{
this
.
handleDelete
(
this
.
selectedSuggestion
);
this
.
selectedSuggestion
=
[];
},
handleSelectionChange
(
selection
)
{
this
.
selectedSuggestion
=
[...
selection
];
},
handleSelectSuggestion
(
s
)
{
this
.
value
=
s
.
spyj
;
},
handleAdd
()
{
this
.
currentEditSuggestion
=
{
code
:
this
.
genCode
(),
spyj
:
this
.
value
,
};
this
.
saveSuggestion
();
},
async
add
()
{
this
.
currentEditSuggestion
=
{
name
:
""
,
parentcode
:
"-"
,
parentcode_show
:
{
name
:
"-"
,
title
:
"-"
},
shortname
:
""
,
stopflag
:
0
,
tableName
:
TABLE_NAME
,
...
this
.
currentEditSuggestion
,
};
await
window
.
GAMS
.
Util
.
invokeServer
({
path
:
"bpm/bill/action/add"
,
type
:
"POST"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
(
this
.
currentEditSuggestion
),
});
},
async
saveSuggestion
()
{
if
(
this
.
currentEditSuggestion
.
id
)
{
await
this
.
update
();
}
else
if
(
this
.
currentEditSuggestion
.
spyj
&&
this
.
currentEditSuggestion
.
spyj
.
trim
()
)
{
await
this
.
add
();
}
this
.
currentEditSuggestion
=
{};
this
.
getSuggestionOptions
();
},
async
update
()
{
delete
this
.
currentEditSuggestion
.
showTitleMap
;
this
.
currentEditSuggestion
.
ver
=
Date
.
now
();
await
window
.
GAMS
.
Util
.
invokeServer
({
path
:
"baseData/data/update"
,
type
:
"POST"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
(
this
.
currentEditSuggestion
),
});
},
async
handleDelete
(
s
)
{
const
params
=
{
dataList
:
s
,
tableName
:
TABLE_NAME
,
};
await
window
.
GAMS
.
Util
.
invokeServer
({
path
:
"baseData/data/batch/remove"
,
type
:
"POST"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
(
params
),
});
this
.
getSuggestionOptions
();
},
async
getSuggestionOptions
()
{
console
.
log
(
"========"
);
const
res
=
await
window
.
GAMS
.
Util
.
invokeServer
({
path
:
"bpm/bill/action/list"
,
type
:
"POST"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
({
tableName
:
TABLE_NAME
,
pagination
:
false
,
searchKey
:
""
,
queryDataStructure
:
"ALL_WITH_REF"
,
stopflag
:
-
1
,
authType
:
"NONE"
,
}),
});
this
.
suggestionOption
=
((
res
&&
res
.
rows
)
||
[]).
map
((
o
,
index
)
=>
({
...
o
,
index
:
index
+
1
,
tableName
:
TABLE_NAME
,
}));
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.suggestion-wrapper
{
display
:
block
;
.label
{
width
:
auto
;
display
:
inline-block
;
height
:
40px
;
line-height
:
40px
;
font-size
:
16px
;
text-align
:
left
;
float
:
left
;
}
.options
{
float
:
right
;
height
:
40px
;
width
:
60px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.input-wrapper
{
clear
:
both
;
padding-left
:
0px
;
.suggestion-button-wrapper
{
display
:
flex
;
flex-wrap
:
wrap
;
padding-top
:
12px
;
max-height
:
84px
;
overflow
:
hidden
;
.suggestion-button
{
cursor
:
pointer
;
height
:
28px
;
padding
:
0px
11px
;
margin
:
0px
8px
8px
0px
;
border-radius
:
3px
;
position
:
relative
;
.delete-icon
{
width
:
12px
;
height
:
12px
;
font-size
:
10px
;
color
:
red
;
position
:
absolute
;
top
:
-10px
;
right
:
-6px
;
}
.text
{
height
:
28px
;
max-width
:
140px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
line-height
:
28px
;
}
}
}
}
}
.suggestion-edit-table-popper
[
style
]
{
z-index
:
3000
!important
;
}
.suggestion-option-modal
{
.header
{
text-align
:
left
;
height
:
22px
;
font-size
:
16px
;
font-weight
:
500
;
color
:
#0f0f0f
;
line-height
:
22px
;
}
.el-dialog__header
{
border-bottom
:
1px
solid
#e5e5e5
;
}
.el-dialog__body
{
overflow-y
:
scroll
;
padding-top
:
20px
;
.suggestion-modal-toolbar
{
padding-bottom
:
4px
;
display
:
flex
;
justify-content
:
space-between
;
.button-wrapper
{
flex
:
1
;
display
:
flex
;
justify-content
:
flex-end
;
}
}
.ivu-table-header
thead
tr
th
{
padding
:
5px
0px
;
}
.ivu-table-small
td
{
padding
:
5px
0px
;
}
.ivu-table-cell
{
padding
:
0
10px
;
}
.suggestion-edit-button
{
color
:
#5369d8
;
}
}
}
</
style
>
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/control/util/dynamic-from-common.less
0 → 100644
View file @
873ed2e6
.input-height{
/deep/.ivu-input-default{
height: 100%;
}
}
.input-center{
/deep/.ivu-input-default{
text-align: center;
}
}
.input-left{
/deep/.ivu-input-default{
text-align: left;
}
}
.input-right{
/deep/.ivu-input-default{
text-align: right;
}
}
.input-control-wrapper{
display: inline-block;
width: 100%;
position: relative;
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/control/vxeTableExpand/SubjectControl.vue
0 → 100644
View file @
873ed2e6
<
template
>
<div
class=
"input-control-wrapper"
>
<!--
<SubjectModalTree
v-if=
"!isContent && controlDisplay"
:systemFlag=
"systemFlag"
:nodeKey=
"nodeKey"
:multiple=
"define.config.multiple"
:placeholder=
"define.config.placeholder"
:entryTitle=
"define.config.title"
:modalName=
"define.config.title"
:onlyChooseLeaf=
"define.config.isLeaf"
:defaultExpandAll=
"defaultExpandAll"
:lazy=
"lazy"
:customListFunc=
"customListFunc"
:customTreeFunc=
"customTreeFunc"
:value=
"value"
@
on-subject-selected=
"subjectSelectedHandler"
/>
<div
v-if=
"isContent"
>
{{
getValue
()
}}
</div>
-->
</div>
</
template
>
<
script
>
import
input
from
"../util/bc_input.js"
;
/* import { SubjectModalTree } from "@yhs/components"; */
export
default
{
mixins
:
[
input
],
/* components: {
SubjectModalTree,
}, */
props
:
{
rowIndex
:
{
type
:
Number
,
default
:
-
1
,
},
isVxe
:
{},
},
data
()
{
return
{
systemFlag
:
"finance"
,
nodeKey
:
"code"
,
multiple
:
false
,
defaultExpandAll
:
false
,
lazy
:
false
,
value
:
""
,
};
},
methods
:
{
stopPropagation
(
event
)
{
event
.
stopPropagation
()
},
subjectSelectedHandler
(
selectedObj
)
{
console
.
log
(
selectedObj
)
const
code
=
selectedObj
.
code
;
const
name
=
selectedObj
.
name
||
selectedObj
.
title
let
nv
=
code
+
" "
+
name
;
this
.
value
=
code
;
this
.
setDataObjectValue
(
nv
);
},
customListFunc
(
callback
)
{
GMS
.
$http
.
post
(
"/rbc/acct-sys/subject/list"
,
{
pagination
:
false
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
let
data
=
res
.
data
.
data
.
rows
;
callback
(
data
);
});
},
customTreeFunc
(
callback
)
{
GMS
.
$http
.
post
(
"/rbc/acct-sys/subject/tree"
,
{
pagination
:
false
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
let
data
=
res
.
data
.
data
;
callback
(
data
);
});
},
getSubjectDataList
()
{},
getSubjectDataTree
()
{},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
@import
"../util/dynamic-from-common.less"
;
.input-control-wrapper
{
/deep/
.ivu-input-suffix
{
z-index
:
999
;
}
/
deep
/
.ivu-input-suffix
i
{
position
:
relative
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
}
}
</
style
>
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/control/vxeTableExpand/VxeSubjectControl.js
0 → 100644
View file @
873ed2e6
import
SubjectControl
from
'./SubjectControl.vue'
export
default
{
renderEdit
:(
h
,
renderOpts
,
params
,
hide
)
=>
{
const
{
row
,
column
,
rowIndex
}
=
params
;
let
props
=
column
.
editRender
.
props
;
let
define
=
props
.
define
;
let
context
=
props
.
context
;
return
[
h
(
SubjectControl
,
{
class
:
"InputControl"
,
attrs
:{
id
:
props
.
id
},
props
:
{
define
:
define
,
context
:
context
,
rowIndex
:
rowIndex
,
isVxe
:{
width
:
props
.
colItem
.
width
,
height
:
props
.
colItem
.
height
}
},
on
:
{},
})
]
}
}
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
873ed2e6
...
...
@@ -84,6 +84,7 @@ import IntroduceInputControl from './control/IntroduceInputControl.vue'
import
InputModalControl
from
'./control/InputModalControl.vue'
import
TabContainer
from
'./control/tab-container/tab-container.vue'
import
Achievements
from
'./control/vxe-achievements/achievements.vue'
import
VxeSubjectControl
from
'./control/vxeTableExpand/VxeSubjectControl.js'
//formula
import
GeneralImportFile
from
'./formula/GeneralImportFile.js'
;
...
...
@@ -265,7 +266,8 @@ export default {
IntroduceInputControl
,
InputModalControl
,
TabContainer
,
Achievements
Achievements
,
VxeSubjectControl
},
formula
:
{
SubTableSetBaseData
,
...
...
develop/@gms/gms-plugin-billexpand/src/plugin.js
View file @
873ed2e6
...
...
@@ -5,6 +5,9 @@ import '@rbc/icon/iconfont'
import
'@rbc/icon/iconfont.css'
import
'@rbc/icon/icon.css'
import
'./styles/common/normalize.less'
import
'@yhs/icon/iconfont.css'
import
'@yhs/icon/iconfont.js'
import
'@yhs/icon/icon.css'
(
function
()
{
if
(
window
.
__rcb_bjcawebsign__
)
return
...
...
@@ -27,6 +30,7 @@ import './styles/common/normalize.less'
})
})()
export
default
{
install
:
function
(){
GMS
.
getContext
().
getCollector
().
addElements
(
mcon
);
// 收集所有配置文件
...
...
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