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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
672 additions
and
11 deletions
+672
-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
+0
-0
bpo-admin/app/front/vues/pages/entcontractmy/entcontractmy.js
+0
-0
bpo-admin/app/front/vues/pages/enttemplatemy/enttemplatemy.html
+0
-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
This diff is collapsed.
Click to expand it.
bpo-admin/app/front/vues/pages/entcontractmy/entcontractmy.js
0 → 100644
View file @
fdca4c62
This diff is collapsed.
Click to expand it.
bpo-admin/app/front/vues/pages/enttemplatemy/enttemplatemy.html
0 → 100644
View file @
fdca4c62
This diff is collapsed.
Click to expand it.
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