Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
b9fabe56
Commit
b9fabe56
authored
May 12, 2020
by
郝珍华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bpo-admin' of gitlab.gongsibao.com:jiangyong/zhichan into bpo-admin
parents
ae2c1836
70562c90
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
611 additions
and
24 deletions
+611
-24
bpo-admin/app/base/api/impl/channelApi.js
+104
-4
bpo-admin/app/base/controller/impl/entcontractCtl.js
+24
-0
bpo-admin/app/base/controller/impl/uploadCtl.js
+2
-2
bpo-admin/app/base/db/impl/yzmerchantsignedDao.js
+16
-0
bpo-admin/app/base/db/metadata/apps/platform.js
+9
-0
bpo-admin/app/base/db/metadata/bizs/wx76a324c5d201d1a4/entcontractall2.js
+26
-0
bpo-admin/app/base/db/models/yzmerchantsigned.js
+57
-0
bpo-admin/app/base/service/impl/channelSve.js
+4
-1
bpo-admin/app/base/service/impl/entcontractSve.js
+74
-6
bpo-admin/app/base/service/impl/utilesignbaoSve.js
+147
-0
bpo-admin/app/base/service/impl/yzmerchantsignedSve.js
+11
-0
bpo-admin/app/base/system.js
+11
-3
bpo-admin/app/base/utils/ossClient.js
+2
-2
bpo-admin/app/front/vues/pages/channelmerchantmanager/channelmerchantmanager.html
+101
-5
bpo-admin/app/front/vues/pages/channelmerchantmanager/channelmerchantmanager.js
+23
-1
bpo-admin/app/front/vues/pages/entcontractall2/entcontractall2.html
+0
-0
bpo-admin/app/front/vues/pages/entcontractall2/entcontractall2.js
+0
-0
No files found.
bpo-admin/app/base/api/impl/channelApi.js
View file @
b9fabe56
...
...
@@ -14,6 +14,7 @@ class ChannelApi {
this
.
FQURL
=
settings
.
FQYF
().
pushOrderApi
;
this
.
pushfqlogSve
=
system
.
getObject
(
"service.pushfqlogSve"
)
this
.
esettleofflineSve
=
system
.
getObject
(
"service.esettleofflineSve"
)
this
.
channelService
=
system
.
getObject
(
"service.ChannelSve"
)
}
//渠道绑定
...
...
@@ -100,6 +101,105 @@ class ChannelApi {
}
//渠道添加
async
pushAddChannel
(
queryobj
,
qobj
,
req
)
{
try
{
if
(
!
queryobj
.
platform_id
){
return
system
.
getResultFail
(
-
1
,
"platform_id不能为空"
);
}
if
(
!
queryobj
.
ctype
){
return
system
.
getResultFail
(
-
1
,
"ctype不能为空"
);
}
if
(
!
queryobj
.
name
){
return
system
.
getResultFail
(
-
1
,
"name不能为空"
);
}
if
(
!
queryobj
.
idcode
){
return
system
.
getResultFail
(
-
1
,
"idcode不能为空"
);
}
if
(
queryobj
.
ctype
==
1
){
if
(
!
queryobj
.
business_license
){
return
system
.
getResultFail
(
-
1
,
"business_license不能为空"
);
}
}
else
{
if
(
!
queryobj
.
idcard_front
){
return
system
.
getResultFail
(
-
1
,
"idcard_front不能为空"
);
}
if
(
!
queryobj
.
idcard_back
){
return
system
.
getResultFail
(
-
1
,
"idcard_back不能为空"
);
}
}
if
(
!
queryobj
.
contact_man
){
return
system
.
getResultFail
(
-
1
,
"contact_man不能为空"
);
}
if
(
!
queryobj
.
contact_mobile
){
return
system
.
getResultFail
(
-
1
,
"contact_mobile不能为空"
);
}
if
(
!
queryobj
.
contact_email
){
return
system
.
getResultFail
(
-
1
,
"contact_email不能为空"
);
}
if
(
!
queryobj
.
contact_addr
){
return
system
.
getResultFail
(
-
1
,
"contact_addr不能为空"
);
}
var
da
=
await
this
.
channelService
.
channelSave
(
queryobj
)
if
(
da
.
data
)
{
var
bind
=
{
platform_id
:
queryobj
.
platform_id
,
channel_id
:
da
.
data
.
id
,
platform_channel_id
:
10000
}
var
result
=
this
.
channelSve
.
bindPlatform
(
bind
);
console
.
log
(
result
);
}
return
da
;
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
//商户添加
async
pushAddMerchant
(
queryobj
,
qobj
,
req
){
try
{
if
(
!
queryobj
.
channel_id
){
return
system
.
getResultFail
(
-
1
,
"channel_id不能为空"
);
}
if
(
!
queryobj
.
origin_id
){
return
system
.
getResultFail
(
-
1
,
"origin_id不能为空"
);
}
if
(
!
queryobj
.
merchant_name
){
return
system
.
getResultFail
(
-
1
,
"merchant_name不能为空"
);
}
if
(
!
queryobj
.
contact_man
){
return
system
.
getResultFail
(
-
1
,
"contact_man不能为空"
);
}
if
(
!
queryobj
.
contact_mobile
){
return
system
.
getResultFail
(
-
1
,
"contact_mobile不能为空"
);
}
if
(
!
queryobj
.
contact_email
){
return
system
.
getResultFail
(
-
1
,
"contact_email不能为空"
);
}
if
(
!
queryobj
.
contact_addr
){
return
system
.
getResultFail
(
-
1
,
"contact_addr不能为空"
);
}
if
(
queryobj
.
id
){
if
(
!
queryobj
.
origin_merchant_id
){
return
system
.
getResultFail
(
-
1
,
"origin_merchant_id不能为空"
);
}
if
(
!
queryobj
.
origin_merchant_name
){
return
system
.
getResultFail
(
-
1
,
"origin_merchant_name不能为空"
);
}
}
return
await
this
.
channelService
.
merchantSaves
(
queryobj
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
async
paydayCount
(
queryobj
,
qobj
,
req
)
{
var
data
=
await
this
.
separateGet
(
queryobj
);
console
.
log
(
data
.
dataValues
)
...
...
@@ -127,8 +227,8 @@ class ChannelApi {
"idempotentSourceName"
:
"BPO"
,
// 来源编号,写死:BPO薪必果
"thirdPartyChannelId"
:
chnanel
.
channel_id
.
toString
(),
// 渠道id
"thirdPartyCustomerId"
:
chnanel
.
id
.
toString
(),
// 第三方客户id
//
"productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境)
"productId"
:
"5e6c89d54c52bf000a750bc5"
,
// 云服产品id (生产环境)
"productId"
:
"5e6b02cc3290c3000a3a63dc"
,
// 云服产品id (测试环境)
//
"productId": "5e6c89d54c52bf000a750bc5",// 云服产品id (生产环境)
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
"orderPrice"
:
da
.
deduct_amt
,
// 订单金额
...
...
@@ -154,8 +254,8 @@ class ChannelApi {
"idempotentSourceName"
:
"BPO"
,
// 来源编号,写死:BPO薪必果
"thirdPartyChannelId"
:
chnanel
.
channel_id
.
toString
(),
// 渠道id
"thirdPartyCustomerId"
:
chnanel
.
id
.
toString
(),
// 第三方客户id
//
"productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境)
"productId"
:
"5e6c89d54c52bf000a750bc5"
,
// 云服产品id (生产环境)
"productId"
:
"5e6b02cc3290c3000a3a63dc"
,
// 云服产品id (测试环境)
//
"productId": "5e6c89d54c52bf000a750bc5",// 云服产品id (生产环境)
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
"orderPrice"
:
da
.
amt
,
// 订单金额
"productQuantity"
:
"1"
,
// 产品数量
...
...
bpo-admin/app/base/controller/impl/entcontractCtl.js
View file @
b9fabe56
...
...
@@ -63,6 +63,24 @@ class EntcontractCtl extends CtlBase {
}
}
async
allList2
(
queryobj
,
obj
,
req
)
{
var
params
=
obj
.
search
||
{};
var
ecompanyId
=
params
.
ecompany_id
;
if
(
ecompanyId
)
{
params
.
ecompanyIds
=
[
ecompanyId
];
delete
params
.
ecompany_id
;
}
params
.
eflowstatusList
=
[
'1'
];
this
.
doTimeCondition
(
params
,
[
"signBegin"
,
"signEnd"
]);
try
{
var
page
=
await
this
.
service
.
listByCondition
(
params
);
return
system
.
getResult2
(
page
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
);
}
}
async
allExport
(
queryobj
,
req
,
res
)
{
var
params
=
JSON
.
parse
(
queryobj
.
search
);
params
.
currentPage
=
1
;
...
...
@@ -499,6 +517,11 @@ class EntcontractCtl extends CtlBase {
}
}
async
yzReSign
(
q
,
obj
,
req
)
{
let
res
=
await
this
.
service
.
yzMerchantReSign
(
obj
);
return
res
;
}
}
module
.
exports
=
EntcontractCtl
;
\ No newline at end of file
bpo-admin/app/base/controller/impl/uploadCtl.js
View file @
b9fabe56
var
System
=
require
(
"../../system"
)
const
crypto
=
require
(
'crypto'
);
var
fs
=
require
(
"fs"
);
var
accesskey
=
'
DHmRtFlw2Zr3KaRwUFeiu7FWATnmla
'
;
var
accessKeyId
=
'LTAI
yAUK8AD04P5S
'
;
var
accesskey
=
'
3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5
'
;
var
accessKeyId
=
'LTAI
4GC5tSKvqsH2hMqj6pvd
'
;
var
url
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com"
;
class
UploadCtl
{
constructor
(){
...
...
bpo-admin/app/base/db/impl/yzmerchantsignedDao.js
0 → 100644
View file @
b9fabe56
const
system
=
require
(
"../../system"
);
const
Dao
=
require
(
"../dao.base"
);
class
YzmerchantsignedDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
YzmerchantsignedDao
));
}
async
getById
(
id
)
{
return
await
this
.
model
.
findOne
({
where
:
{
id
:
id
},
raw
:
true
});
}
}
module
.
exports
=
YzmerchantsignedDao
;
bpo-admin/app/base/db/metadata/apps/platform.js
View file @
b9fabe56
...
...
@@ -944,6 +944,14 @@ module.exports = {
"bizConfig"
:
null
,
"path"
:
""
},
{
"code"
:
"zc_entcontractall2"
,
"label"
:
"手动签约"
,
"isMenu"
:
true
,
"bizCode"
:
"entcontractall2"
,
"bizConfig"
:
null
,
"path"
:
""
},
],
},
...
...
@@ -1620,6 +1628,7 @@ module.exports = {
"entcompanyadmin"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompanyadmin"
,
"comname"
:
"entcompanyadmin"
},
"enttemplateadmin"
:
{
"title"
:
"模板管理"
,
"config"
:
null
,
"path"
:
"/enttemplateadmin"
,
"comname"
:
"enttemplateadmin"
},
"entcontractall"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontractall"
,
"comname"
:
"entcontractall"
},
"entcontractall2"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontractall2"
,
"comname"
:
"entcontractall2"
},
// 企业电子签-个人
"entcompanymy"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompanymy"
,
"comname"
:
"entcompanymy"
},
...
...
bpo-admin/app/base/db/metadata/bizs/wx76a324c5d201d1a4/entcontractall2.js
0 → 100644
View file @
b9fabe56
module
.
exports
=
{
"bizName"
:
"entcontractall2"
,
"list"
:{
columnMetaData
:[
]
},
"form"
:[
],
"search"
:[
],
"auth"
:{
"add"
:[
],
"edit"
:[
],
"delete"
:[
// {"icon":"el-icon-remove","title":"删除","type":"default","key":"delete","isInRow":true},
],
"common"
:[
],
}
}
bpo-admin/app/base/db/models/yzmerchantsigned.js
0 → 100644
View file @
b9fabe56
const
system
=
require
(
"../../system"
);
const
settings
=
require
(
"../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
wxconfig
.
appId
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"yzmerchantsigned"
,
{
companyName
:
DataTypes
.
STRING
,
appId
:
DataTypes
.
STRING
,
mchtId
:
DataTypes
.
STRING
,
mainId
:
DataTypes
.
STRING
,
secret
:
DataTypes
.
STRING
,
ecid
:
DataTypes
.
INTEGER
,
params
:
DataTypes
.
TEXT
,
entcontract_id
:
DataTypes
.
INTEGER
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'c_yzmerchant_signed'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
bpo-admin/app/base/service/impl/channelSve.js
View file @
b9fabe56
...
...
@@ -53,10 +53,13 @@ class ChannelService extends microService {
async
merchantSave
(
params
)
{
return
await
this
.
callms
(
"channel"
,
"merchantSave"
,
params
);
}
async
merchantSaves
(
params
)
{
//峰擎推送添加
return
await
this
.
callms
(
"channel"
,
"merchantSaves"
,
params
);
}
async
merchantPage
(
params
)
{
return
await
this
.
callms
(
"channel"
,
"merchantPage"
,
params
);
}
async
getPushMerchantIds
(
params
){
return
await
this
.
callms
(
"channel"
,
"getPushMerchantIds"
,
params
);
}
...
...
bpo-admin/app/base/service/impl/entcontractSve.js
View file @
b9fabe56
...
...
@@ -21,12 +21,14 @@ class EntcontractService extends ServiceBase {
this
.
ecompanybusiDao
=
system
.
getObject
(
"db.ecompanybusiDao"
);
this
.
userDao
=
system
.
getObject
(
"db.userDao"
);
this
.
esealSve
=
system
.
getObject
(
"service.esealSve"
);
this
.
enttemplateSve
=
system
.
getObject
(
"service.enttemplateSve"
);
this
.
entcompanyDao
=
system
.
getObject
(
"db.entcompanyDao"
)
this
.
ejobapplySve
=
system
.
getObject
(
"service.ejobapplySve"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
maindict
=
system
.
getObject
(
"util.maindict"
);
this
.
yzmerchantsignedSve
=
system
.
getObject
(
"service.yzmerchantsignedSve"
);
this
.
eSignBaoRedirectBossUrl
=
settings
.
apiconfig
.
eSignBaoRedirectBossUrl
();
}
...
...
@@ -327,9 +329,7 @@ class EntcontractService extends ServiceBase {
[
"id"
,
'desc'
]
];
var
attributes
=
[
`id`
,
`name`
,
`fileurl`
,
`eflowstatus`
,
`eflowstatusname`
,
`completed_at`
,
`end_at`
,
`user_id`
,
`usereaccount_id`
,
`entcompany_id`
,
`enttemplate_id`
];
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
,
attributes
);
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
);
if
(
page
&&
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
this
.
handleDate
(
row
,
[
"completed_at"
,
"end_at"
],
null
);
...
...
@@ -932,6 +932,67 @@ class EntcontractService extends ServiceBase {
this
.
ejobapplySve
.
addMessage
(
id
,
"零工签约"
,
"成功签约"
);
}
async
yzMerchantReSign
(
params
)
{
let
id
=
params
.
id
;
let
econtract
=
await
this
.
dao
.
findById
(
id
);
if
(
!
econtract
)
{
return
this
.
returnjson
(
-
1
,
"协议不存在"
);
}
if
(
econtract
.
eflowstatus
==
'2'
)
{
return
this
.
returnjson
(
-
1
,
"商户已经签约成功"
);
}
// enttemplate 模板查询
let
enttemplate
=
await
this
.
enttemplateSve
.
findById
(
econtract
.
enttemplate_id
);
// entcompany
let
entcompany
=
await
this
.
entcompanyDao
.
findById
(
econtract
.
entcompany_id
);
//c_yzmerchant_signed
var
yzparams
=
await
this
.
yzmerchantsignedSve
.
findOne
({
entcontract_id
:
id
})
var
yz
=
JSON
.
parse
(
yzparams
.
params
);
// p_user
let
user
=
await
this
.
userDao
.
findById
(
econtract
.
user_id
);
let
eaccount
=
await
this
.
usereaccountDao
.
findById
(
econtract
.
usereaccount_id
);
var
sealId
=
entcompany
.
sealId
;
let
today
=
new
Date
().
Format
(
"yyyy"
)
+
"年"
+
new
Date
().
Format
(
"MM"
)
+
"月"
+
new
Date
().
Format
(
"dd"
)
+
"日"
;
var
signParams
=
{
templateId
:
enttemplate
.
templateid
,
//模板id,由创建模板接口调用返回的templateId 必填
name
:
enttemplate
.
name
,
//合同模板名称 必填
simpleFormFields
:
{
nameA
:
yz
.
merchantName
,
//甲方 必填
addressA
:
yz
.
merchantAddr
,
//甲方地址
representA
:
yz
.
merchantLegal
,
//甲方法定代表人
agentA
:
yz
.
idName
,
//甲方联系人
agentMobileA
:
yz
.
mobile
,
//甲方 联系电话
nameB
:
entcompany
.
name
,
//乙方 必填
addressB
:
entcompany
.
addr
,
//乙方 地址
representB
:
entcompany
.
legal
,
//乙方 法定代表人
agentB
:
entcompany
.
contactName
,
//乙方 联系人
agentMobileB
:
entcompany
.
contactMobile
,
//乙方 联系电话
signDate
:
today
,
//签约时间
signDateA
:
today
,
//甲方签约日期 必填
signDateB
:
today
//乙方签约日期 必填
}
};
var
ebaoAccountId
=
eaccount
.
eaccountid
;
//签署人账户id-- 必填
var
thirdOrderNo
=
"ent_"
+
id
;
//第三方流水号,通知回调使用---选填
var
eBaoRedirectBossUrl
=
""
;
var
tt
=
await
this
.
utilesignbaoSve
.
userSignContractNoTemplaterEversalSeal
(
signParams
,
ebaoAccountId
,
thirdOrderNo
,
eBaoRedirectBossUrl
,
"econtractSve"
,
sealId
);
console
.
log
(
tt
,
"-============= result ==========================="
);
if
(
tt
&&
tt
.
code
==
1
)
{
econtract
.
eflowid
=
tt
.
data
.
flowId
;
econtract
.
edocid
=
tt
.
data
.
docId
;
econtract
.
esignUrl
=
tt
.
data
.
signUrl
;
await
econtract
.
save
();
return
system
.
getResult2
(
tt
.
data
,
null
);
}
return
this
.
returnjson
(
-
1
,
tt
.
message
||
"签约失败"
,
tt
.
code
);
}
async
syncContract
(
id
)
{
var
contract
=
null
;
var
account
=
null
;
...
...
@@ -1099,6 +1160,14 @@ class EntcontractService extends ServiceBase {
return
y
+
''
+
m
+
''
+
d
+
''
+
h
+
''
+
minute
+
''
+
second
;
}
returnjson
(
code
,
msg
,
data
)
{
return
{
code
:
code
,
msg
:
msg
,
data
:
data
||
null
}
}
async
formateTime3
(
inputTime
)
{
if
(
!
inputTime
)
{
return
''
;
...
...
@@ -1180,4 +1249,4 @@ class EntcontractService extends ServiceBase {
}
}
module
.
exports
=
EntcontractService
;
\ No newline at end of file
module
.
exports
=
EntcontractService
;
bpo-admin/app/base/service/impl/utilesignbaoSve.js
View file @
b9fabe56
...
...
@@ -5,6 +5,7 @@ const logCtl = System.getObject("web.oplogCtl");
const
crypto
=
require
(
'crypto'
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
fs
=
require
(
"fs"
);
const
axios
=
require
(
"axios"
);
//工商查询操作
class
UtilESignBaoService
{
constructor
()
{
...
...
@@ -731,6 +732,103 @@ class UtilESignBaoService {
return
result
;
}
/*
seal 位置反转
*/
async
userSignContractNoTemplaterEversalSeal
(
params
,
ebaoAccountId
,
thirdOrderNo
,
eSignBaoRedirectBossUrl
,
opName
,
sealId
)
{
//用户签署合同-------调用此方法
//日志记录
logCtl
.
info
({
optitle
:
"e签宝===>创建用户签署合同信息info"
,
op
:
"app/base/service/impl/utilesignbaoSve/userSignContractNoTemplate"
,
content
:
"参数:ebaoAccountId="
+
ebaoAccountId
+
",thirdOrderNo="
+
thirdOrderNo
+
",eSignBaoRedirectBossUrl="
+
eSignBaoRedirectBossUrl
+
",请求params参数:"
+
JSON
.
stringify
(
params
),
clientIp
:
""
});
/*
1.合同模板创建合同 5.4.2
2.创建合同签署流程 5.5.1
3.发起对接平台自动签署 5.5.2
4.发起个人手动签署 5.5.4
*/
var
result
=
{
code
:
1
,
message
:
"success"
,
data
:
{}
};
if
(
ebaoAccountId
==
null
||
ebaoAccountId
==
""
||
ebaoAccountId
==
"undefined"
)
{
result
.
code
=
-
100
;
result
.
message
=
"ebaoAccountId参数有误"
;
return
result
;
}
var
tThirdOrderNo
=
thirdOrderNo
==
null
||
thirdOrderNo
==
""
||
thirdOrderNo
==
"undefined"
?
""
:
thirdOrderNo
var
self
=
this
;
//1.合同模板创建合同 5.4.2
var
createTemplate
=
await
self
.
createByTemplate
(
params
,
opName
,
result
);
if
(
createTemplate
.
code
!=
1
)
{
return
result
;
}
var
tDocId
=
createTemplate
.
data
.
docId
;
var
addProcessParams
=
{
businessScene
:
params
.
name
,
//业务场景名称-- 必填
initiatorAccountId
:
""
,
//发起方账户id,默认对接平台,--使用默认的,不用填写
signValidity
:
""
,
//签署截止时间戳毫秒值-- 选填
payer
:
""
,
//签署付费方,默认对接平台-- 选填
signPlatform
:
"1"
,
//指定用户签署的平台,空值表示不限平台(1:H5签2:支付宝生活号签3:微信小程序签(后续版本支持))-- 选填
noticeType
:
""
,
//用户接收签署任务通知的方式,空值不通知,1短信,2邮箱,格式"1,2"
redirectUrl
:
eSignBaoRedirectBossUrl
,
//页面签署完成后跳转地址
docId
:
tDocId
,
//合同id
docName
:
""
//合同名称,默认使用创建合同时的名称-- 选填
};
//2.创建合同签署流程 5.5.1
var
createAddProcess
=
await
self
.
addProcess
(
addProcessParams
,
opName
,
result
);
if
(
createAddProcess
.
code
!=
1
)
{
return
result
;
}
var
tFlowId
=
createAddProcess
.
data
.
flowId
;
var
platformSignTaskParams
=
{
flowId
:
tFlowId
,
//流程id-- 必填
thirdOrderNo
:
tThirdOrderNo
,
//第三方流水号,通知回调使用
posList
:
[{
signType
:
1
,
//盖章位置定位方式,1关键字定位-- 必填
key
:
"sealB"
//-- 必填
}]
};
if
(
sealId
)
{
//印章id,不传时使用账户默认印章
platformSignTaskParams
.
sealId
=
sealId
;
}
//3.发起对接平台自动签署 5.5.2
var
platformSignTaskResult
=
await
self
.
platformSignTask
(
platformSignTaskParams
,
opName
,
result
);
if
(
platformSignTaskResult
.
code
!=
1
)
{
return
result
;
}
var
handPersonSignTaskParams
=
{
flowId
:
tFlowId
,
//流程id-- 必填
accountId
:
ebaoAccountId
,
//签署人账户id-- 必填
thirdOrderNo
:
tThirdOrderNo
,
//第三方流水号,通知回调使用
sealType
:
"0"
,
//印章类型, 指定签署印章类型,0:手绘印章;1:模板印章-- 必填 ?????????????????????????????
posList
:
[{
signType
:
1
,
//盖章位置定位方式,1关键字定位-- 必填
key
:
"sealA"
//-- 必填
}]
};
//4.发起个人手动签署 5.5.4
var
handPersonSignTaskResult
=
await
self
.
handPersonSignTask
(
handPersonSignTaskParams
,
opName
,
result
);
if
(
handPersonSignTaskResult
.
code
!=
1
)
{
return
result
;
}
result
.
data
=
{
flowId
:
tFlowId
,
//流程id
docId
:
tDocId
,
//合同id
signUrl
:
handPersonSignTaskResult
.
data
.
signUrl
,
//签署地址,用户可通过本地址跳转至 e 签宝签署页面进行签署,链接永久有效
signShortUrl
:
handPersonSignTaskResult
.
data
.
signShortUrl
,
//接口调用时传入的对接方业务流水号,用于支持对接方进行上下文关联
templateId
:
params
.
templateId
//模板id,由创建模板接口调用返回的templateId
};
return
result
;
}
/*参数说明:
var params = {
templateId: "2c98d5446734acf5016827d168a6013b", //模板id,由创建模板接口调用返回的templateId 必填
...
...
@@ -997,10 +1095,59 @@ class UtilESignBaoService {
return
result
;
}
//-------------------------------------------------------------------------签署成功后归档-----结束--------------
// async returnResult(params, reqUrl, opClassName, opMethod, result) {
// var data = JSON.stringify(params);
// var rtn = null;
// try {
// rtn = await this.restClient.execPostESignBao(data, reqUrl);
// console.log(rtn, "rtn---------------------------------e签宝--------execPostESignBao---------------->>>>>>>>>>>>>>>>");
// if (rtn.stdout == null || rtn.stdout == "" || rtn.stdout == "undefined") {
// result.errCode = -100;
// result.code = -100;
// result.message = "请求结果返回为空";
// return result;
// }
// return JSON.parse(rtn.stdout);
// } catch (e) {
// console.log(e.stack);
// //日志记录
// logCtl.error({
// optitle: "e签宝opClassName=" + opClassName + ",opMethod=" + opMethod + "操作异常异常error",
// op: "base/service/impl/utilesignbaoSve/returnResult,请求url:" + reqUrl,
// content: "请求参数:" + data + ",返回结果参数rtn.stdout:" + rtn.stdout + ",异常信息error:" + e.stack,
// clientIp: ""
// });
// result.errCode = -200;
// result.code = -200;
// result.message = "操作异常"
// return result;
// }
// }
async
returnResult
(
params
,
reqUrl
,
opClassName
,
opMethod
,
result
)
{
var
data
=
JSON
.
stringify
(
params
);
var
rtn
=
null
;
try
{
if
(
settings
.
env
==
'dev'
)
{
let
rs
=
await
axios
({
method
:
'post'
,
url
:
reqUrl
,
data
:
params
,
headers
:
{
'X-Tsign-Open-App-Id'
:
'5111588557'
,
'X-Tsign-Open-App-Secret'
:
'1595787e8d5b7d19f7b6798f16f41fc2'
},
});
console
.
log
(
rs
);
if
(
rs
.
data
.
errCode
!=
0
)
{
result
.
code
=
-
110
;
result
.
message
=
"接口请求错误"
;
return
result
;
}
result
.
errCode
=
0
;
result
.
data
=
rs
.
data
.
data
;
return
result
;
}
rtn
=
await
this
.
restClient
.
execPostESignBao
(
data
,
reqUrl
);
console
.
log
(
rtn
,
"rtn---------------------------------e签宝--------execPostESignBao---------------->>>>>>>>>>>>>>>>"
);
if
(
rtn
.
stdout
==
null
||
rtn
.
stdout
==
""
||
rtn
.
stdout
==
"undefined"
)
{
...
...
bpo-admin/app/base/service/impl/yzmerchantsignedSve.js
0 → 100644
View file @
b9fabe56
const
system
=
require
(
"../../system"
);
const
ServiceBase
=
require
(
"../sve.base"
)
class
YzmerchantsignedService
extends
ServiceBase
{
constructor
()
{
super
(
ServiceBase
.
getDaoName
(
YzmerchantsignedService
));
}
}
module
.
exports
=
YzmerchantsignedService
;
bpo-admin/app/base/system.js
View file @
b9fabe56
...
...
@@ -27,6 +27,14 @@ class System {
return
System
.
objTable
[
key
];
}
static
getResultFail
(
status
=
-
1
,
errmsg
=
"fail"
,
data
=
null
)
{
return
{
status
:
status
,
msg
:
errmsg
,
data
:
data
,
};
}
static
getResult3
(
data
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
){
var
total
=
data
.
total
;
data
=
data
.
hits
;
...
...
@@ -264,7 +272,7 @@ class System {
var
domain
=
"http://39.107.234.14"
;
return
{
// 渠道服务
channel
:
domain
+
":3003"
+
path
,
channel
:
domain
2
+
":3003"
+
path
,
}
}
else
{
// var odomain = "http://123.57.217.203"
...
...
@@ -282,7 +290,7 @@ class System {
let
key
=
AES_conf
.
key
;
let
iv
=
AES_conf
.
iv
;
// let padding = AES_conf.padding;
var
cipherChunks
=
[];
var
cipher
=
crypto
.
createCipheriv
(
'aes-128-cbc'
,
key
,
iv
);
cipher
.
setAutoPadding
(
true
);
...
...
@@ -299,7 +307,7 @@ class System {
let
key
=
AES_conf
.
key
;
let
iv
=
AES_conf
.
iv
;
// let padding = AES_conf.padding;
var
cipherChunks
=
[];
var
decipher
=
crypto
.
createDecipheriv
(
'aes-128-cbc'
,
key
,
iv
);
decipher
.
setAutoPadding
(
true
);
...
...
bpo-admin/app/base/utils/ossClient.js
View file @
b9fabe56
...
...
@@ -4,8 +4,8 @@ class OSSClient{
constructor
(){
this
.
client
=
new
OSS
({
endpoint
:
'https://oss-cn-beijing.aliyuncs.com'
,
accessKeyId
:
'LTAI
yAUK8AD04P5S
'
,
accessKeySecret
:
'
DHmRtFlw2Zr3KaRwUFeiu7FWATnmla
'
accessKeyId
:
'LTAI
4GC5tSKvqsH2hMqj6pvd
'
,
accessKeySecret
:
'
3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5
'
});
this
.
client
.
useBucket
(
'gsb-zc'
);
}
...
...
bpo-admin/app/front/vues/pages/channelmerchantmanager/channelmerchantmanager.html
View file @
b9fabe56
...
...
@@ -34,6 +34,17 @@
</el-option>
</el-select>
</div>
<div
style=
"float:left;width: 300px;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
关联商户:
</span>
<el-select
v-model=
"search.types"
placeholder=
"请选择是否商户关联"
style=
"max-width:200px;height: 36px;"
>
<el-option
v-for=
"item in optionsTypes"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</div>
<div
style=
"float:left;margin-top:5px;"
>
<el-button
@
click=
"resetSearch()"
style=
"float:right;width:68px;height:36px;background-color: #54C4A7;color: #FFFFFF;font-size: 14px;padding-top:10px;"
>
重置
</el-button>
<el-button
@
click=
"opSearch"
style=
"float:right;width:68px;height:36px;background-color: #54C4A7;color: #FFFFFF;font-size: 14px;padding-top:10px;margin-right: 10px;"
>
搜索
</el-button>
...
...
@@ -68,6 +79,7 @@
<el-table-column
label=
"操作"
align=
"center"
>
<template
slot-scope=
"scope"
>
<a
href=
"javascript:;"
@
click=
"openEdit(scope.row.id)"
style=
"text-decoration: none;color:#59C1A6;font-size: 14px;"
>
修改
</a>
<!-- <a href="javascript:;" v-if="scope.row.origin_id == 10000 && !scope.row.origin_merchant_name" @click="relevancy(scope.row.id)" style="text-decoration: none;color:#59C1A6;font-size: 14px;">关联</a> -->
</template>
</el-table-column>
</el-table>
...
...
@@ -137,12 +149,12 @@
remote
clearable
reserve-keyword
style=
"width:4
20
px;float: left;"
style=
"width:4
68
px;float: left;"
placeholder=
"请搜索商户名称"
@
change=
"merchantNameChange"
:remote-method=
"suggestMerchantNames"
:loading=
"merchantNameLoading"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id
|| dkcompany.types
"
>
<el-option
v-for=
"item in merchantNameList"
...
...
@@ -163,12 +175,12 @@
remote
clearable
reserve-keyword
style=
"width:4
20
px;float: left;"
style=
"width:4
68
px;float: left;"
placeholder=
"请搜索商户名称"
@
change=
"merchantNameChangeoffline"
:remote-method=
"suggestMerchantNamesoffline"
:loading=
"merchantNameLoading"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id
|| dkcompany.types
"
>
<el-option
v-for=
"item in merchantNameListoffline"
...
...
@@ -230,8 +242,92 @@
<div
style=
"margin-left: 200px;"
>
<el-button
:loading=
"saveLoading"
@
click=
"saveCompany"
style=
"width:120px;height:36px; background:#54C4A7; border-radius:4px;color: #FFFFFF;font-size: 16px;padding-top: 10px;"
>
保存
</el-button>
</div>
</el-dialog>
</el-dialog>
<!-- <el-dialog width="862px" :visible.sync="showEdit2">
<div slot="title">
<span style="margin-left:9px;margin-top:-3px;;width:72px; height:25px; font-size:18px; font-family:PingFangSC-Regular; font-weight:400; color:rgba(51,51,51,1); line-height:25px;">{{editTitle}}商户</span>
<div style="width: 862px; height: 1px;background-color: #E3E3E3;margin: 17px 20px 0px -20px"></div>
</div>
<el-form :model="dkcompany" :rules="rules" ref="dkcompany" label-width="100px" label="right" style="padding:0px 100px;" >
<div style="0px 10px; line-height: 15px;padding-bottom:40px;">
<div style="width:2px;height:15px;float: left;background-color: #54C4A7">
</div>
<span style="font-size:15px;color: #333333;float: left;font-weight:bold;margin-left: 7px;">商户信息</span>
</div>
<el-form-item label="渠道名称:" prop="channel_id" >
<el-select v-model="dkcompany.channel_id" filterable placeholder="请选择渠道名称" style="width:468px;" :disabled="dkcompany.id">
<el-option
v-for="item in optionsChannel"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商户来源:" prop="origin_id" >
<el-select v-model="dkcompany.origin_id" placeholder="请选择商户来源" style="width:468px;" @change="originMerchantsPost">
<el-option
v-for="item in optionsMerchants"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="关联商户:" prop="origin_merchant_name" v-if="is_api == 1" >
<el-select
v-model="dkcompany.origin_merchant_name"
filterable
remote
clearable
reserve-keyword
style="width:468px;float: left;"
placeholder="请搜索商户名称"
@change="merchantNameChange"
:remote-method="suggestMerchantNames"
:loading="merchantNameLoading"
>
<el-option
v-for="item in merchantNameList"
:key="item.id"
:label="item.name"
:value="item.id">
<span style="float: left;width:150px;">{{ item.name }}--{{ item.id }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="关联商户:" prop="origin_merchant_name" v-if="is_api == 0">
<el-select
v-model="dkcompany.origin_merchant_name"
filterable
remote
clearable
reserve-keyword
style="width:468px;float: left;"
placeholder="请搜索商户名称"
@change="merchantNameChangeoffline"
:remote-method="suggestMerchantNamesoffline"
:loading="merchantNameLoading"
>
<el-option
v-for="item in merchantNameListoffline"
:key="item.id"
:label="item.name"
:value="item.id">
<span style="float: left;width:150px;">{{ item.name }}--{{ item.id }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div style="margin-left: 200px;">
<el-button :loading="saveLoading" @click="saveCompany" style="width:120px;height:36px; background:#54C4A7; border-radius:4px;color: #FFFFFF;font-size: 16px;padding-top: 10px;">保存</el-button>
</div>
</el-dialog> -->
</div>
</gsb-pcpage>
bpo-admin/app/front/vues/pages/channelmerchantmanager/channelmerchantmanager.js
View file @
b9fabe56
...
...
@@ -13,6 +13,7 @@
dkcompany
:
{},
editTitle
:
"新增"
,
showEdit
:
false
,
showEdit2
:
false
,
saveLoading
:
false
,
ownerList
:[],
ownerMap
:[],
...
...
@@ -23,7 +24,15 @@
merchantNameListoffline
:
[],
merchantNameMap
:[],
merchantNameMapoffline
:
[],
optionsTypes
:[
{
id
:
0
,
name
:
'是'
},{
id
:
1
,
name
:
'否'
}
],
search
:
{
list
:
[],
currentPage
:
1
,
...
...
@@ -211,6 +220,16 @@
},
toDetail
(
id
)
{
},
relevancy
(
id
)
{
this
.
ownerLoading
=
false
;
this
.
saveLoading
=
false
;
this
.
owner_id
=
null
;
if
(
this
.
$refs
.
dkcompany
)
{
this
.
$refs
.
dkcompany
.
resetFields
();
}
this
.
getDKcompany
(
id
);
this
.
showEdit2
=
true
;
},
openEdit
(
id
)
{
this
.
ownerLoading
=
false
;
this
.
saveLoading
=
false
;
...
...
@@ -274,6 +293,9 @@
self
.
ownerLoading
=
false
;
},
15000
);
},
saveCompany2
()
{
},
saveCompany
()
{
var
self
=
this
;
self
.
saveLoading
=
true
;
...
...
bpo-admin/app/front/vues/pages/entcontractall2/entcontractall2.html
0 → 100644
View file @
b9fabe56
This diff is collapsed.
Click to expand it.
bpo-admin/app/front/vues/pages/entcontractall2/entcontractall2.js
0 → 100644
View file @
b9fabe56
This diff is collapsed.
Click to expand it.
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