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
4c136981
Commit
4c136981
authored
May 05, 2022
by
qiaoyanqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://nvwa.jiuqi.com.cn/gitlab/GFP/RBC/rbc-frontend
into develop
parents
f9de611b
699dc9ef
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
129 additions
and
27 deletions
+129
-27
BJCAWebsign.js
develop/@gms/gms-plugin-billexpand/src/BJCAWebsign.js
+10
-6
printActionNew.js
.../@gms/gms-plugin-billexpand/src/actions/printActionNew.js
+6
-0
index.js
develop/@gms/gms-plugin-billexpand/src/actions/util/index.js
+18
-5
verifySignature.js
...@gms/gms-plugin-billexpand/src/actions/verifySignature.js
+12
-0
electronic-signature.vue
...illexpand/src/components-control/electronic-signature.vue
+1
-4
constant.js
develop/@gms/gms-plugin-billexpand/src/constant.js
+5
-0
signature-list.vue
...@gms/gms-plugin-billexpand/src/control/signature-list.vue
+50
-10
emcon.js
develop/@gms/gms-plugin-billexpand/src/emcon.js
+12
-0
mcon.js
develop/@gms/gms-plugin-billexpand/src/mcon.js
+3
-1
utils.js
develop/@gms/gms-plugin-billexpand/src/utils.js
+12
-1
No files found.
develop/@gms/gms-plugin-billexpand/src/BJCAWebsign.js
View file @
4c136981
...
...
@@ -48,25 +48,29 @@ export function btnVerifySync(stampID, orgdata, signdata) {
var
sVerifyResult
;
var
sVerifyResult
=
sealSync
.
Verify
(
orgdata
,
signdata
);
if
(
sVerifyResult
==
true
||
sVerifyResult
==
'true'
)
{
return
true
}
else
if
(
sVerifyResult
==
false
||
sVerifyResult
==
'false'
)
{
return
return
false
}
else
{
//当前接口不存在,客户端版本不匹配
alert
(
$_$METHOD_NOT_EXIST
);
return
;
return
false
}
}
export
function
getVerifyImage
(
stampID
,
orgdata
,
signdata
)
{
btnVerifySync
(
stampID
,
orgdata
,
signdata
)
//获取验证图片
let
ret
=
sealSync
.
GetStampPicAfterVerified
();
if
(
typeof
(
ret
)
==
"undefined"
){
//当前接口不存在,客户端版本不匹配
alert
(
$_$METHOD_NOT_EXIST
);
return
;
throw
new
Error
(
$_$METHOD_NOT_EXIST
)
}
else
if
(
ret
!=
""
)
{
return
"data:image/gif;base64,"
+
ret
return
ret
}
else
{
//获取错误信息,并弹框显示
ret
=
sealSync
.
$GetLastErr
();
alert
(
ret
);
throw
new
Error
(
ret
)
}
}
...
...
develop/@gms/gms-plugin-billexpand/src/actions/printActionNew.js
View file @
4c136981
import
printBill
from
'../control/printBill.vue'
import
{
verifyBill
}
from
'./util'
export
default
{
execute
:
function
(
bill
,
param
)
{
if
(
param
)
{
if
(
!
verifyBill
(
bill
))
{
GMS
.
$hideContainer
.
$Message
.
error
(
'验签失败'
)
return
}
GMS
.
$hideContainer
.
addComponent
(
printBill
,
{},
function
(
c
)
{
c
.
billId
=
bill
.
getMasterData
().
getValue
(
'id'
);
c
.
billDefineName
=
param
.
define
;
...
...
develop/@gms/gms-plugin-billexpand/src/actions/util/index.js
View file @
4c136981
...
...
@@ -2,6 +2,7 @@ import {
SIGNATURE_TABLE_NAME
,
SIGNATURE_TABLE
,
BILL_GLOBAL_PARAM
,
GLOBAL_EVENT
,
}
from
'../../constant'
import
{
getValueListString
}
from
'../../utils'
import
{
btnVerifySync
}
from
'../../BJCAWebsign'
...
...
@@ -55,6 +56,12 @@ export const showSignModal = (bill, param, nodeName) => {
subDataObj
[
subDataIndex
].
setValue
(
SIGNATURE_TABLE
.
NODE_NAME
,
nodeName
,
null
,
'none'
)
subDataObj
[
subDataIndex
].
setValue
(
SIGNATURE_TABLE
.
CREATE_TIME
,
operateTime
,
null
,
'none'
)
subDataObj
[
subDataIndex
].
setValue
(
SIGNATURE_TABLE
.
SIGN_IMAGE
,
imgData
,
null
,
'none'
)
subDataObj
[
subDataIndex
].
setValue
(
SIGNATURE_TABLE
.
PROTECT_FIELDS
,
JSON
.
stringify
(
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
SIGNATURE_FIELDS
)),
null
,
'none'
)
bill
.
refreshSubDataRow
(
SIGNATURE_TABLE_NAME
)
}
...
...
@@ -94,14 +101,20 @@ export const showSignModal = (bill, param, nodeName) => {
}
export
const
verifyBill
=
(
bill
)
=>
{
const
fields
=
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
SIGNATURE_FIELDS
)
if
(
!
fields
)
return
true
const
valueString
=
getValueListString
(
bill
,
fields
)
const
dataObjList
=
bill
.
getSubData
(
SIGNATURE_TABLE_NAME
)
if
(
!
(
dataObjList
instanceof
Array
&&
dataObjList
.
length
))
return
true
const
valueString
=
getValueListString
(
bill
)
if
(
dataObjList
instanceof
Array
)
{
const
dataObj
=
dataObjList
[
dataObjList
.
length
-
1
]
const
tmp
=
btnVerifySync
(
dataObj
.
getValue
(
SIGNATURE_TABLE
.
CREATE_TIME
),
valueString
,
dataObj
.
getValue
(
SIGNATURE_TABLE
.
SIGNATURE_VALUE
))
return
tmp
const
flag
=
btnVerifySync
(
dataObj
.
getValue
(
SIGNATURE_TABLE
.
CREATE_TIME
),
valueString
,
dataObj
.
getValue
(
SIGNATURE_TABLE
.
SIGNATURE_VALUE
)
)
if
(
!
flag
)
{
window
.
GMS
.
vbus
.
$emit
(
GLOBAL_EVENT
.
VERIFY_SIGNATURE_FAIL
,
window
.
nros
.
getCurrTag
())
}
return
flag
}
return
true
}
develop/@gms/gms-plugin-billexpand/src/actions/verifySignature.js
0 → 100644
View file @
4c136981
import
{
verifyBill
}
from
'./util'
export
default
{
execute
:
function
(
bill
,
param
)
{
if
(
verifyBill
(
bill
))
{
GMS
.
$hideContainer
.
$Message
.
success
(
'验签成功'
)
}
else
{
GMS
.
$hideContainer
.
$Message
.
error
(
'验签失败'
)
}
}
}
develop/@gms/gms-plugin-billexpand/src/components-control/electronic-signature.vue
View file @
4c136981
...
...
@@ -11,7 +11,6 @@
<
script
>
import
{
getValueListString
}
from
'../utils'
import
{
positionSignSync
,
OnceStartSign
}
from
'../BJCAWebsign'
import
{
BILL_GLOBAL_PARAM
}
from
'../constant'
;
export
default
{
props
:
{
...
...
@@ -19,7 +18,6 @@ export default {
},
data
()
{
return
{
signatureFields
:
[],
imgData
:
null
,
operateTime
:
null
,
valueString
:
null
,
...
...
@@ -34,12 +32,11 @@ export default {
this
.
imgData
=
null
this
.
operateTime
=
null
this
.
valueString
=
null
this
.
signatureFields
=
this
.
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
SIGNATURE_FIELDS
)
},
getSign
(
type
)
{
try
{
this
.
operateTime
=
Date
.
now
()
this
.
valueString
=
getValueListString
(
this
.
bill
,
this
.
signatureFields
)
this
.
valueString
=
getValueListString
(
this
.
bill
)
const
signData
=
type
===
'writingPad'
?
OnceStartSign
()
:
null
const
{
imgData
,
...
...
develop/@gms/gms-plugin-billexpand/src/constant.js
View file @
4c136981
...
...
@@ -5,8 +5,13 @@ export const SIGNATURE_TABLE = {
NODE_NAME
:
'nodeName'
,
CREATE_TIME
:
'createTime'
,
SIGN_IMAGE
:
'signImage'
,
PROTECT_FIELDS
:
'guardFields'
,
}
export
const
BILL_GLOBAL_PARAM
=
{
SIGNATURE_FIELDS
:
'signatureFields'
,
}
export
const
GLOBAL_EVENT
=
{
VERIFY_SIGNATURE_FAIL
:
'verifySignatureFail'
,
}
develop/@gms/gms-plugin-billexpand/src/control/signature-list.vue
View file @
4c136981
...
...
@@ -20,14 +20,19 @@ import {
SIGNATURE_TABLE_NAME
,
SIGNATURE_TABLE
,
BILL_GLOBAL_PARAM
,
GLOBAL_EVENT
,
}
from
'../constant'
import
{
getValueListString
}
from
'../utils'
import
{
getVerifyImage
}
from
'../BJCAWebsign'
export
default
{
data
()
{
return
{
imgData
:
null
,
signatureTableData
:
[],
signatureNode
:
[],
tagId
:
null
,
}
},
props
:
{
...
...
@@ -37,10 +42,54 @@ export default {
},
context
:
{
type
:
Object
,
default
:
()
=>
{
}
default
:
()
=>
{
}
,
}
},
computed
:
{
},
mounted
()
{
this
.
tagId
=
window
.
nros
.
getCurrTag
()
window
.
GMS
.
vbus
.
$on
(
GLOBAL_EVENT
.
VERIFY_SIGNATURE_FAIL
,
this
.
loadVerifiedImage
)
let
protectFields
=
this
.
context
.
settings
.
content
.
signatureConfig
&&
this
.
context
.
settings
.
content
.
signatureConfig
.
fields
const
masterTableName
=
this
.
context
.
bill
.
getTableType
(
'masterName'
).
name
if
(
!
protectFields
||
!
protectFields
.
length
)
{
protectFields
=
[{
title
:
'billCode'
,
field
:
masterTableName
+
'.billCode'
}]
}
this
.
context
.
bill
.
setGlobalParam
(
BILL_GLOBAL_PARAM
.
SIGNATURE_FIELDS
,
protectFields
)
this
.
getSignatureTableData
()
this
.
initSignatureImg
()
},
beforeDestroy
()
{
window
.
GMS
.
vbus
.
$off
(
GLOBAL_EVENT
.
VERIFY_SIGNATURE_FAIL
,
this
.
loadVerifiedImage
)
},
methods
:{
loadVerifiedImage
(
tagId
)
{
if
(
tagId
!=
this
.
tagId
)
return
const
valueString
=
getValueListString
(
this
.
context
.
bill
)
this
.
signatureNode
=
this
.
signatureTableData
.
map
((
dataObj
)
=>
{
let
verifyImage
try
{
verifyImage
=
getVerifyImage
(
dataObj
.
getValue
(
SIGNATURE_TABLE
.
CREATE_TIME
),
valueString
,
dataObj
.
getValue
(
SIGNATURE_TABLE
.
SIGNATURE_VALUE
)
)
}
catch
(
error
)
{
GMS
.
$hideContainer
.
$message
.
error
(
error
)
}
return
{
name
:
dataObj
.
getValue
(
SIGNATURE_TABLE
.
NODE_NAME
),
src
:
'data:image/gif;base64,'
+
verifyImage
,
}
})
},
getSignatureTableData
()
{
const
dataObj
=
this
.
context
.
bill
.
getSubData
(
SIGNATURE_TABLE_NAME
)
if
(
dataObj
instanceof
Array
)
{
...
...
@@ -59,15 +108,6 @@ export default {
})
}
},
mounted
()
{
this
.
context
.
bill
.
setGlobalParam
(
BILL_GLOBAL_PARAM
.
SIGNATURE_FIELDS
,
this
.
define
.
config
.
fields
)
this
.
getSignatureTableData
()
this
.
initSignatureImg
()
},
computed
:
{
},
beforeDestroy
()
{
},
}
</
script
>
...
...
develop/@gms/gms-plugin-billexpand/src/emcon.js
View file @
4c136981
...
...
@@ -2039,6 +2039,18 @@ export default {
"path"
:
"资产/通用"
,
"extends"
:
{
"param"
:
[
]
},
"description"
:
""
,
"title"
:
"验签[CW_verifySignature]"
,
"value"
:
"CW_verifySignature"
,
"alwaysUse"
:
true
,
},
{
"discard"
:
false
,
"path"
:
"资产/通用"
,
"extends"
:
{
"param"
:
[
{
"ref"
:
"BillClassVO.all"
,
"type"
:
"field"
,
...
...
develop/@gms/gms-plugin-billexpand/src/mcon.js
View file @
4c136981
...
...
@@ -40,6 +40,7 @@ import relateInvoiceAction from './actions/relateInvoiceAction.js'
import
deleteInvoiceAction
from
'./actions/deleteInvoiceAction.js'
import
saveActionBXD
from
'./actions/saveActionBXD'
;
import
lincaoAddView
from
'./actions/lincaoAddView'
;
import
CW_verifySignature
from
'./actions/verifySignature'
;
import
lincaoReadView
from
'./actions/lincaoReadView'
;
//queryAction
...
...
@@ -245,7 +246,8 @@ export default {
CW_submitAction
,
CW_closeAction
,
CW_imageView
,
saveActionBXD
saveActionBXD
,
CW_verifySignature
,
},
billControl
:
{
applyDetail
,
...
...
develop/@gms/gms-plugin-billexpand/src/utils.js
View file @
4c136981
import
{
SIGNATURE_TABLE_NAME
,
BILL_GLOBAL_PARAM
,
SIGNATURE_TABLE
}
from
'./constant'
/**
* 请求基础数据
* @param {string} tableName 基础数据表名
...
...
@@ -35,7 +41,12 @@ export const getBaseData = (tableName, param = {}) => {
/**
* 从bill中根据字段列表取值,拼字符串
*/
export
const
getValueListString
=
(
bill
,
list
)
=>
{
export
const
getValueListString
=
(
bill
)
=>
{
let
list
=
bill
.
getGlobalParam
(
BILL_GLOBAL_PARAM
.
SIGNATURE_FIELDS
)
const
signatureTable
=
bill
.
getSubData
(
SIGNATURE_TABLE_NAME
)
if
(
signatureTable
instanceof
Array
&&
signatureTable
.
length
)
{
list
=
JSON
.
parse
(
signatureTable
[
0
].
getValue
(
SIGNATURE_TABLE
.
PROTECT_FIELDS
))
}
const
isDateType
=
(
fieldName
,
tableType
)
=>
{
for
(
let
attribute
of
tableType
.
attributes
)
{
...
...
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