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
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1291 additions
and
24 deletions
+1291
-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
+227
-0
bpo-admin/app/front/vues/pages/entcontractall2/entcontractall2.js
+453
-0
No files found.
bpo-admin/app/base/api/impl/channelApi.js
View file @
b9fabe56
...
@@ -14,6 +14,7 @@ class ChannelApi {
...
@@ -14,6 +14,7 @@ class ChannelApi {
this
.
FQURL
=
settings
.
FQYF
().
pushOrderApi
;
this
.
FQURL
=
settings
.
FQYF
().
pushOrderApi
;
this
.
pushfqlogSve
=
system
.
getObject
(
"service.pushfqlogSve"
)
this
.
pushfqlogSve
=
system
.
getObject
(
"service.pushfqlogSve"
)
this
.
esettleofflineSve
=
system
.
getObject
(
"service.esettleofflineSve"
)
this
.
esettleofflineSve
=
system
.
getObject
(
"service.esettleofflineSve"
)
this
.
channelService
=
system
.
getObject
(
"service.ChannelSve"
)
}
}
//渠道绑定
//渠道绑定
...
@@ -100,6 +101,105 @@ class ChannelApi {
...
@@ -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
)
{
async
paydayCount
(
queryobj
,
qobj
,
req
)
{
var
data
=
await
this
.
separateGet
(
queryobj
);
var
data
=
await
this
.
separateGet
(
queryobj
);
console
.
log
(
data
.
dataValues
)
console
.
log
(
data
.
dataValues
)
...
@@ -127,8 +227,8 @@ class ChannelApi {
...
@@ -127,8 +227,8 @@ class ChannelApi {
"idempotentSourceName"
:
"BPO"
,
// 来源编号,写死:BPO薪必果
"idempotentSourceName"
:
"BPO"
,
// 来源编号,写死:BPO薪必果
"thirdPartyChannelId"
:
chnanel
.
channel_id
.
toString
(),
// 渠道id
"thirdPartyChannelId"
:
chnanel
.
channel_id
.
toString
(),
// 渠道id
"thirdPartyCustomerId"
:
chnanel
.
id
.
toString
(),
// 第三方客户id
"thirdPartyCustomerId"
:
chnanel
.
id
.
toString
(),
// 第三方客户id
//
"productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境)
"productId"
:
"5e6b02cc3290c3000a3a63dc"
,
// 云服产品id (测试环境)
"productId"
:
"5e6c89d54c52bf000a750bc5"
,
// 云服产品id (生产环境)
//
"productId": "5e6c89d54c52bf000a750bc5",// 云服产品id (生产环境)
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
"orderPrice"
:
da
.
deduct_amt
,
// 订单金额
"orderPrice"
:
da
.
deduct_amt
,
// 订单金额
...
@@ -154,8 +254,8 @@ class ChannelApi {
...
@@ -154,8 +254,8 @@ class ChannelApi {
"idempotentSourceName"
:
"BPO"
,
// 来源编号,写死:BPO薪必果
"idempotentSourceName"
:
"BPO"
,
// 来源编号,写死:BPO薪必果
"thirdPartyChannelId"
:
chnanel
.
channel_id
.
toString
(),
// 渠道id
"thirdPartyChannelId"
:
chnanel
.
channel_id
.
toString
(),
// 渠道id
"thirdPartyCustomerId"
:
chnanel
.
id
.
toString
(),
// 第三方客户id
"thirdPartyCustomerId"
:
chnanel
.
id
.
toString
(),
// 第三方客户id
//
"productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境)
"productId"
:
"5e6b02cc3290c3000a3a63dc"
,
// 云服产品id (测试环境)
"productId"
:
"5e6c89d54c52bf000a750bc5"
,
// 云服产品id (生产环境)
//
"productId": "5e6c89d54c52bf000a750bc5",// 云服产品id (生产环境)
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
"orderPrice"
:
da
.
amt
,
// 订单金额
"orderPrice"
:
da
.
amt
,
// 订单金额
"productQuantity"
:
"1"
,
// 产品数量
"productQuantity"
:
"1"
,
// 产品数量
...
...
bpo-admin/app/base/controller/impl/entcontractCtl.js
View file @
b9fabe56
...
@@ -63,6 +63,24 @@ class EntcontractCtl extends CtlBase {
...
@@ -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
)
{
async
allExport
(
queryobj
,
req
,
res
)
{
var
params
=
JSON
.
parse
(
queryobj
.
search
);
var
params
=
JSON
.
parse
(
queryobj
.
search
);
params
.
currentPage
=
1
;
params
.
currentPage
=
1
;
...
@@ -499,6 +517,11 @@ class EntcontractCtl extends CtlBase {
...
@@ -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
;
module
.
exports
=
EntcontractCtl
;
\ No newline at end of file
bpo-admin/app/base/controller/impl/uploadCtl.js
View file @
b9fabe56
var
System
=
require
(
"../../system"
)
var
System
=
require
(
"../../system"
)
const
crypto
=
require
(
'crypto'
);
const
crypto
=
require
(
'crypto'
);
var
fs
=
require
(
"fs"
);
var
fs
=
require
(
"fs"
);
var
accesskey
=
'
DHmRtFlw2Zr3KaRwUFeiu7FWATnmla
'
;
var
accesskey
=
'
3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5
'
;
var
accessKeyId
=
'LTAI
yAUK8AD04P5S
'
;
var
accessKeyId
=
'LTAI
4GC5tSKvqsH2hMqj6pvd
'
;
var
url
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com"
;
var
url
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com"
;
class
UploadCtl
{
class
UploadCtl
{
constructor
(){
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 = {
...
@@ -944,6 +944,14 @@ module.exports = {
"bizConfig"
:
null
,
"bizConfig"
:
null
,
"path"
:
""
"path"
:
""
},
},
{
"code"
:
"zc_entcontractall2"
,
"label"
:
"手动签约"
,
"isMenu"
:
true
,
"bizCode"
:
"entcontractall2"
,
"bizConfig"
:
null
,
"path"
:
""
},
],
],
},
},
...
@@ -1620,6 +1628,7 @@ module.exports = {
...
@@ -1620,6 +1628,7 @@ module.exports = {
"entcompanyadmin"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompanyadmin"
,
"comname"
:
"entcompanyadmin"
},
"entcompanyadmin"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompanyadmin"
,
"comname"
:
"entcompanyadmin"
},
"enttemplateadmin"
:
{
"title"
:
"模板管理"
,
"config"
:
null
,
"path"
:
"/enttemplateadmin"
,
"comname"
:
"enttemplateadmin"
},
"enttemplateadmin"
:
{
"title"
:
"模板管理"
,
"config"
:
null
,
"path"
:
"/enttemplateadmin"
,
"comname"
:
"enttemplateadmin"
},
"entcontractall"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontractall"
,
"comname"
:
"entcontractall"
},
"entcontractall"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontractall"
,
"comname"
:
"entcontractall"
},
"entcontractall2"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontractall2"
,
"comname"
:
"entcontractall2"
},
// 企业电子签-个人
// 企业电子签-个人
"entcompanymy"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompanymy"
,
"comname"
:
"entcompanymy"
},
"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 {
...
@@ -53,10 +53,13 @@ class ChannelService extends microService {
async
merchantSave
(
params
)
{
async
merchantSave
(
params
)
{
return
await
this
.
callms
(
"channel"
,
"merchantSave"
,
params
);
return
await
this
.
callms
(
"channel"
,
"merchantSave"
,
params
);
}
}
async
merchantSaves
(
params
)
{
//峰擎推送添加
return
await
this
.
callms
(
"channel"
,
"merchantSaves"
,
params
);
}
async
merchantPage
(
params
)
{
async
merchantPage
(
params
)
{
return
await
this
.
callms
(
"channel"
,
"merchantPage"
,
params
);
return
await
this
.
callms
(
"channel"
,
"merchantPage"
,
params
);
}
}
async
getPushMerchantIds
(
params
){
async
getPushMerchantIds
(
params
){
return
await
this
.
callms
(
"channel"
,
"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 {
...
@@ -21,12 +21,14 @@ class EntcontractService extends ServiceBase {
this
.
ecompanybusiDao
=
system
.
getObject
(
"db.ecompanybusiDao"
);
this
.
ecompanybusiDao
=
system
.
getObject
(
"db.ecompanybusiDao"
);
this
.
userDao
=
system
.
getObject
(
"db.userDao"
);
this
.
userDao
=
system
.
getObject
(
"db.userDao"
);
this
.
esealSve
=
system
.
getObject
(
"service.esealSve"
);
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
.
ejobapplySve
=
system
.
getObject
(
"service.ejobapplySve"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
maindict
=
system
.
getObject
(
"util.maindict"
);
this
.
maindict
=
system
.
getObject
(
"util.maindict"
);
this
.
yzmerchantsignedSve
=
system
.
getObject
(
"service.yzmerchantsignedSve"
);
this
.
eSignBaoRedirectBossUrl
=
settings
.
apiconfig
.
eSignBaoRedirectBossUrl
();
this
.
eSignBaoRedirectBossUrl
=
settings
.
apiconfig
.
eSignBaoRedirectBossUrl
();
}
}
...
@@ -327,9 +329,7 @@ class EntcontractService extends ServiceBase {
...
@@ -327,9 +329,7 @@ class EntcontractService extends ServiceBase {
[
"id"
,
'desc'
]
[
"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
);
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
,
attributes
);
if
(
page
&&
page
.
rows
)
{
if
(
page
&&
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
this
.
handleDate
(
row
,
[
"completed_at"
,
"end_at"
],
null
);
this
.
handleDate
(
row
,
[
"completed_at"
,
"end_at"
],
null
);
...
@@ -932,6 +932,67 @@ class EntcontractService extends ServiceBase {
...
@@ -932,6 +932,67 @@ class EntcontractService extends ServiceBase {
this
.
ejobapplySve
.
addMessage
(
id
,
"零工签约"
,
"成功签约"
);
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
)
{
async
syncContract
(
id
)
{
var
contract
=
null
;
var
contract
=
null
;
var
account
=
null
;
var
account
=
null
;
...
@@ -1099,6 +1160,14 @@ class EntcontractService extends ServiceBase {
...
@@ -1099,6 +1160,14 @@ class EntcontractService extends ServiceBase {
return
y
+
''
+
m
+
''
+
d
+
''
+
h
+
''
+
minute
+
''
+
second
;
return
y
+
''
+
m
+
''
+
d
+
''
+
h
+
''
+
minute
+
''
+
second
;
}
}
returnjson
(
code
,
msg
,
data
)
{
return
{
code
:
code
,
msg
:
msg
,
data
:
data
||
null
}
}
async
formateTime3
(
inputTime
)
{
async
formateTime3
(
inputTime
)
{
if
(
!
inputTime
)
{
if
(
!
inputTime
)
{
return
''
;
return
''
;
...
@@ -1180,4 +1249,4 @@ class EntcontractService extends ServiceBase {
...
@@ -1180,4 +1249,4 @@ class EntcontractService extends ServiceBase {
}
}
}
}
module
.
exports
=
EntcontractService
;
module
.
exports
=
EntcontractService
;
\ No newline at end of file
bpo-admin/app/base/service/impl/utilesignbaoSve.js
View file @
b9fabe56
...
@@ -5,6 +5,7 @@ const logCtl = System.getObject("web.oplogCtl");
...
@@ -5,6 +5,7 @@ const logCtl = System.getObject("web.oplogCtl");
const
crypto
=
require
(
'crypto'
);
const
crypto
=
require
(
'crypto'
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
fs
=
require
(
"fs"
);
const
fs
=
require
(
"fs"
);
const
axios
=
require
(
"axios"
);
//工商查询操作
//工商查询操作
class
UtilESignBaoService
{
class
UtilESignBaoService
{
constructor
()
{
constructor
()
{
...
@@ -731,6 +732,103 @@ class UtilESignBaoService {
...
@@ -731,6 +732,103 @@ class UtilESignBaoService {
return
result
;
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 = {
var params = {
templateId: "2c98d5446734acf5016827d168a6013b", //模板id,由创建模板接口调用返回的templateId 必填
templateId: "2c98d5446734acf5016827d168a6013b", //模板id,由创建模板接口调用返回的templateId 必填
...
@@ -997,10 +1095,59 @@ class UtilESignBaoService {
...
@@ -997,10 +1095,59 @@ class UtilESignBaoService {
return
result
;
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
)
{
async
returnResult
(
params
,
reqUrl
,
opClassName
,
opMethod
,
result
)
{
var
data
=
JSON
.
stringify
(
params
);
var
data
=
JSON
.
stringify
(
params
);
var
rtn
=
null
;
var
rtn
=
null
;
try
{
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
);
rtn
=
await
this
.
restClient
.
execPostESignBao
(
data
,
reqUrl
);
console
.
log
(
rtn
,
"rtn---------------------------------e签宝--------execPostESignBao---------------->>>>>>>>>>>>>>>>"
);
console
.
log
(
rtn
,
"rtn---------------------------------e签宝--------execPostESignBao---------------->>>>>>>>>>>>>>>>"
);
if
(
rtn
.
stdout
==
null
||
rtn
.
stdout
==
""
||
rtn
.
stdout
==
"undefined"
)
{
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 {
...
@@ -27,6 +27,14 @@ class System {
return
System
.
objTable
[
key
];
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
=
"操作失败"
){
static
getResult3
(
data
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
){
var
total
=
data
.
total
;
var
total
=
data
.
total
;
data
=
data
.
hits
;
data
=
data
.
hits
;
...
@@ -264,7 +272,7 @@ class System {
...
@@ -264,7 +272,7 @@ class System {
var
domain
=
"http://39.107.234.14"
;
var
domain
=
"http://39.107.234.14"
;
return
{
return
{
// 渠道服务
// 渠道服务
channel
:
domain
+
":3003"
+
path
,
channel
:
domain
2
+
":3003"
+
path
,
}
}
}
else
{
}
else
{
// var odomain = "http://123.57.217.203"
// var odomain = "http://123.57.217.203"
...
@@ -282,7 +290,7 @@ class System {
...
@@ -282,7 +290,7 @@ class System {
let
key
=
AES_conf
.
key
;
let
key
=
AES_conf
.
key
;
let
iv
=
AES_conf
.
iv
;
let
iv
=
AES_conf
.
iv
;
// let padding = AES_conf.padding;
// let padding = AES_conf.padding;
var
cipherChunks
=
[];
var
cipherChunks
=
[];
var
cipher
=
crypto
.
createCipheriv
(
'aes-128-cbc'
,
key
,
iv
);
var
cipher
=
crypto
.
createCipheriv
(
'aes-128-cbc'
,
key
,
iv
);
cipher
.
setAutoPadding
(
true
);
cipher
.
setAutoPadding
(
true
);
...
@@ -299,7 +307,7 @@ class System {
...
@@ -299,7 +307,7 @@ class System {
let
key
=
AES_conf
.
key
;
let
key
=
AES_conf
.
key
;
let
iv
=
AES_conf
.
iv
;
let
iv
=
AES_conf
.
iv
;
// let padding = AES_conf.padding;
// let padding = AES_conf.padding;
var
cipherChunks
=
[];
var
cipherChunks
=
[];
var
decipher
=
crypto
.
createDecipheriv
(
'aes-128-cbc'
,
key
,
iv
);
var
decipher
=
crypto
.
createDecipheriv
(
'aes-128-cbc'
,
key
,
iv
);
decipher
.
setAutoPadding
(
true
);
decipher
.
setAutoPadding
(
true
);
...
...
bpo-admin/app/base/utils/ossClient.js
View file @
b9fabe56
...
@@ -4,8 +4,8 @@ class OSSClient{
...
@@ -4,8 +4,8 @@ class OSSClient{
constructor
(){
constructor
(){
this
.
client
=
new
OSS
({
this
.
client
=
new
OSS
({
endpoint
:
'https://oss-cn-beijing.aliyuncs.com'
,
endpoint
:
'https://oss-cn-beijing.aliyuncs.com'
,
accessKeyId
:
'LTAI
yAUK8AD04P5S
'
,
accessKeyId
:
'LTAI
4GC5tSKvqsH2hMqj6pvd
'
,
accessKeySecret
:
'
DHmRtFlw2Zr3KaRwUFeiu7FWATnmla
'
accessKeySecret
:
'
3KV9nIwW8qkTGlrPmAe3HnR3fzM6r5
'
});
});
this
.
client
.
useBucket
(
'gsb-zc'
);
this
.
client
.
useBucket
(
'gsb-zc'
);
}
}
...
...
bpo-admin/app/front/vues/pages/channelmerchantmanager/channelmerchantmanager.html
View file @
b9fabe56
...
@@ -34,6 +34,17 @@
...
@@ -34,6 +34,17 @@
</el-option>
</el-option>
</el-select>
</el-select>
</div>
</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;"
>
<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=
"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>
<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 @@
...
@@ -68,6 +79,7 @@
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
>
<template
slot-scope=
"scope"
>
<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:;"
@
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>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -137,12 +149,12 @@
...
@@ -137,12 +149,12 @@
remote
remote
clearable
clearable
reserve-keyword
reserve-keyword
style=
"width:4
20
px;float: left;"
style=
"width:4
68
px;float: left;"
placeholder=
"请搜索商户名称"
placeholder=
"请搜索商户名称"
@
change=
"merchantNameChange"
@
change=
"merchantNameChange"
:remote-method=
"suggestMerchantNames"
:remote-method=
"suggestMerchantNames"
:loading=
"merchantNameLoading"
:loading=
"merchantNameLoading"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id
|| dkcompany.types
"
>
>
<el-option
<el-option
v-for=
"item in merchantNameList"
v-for=
"item in merchantNameList"
...
@@ -163,12 +175,12 @@
...
@@ -163,12 +175,12 @@
remote
remote
clearable
clearable
reserve-keyword
reserve-keyword
style=
"width:4
20
px;float: left;"
style=
"width:4
68
px;float: left;"
placeholder=
"请搜索商户名称"
placeholder=
"请搜索商户名称"
@
change=
"merchantNameChangeoffline"
@
change=
"merchantNameChangeoffline"
:remote-method=
"suggestMerchantNamesoffline"
:remote-method=
"suggestMerchantNamesoffline"
:loading=
"merchantNameLoading"
:loading=
"merchantNameLoading"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id"
:disabled=
"dkcompany.id && dkcompany.origin_merchant_id
|| dkcompany.types
"
>
>
<el-option
<el-option
v-for=
"item in merchantNameListoffline"
v-for=
"item in merchantNameListoffline"
...
@@ -230,8 +242,92 @@
...
@@ -230,8 +242,92 @@
<div
style=
"margin-left: 200px;"
>
<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>
<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>
</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>
</div>
</gsb-pcpage>
</gsb-pcpage>
bpo-admin/app/front/vues/pages/channelmerchantmanager/channelmerchantmanager.js
View file @
b9fabe56
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
dkcompany
:
{},
dkcompany
:
{},
editTitle
:
"新增"
,
editTitle
:
"新增"
,
showEdit
:
false
,
showEdit
:
false
,
showEdit2
:
false
,
saveLoading
:
false
,
saveLoading
:
false
,
ownerList
:[],
ownerList
:[],
ownerMap
:[],
ownerMap
:[],
...
@@ -23,7 +24,15 @@
...
@@ -23,7 +24,15 @@
merchantNameListoffline
:
[],
merchantNameListoffline
:
[],
merchantNameMap
:[],
merchantNameMap
:[],
merchantNameMapoffline
:
[],
merchantNameMapoffline
:
[],
optionsTypes
:[
{
id
:
0
,
name
:
'是'
},{
id
:
1
,
name
:
'否'
}
],
search
:
{
search
:
{
list
:
[],
list
:
[],
currentPage
:
1
,
currentPage
:
1
,
...
@@ -211,6 +220,16 @@
...
@@ -211,6 +220,16 @@
},
},
toDetail
(
id
)
{
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
)
{
openEdit
(
id
)
{
this
.
ownerLoading
=
false
;
this
.
ownerLoading
=
false
;
this
.
saveLoading
=
false
;
this
.
saveLoading
=
false
;
...
@@ -274,6 +293,9 @@
...
@@ -274,6 +293,9 @@
self
.
ownerLoading
=
false
;
self
.
ownerLoading
=
false
;
},
15000
);
},
15000
);
},
},
saveCompany2
()
{
},
saveCompany
()
{
saveCompany
()
{
var
self
=
this
;
var
self
=
this
;
self
.
saveLoading
=
true
;
self
.
saveLoading
=
true
;
...
...
bpo-admin/app/front/vues/pages/entcontractall2/entcontractall2.html
0 → 100644
View file @
b9fabe56
<gsb-pcpage>
<div
style=
"padding:10px 20px;"
>
<div
style=
"height: auto; max-width: 1500px;"
>
<!-- <el-card style="background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;">-->
<!-- <div style="width:100%;line-height: 40px;">-->
<!-- <div style="float:left;width: auto;">-->
<!-- <span style="color:2F2F2F;font-size: 14px;" >所属企业: </span>-->
<!-- <el-select-->
<!-- v-model="selname"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- style="width:200px;"-->
<!-- placeholder="请搜索公司名称"-->
<!-- @change="nameChange"-->
<!-- :remote-method="getCompanyNames"-->
<!-- :loading="nameLoading">-->
<!-- <el-option-->
<!-- v-for="item in nameList"-->
<!-- :key="item.id"-->
<!-- :label="item.name"-->
<!-- :value="item.name">-->
<!-- <span style="float: left;width:150px;">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- <div style="float:left;width: auto;margin-left: 40px;">-->
<!-- <span style="color:2F2F2F;font-size: 14px;" >客户姓名: </span>-->
<!-- <el-input v-model="search.accountName" maxlength="50" clearable style="width:160px;height: 36px;" ></el-input>-->
<!-- </div>-->
<!-- <div style="float:left;width: auto;margin-left: 40px;">-->
<!-- <span style="color:2F2F2F;font-size: 14px;" >身份证: </span>-->
<!-- <el-input v-model="search.accountIdno" maxlength="50" clearable style="width:160px;height: 36px;" ></el-input>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div style="clear:both;height:20px;"></div>-->
<!-- <div style="width:100%;line-height: 40px;">-->
<!-- <div style="float:left;width: auto;">-->
<!-- <span style="color:2F2F2F;font-size: 14px;" >客户手机: </span>-->
<!-- <el-input v-model="search.accountMobile" maxlength="50" clearable style="width:200px;height: 36px;" ></el-input>-->
<!-- </div>-->
<!-- <div style="float:left;width: 400px;margin-left: 40px;">-->
<!-- <span style="color:2F2F2F;font-size: 14px; float:left;" >签约日期: </span>-->
<!-- <el-date-picker-->
<!-- v-model="search.signBegin"-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- style="width:140px;height: 36px;float:left;"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- default-value="">-->
<!-- </el-date-picker>-->
<!-- <el-date-picker-->
<!-- v-model="search.signEnd"-->
<!-- type="date"-->
<!-- style="width:140px;height: 36px;margin-left: 16px;float:left;"-->
<!-- placeholder="结束时间"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- default-value="">-->
<!-- </el-date-picker>-->
<!-- </div>-->
<!-- <div style="float:left;margin-top:5px;margin-left: 40px;">-->
<!-- <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>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-card>-->
<el-card
style=
"background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;"
>
<div
style=
"margin-top: -15px;"
>
<div
style=
"line-height: 36px;padding-bottom: 20px;"
>
<span
style=
"float:left;color:#2F2F2F;font-size: 14px;"
>
共{{search.total}}条记录
</span>
<!-- <el-button @click="exportList()" style="float:right;width:100px;height:36px;color: #FFFFFF;font-weight: 400;border-radius: 4px;font-size: 14px;background-color: #59C1A6;padding-top:11px">导出签约</el-button>-->
<!-- <el-button @click="autoOpenEdit()" style="float:right;width:120px;height:36px;color: #FFFFFF;font-weight: 400;border-radius: 4px;font-size: 14px;background-color: #59C1A6;padding-top:11px">批量签约</el-button>-->
</div>
<div
style=
"margin-top: 15px;"
>
<el-table
stripe
fix=
"true"
:data=
"search.list"
style=
"width: 100%;margin-top: 23px;min-height: 500px;"
empty-text=
"暂无申请"
tooltip-effect=
"light"
header-cell-style=
"background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style=
"height:50px;"
>
<el-table-column
prop=
"id"
label=
"id"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"公司名称"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"esignUrl"
label=
"手动签署"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<!-- <el-table-column prop="template.nameA" label="签约主体" :formatter="onColFormater" align="center" show-overflow-tooltip ></el-table-column>-->
<el-table-column
prop=
"eaccount.userName"
label=
"姓名"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"eaccount.mobile"
label=
"手机号"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"eaccount.personsSign"
label=
"身份证"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"eflowstatusname"
label=
"签署状态"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"completed_at"
label=
"签约时间"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
align=
"center"
>
<a
v-if=
"!scope.row.esignUrl"
href=
"javascript:;"
@
click=
"toHand(scope.row.id)"
style=
"float:left;text-decoration: none;color:#59C1A6;font-size: 14px;margin-left: 10px;"
>
发起手动
</a>
</template>
</el-table-column>
</el-table>
<div
style=
"width:100%;text-align: center;margin-top: 20px"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"search.currentPage"
:page-sizes=
"[10, 20, 50, 100]"
:page-size=
"search.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"search.total"
>
</el-pagination>
</div>
</div>
</div>
</el-card>
<el-dialog
width=
"730px"
:visible
.
sync=
"showEdit"
>
<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;"
>
录入协议
</span>
<div
style=
"width: 730px; height: 1px;background-color: #E3E3E3;margin: 17px 20px 0px -20px"
></div>
</div>
<el-form
:model=
"aggreement"
:rules=
"rules"
ref=
"aggreement"
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=
"ecompanyName"
>
<el-select
v-model=
"aggreement.ecompanyName"
filterable
remote
clearable
reserve-keyword
style=
"width:340px;"
placeholder=
"请搜索公司名称"
@
change=
"nameChange2"
:remote-method=
"getCompanyNames2"
:loading=
"nameLoading2"
>
<el-option
v-for=
"item in nameList2"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
>
<span
style=
"float: left;width:150px;"
>
{{ item.name }}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"姓名:"
prop=
"userName"
>
<el-input
v-model=
"aggreement.userName"
placeholder=
"请输入姓名"
maxlength=
"20"
style=
"width:340px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"手机号:"
prop=
"mobile"
>
<el-input
v-model=
"aggreement.mobile"
placeholder=
"请输入手机号"
maxlength=
"20"
style=
"width:340px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"身份证:"
prop=
"personsSign"
>
<el-input
v-model=
"aggreement.personsSign"
placeholder=
"请输入手机号"
maxlength=
"30"
style=
"width:340px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"银行卡号:"
prop=
"bankno"
>
<el-input
v-model=
"aggreement.bankno"
placeholder=
"请输入手机号"
maxlength=
"50"
style=
"width:340px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"签约协议:"
prop=
"fileurl"
>
<gsb-upload3
ref=
"upload3"
v-model=
"uploadResult"
@
uploadsuccess=
"uploadsuccess"
filetype=
"pdf"
></gsb-upload3>
</el-form-item>
</el-form>
<div
style=
"margin-left: 226px;"
>
<el-button
:loading=
"submitLoading"
@
click=
"save"
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
width=
"730px"
:visible
.
sync=
"showAutoEdit"
>
<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;"
>
批量签约
</span>
<div
style=
"width: 730px; height: 1px;background-color: #E3E3E3;margin: 17px 20px 0px -20px"
></div>
</div>
<el-form
:model=
"autoAggreement"
:rules=
"rules"
ref=
"autoAggreement"
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=
"etemplateName"
>
<el-select
v-model=
"autoAggreement.etemplateName"
filterable
remote
clearable
reserve-keyword
style=
"width:340px;"
placeholder=
"请搜索模板名称"
@
change=
"autoNameChange2"
:remote-method=
"getTemplateNames2"
:loading=
"autoNameLoading2"
>
<el-option
v-for=
"item in autoNameList2"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
>
<span
style=
"float: left;width:150px;"
>
{{ item.name }}
</span>
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="签约协议:" prop="fileurl">
<gsb-upload3 ref="upload3" v-model="autoUploadResult" @uploadsuccess="autoUpload" filetype="pdf"></gsb-upload3>
</el-form-item> -->
<el-form-item
label=
"签约人员:"
prop=
"fileFourElement"
>
<gsb-upload3
ref=
"upload4"
v-model=
"autoUploadResult"
@
uploadsuccess=
"autoUploadFourElement"
filetype=
"xlsx"
></gsb-upload3>
<a
href=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_887156480901876320193131018763autosign.xlsx"
download=
"四要素.xlsx"
target=
"_blank"
>
下载模板
</a>
</el-form-item>
</el-form>
</el-form>
<div
style=
"margin-left: 226px;"
>
<el-button
:loading=
"submitLoading"
@
click=
"autoSave"
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/entcontractall2/entcontractall2.js
0 → 100644
View file @
b9fabe56
{
template
:
'${tmpl}'
,
data
:
function
()
{
var
validMethod
=
(
rule
,
value
,
callback
)
=>
{
return
this
.
validfileds
(
rule
,
value
,
callback
);
};
return
{
showDetail
:
false
,
showEdit
:
false
,
showAutoEdit
:
false
,
selname
:
""
,
submitLoading
:
false
,
isFirstEdit
:
true
,
eduTypeList
:
[],
search
:
{
list
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
ecompany_id
:
''
,
accountName
:
''
,
accountMobile
:
''
,
accountIdno
:
''
,
signBegin
:
''
,
signEnd
:
''
,
},
rules
:
{
ecompanyName
:
[
{
required
:
true
,
message
:
'请输入公司名称'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
userName
:
[
{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
},
],
mobile
:
[
{
required
:
true
,
message
:
'请输入手机号'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
personsSign
:
[
{
required
:
true
,
message
:
'请输入身份证'
,
trigger
:
'blur'
},
],
bankno
:
[
{
required
:
true
,
message
:
'请输入银行卡'
,
trigger
:
'blur'
},
],
fileurl
:
[
{
required
:
true
,
message
:
'请上传签约协议'
,
trigger
:
'blur'
},
],
fileFourElement
:
[
{
required
:
true
,
message
:
'请上传签约人员'
,
trigger
:
'blur'
},
],
a
:
[],
etemplateName
:
[
{
required
:
true
,
message
:
'请输入模板名称'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
},
nameLoading
:
false
,
nameList
:
[],
nameMap
:[],
nameLoading2
:
false
,
nameList2
:
[],
nameMap2
:[],
uploadResult
:
null
,
autoNameLoading2
:
false
,
autoNameList2
:
[],
autoNameMap2
:[],
aggreement
:
{},
autoAggreement
:
{},
autoUploadResult
:
null
,
}
},
mounted
:
function
()
{
this
.
resetSearch
();
},
created
:
function
()
{},
methods
:
{
getEmptySearch
()
{
return
{
list
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
ecompany_id
:
''
,
accountName
:
''
,
accountMobile
:
''
,
accountIdno
:
''
,
signBegin
:
''
,
signEnd
:
''
,
}
},
resetSearch
()
{
this
.
search
=
this
.
getEmptySearch
();
this
.
selname
=
""
;
this
.
getList
();
},
tableHeaderColor
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
rowIndex
===
0
)
{
return
'background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;'
}
},
opSearch
()
{
this
.
getList
();
},
getList
()
{
var
self
=
this
;
this
.
$root
.
postReq
(
"/web/entcontractCtl/allList2"
,
{
search
:
self
.
getParams
()
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
search
.
list
=
d
.
data
.
rows
||
[];
self
.
search
.
total
=
d
.
data
.
count
||
0
;
}
else
{}
});
},
getParams
()
{
var
params
=
{};
for
(
var
f
in
this
.
search
)
{
if
(
f
==
"list"
)
{
continue
;
}
params
[
f
]
=
this
.
search
[
f
];
}
return
params
;
},
exportList
()
{
window
.
open
(
"/web/entcontractCtl/allExport"
+
this
.
getExportParams
());
},
getExportParams
()
{
var
params
=
{};
for
(
var
f
in
this
.
search
)
{
if
(
f
==
"list"
)
{
continue
;
}
params
[
f
]
=
this
.
search
[
f
];
}
return
"?search="
+
encodeURIComponent
(
JSON
.
stringify
(
params
));
},
onColFormater
(
row
,
column
,
cellValue
,
index
)
{
return
cellValue
||
"---"
;
},
handleSizeChange
(
val
)
{
this
.
search
.
pageSize
=
val
;
this
.
resetSearch
();
},
handleCurrentChange
(
val
)
{
this
.
search
.
currentPage
=
val
;
this
.
getList
();
},
validfileds
(
rule
,
value
,
callback
)
{
var
self
=
this
;
if
(
rule
.
field
==
'name'
)
{
if
(
!
self
.
intention
.
name
)
{
return
callback
(
new
Error
(
"请输入客户名称"
));
}
self
.
$root
.
postReq
(
"/web/eintentionCtl/validName"
,
{
name
:
self
.
intention
.
name
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
return
callback
();
}
else
{
return
callback
(
new
Error
(
d
.
msg
));
}
});
}
else
{
return
callback
();
}
if
(
rule
.
field
==
"ecompanyName"
)
{
if
(
!
self
.
aggreement
.
ecompany_id
)
{
return
callback
(
new
Error
(
"请重新选择公司名称"
));
}
}
if
(
rule
.
field
==
"mobile"
)
{
if
(
!
/^
(
1
)\d{10}
$/
.
text
(
self
.
aggreement
.
mobile
))
{
return
callback
(
new
Error
(
"请输入公司名称"
));
}
}
},
changeStatus
()
{
this
.
curStatus
=
this
.
search
.
applyStatus
;
this
.
search
.
currentPage
=
1
;
this
.
search
.
pageSize
=
20
;
this
.
search
.
total
=
0
;
this
.
getList
();
},
openEdit
()
{
var
self
=
this
;
self
.
nameList
=
[];
self
.
aggreement
=
{};
self
.
showEdit
=
true
;
if
(
self
.
isFirstEdit
)
{
self
.
isFirstEdit
=
false
;
}
else
{
self
.
$refs
.
aggreement
.
resetFields
();
self
.
clearUpload
();
}
},
autoOpenEdit
()
{
var
self
=
this
;
self
.
autoAggreement
=
{};
self
.
showAutoEdit
=
true
;
self
.
autoClearUpload
();
},
nameChange
(
val
)
{
console
.
log
(
val
,
"------------------------- "
);
var
self
=
this
;
var
item
=
self
.
nameMap
[
val
];
self
.
search
.
entcompany_id
=
(
item
||
{}).
id
||
""
;
},
nameChange2
(
val
)
{
var
self
=
this
;
var
item
=
self
.
nameMap2
[
val
];
self
.
aggreement
.
entcompany_id
=
(
item
||
{}).
id
||
""
;
console
.
log
(
val
,
self
.
aggreement
.
entcompany_id
,
"------------------------- "
);
},
autoNameChange2
(
val
)
{
var
self
=
this
;
var
item
=
self
.
autoNameMap2
[
val
];
self
.
autoAggreement
.
etemplate_id
=
(
item
||
{}).
id
||
""
;
console
.
log
(
val
,
self
.
autoAggreement
.
etemplate_id
,
"---------22222222222---------------- "
);
},
save
()
{
var
self
=
this
;
self
.
submitLoading
=
true
;
self
.
$refs
.
aggreement
.
validate
((
valid
)
=>
{
if
(
valid
)
{
setTimeout
(()
=>
{
self
.
submitLoading
=
false
;
},
5000
);
self
.
$root
.
postReq
(
"/web/entcontractCtl/saveOffline"
,
self
.
aggreement
).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
getList
();
self
.
$confirm
(
"保存成功,继续录入下一条?"
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'success'
}).
then
(()
=>
{
self
.
aggreement
=
{};
self
.
clearUpload
();
}).
catch
(()
=>
{
self
.
showEdit
=
false
;
});
}
else
{
self
.
$alert
(
d
.
msg
||
'保存失败'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
self
.
submitLoading
=
false
;
});
}
else
{
self
.
submitLoading
=
false
;
return
false
;
}
});
},
autoSave
()
{
var
self
=
this
;
self
.
submitLoading
=
true
;
self
.
$refs
.
autoAggreement
.
validate
((
valid
)
=>
{
self
.
submitLoading
=
false
;
if
(
valid
)
{
var
list
=
self
.
autoAggreement
.
autoExcel
||
[];
var
d
=
3
*
list
.
length
;
const
loading
=
self
.
$loading
({
lock
:
true
,
text
:
'正在签约,请耐心等待,大约需要'
+
d
+
'秒后签约完成'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
self
.
$root
.
postReq
(
"/web/entcontractCtl/autoSaveOffline"
,
self
.
autoAggreement
).
then
(
function
(
d
)
{
loading
.
close
();
if
(
d
.
status
==
0
)
{
self
.
getList
();
self
.
autoClearUpload
();
self
.
showAutoEdit
=
false
;
self
.
$alert
(
'批量录入成功'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
else
{
self
.
$alert
(
d
.
msg
||
'保存失败'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
});
}
else
{
return
false
;
}
});
},
getCompanyNames
(
query
)
{
var
self
=
this
;
self
.
nameLoading
=
true
;
self
.
$root
.
postReq
(
"/web/ecompanyCtl/suggest"
,
{
name
:
query
}).
then
(
function
(
d
)
{
self
.
nameLoading
=
false
;
self
.
nameList
=
d
.
data
||
[];
self
.
nameMap
=
[];
for
(
var
item
of
self
.
nameList
)
{
self
.
nameMap
[
item
.
name
]
=
item
;
}
});
setTimeout
(()
=>
{
self
.
nameLoading
=
false
;
},
15000
);
},
getCompanyNames2
(
query
)
{
var
self
=
this
;
self
.
nameLoading2
=
true
;
self
.
$root
.
postReq
(
"/web/ecompanyCtl/suggest"
,
{
name
:
query
}).
then
(
function
(
d
)
{
self
.
nameLoading2
=
false
;
self
.
nameList2
=
d
.
data
||
[];
self
.
nameMap2
=
[];
for
(
var
item
of
self
.
nameList2
)
{
self
.
nameMap2
[
item
.
name
]
=
item
;
}
});
setTimeout
(()
=>
{
self
.
nameLoading2
=
false
;
},
15000
);
},
getTemplateNames2
(
query
)
{
var
self
=
this
;
self
.
autoNameLoading2
=
true
;
self
.
$root
.
postReq
(
"/web/etemplateCtl/getListByName"
,
{
name
:
query
}).
then
(
function
(
d
)
{
self
.
autoNameLoading2
=
false
;
self
.
autoNameList2
=
d
.
data
||
[];
self
.
autoNameMap2
=
[];
for
(
var
item
of
self
.
autoNameList2
)
{
self
.
autoNameMap2
[
item
.
name
]
=
item
;
}
});
setTimeout
(()
=>
{
self
.
autoNameLoading2
=
false
;
},
15000
);
},
clearUpload
()
{
var
self
=
this
;
self
.
uploadResult
=
null
;
self
.
aggreement
.
fileurl
=
""
;
if
(
self
.
$refs
.
upload3
&&
self
.
$refs
.
upload3
.
$refs
&&
self
.
$refs
.
upload3
.
$refs
.
upload
)
{
self
.
$refs
.
upload3
.
$refs
.
upload
.
clearFiles
();
}
},
autoClearUpload
()
{
var
self
=
this
;
self
.
autoUploadResult
=
null
;
self
.
autoAggreement
.
fileurl
=
""
;
self
.
autoAggreement
.
fileFourElement
=
""
;
self
.
$refs
.
upload3
.
$refs
.
upload
.
clearFiles
();
self
.
$refs
.
upload4
.
$refs
.
upload
.
clearFiles
();
},
uploadsuccess
(
v
)
{
if
(
!
v
||
!
v
[
0
]
||
!
v
[
0
].
url
)
{
this
.
$message
.
warning
(
"上传失败"
);
return
;
}
this
.
aggreement
.
fileurl
=
v
[
0
].
url
;
},
autoUpload
(
v
)
{
if
(
!
v
||
!
v
[
0
]
||
!
v
[
0
].
url
)
{
this
.
$message
.
warning
(
"上传失败"
);
return
;
}
this
.
autoAggreement
.
fileurl
=
v
[
0
].
url
;
},
autoUploadFourElement
(
v
)
{
if
(
!
v
||
!
v
[
0
]
||
!
v
[
0
].
url
)
{
this
.
$message
.
warning
(
"上传失败"
);
return
;
}
this
.
autoAggreement
.
fileFourElement
=
v
[
0
].
url
;
this
.
parseExcel
();
},
parseExcel
()
{
var
self
=
this
;
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'正在解析签约人员'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
self
.
$root
.
postReq
(
"/web/usereaccountCtl/parseItems"
,
{
url
:
self
.
autoAggreement
.
fileFourElement
}).
then
(
function
(
d
)
{
loading
.
close
();
if
(
d
.
status
==
0
)
{
var
itemlist
=
(
d
.
data
||
{}).
list
;
self
.
autoAggreement
.
autoExcel
=
itemlist
;
console
.
log
(
itemlist
,
"************22222222222222*****************"
);
}
else
{
/* self.autoClearUpload();*/
self
.
$alert
(
d
.
msg
||
"文件解析失败"
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
});
},
downloadContractUrl
(
id
)
{
var
self
=
this
;
self
.
$root
.
postReq
(
"/web/entcontractCtl/downloadContractUrl"
,
{
id
:
id
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
&&
d
.
data
)
{
window
.
open
(
d
.
data
);
}
else
{
self
.
$message
.
warning
(
d
.
msg
||
"上传失败"
);
}
});
},
toHand
(
id
)
{
var
self
=
this
;
self
.
$root
.
postReq
(
"/web/entcontractCtl/yzReSign"
,
{
id
:
id
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
&&
d
.
data
)
{
self
.
$alert
(
"https://bpohhr.gongsibao.com/bpoent?entid="
+
id
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
else
{
self
.
$message
.
warning
(
d
.
msg
||
"签署失败"
);
}
});
},
},
vname
:
"gsb-econtractall2"
}
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