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
fdca4c62
Commit
fdca4c62
authored
Dec 25, 2019
by
赵庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
45f626e5
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1507 additions
and
11 deletions
+1507
-11
bpo-admin/app/base/controller/impl/entcompanyCtl.js
+1
-1
bpo-admin/app/base/controller/impl/entcontractCtl.js
+1
-1
bpo-admin/app/base/db/metadata/apps/platform.js
+3
-3
bpo-admin/app/base/service/impl/entcontractSve.js
+3
-3
bpo-admin/app/base/service/impl/enttemplateSve.js
+6
-0
bpo-admin/app/front/vues/pages/entcompanymy/entcompanymy.html
+156
-0
bpo-admin/app/front/vues/pages/entcompanymy/entcompanymy.js
+231
-0
bpo-admin/app/front/vues/pages/entcontractall/entcontractall.js
+3
-3
bpo-admin/app/front/vues/pages/entcontractmy/entcontractmy.html
+229
-0
bpo-admin/app/front/vues/pages/entcontractmy/entcontractmy.js
+439
-0
bpo-admin/app/front/vues/pages/enttemplatemy/enttemplatemy.html
+167
-0
bpo-admin/app/front/vues/pages/enttemplatemy/enttemplatemy.js
+268
-0
No files found.
bpo-admin/app/base/controller/impl/entcompanyCtl.js
View file @
fdca4c62
...
...
@@ -109,7 +109,7 @@ class EntcompanyCtl extends CtlBase {
}
try
{
var
page
=
await
this
.
service
.
page
ByCondition
(
params
);
var
page
=
await
this
.
service
.
list
ByCondition
(
params
);
return
system
.
getResult2
(
page
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
bpo-admin/app/base/controller/impl/entcontractCtl.js
View file @
fdca4c62
...
...
@@ -137,7 +137,7 @@ class EntcontractCtl extends CtlBase {
params
.
eflowstatusList
=
[
'2'
];
this
.
doTimeCondition
(
params
,
[
"signBegin"
,
"signEnd"
]);
try
{
var
page
=
await
this
.
service
.
page
ByCondition
(
params
);
var
page
=
await
this
.
service
.
list
ByCondition
(
params
);
return
system
.
getResult2
(
page
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
bpo-admin/app/base/db/metadata/apps/platform.js
View file @
fdca4c62
...
...
@@ -1556,9 +1556,9 @@ module.exports = {
"entcontractall"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontractall"
,
"comname"
:
"entcontractall"
},
// 企业电子签-个人
"entcompanymy"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompany
admin
"
,
"comname"
:
"entcompanymy"
},
"enttemplatemy"
:
{
"title"
:
"模板管理"
,
"config"
:
null
,
"path"
:
"/enttemplate
admin
"
,
"comname"
:
"enttemplatemy"
},
"entcontractmy"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontract
all
"
,
"comname"
:
"entcontractmy"
},
"entcompanymy"
:
{
"title"
:
"企业管理"
,
"config"
:
null
,
"path"
:
"/entcompany
my
"
,
"comname"
:
"entcompanymy"
},
"enttemplatemy"
:
{
"title"
:
"模板管理"
,
"config"
:
null
,
"path"
:
"/enttemplate
my
"
,
"comname"
:
"enttemplatemy"
},
"entcontractmy"
:
{
"title"
:
"签约管理"
,
"config"
:
null
,
"path"
:
"/entcontract
my
"
,
"comname"
:
"entcontractmy"
},
// "dkcompanyadmin": {"title": "企业管理", "config": null, "path": "/dkcompanyadmin", "comname": "dkcompanyadmin"},
},
...
...
bpo-admin/app/base/service/impl/entcontractSve.js
View file @
fdca4c62
...
...
@@ -287,13 +287,13 @@ class EntcontractService extends ServiceBase {
var
where
=
{};
if
(
params
.
ecompanyIds
)
{
where
.
ecompany_id
=
{
where
.
e
nt
company_id
=
{
[
this
.
db
.
Op
.
in
]:
params
.
ecompanyIds
};
}
if
(
params
.
ecompany_id
)
{
where
.
e
company_id
=
params
.
e
company_id
;
if
(
params
.
e
nt
company_id
)
{
where
.
e
ntcompany_id
=
params
.
ent
company_id
;
}
if
(
params
.
eflowstatusList
)
{
...
...
bpo-admin/app/base/service/impl/enttemplateSve.js
View file @
fdca4c62
...
...
@@ -20,6 +20,12 @@ class EnttemplateService extends ServiceBase{
};
}
if
(
params
.
ecompanyIds
)
{
where
.
entcompany_id
=
{
[
this
.
db
.
Op
.
in
]:
params
.
ecompanyIds
};
}
if
(
params
.
entcompany_id
)
{
where
.
entcompany_id
=
params
.
entcompany_id
;
}
...
...
bpo-admin/app/front/vues/pages/entcompanymy/entcompanymy.html
0 → 100644
View file @
fdca4c62
<gsb-pcpage>
<style>
::el-radio-button__inner
{
border-color
:
#D9D9D9
;
}
</style>
<div
style=
"padding:20px;"
>
<div
style=
"height: auto;min-width: 1000px; 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: 300px;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
企业名称:
</span>
<el-input
v-model=
"search.name"
placeholder=
"请输入企业名称"
maxlength=
"100"
clearable
style=
"max-width:200px;height: 36px;"
></el-input>
</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>
</div>
</div>
</el-card>
<el-card
style=
"background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;"
>
<div>
<div
style=
"line-height: 36px;padding-bottom: 20px;"
>
<span
style=
"float:left;color:#2F2F2F;font-size: 14px;"
>
共{{search.total}}条记录
</span>
</div>
<div>
<el-table
stripe
fix=
"true"
:data=
"search.list"
tooltip-effect=
"light"
style=
"min-width: 1000px;max-width: 1500px;margin-top: 23px;min-height: 500px;"
empty-text=
"暂无需求"
header-cell-style=
"background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style=
"height:50px;"
>
<el-table-column
prop=
"id"
label=
"序号"
:formatter=
"onColFormater"
width=
"80"
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=
"legal"
label=
"法人"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"contactMobile"
label=
"电话"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"owner.nickName"
label=
"所属人"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"addr"
label=
"联系地址"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"sealId"
label=
"公章id"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"addr"
label=
"联系地址"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建日期"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<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>
</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=
"862px"
: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;"
>
{{editTitle}}企业
</span>
<div
style=
"width: 862px; height: 1px;background-color: #E3E3E3;margin: 17px 20px 0px -20px"
></div>
</div>
<el-form
:model=
"entcompany"
:rules=
"rules"
ref=
"entcompany"
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=
"name"
>
<el-input
v-model=
"entcompany.name"
placeholder=
"请输入企业名称"
maxlength=
"100"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"法人姓名:"
prop=
"legal"
>
<el-input
v-model=
"entcompany.legal"
placeholder=
"请输入法人姓名"
maxlength=
"30"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"联系电话:"
prop=
"contactMobile"
>
<el-input
v-model=
"entcompany.contactMobile"
placeholder=
"请输入联系电话"
maxlength=
"200"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"联系地址:"
prop=
"addr"
>
<el-input
v-model=
"entcompany.addr"
placeholder=
"请输入联系地址"
maxlength=
"200"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"公章名称:"
prop=
"sealName"
>
<el-input
v-model=
"entcompany.sealName"
placeholder=
"请输入公章名称"
maxlength=
"100"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"归属人员:"
prop=
"owner_id"
>
<el-select
v-model=
"entcompany.owner_id"
filterable
remote
clearable
reserve-keyword
style=
"float:left;width:255px;"
placeholder=
"请输入姓名或手机号"
@
change=
"ownerChange"
:remote-method=
"getOwnerList"
:loading=
"ownerLoading"
>
<el-option
v-for=
"item in ownerList"
:key=
"item.id"
:label=
"item.nickName"
:value=
"item.id"
>
<span
style=
"float: left;width:150px;"
>
{{ item.userName }}
</span>
<span
style=
"float: left;width:150px;"
>
{{ item.nickName }}
</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>
\ No newline at end of file
bpo-admin/app/front/vues/pages/entcompanymy/entcompanymy.js
0 → 100644
View file @
fdca4c62
{
template
:
'${tmpl}'
,
data
:
function
()
{
var
validMethod
=
(
rule
,
value
,
callback
)
=>
{
return
this
.
validfileds
(
rule
,
value
,
callback
);
};
return
{
entcompany
:
{},
editTitle
:
"新增"
,
showEdit
:
false
,
saveLoading
:
false
,
ownerList
:[],
ownerMap
:[],
ownerLoading
:
false
,
owner_id
:
""
,
search
:
{
list
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
name
:
''
,
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'请输入企业名称'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
legal
:
[
{
required
:
true
,
message
:
'请输入法人姓名'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
addr
:
[
{
required
:
true
,
message
:
'请输入联系地址'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
contactMobile
:
[
{
required
:
true
,
message
:
'请输入联系电话'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
sealName
:
[
{
required
:
true
,
message
:
'请输入公章名称'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
/*
sealUrl : [
{ required: true, message: '请上传企业公章', trigger: 'blur' },
{ validator: validMethod, trigger: 'blur' }
],*/
owner_id
:
[
{
required
:
true
,
message
:
'请选择客户归属人员'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
a
:
[],
},
}
},
mounted
:
function
()
{
this
.
resetSearch
(
true
);
},
created
:
function
()
{},
methods
:
{
getEmptySearch
()
{
return
{
list
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
name
:
''
,
}
},
resetSearch
()
{
this
.
search
=
this
.
getEmptySearch
();
this
.
getList
();
},
tableHeaderColor
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
rowIndex
===
0
)
{
return
'background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;'
}
},
opSearch
()
{
this
.
search
.
currentPage
=
1
;
this
.
search
.
total
=
0
;
this
.
getList
();
},
getList
()
{
var
self
=
this
;
var
params
=
this
.
getParams
();
this
.
$root
.
postReq
(
"/web/entcompanyCtl/mySignList"
,
{
search
:
params
}).
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
;
},
onColFormater
(
row
,
column
,
cellValue
,
index
)
{
return
cellValue
||
"---"
;
},
getDKcompany
(
id
)
{
var
self
=
this
;
self
.
$root
.
postReq
(
"/web/entcompanyCtl/info"
,
{
id
:
id
,
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
if
(
d
.
data
)
{
d
.
data
.
isEnabled
=
d
.
data
.
isEnabled
?
true
:
false
;
}
self
.
entcompany
=
d
.
data
;
self
.
entcompany
.
owner_id
=
self
.
entcompany
.
owner_id
||
""
;
self
.
owner_id
=
(
d
.
data
.
owner
||
{}).
id
||
""
;
if
(
d
.
data
.
owner
)
{
self
.
ownerList
=
[
d
.
data
.
owner
];
self
.
ownerMap
[
"id_"
+
d
.
data
.
owner
.
id
]
=
d
.
data
.
owner
;
}
else
{
self
.
ownerList
=
null
;
}
}
else
{
self
.
$message
.
warning
(
d
.
msg
||
`您的网络不稳定, 请稍后重试`
);
}
});
},
toDetail
(
id
)
{
},
openEdit
(
id
)
{
this
.
ownerLoading
=
false
;
this
.
saveLoading
=
false
;
this
.
owner_id
=
null
;
if
(
this
.
$refs
.
entcompany
)
{
this
.
$refs
.
entcompany
.
resetFields
();
}
if
(
id
)
{
this
.
getDKcompany
(
id
);
this
.
editTitle
=
"修改"
;
}
else
{
this
.
ownerList
=
[];
this
.
editTitle
=
"新增"
;
this
.
entcompany
=
{
isEnabled
:
true
};
}
this
.
showEdit
=
true
;
},
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
==
'owner_id'
)
{
if
(
!
self
.
entcompany
.
owner_id
)
{
return
callback
(
new
Error
(
"请选择归属人员"
));
}
else
{
return
callback
();
}
}
else
{
return
callback
();
}
},
ownerChange
(
val
)
{
console
.
log
(
val
,
);
this
.
entcompany
.
owner_id
=
val
||
0
;
this
.
owner
=
this
.
ownerMap
[
"id_"
+
val
];
console
.
log
(
this
.
owner
);
},
getOwnerList
(
query
)
{
var
self
=
this
;
self
.
ownerLoading
=
true
;
self
.
$root
.
postReq
(
"/web/userCtl/rolesSuggest"
,
{
name
:
query
,
roleCodes
:
[
"zczy"
,
"zcgl"
,
"qdzy"
,
"qdgl"
,
"ptzy"
,
"ptgl"
,
"dkhzy"
,
"dkhgl"
,
"ziying"
,
"tzgl"
,
"tzzy"
]
}).
then
(
function
(
d
)
{
self
.
ownerLoading
=
false
;
self
.
ownerList
=
d
.
data
||
[];
self
.
ownerMap
=
[];
for
(
var
o
of
self
.
ownerList
)
{
self
.
ownerMap
[
"id_"
+
o
.
id
]
=
o
;
}
});
setTimeout
(()
=>
{
self
.
ownerLoading
=
false
;
},
15000
);
},
saveCompany
()
{
var
self
=
this
;
self
.
saveLoading
=
true
;
self
.
$refs
.
entcompany
.
validate
((
valid
)
=>
{
if
(
valid
)
{
self
.
$root
.
postReq
(
"/web/entcompanyCtl/signSave"
,
self
.
entcompany
).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
$message
.
success
(
`保存成功`
);
self
.
showEdit
=
false
;
self
.
getList
();
}
else
{
self
.
$alert
(
d
.
msg
||
'保存失败'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
self
.
saveLoading
=
false
;
});
}
else
{
self
.
saveLoading
=
false
;
return
false
;
}
});
setTimeout
(()
=>
{
self
.
saveLoading
=
false
;
},
5000
);
},
},
vname
:
"gsb-entcompanyadmin"
}
\ No newline at end of file
bpo-admin/app/front/vues/pages/entcontractall/entcontractall.js
View file @
fdca4c62
...
...
@@ -215,14 +215,14 @@
console
.
log
(
val
,
"------------------------- "
);
var
self
=
this
;
var
item
=
self
.
nameMap
[
val
];
self
.
search
.
ecompany_id
=
(
item
||
{}).
id
||
""
;
self
.
search
.
e
nt
company_id
=
(
item
||
{}).
id
||
""
;
},
nameChange2
(
val
)
{
var
self
=
this
;
var
item
=
self
.
nameMap2
[
val
];
self
.
aggreement
.
ecompany_id
=
(
item
||
{}).
id
||
""
;
self
.
aggreement
.
e
nt
company_id
=
(
item
||
{}).
id
||
""
;
console
.
log
(
val
,
self
.
aggreement
.
ecompany_id
,
"------------------------- "
);
console
.
log
(
val
,
self
.
aggreement
.
e
nt
company_id
,
"------------------------- "
);
},
autoNameChange2
(
val
)
{
var
self
=
this
;
...
...
bpo-admin/app/front/vues/pages/entcontractmy/entcontractmy.html
0 → 100644
View file @
fdca4c62
<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=
"ecompany.name"
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
label=
"查看合同"
>
<template
slot-scope=
"scope"
align=
"center"
>
<a
v-if=
"scope.row.fileurl"
:href=
"scope.row.fileurl"
target=
"_blank"
style=
"float:left;text-decoration: none;color:#59C1A6;font-size: 14px;margin-left: 10px;"
>
查看合同
</a>
<a
v-if=
"!scope.row.fileurl"
href=
"javascript:;"
@
click=
"downloadContractUrl(scope.row.id)"
target=
"_blank"
style=
"float:left;text-decoration: none;color:#59C1A6;font-size: 14px;margin-left: 10px;"
>
查看合同
</a>
</template>
</el-table-column>
<el-table-column
prop=
"completed_at"
label=
"签约时间"
:formatter=
"onColFormater"
align=
"center"
show-overflow-tooltip
></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>
\ No newline at end of file
bpo-admin/app/front/vues/pages/entcontractmy/entcontractmy.js
0 → 100644
View file @
fdca4c62
{
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
,
entcompany_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
,
entcompany_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/myList"
,
{
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
.
entcompany_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
||
"上传失败"
);
}
});
},
},
vname
:
"gsb-econtractall"
}
\ No newline at end of file
bpo-admin/app/front/vues/pages/enttemplatemy/enttemplatemy.html
0 → 100644
View file @
fdca4c62
<gsb-pcpage>
<div
style=
"padding:20px;"
>
<div
style=
"height: auto;min-width: 1000px; 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: 300px;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
模板名称:
</span>
<el-input
v-model=
"search.name"
placeholder=
"请输入模板名称"
maxlength=
"100"
clearable
style=
"max-width:200px;height: 36px;"
></el-input>
</div>
<div
style=
"float:left;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
所属公司:
</span>
<el-select
v-model=
"search.ecompanyName"
filterable
remote
clearable
reserve-keyword
style=
"width:340px;"
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;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>
</div>
</div>
</el-card>
<el-card
style=
"background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;"
>
<div>
<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:110px;height:36px;color: #FFFFFF;font-weight: 400;border-radius: 4px;font-size: 14px;background-color: #59C1A6;padding-top:11px">导出二维码</el-button>-->
<!-- <el-button @click="openEdit()" 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>-->
</div>
<div>
<el-table
stripe
fix=
"true"
:data=
"search.list"
tooltip-effect=
"light"
style=
"min-width: 1000px;max-width: 1500px;margin-top: 23px;min-height: 500px;"
empty-text=
"暂无需求"
header-cell-style=
"background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style=
"height:50px;"
>
<el-table-column
prop=
"id"
label=
"序号"
:formatter=
"onColFormater"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"模板名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"ecompany.name"
label=
"公司名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<!-- <el-table-column prop="ecompanyMain.alias" label="签约主体" :formatter="onColFormater" align="center" ></el-table-column>-->
<!-- <el-table-column label="二维码" >-->
<!-- <template slot-scope="scope" >-->
<!-- <a v-if="scope.row.qrcodeurl" :href="scope.row.qrcodeurl" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">二维码</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
label=
"模板文件"
>
<template
slot-scope=
"scope"
>
<a
v-if=
"scope.row.codeurl"
:href=
"scope.row.codeurl"
target=
"_blank"
style=
"text-decoration: none;color:#59C1A6;font-size: 14px;"
>
查看
</a>
</template>
</el-table-column>
<!-- <el-table-column prop="filekey" label="模板key" :formatter="onColFormater" align="center" show-overflow-tooltip></el-table-column>-->
<el-table-column
prop=
"created_at"
label=
"创建日期"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"updated_at"
label=
"修改日期"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<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>
</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=
"862px"
: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;"
>
{{editTitle}}模板
</span>
<div
style=
"width: 862px; height: 1px;background-color: #E3E3E3;margin: 17px 20px 0px -20px"
></div>
</div>
<el-form
:model=
"etemplate"
:rules=
"rules"
ref=
"etemplate"
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=
"name"
>
<el-input
v-model=
"etemplate.name"
placeholder=
"请输入模板名称:例如韵达、沐冉"
maxlength=
"50"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"所属公司:"
prop=
"ecompanyName"
>
<el-select
v-model=
"etemplate.ecompanyName"
filterable
remote
clearable
reserve-keyword
style=
"width:468px;"
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="ecompanyMainId" >-->
<!-- <el-select v-model="etemplate.ecompanyMainId" style="width:468px;" filterable placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in mainList"-->
<!-- :key="item.id"-->
<!-- :label="item.alias"-->
<!-- :value="item.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- <!– <el-input v-model="etemplate.nameA" placeholder="请输入签约主体" maxlength="50" style="width:468px;" clearable ></el-input> –>-->
<!-- </el-form-item>-->
<el-form-item
label=
"签约协议:"
prop=
"codeurl"
>
<gsb-upload3
ref=
"upload3"
v-model=
"uploadResult"
@
uploadsuccess=
"uploadsuccess"
:fileList=
"fileList"
filetype=
"pdf"
></gsb-upload3>
</el-form-item>
<el-form-item
label=
"备注信息:"
prop=
"remark"
>
<el-input
type=
"textarea"
v-model=
"etemplate.remark"
placeholder=
"请输入备注信息"
maxlength=
"50"
style=
"width:468px;"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"模板参数:"
prop=
"placeholderkey"
>
<el-input
v-model=
"etemplate.placeholderkey"
placeholder=
"请输入模板参数"
maxlength=
"255"
style=
"width:468px;"
showlist=
"true"
:file-list=
"fileList"
clearable
></el-input>
</el-form-item>
</el-form>
<div
style=
"margin-left: 200px;"
>
<el-button
:loading=
"saveLoading"
@
click=
"saveTemplate"
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>
\ No newline at end of file
bpo-admin/app/front/vues/pages/enttemplatemy/enttemplatemy.js
0 → 100644
View file @
fdca4c62
{
template
:
'${tmpl}'
,
data
:
function
()
{
var
validMethod
=
(
rule
,
value
,
callback
)
=>
{
return
this
.
validfileds
(
rule
,
value
,
callback
);
};
return
{
etemplate
:
{
isEnabled
:
true
},
editTitle
:
"新增"
,
showEdit
:
false
,
saveLoading
:
false
,
nameLoading
:
false
,
nameList
:
[],
nameMap
:
[],
nameLoading2
:
false
,
nameList2
:
[],
nameMap2
:[],
uploadResult
:
null
,
fileList
:[],
mainList
:[],
search
:
{
list
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
name
:
''
,
},
rules
:
{
ecompanyName
:
[
{
required
:
true
,
message
:
'请输入公司名称'
,
trigger
:
'blur'
},
{
validator
:
validMethod
,
trigger
:
'blur'
}
],
codeurl
:
[
{
required
:
true
,
message
:
'请上传签约协议'
,
trigger
:
'blur'
},
],
a
:
[],
},
}
},
mounted
:
function
()
{
this
.
resetSearch
(
true
);
this
.
getMainList
();
},
created
:
function
()
{},
methods
:
{
getEmptySearch
()
{
return
{
list
:
[],
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
name
:
''
,
}
},
resetSearch
()
{
this
.
search
=
this
.
getEmptySearch
();
this
.
getList
();
},
tableHeaderColor
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
rowIndex
===
0
)
{
return
'background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;'
}
},
opSearch
()
{
this
.
search
.
currentPage
=
1
;
this
.
search
.
total
=
0
;
this
.
getList
();
},
getMainList
()
{
var
self
=
this
;
this
.
$root
.
postReq
(
"/web/ecompanymainCtl/all"
,
{
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
mainList
=
d
.
data
||
[];
}
else
{
}
});
},
getList
()
{
var
self
=
this
;
var
params
=
this
.
getParams
();
this
.
$root
.
postReq
(
"/web/enttemplateCtl/mySignList"
,
{
search
:
params
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
search
.
list
=
d
.
data
.
rows
||
[];
self
.
search
.
total
=
d
.
data
.
count
||
0
;
}
else
{
}
});
},
exportList
()
{
window
.
open
(
"/web/enttemplateCtl/signExport"
+
this
.
getExportParams
());
},
getParams
()
{
var
params
=
{};
for
(
var
f
in
this
.
search
)
{
if
(
f
==
"list"
)
{
continue
;
}
params
[
f
]
=
this
.
search
[
f
];
}
return
params
;
},
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
||
"---"
;
},
getEtemplate
(
id
)
{
var
self
=
this
;
self
.
$root
.
postReq
(
"/web/enttemplateCtl/info"
,
{
id
:
id
,
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
if
(
d
.
data
)
{
d
.
data
.
isEnabled
=
d
.
data
.
isEnabled
?
true
:
false
;
}
self
.
etemplate
=
d
.
data
;
if
(
self
.
etemplate
.
codeurl
)
{
self
.
fileList
=
[{
name
:
"模板文件"
,
url
:
self
.
etemplate
.
codeurl
,
}];
}
else
{
self
.
uploadResult
=
null
;
}
console
.
log
(
self
.
uploadResult
);
}
else
{
self
.
$message
.
warning
(
d
.
msg
||
`您的网络不稳定, 请稍后重试`
);
}
});
},
toDetail
(
id
)
{
},
openEdit
(
id
)
{
this
.
clearUpload
();
if
(
id
)
{
this
.
editTitle
=
"修改"
;
this
.
getEtemplate
(
id
);
}
else
{
this
.
editTitle
=
"修改"
;
this
.
etemplate
=
{
isEnabled
:
true
};
}
this
.
showEdit
=
true
;
},
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
==
"ecompanyName"
)
{
if
(
!
self
.
etemplate
.
entcompany_id
)
{
return
callback
(
new
Error
(
"请重新选择公司名称"
));
}
}
return
callback
();
},
nameChange
(
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
.
etemplate
.
entcompany_id
=
(
item
||
{}).
id
||
""
;
},
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
);
},
clearUpload
()
{
var
self
=
this
;
self
.
uploadResult
=
null
;
self
.
etemplate
.
codeurl
=
""
;
if
(
self
.
$refs
.
upload3
&&
self
.
$refs
.
upload3
.
$refs
&&
self
.
$refs
.
upload3
.
$refs
.
upload
)
{
self
.
$refs
.
upload3
.
$refs
.
upload
.
clearFiles
();
}
},
uploadsuccess
(
v
)
{
if
(
!
v
||
!
v
[
0
]
||
!
v
[
0
].
url
)
{
this
.
$message
.
warning
(
"上传失败"
);
return
;
}
this
.
etemplate
.
codeurl
=
v
[
0
].
url
;
},
saveTemplate
()
{
var
self
=
this
;
self
.
$refs
.
etemplate
.
validate
((
valid
)
=>
{
if
(
valid
)
{
self
.
saveLoading
=
true
;
setTimeout
(()
=>
{
self
.
saveLoading
=
false
;
},
15000
);
self
.
$root
.
postReq
(
"/web/enttemplateCtl/mysave"
,
self
.
etemplate
).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
$message
.
success
(
`保存成功`
);
self
.
showEdit
=
false
;
self
.
getList
();
}
else
{
self
.
$alert
(
d
.
msg
||
'保存失败'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{}
});
}
self
.
saveLoading
=
false
;
});
}
else
{
self
.
saveLoading
=
false
;
return
false
;
}
});
},
},
vname
:
"gsb-ecompanyadmin"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment