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
a174098c
Commit
a174098c
authored
May 26, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
4b8462e2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
19 deletions
+50
-19
bpo-admin/app/base/controller/impl/etemplateCtl.js
+6
-5
bpo-admin/app/base/db/models/etemplate.js
+3
-0
bpo-admin/app/base/service/impl/etemplateSve.js
+18
-2
bpo-admin/app/front/vues/pages/etemplateadmin/etemplateadmin.html
+16
-9
bpo-admin/app/front/vues/pages/etemplateadmin/etemplateadmin.js
+7
-3
No files found.
bpo-admin/app/base/controller/impl/etemplateCtl.js
View file @
a174098c
...
...
@@ -57,8 +57,8 @@ class EtemplateCtl extends CtlBase {
var
name
=
this
.
trim
(
qobj
.
name
);
if
(
!
name
)
{
return
system
.
getResult2
([])
}
}
var
list
=
await
this
.
service
.
getListByName
(
name
);
return
system
.
getResult2
(
list
);
}
...
...
@@ -74,7 +74,7 @@ class EtemplateCtl extends CtlBase {
delete
params
.
ecompany_id
;
}
var
page
=
await
this
.
service
.
signPage
(
params
);
var
csvobj
=
{
fileName
:
"二维码-"
+
moment
().
format
(
"YYYYMMDD"
)
+
".csv"
,
rows
:
page
.
rows
,
...
...
@@ -232,6 +232,7 @@ class EtemplateCtl extends CtlBase {
template
.
filepath
=
qobj
.
filepath
;
template
.
remark
=
qobj
.
remark
||
""
;
template
.
isLegal
=
qobj
.
isLegal
;
template
.
ecompanyMainId
=
ecompanyMain
.
id
;
template
.
mainId
=
ecompanyMain
.
mainId
||
""
;
template
.
nameA
=
ecompanyMain
.
name
;
...
...
@@ -245,6 +246,7 @@ class EtemplateCtl extends CtlBase {
template
.
placeholderkey
=
qobj
.
placeholderkey
;
template
.
remark
=
qobj
.
remark
||
""
;
template
.
isLegal
=
qobj
.
isLegal
;
template
.
ecompanyMainId
=
ecompanyMain
.
id
;
template
.
mainId
=
ecompanyMain
.
mainId
||
""
;
template
.
nameA
=
ecompanyMain
.
name
;
...
...
@@ -286,4 +288,4 @@ class EtemplateCtl extends CtlBase {
}
}
}
module
.
exports
=
EtemplateCtl
;
\ No newline at end of file
module
.
exports
=
EtemplateCtl
;
bpo-admin/app/base/db/models/etemplate.js
View file @
a174098c
...
...
@@ -21,6 +21,9 @@ module.exports = (db, DataTypes) => {
allowNull
:
false
,
defaultValue
:
true
},
isLegal
:{
type
:
DataTypes
.
INTEGER
,
},
qrcodeurl
:
DataTypes
.
STRING
,
remark
:
DataTypes
.
STRING
(
300
),
},{
...
...
bpo-admin/app/base/service/impl/etemplateSve.js
View file @
a174098c
...
...
@@ -34,7 +34,7 @@ class EtemplateService extends ServiceBase{
[
"id"
,
'desc'
]
];
var
attributes
=
[
"id"
,
"name"
,
"ecompanyMainId"
,
"mainId"
,
"nameA"
,
"filekey"
,
"filepath"
,
"created_at"
,
"updated_at"
,
"qrcodeurl"
,
"ecompany_id"
];
var
attributes
=
[
"id"
,
"name"
,
"ecompanyMainId"
,
"mainId"
,
"nameA"
,
"filekey"
,
"
isLegal"
,
"
filepath"
,
"created_at"
,
"updated_at"
,
"qrcodeurl"
,
"ecompany_id"
];
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
,
attributes
);
if
(
page
&&
page
.
rows
)
{
var
ecompanyIds
=
[];
...
...
@@ -43,6 +43,7 @@ class EtemplateService extends ServiceBase{
}
await
this
.
setCompany
(
page
.
rows
);
await
this
.
setMain
(
page
.
rows
);
await
this
.
setLegal
(
page
.
rows
);
}
return
page
;
}
...
...
@@ -83,9 +84,24 @@ class EtemplateService extends ServiceBase{
}
}
async
setLegal
(
list
){
if
(
!
list
||
list
.
length
==
0
)
{
return
;
}
for
(
var
item
of
list
){
if
(
item
.
isLegal
==
0
){
item
.
begUrl
=
"https://bpohhr.gongsibao.com/ec3rd?appId="
+
item
.
ecompany_id
+
"&ecid="
+
item
.
id
+
"&&legal=1"
;
}
else
{
item
.
begUrl
=
"https://bpohhr.gongsibao.com/ec3rd?appId="
+
item
.
ecompany_id
+
"&ecid="
+
item
.
id
;
}
}
}
async
getInfo
(
id
)
{
var
attrs
=
[
"id"
,
"name"
,
"ecompanyMainId"
,
"mainId"
,
"nameA"
,
"templateid"
,
"filekey"
,
"filepath"
,
"qrcodeurl"
,
"placeholderkey"
,
"isEnabled"
,
"created_at"
,
"updated_at"
,
"ecompany_id"
];
"placeholderkey"
,
"isEnabled"
,
"isLegal"
,
"created_at"
,
"updated_at"
,
"ecompany_id"
];
return
await
this
.
dao
.
model
.
findOne
({
where
:
{
id
:
id
},
attrs
,
raw
:
true
});
...
...
bpo-admin/app/front/vues/pages/etemplateadmin/etemplateadmin.html
View file @
a174098c
...
...
@@ -30,7 +30,7 @@
</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>
...
...
@@ -46,7 +46,7 @@
<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
<el-table
stripe
fix=
"true"
:data=
"search.list"
...
...
@@ -59,6 +59,7 @@
<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
prop=
"begUrl"
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>
...
...
@@ -69,11 +70,11 @@
<a
v-if=
"scope.row.filepath"
:href=
"scope.row.filepath"
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"
>
<!-- <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>
<a
href=
"javascript:;"
@
click=
"relevance(scope.row.id)"
style=
"text-decoration: none;color:#59C1A6;font-size: 14px;"
>
关联
</a>
...
...
@@ -133,7 +134,7 @@
</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
...
...
@@ -145,12 +146,19 @@
</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=
"filepath"
>
<gsb-upload3
ref=
"upload3"
v-model=
"uploadResult"
@
uploadsuccess=
"uploadsuccess"
:fileList=
"fileList"
filetype=
"pdf"
></gsb-upload3>
</el-form-item>
<el-form-item
label=
"是否法人:"
prop=
"isLegal"
>
<template>
<el-radio
v-model=
"isLegal"
label=
"1"
>
否
</el-radio>
<el-radio
v-model=
"isLegal"
label=
"0"
>
是
</el-radio>
</template>
</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>
...
...
@@ -214,4 +222,4 @@
</div>
</gsb-pcpage>
\ No newline at end of file
</gsb-pcpage>
bpo-admin/app/front/vues/pages/etemplateadmin/etemplateadmin.js
View file @
a174098c
...
...
@@ -13,7 +13,7 @@
showrelevances
:
false
,
saveLoading
:
false
,
busiData
:[],
isLegal
:
""
,
nameLoading
:
false
,
nameList
:
[],
...
...
@@ -59,6 +59,7 @@
},
created
:
function
()
{},
methods
:
{
getEmptySearch
()
{
return
{
list
:
[],
...
...
@@ -141,6 +142,8 @@
if
(
d
.
data
)
{
d
.
data
.
isEnabled
=
d
.
data
.
isEnabled
?
true
:
false
;
}
console
.
log
(
"=====================================asdas"
,
d
.
data
.
isLegal
);
self
.
isLegal
=
d
.
data
.
isLegal
.
toString
();
self
.
etemplate
=
d
.
data
;
if
(
self
.
etemplate
.
filepath
)
{
self
.
fileList
=
[{
...
...
@@ -188,6 +191,7 @@
this
.
getEtemplate
(
id
);
}
else
{
this
.
editTitle
=
"新增"
;
this
.
isLegal
=
'1'
;
this
.
etemplate
=
{
isEnabled
:
true
};
}
this
.
showEdit
=
true
;
...
...
@@ -306,6 +310,7 @@
setTimeout
(()
=>
{
self
.
saveLoading
=
false
;
},
15000
);
self
.
etemplate
.
isLegal
=
self
.
isLegal
;
self
.
$root
.
postReq
(
"/web/etemplateCtl/mysave"
,
self
.
etemplate
).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
self
.
$message
.
success
(
`保存成功`
);
...
...
@@ -370,4 +375,4 @@
}
},
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