Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
35fe4900
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1172
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
35fe4900
编写于
11月 27, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公司信息编辑完成
上级
6e22c5d3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
323 addition
and
16 deletion
+323
-16
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+8
-0
skyeye-web/src/main/webapp/js/companymation/companymationedit.js
...web/src/main/webapp/js/companymation/companymationedit.js
+268
-6
skyeye-web/src/main/webapp/tpl/companymation/companymationedit.html
.../src/main/webapp/tpl/companymation/companymationedit.html
+1
-1
skyeye-web/src/main/webapp/tpl/companymation/companymationeditTemplate.html
...n/webapp/tpl/companymation/companymationeditTemplate.html
+0
-9
skyeye-web/src/main/webapp/tpl/companymation/companymationeditTemplate.tpl
...in/webapp/tpl/companymation/companymationeditTemplate.tpl
+46
-0
未找到文件。
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
35fe4900
...
...
@@ -754,6 +754,14 @@
</url>
<url
id=
"companymation005"
path=
"/post/CompanyMationController/editCompanyMationById"
val=
"编辑公司信息信息"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"公司信息id"
/>
<property
id=
"companyName"
name=
"companyName"
ref=
"required"
var=
"公司名称"
/>
<property
id=
"companyDesc"
name=
"companyDesc"
ref=
""
var=
"公司简介"
/>
<property
id=
"pId"
name=
"pId"
ref=
"required"
var=
"公司总公司"
/>
<property
id=
"provinceId"
name=
"provinceId"
ref=
"required"
var=
"行政区划省"
/>
<property
id=
"cityId"
name=
"cityId"
ref=
""
var=
"行政区划市"
/>
<property
id=
"areaId"
name=
"areaId"
ref=
""
var=
"行政区划县"
/>
<property
id=
"townshipId"
name=
"townshipId"
ref=
""
var=
"行政区划镇"
/>
<property
id=
"addressDetailed"
name=
"addressDetailed"
ref=
"required"
var=
"行政区划具体地址"
/>
</url>
<url
id=
"companymation006"
path=
"/post/CompanyMationController/queryOverAllCompanyMationList"
val=
"获取总公司信息列表"
allUse=
"1"
>
</url>
...
...
skyeye-web/src/main/webapp/js/companymation/companymationedit.js
浏览文件 @
35fe4900
...
...
@@ -3,31 +3,103 @@ layui.config({
version
:
skyeyeVersion
}).
define
([
'
jquery
'
,
'
winui
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
layui
.
use
([
'
form
'
,
'
layedit
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
,
form
=
layui
.
form
;
form
=
layui
.
form
,
layedit
=
layui
.
layedit
;
var
layContent
;
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
"
ic
on004
"
,
url
:
reqBasePath
+
"
companymati
on004
"
,
params
:
{
rowId
:
parent
.
rowId
},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/companymat
on/companymat
oneditTemplate.tpl
'
),
template
:
getFileContent
(
'
tpl/companymat
ion/companymati
oneditTemplate.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
},
ajaxSendAfter
:
function
(
json
){
layContent
=
layedit
.
build
(
'
content
'
,
{
tool
:
[
'
strong
'
//加粗
,
'
italic
'
//斜体
,
'
underline
'
//下划线
,
'
del
'
//删除线
,
'
|
'
//分割线
,
'
left
'
//左对齐
,
'
center
'
//居中对齐
,
'
right
'
//右对齐
,
'
link
'
//超链接
,
'
unlink
'
//清除链接
,
'
face
'
//表情
]
});
if
(
json
.
bean
.
pId
==
'
0
'
||
isNull
(
json
.
bean
.
pId
)){
$
(
"
#parentIdBox
"
).
addClass
(
"
layui-hide
"
);
$
(
"
input:radio[name=companyType][value=1]
"
).
attr
(
"
checked
"
,
true
);
}
else
{
$
(
"
input:radio[name=companyType][value=2]
"
).
attr
(
"
checked
"
,
true
);
//初始化总公司
loadParentCompany
(
json
.
bean
.
pId
);
}
form
.
render
();
//公司地址
initArea
(
json
.
bean
);
//加载省级行政区划
form
.
on
(
'
radio(companyType)
'
,
function
(
data
)
{
var
val
=
data
.
value
;
if
(
val
==
'
1
'
){
//总公司
$
(
"
#parentIdBox
"
).
addClass
(
"
layui-hide
"
);
}
else
if
(
val
==
'
2
'
){
//子公司
$
(
"
#parentIdBox
"
).
removeClass
(
"
layui-hide
"
);
}
else
{
top
.
winui
.
window
.
msg
(
'
状态值错误
'
,
{
icon
:
2
,
time
:
2000
});
}
});
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
pId
=
'
0
'
;
if
(
$
(
"
input[name='companyType']:checked
"
).
val
()
==
'
2
'
){
if
(
isNull
(
$
(
"
#OverAllCompany
"
).
val
())){
top
.
winui
.
window
.
msg
(
'
请选择总公司
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
else
{
pId
=
$
(
"
#OverAllCompany
"
).
val
();
}
}
var
provinceId
=
""
,
cityId
=
""
,
areaId
=
""
,
townshipId
=
""
;
if
(
!
isNull
(
$
(
"
#provinceId
"
).
val
())){
provinceId
=
$
(
"
#provinceId
"
).
val
();
}
if
(
!
isNull
(
$
(
"
#cityId
"
).
val
())){
cityId
=
$
(
"
#cityId
"
).
val
();
}
if
(
!
isNull
(
$
(
"
#areaId
"
).
val
())){
areaId
=
$
(
"
#areaId
"
).
val
();
}
if
(
!
isNull
(
$
(
"
#townshipId
"
).
val
())){
townshipId
=
$
(
"
#townshipId
"
).
val
();
}
var
params
=
{
companyName
:
$
(
"
#companyName
"
).
val
(),
companyDesc
:
encodeURI
(
layedit
.
getContent
(
layContent
)),
pId
:
pId
,
provinceId
:
provinceId
,
cityId
:
cityId
,
areaId
:
areaId
,
townshipId
:
townshipId
,
addressDetailed
:
$
(
"
#addressDetailed
"
).
val
(),
rowId
:
parent
.
rowId
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
"
ic
on005
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
companymati
on005
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
...
...
@@ -42,6 +114,196 @@ layui.config({
}
});
//加载总公司
function
loadParentCompany
(
id
){
showGrid
({
id
:
"
OverAllCompany
"
,
url
:
reqBasePath
+
"
companymation006
"
,
params
:
{},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/template/select-option.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
},
ajaxSendAfter
:
function
(
json
){
$
(
"
#OverAllCompany
"
).
val
(
id
);
form
.
render
(
'
select
'
);
}
});
}
//初始化行政区划-省
function
initArea
(
bean
){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea001
"
,
params
:{},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
if
(
!
isNull
(
bean
.
provinceId
)){
$
(
"
#provinceId
"
).
val
(
bean
.
provinceId
);
initAreaCity
(
bean
);
}
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//初始化行政区划-市
function
initAreaCity
(
bean
){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea002
"
,
params
:{
rowId
:
$
(
"
#provinceId
"
).
val
()},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
if
(
!
isNull
(
bean
.
cityId
)){
$
(
"
#cityId
"
).
val
(
bean
.
cityId
);
initAreaChildArea
(
bean
);
}
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//初始化行政区划-县
function
initAreaChildArea
(
bean
){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea003
"
,
params
:{
rowId
:
$
(
"
#cityId
"
).
val
()},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
if
(
!
isNull
(
bean
.
areaId
)){
$
(
"
#areaId
"
).
val
(
bean
.
areaId
);
initAreaTownShip
(
bean
);
}
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//初始化行政区划-镇
function
initAreaTownShip
(
bean
){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea004
"
,
params
:{
rowId
:
$
(
"
#areaId
"
).
val
()},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
if
(
!
isNull
(
bean
.
townshipId
)){
$
(
"
#townshipId
"
).
val
(
bean
.
townshipId
);
}
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
form
.
on
(
'
select(areaProvince)
'
,
function
(
data
){
layui
.
$
(
data
.
elem
).
parent
(
'
dd
'
).
nextAll
().
remove
();
if
(
isNull
(
data
.
value
)
||
data
.
value
==
'
请选择
'
){
}
else
{
loadChildCityArea
();
}
});
form
.
on
(
'
select(areaCity)
'
,
function
(
data
){
layui
.
$
(
data
.
elem
).
parent
(
'
dd
'
).
nextAll
().
remove
();
if
(
isNull
(
data
.
value
)
||
data
.
value
==
'
请选择
'
){
}
else
{
loadChildArea
();
}
});
form
.
on
(
'
select(area)
'
,
function
(
data
){
layui
.
$
(
data
.
elem
).
parent
(
'
dd
'
).
nextAll
().
remove
();
if
(
isNull
(
data
.
value
)
||
data
.
value
==
'
请选择
'
){
}
else
{
loadChildAreaTownShip
();
}
});
//省级行政区划
function
loadChildProvinceArea
(){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea001
"
,
params
:{},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="provinceId" win-verify="required" lay-filter="areaProvince" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//市级行政区划
function
loadChildCityArea
(){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea002
"
,
params
:{
rowId
:
$
(
"
#provinceId
"
).
val
()},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="cityId" lay-filter="areaCity" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//县级行政区划
function
loadChildArea
(){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea003
"
,
params
:{
rowId
:
$
(
"
#cityId
"
).
val
()},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="areaId" lay-filter="area" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//镇级行政区划
function
loadChildAreaTownShip
(){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
commontarea004
"
,
params
:{
rowId
:
$
(
"
#areaId
"
).
val
()},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
var
str
=
'
<dd class="layui-col-xs3"><select id="townshipId" lay-filter="areaTownShip" lay-search=""><option value="">请选择</option>
'
;
for
(
var
i
=
0
;
i
<
json
.
rows
.
length
;
i
++
){
str
+=
'
<option value="
'
+
json
.
rows
[
i
].
id
+
'
">
'
+
json
.
rows
[
i
].
name
+
'
</option>
'
;
}
str
+=
'
</select></dd>
'
;
$
(
"
#lockParentSel
"
).
append
(
str
);
form
.
render
(
'
select
'
);
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
//取消
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
(){
parent
.
layer
.
close
(
index
);
...
...
skyeye-web/src/main/webapp/tpl/companymation/companymationedit.html
浏览文件 @
35fe4900
...
...
@@ -16,7 +16,7 @@
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/companymat
on/
'
}).
use
(
'
companymat
onedit
'
);
layui
.
config
({
base
:
'
../../js/companymat
ion/
'
}).
use
(
'
companymati
onedit
'
);
</script>
</body>
</html>
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/companymation/companymationeditTemplate.html
已删除
100644 → 0
浏览文件 @
6e22c5d3
{{#bean}}
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formEditBean"
>
保存
</button>
</div>
</div>
{{/bean}}
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/companymation/companymationeditTemplate.tpl
0 → 100644
浏览文件 @
35fe4900
{{
#
bean
}}
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
公司名称
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"companyName"
name=
"companyName"
win-verify=
"required"
placeholder=
"请输入公司名称"
class=
"layui-input"
maxlength=
"50"
value=
"{
{
companyName
}
}"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
公司类型
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block winui-radio"
>
<input
type=
"radio"
name=
"companyType"
value=
"1"
title=
"总公司"
lay-filter=
"companyType"
/>
<input
type=
"radio"
name=
"companyType"
value=
"2"
title=
"子公司"
lay-filter=
"companyType"
/>
</div>
</div>
<div
class=
"layui-form-item"
id=
"parentIdBox"
>
<label
class=
"layui-form-label"
>
总公司
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<select
id=
"OverAllCompany"
lay-filter=
"OverAllCompany"
lay-search=
""
>
<option
value=
""
>
请选择
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
公司地址
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
id=
"lockParentSel"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
详细地址
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"addressDetailed"
name=
"addressDetailed"
win-verify=
"required"
placeholder=
"请输入公司详细地址"
class=
"layui-input"
maxlength=
"50"
value=
"{
{
addressDetailed
}
}"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
公司简介
</label>
<div
class=
"layui-input-block"
>
<textarea
id=
"content"
name=
"content"
style=
"display: none;"
>
{
{
companyDesc
}
}
</textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formEditBean"
>
保存
</button>
</div>
</div>
{
{/
bean
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录