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
1b38324c
Commit
1b38324c
authored
May 17, 2022
by
Joey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(@gms/gms-plugin-billexpand): 工会预算按钮
parent
421a62e9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
254 additions
and
695 deletions
+254
-695
gh_agreeAction.js
...ugin-billexpand/src/actions/labourUnion/gh_agreeAction.js
+36
-104
gh_rejectAction.js
...gin-billexpand/src/actions/labourUnion/gh_rejectAction.js
+62
-77
gh_submitAction.js
...gin-billexpand/src/actions/labourUnion/gh_submitAction.js
+9
-4
index.js
develop/@gms/gms-plugin-billexpand/src/actions/util/index.js
+43
-0
typesBill.vue
...ms-plugin-billexpand/src/components-control/typesBill.vue
+3
-0
approval-user-control.vue
...c/control/approval-user-control/approval-user-control.vue
+62
-45
approvalOpinionControl.vue
...-plugin-billexpand/src/control/approvalOpinionControl.vue
+0
-465
run.sh
develop/run.sh
+39
-0
No files found.
develop/@gms/gms-plugin-billexpand/src/actions/labourUnion/gh_agreeAction.js
View file @
1b38324c
import
Bridge
from
'../../components-control/util/bridge'
import
SelectApprovers
from
'../../components-control/select-approvers.vue'
import
{
compareData
}
from
"../../components-control/util/dataChange"
import
{
s
howSignModal
,
saveBill
,
verifyBil
l
}
from
'../util'
import
{
s
aveBill
,
verifyBill
,
showCommentModa
l
}
from
'../util'
import
{
BILL_GLOBAL_PARAM
}
from
'../../constant'
export
default
{
execute
:
function
(
bill
,
param
)
{
bill
=
bill
.
dom
||
bill
if
(
bill
)
{
if
(
!
verifyBill
(
bill
))
{
GMS
.
$hideContainer
.
$Message
.
error
(
'验签失败'
)
return
}
if
(
!
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
)
||
!
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
taskId
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
return
}
if
(
!
this
.
isApproverEqulloginer
(
bill
,
param
))
{
GMS
.
$hideContainer
.
$Message
.
error
(
'单据审批状态已发生变化,请刷新界面'
)
return
}
// if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
// GMS.$hideContainer.$Message.error('请配置审批轨迹')
// return
// }
// if (!this.isApproverEqulloginer(bill, param)) {
// GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面')
// return
// }
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
const
dataChangeFlag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
const
noRunTimeFormula
=
bill
.
getGlobalParam
(
"noRunTimeFormula"
)
if
(
noRunTimeFormula
)
{
...
...
@@ -67,63 +71,12 @@ export default {
},
approvalLogical
:
function
(
bill
,
param
)
{
const
getApprovalList
=
()
=>
{
const
setApprover
=
(
data
)
=>
{
bill
.
getMasterData
().
setValue
(
'APPROVERPROPERTIES'
,
data
,
null
,
'none'
)
}
let
taskId
=
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
taskId
;
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
let
selectedApprovers
=
[]
window
.
GMS
.
$http
.
get
(
`/bpm/bill/selectApprover/ApproverList/
${
taskId
}
`
).
then
((
res
)
=>
{
setApprover
(
null
)
if
(
res
.
data
.
code
==
204
)
{
this
.
executeApproval
(
bill
,
param
)
return
}
else
if
(
res
.
data
.
code
!=
200
)
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
GMS
.
$hideContainer
.
$Message
.
error
(
res
.
data
.
msg
||
'提交失败,请联系系统管理员'
);
return
}
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
const
nodeData
=
res
.
data
.
ApproverVo
const
optionList
=
[...
nodeData
.
approvers
]
if
(
optionList
.
length
==
0
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
'未找到下一节点的审批人'
)
return
}
GMS
.
$hideContainer
.
$Modal
.
confirm
({
width
:
700
,
render
:
(
h
)
=>
{
return
h
(
SelectApprovers
,
{
props
:
{
optionList
,
},
on
:
{
'on-change'
:
(
val
)
=>
{
selectedApprovers
=
val
}
}
}
)
},
onOk
:
()
=>
{
const
data
=
JSON
.
stringify
({
...
nodeData
,
approvers
:
selectedApprovers
,
})
setApprover
(
data
)
this
.
executeApproval
(
bill
,
param
)
},
onCancel
:
()
=>
{
}
});
const
fn
=
()
=>
{
showCommentModal
(
bill
,
param
).
then
(()
=>
{
this
.
executeApproval
(
bill
,
param
)
}).
catch
(()
=>
{
GMS
.
$hideContainer
.
$Message
.
error
(
'未找到下一节点的审批人'
);
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
})
}
...
...
@@ -133,7 +86,7 @@ export default {
}
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
)
{
if
(
code
===
200
)
{
getApprovalList
()
fn
()
}
else
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
if
(
data
.
message
.
includes
(
'还款金额不能大于未还金额'
))
{
...
...
@@ -145,7 +98,7 @@ export default {
}
}.
bind
(
this
));
}
else
{
getApprovalList
()
fn
()
}
},
executeApproval
:
function
(
bill
,
param
)
{
...
...
@@ -155,10 +108,22 @@ export default {
?
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
suggestions
:
''
;
if
(
!
comments
)
{
comments
=
'同意'
bill
.
setGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
,
{
taskId
,
suggestions
:
comments
})
}
const
fn
=
()
=>
{
saveBill
(
bill
,
param
).
then
(()
=>
{
GMS
.
$http
.
post
(
'/rbc/workflow/approve/completed/'
+
taskId
+
'?result=1&comments='
+
comments
).
then
(
GMS
.
$http
.
post
(
`/rbc/bill/action/zgh/change/work/
${
param
.
define
}
/bill.Basic.accept`
,
{
approvalComments
:
comments
}
).
then
(
function
(
response
)
{
console
.
log
(
'response'
,
response
)
if
(
response
.
status
==
200
||
response
.
statusText
==
'OK'
)
{
if
(
response
.
data
.
code
!=
0
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
response
.
data
.
message
)
...
...
@@ -193,39 +158,7 @@ export default {
})
}
window
.
GMS
.
$http
.
get
(
`/rbc/workflow/signatureConfig/
${
taskId
}
`
).
then
((
res
)
=>
{
const
{
isUseSignature
,
nodeName
}
=
res
.
data
&&
res
.
data
.
data
||
{}
if
(
isUseSignature
)
{
showSignModal
(
bill
,
param
,
nodeName
).
then
(
fn
).
catch
((
err
)
=>
{
if
(
err
)
console
.
error
(
err
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
})
}
else
{
fn
()
}
})
return
fn
()
},
isApproverEqulloginer
:
function
(
bill
,
param
)
{
const
loginer
=
GMS
.
userContext
&&
GMS
.
userContext
.
id
||
window
.
nros
.
getUser
().
conetxtUser
.
id
;
let
approver
=
[]
$
.
ajax
({
type
:
"GET"
,
url
:
`
${
osConfig
.
baseUrl
}
/rbc/workflow/confirmApprover/getUserId/
${
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
taskId
}
`
,
async
:
false
,
contentType
:
"application/json;"
,
beforeSend
:
function
(
request
)
{
request
.
setRequestHeader
(
"Authorization"
,
GMS
.
util
.
getAuthorization
());
},
success
:
function
(
data1
)
{
approver
=
data1
.
ownerIds
},
error
:
function
()
{
}
})
return
approver
.
includes
(
loginer
)
}
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/actions/labourUnion/gh_rejectAction.js
View file @
1b38324c
import
Bridge
from
'../../components-control/util/bridge'
import
{
compareData
}
from
"../../components-control/util/dataChange"
import
{
SIGNATURE_TABLE_NAME
,
BILL_GLOBAL_PARAM
}
from
'../../constant'
import
{
saveBill
}
from
'../util'
import
{
saveBill
,
showCommentModal
}
from
'../util'
export
default
{
execute
:
function
(
bill
,
param
)
{
if
(
bill
){
if
(
!
this
.
isApproverEqulloginer
(
bill
,
param
))
{
GMS
.
$hideContainer
.
$Message
.
error
(
'单据审批状态已发生变化,请刷新界面'
)
return
}
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]?
GMS
.
oldBillDataMap
[
curTagId
]:
GMS
.
oldBillData
;
let
flag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
||
bill
.
getGlobalParam
(
"noRunTimeFormula"
);
if
(
flag
)
{
this
.
approvalLogical
(
bill
,
param
,
this
)
}
else
{
GMS
.
$hideContainer
.
$Modal
.
confirm
({
title
:
"信息提示"
,
content
:
"信息发生变化, 是否保存"
,
onOk
:
()
=>
{
saveBill
(
bill
,
param
).
then
(()
=>
{
this
.
approvalLogical
(
bill
,
param
)
})
},
onCancel
:
()
=>
{
}
})
}
}
else
{
GMS
.
$hideContainer
.
$Message
.
error
(
'缺少参数'
);
if
(
bill
)
{
bill
=
bill
.
dom
||
bill
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
let
oldObj
=
curTagId
&&
GMS
.
oldBillDataMap
[
curTagId
]
?
GMS
.
oldBillDataMap
[
curTagId
]
:
GMS
.
oldBillData
;
let
flag
=
compareData
(
oldObj
,
bill
.
getBuillData
())
||
bill
.
getGlobalParam
(
"noRunTimeFormula"
);
if
(
flag
)
{
this
.
approvalLogical
(
bill
,
param
,
this
)
}
else
{
GMS
.
$hideContainer
.
$Modal
.
confirm
({
title
:
"信息提示"
,
content
:
"信息发生变化, 是否保存"
,
onOk
:
()
=>
{
saveBill
(
bill
,
param
).
then
(()
=>
{
this
.
approvalLogical
(
bill
,
param
)
})
},
onCancel
:
()
=>
{
}
})
}
}
else
{
GMS
.
$hideContainer
.
$Message
.
error
(
'缺少参数'
);
}
},
approvalLogical
:
function
(
bill
,
param
)
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
false
)
if
(
param
.
param
.
actions
){
let
saveParam
=
{
actions
:
param
.
param
.
actions
,
if
(
param
.
param
.
actions
)
{
let
saveParam
=
{
actions
:
param
.
param
.
actions
,
}
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
)
{
if
(
code
===
200
)
{
this
.
approval
(
bill
,
param
);
}
else
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
GMS
.
$hideContainer
.
$message
.
error
(
"操作异常请联系管理员"
);
}
bill
.
executeServerAction
(
saveParam
,
function
(
code
,
data
){
if
(
code
===
200
){
this
.
approval
(
bill
,
param
);
}
else
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
GMS
.
$hideContainer
.
$message
.
error
(
"操作异常请联系管理员"
);
}
}.
bind
(
this
));
}.
bind
(
this
));
}
else
{
this
.
approval
(
bill
,
param
);
this
.
approval
(
bill
,
param
);
}
},
approval
:
function
(
bill
,
param
){
if
(
!
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
)
||
!
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
taskId
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
'请配置审批轨迹'
)
return
}
let
taskId
=
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
taskId
;
approval
:
function
(
bill
,
param
)
{
const
fn
=
()
=>
{
let
comments
=
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
suggestions
?
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
suggestions
:
''
?
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
suggestions
:
''
bill
.
clearSubDatas
(
SIGNATURE_TABLE_NAME
)
saveBill
(
bill
,
param
).
then
(()
=>
{
GMS
.
$http
.
post
(
'/rbc/workflow/approve/completed/'
+
taskId
+
'?result=3&comments='
+
comments
).
then
(
function
(
response
)
{
GMS
.
$http
.
post
(
`/rbc/bill/action/zgh/change/work/
${
param
.
define
}
/bill.Basic.accept`
,
{
approvalComments
:
comments
},
).
then
(
function
(
response
)
{
if
(
response
.
status
==
200
||
response
.
statusText
==
'OK'
)
{
if
(
response
.
data
.
code
!=
0
)
{
GMS
.
$hideContainer
.
$Message
.
error
(
response
.
data
.
message
)
return
}
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
();
GMS
.
vbus
.
$emit
(
'change-form-state'
,
{
state
:
'readOnly'
},
curTagId
)
GMS
.
vbus
.
$emit
(
'change-form-state'
,
{
state
:
'readOnly'
},
curTagId
)
GMS
.
$hideContainer
.
$Message
.
success
(
'驳回成功!'
)
if
(
window
.
osConfig
.
appOpenMode
&&
...
...
@@ -88,32 +86,20 @@ export default {
}
}.
bind
(
this
)
)
.
catch
(
function
(
error
)
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
tru
e
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
fals
e
)
GMS
.
$hideContainer
.
$Message
.
error
(
'工作流配置错误,请联系管理员'
)
}.
bind
(
this
)
);
.
catch
(
function
(
error
)
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
fals
e
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
tru
e
)
GMS
.
$hideContainer
.
$Message
.
error
(
'工作流配置错误,请联系管理员'
)
}.
bind
(
this
)
);
})
}
showCommentModal
(
bill
,
param
,
true
).
then
(
fn
).
catch
((
error
)
=>
{
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
})
},
isApproverEqulloginer
:
function
(
bill
,
param
)
{
const
loginer
=
GMS
.
userContext
&&
GMS
.
userContext
.
id
||
window
.
nros
.
getUser
().
conetxtUser
.
id
;
let
approver
=
[]
$
.
ajax
({
type
:
"GET"
,
url
:
`
${
osConfig
.
baseUrl
}
/rbc/workflow/confirmApprover/getUserId/
${
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
taskId
}
`
,
async
:
false
,
contentType
:
"application/json;"
,
beforeSend
:
function
(
request
)
{
request
.
setRequestHeader
(
"Authorization"
,
GMS
.
util
.
getAuthorization
());
},
success
:
function
(
data1
)
{
approver
=
data1
.
ownerIds
},
error
:
function
()
{
}
})
return
approver
.
includes
(
loginer
)
}
}
\ No newline at end of file
develop/@gms/gms-plugin-billexpand/src/actions/labourUnion/gh_submitAction.js
View file @
1b38324c
...
...
@@ -4,6 +4,8 @@ import { showSignModal, saveBill } from "../util";
export
default
{
execute
:
function
(
bill
,
param
)
{
bill
=
bill
.
dom
||
bill
console
.
log
(
param
,
bill
)
if
(
param
&&
param
.
param
&&
param
.
param
.
budgetcontrol
)
{
let
res
=
this
.
getBudgetControl
(
bill
,
true
,
param
);
res
.
then
((
data
)
=>
{
...
...
@@ -77,9 +79,12 @@ export default {
const
submitFn
=
()
=>
{
let
postData
=
{
data
:
bill
.
getBuillData
(),
};
let
url
=
`/rbc/bill/workflowAction/executed/
${
param
.
define
}
/workflow.submitToFlow?transmission=total`
;
window
.
GMS
.
$http
.
post
(
url
,
JSON
.
stringify
(
postData
)).
then
((
response
)
=>
{
detailData
:
[],
}
let
url
=
`/rbc/bill/action/zgh/change/work/
${
param
.
define
}
/bill.Basic.submit`
;
window
.
GMS
.
$http
.
post
(
url
,
postData
).
then
((
response
)
=>
{
console
.
log
(
'------------------------------------'
)
console
.
log
(
response
)
const
data
=
response
.
data
let
code
=
200
if
(
data
.
code
!=
0
)
{
...
...
@@ -104,8 +109,8 @@ export default {
}
}).
catch
((
err
)
=>
{
GMS
.
$hideContainer
.
$Message
.
error
(
'工作流配置错误,请联系管理员'
);
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"loading"
,
false
)
bill
.
setControlsSate
(
param
[
"_control_name_"
],
"enable"
,
true
)
})
}
...
...
develop/@gms/gms-plugin-billexpand/src/actions/util/index.js
View file @
1b38324c
...
...
@@ -7,6 +7,7 @@ import {
import
{
getValueListString
}
from
'../../utils'
import
{
btnVerifySync
}
from
'../../BJCAWebsign'
import
ElectronicSignature
from
'../../components-control/electronic-signature.vue'
import
ApprovalUserControl
from
'../../control/approval-user-control/approval-user-control.vue'
export
const
saveBill
=
(
bill
,
param
,
postData
)
=>
{
if
(
!
postData
)
{
...
...
@@ -122,6 +123,48 @@ export const showSignModal = (bill, param, nodeName) => {
})
}
export
const
showCommentModal
=
(
bill
,
param
,
checkComment
)
=>
{
const
h
=
GMS
.
$hideContainer
.
$createElement
const
vNode
=
h
(
ApprovalUserControl
,
{
props
:
{
define
:
{
isModal
:
true
,
config
:
{
placeholder
:
'请直接输入您的意见或在下方选择常用意见'
},
},
context
:
{
bill
,
},
},
}
)
return
GMS
.
$hideContainer
.
$msgbox
({
title
:
'审批意见'
,
message
:
vNode
,
showCancelButton
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
beforeClose
:
(
action
,
instance
,
done
)
=>
{
if
(
action
===
'confirm'
)
{
let
comments
=
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
)
&&
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
APPROVAL_COMMENT
).
suggestions
if
(
comments
)
{
done
()
}
else
{
GMS
.
$hideContainer
.
$Message
.
error
(
'请输入审批意见'
)
}
}
else
{
done
()
}
}
})
}
export
const
verifyBill
=
(
bill
)
=>
{
const
dataObjList
=
bill
.
getSubData
(
SIGNATURE_TABLE_NAME
)
if
(
!
(
dataObjList
instanceof
Array
&&
dataObjList
.
length
))
return
true
...
...
develop/@gms/gms-plugin-billexpand/src/components-control/typesBill.vue
View file @
1b38324c
...
...
@@ -106,6 +106,9 @@ export default {
let
that
=
this
;
setTimeout
(()
=>
{
that
.
billClass
=
bill
;
if
(
!
GMS
.
oldBillDataMap
)
GMS
.
oldBillDataMap
=
{}
let
curTagId
=
window
.
nros
.
context
.
getCurrTag
()
curTagId
&&
(
GMS
.
oldBillDataMap
[
curTagId
]
=
bill
.
getBuillData
())
GMS
.
oldBillData
=
bill
.
getBuillData
();
that
.
oldBillData
=
bill
.
getBuillData
();
// 单据整体对象
},
100
);
...
...
develop/@gms/gms-plugin-billexpand/src/control/approval-user-control/approval-user-control.vue
View file @
1b38324c
<
template
>
<div>
<div
class=
"approval-user-control"
>
<div
v-if=
"isModal"
class=
"top-button-group"
>
<Button
@
click=
"openEditModal"
size=
"small"
>
<svg
aria-hidden=
"true"
class=
"icon"
>
<use
xlink:href=
"#icon-a-16_BILLEXPAND_C_RBC_EDIT"
></use>
</svg>
</Button>
<Button
@
click=
"handleAdd"
size=
"small"
>
<svg
aria-hidden=
"true"
class=
"icon"
>
<use
xlink:href=
"#icon-a-16_BILLEXPAND_A_RBC_ADD"
></use>
</svg>
</Button>
</div>
<div
class=
"suggestion-wrapper"
>
<div
class=
"label"
>
{{
this
.
define
.
title
}}
</div>
<div
v-if=
"!isModal"
class=
"label"
>
{{
this
.
define
.
title
}}
</div>
<div
class=
"input-wrapper"
>
<Input
v-model=
"value"
type=
"textarea"
:placeholder=
"define.config.placeholder"
:maxlength=
"240"
/>
<div
class=
"suggestion-button-wrapper"
>
...
...
@@ -31,10 +44,6 @@
</div>
</ConfirmPopover>
</div>
<!--
<div>
<Button
size=
"small"
@
click=
"suggestionOptionModal = true"
>
edit
</Button>
<Button
size=
"small"
@
click=
"handleAdd"
>
add
</Button>
</div>
-->
</div>
</div>
<el-dialog
...
...
@@ -185,6 +194,7 @@ export default {
}
},
mounted
()
{
this
.
isModal
=
this
.
define
.
isModal
this
.
reviewParam
[
'taskId'
]
=
GMS
.
workflowTaskId
this
.
taskId
=
GMS
.
workflowTaskId
;
// this.reviewParam['billid'] = this.$route.query.id;
...
...
@@ -348,52 +358,59 @@ export default {
</
script
>
<
style
lang=
"less"
>
.suggestion-wrapper
{
display
:
flex
;
.label
{
width
:
90px
;
text-align
:
right
;
.approval-user-control
{
.top-button-group
{
display
:
flex
;
padding
:
0
0
10px
15px
;
}
.input-wrapper
{
flex
:
1
;
padding-left
:
15px
;
.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
{
.suggestion-wrapper
{
display
:
flex
;
.label
{
width
:
90px
;
text-align
:
right
;
}
.input-wrapper
{
flex
:
1
;
padding-left
:
15px
;
.suggestion-button-wrapper
{
display
:
flex
;
flex-wrap
:
wrap
;
padding-top
:
12px
;
max-height
:
84px
;
overflow
:
hidden
;
.suggestion-button
{
cursor
:
pointer
;
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
;
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
;
}
...
...
develop/@gms/gms-plugin-billexpand/src/control/approvalOpinionControl.vue
deleted
100644 → 0
View file @
421a62e9
<
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/run.sh
0 → 100644
View file @
1b38324c
baseDir
=
`
pwd
`
# basedir = $(cd "$(dirname "$0")";pwd)
echo
$baseDir
for
folder
in
\
"@gms/gms-plugin-billexpand"
\
"@gms/gms-plugin-mainpage-commonfunctions"
\
"@gms/gms-plugin-mainpage-feedback"
\
"@gms/gms-plugin-mainpage-fileList"
\
"@gms/gms-plugin-mainpage-mybill"
\
"@gms/gms-plugin-mainpage-newsList"
\
"@gms/gms-plugin-mainpage-reimburseBill"
\
"@gms/gms-plugin-mainpage-reimburseExpense"
\
"@gms/gms-plugin-mainpage-workflowcard"
\
# "@gms/gms-plugin-workflow" \
# "@rbc/bill-runner-query" \
# "@rbc/control-strategy" \
# "@rbc/file-management" \
# "@rbc/invoice" \
# "@rbc/rbc-news" \
# "@rbc/runner-bill-form" \
# "@rbc/voucher-center" \
# "@rbc/welcome-page" \
# "@rbc/workflow-job-view"
do
cd
$baseDir
/
$folder
# rm package-lock.json
# npm install
npm run build-dev
# npm publish
done
\ No newline at end of file
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