Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
2bccbe23
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1437
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
2bccbe23
编写于
11月 26, 2018
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公司详细地址展示
上级
bb4e84a9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
378 addition
and
6 deletion
+378
-6
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysTAreaDao.java
...o/src/main/java/com/skyeye/authority/dao/SysTAreaDao.java
+8
-0
skyeye-service/src/main/java/com/skyeye/authority/service/SysTAreaService.java
...in/java/com/skyeye/authority/service/SysTAreaService.java
+8
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysTAreaServiceImpl.java
...om/skyeye/authority/service/impl/SysTAreaServiceImpl.java
+80
-0
skyeye-web/src/main/java/com/skyeye/authority/controller/SysTAreaController.java
...a/com/skyeye/authority/controller/SysTAreaController.java
+64
-0
skyeye-web/src/main/resources/dbmapper/SysTAreaMapper.xml
skyeye-web/src/main/resources/dbmapper/SysTAreaMapper.xml
+45
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+10
-1
skyeye-web/src/main/webapp/js/companymation/companymationadd.js
...-web/src/main/webapp/js/companymation/companymationadd.js
+128
-4
skyeye-web/src/main/webapp/tpl/companymation/companymationadd.html
...b/src/main/webapp/tpl/companymation/companymationadd.html
+35
-1
未找到文件。
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysTAreaDao.java
浏览文件 @
2bccbe23
...
...
@@ -7,4 +7,12 @@ public interface SysTAreaDao {
public
List
<
Map
<
String
,
Object
>>
querySysTAreaList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysTAreaProvinceList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysTAreaCityList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysTAreaChildAreaList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysTAreaTownShipList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/SysTAreaService.java
浏览文件 @
2bccbe23
...
...
@@ -7,4 +7,12 @@ public interface SysTAreaService {
public
void
querySysTAreaList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysTAreaProvinceList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysTAreaCityList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysTAreaChildAreaList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysTAreaTownShipList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysTAreaServiceImpl.java
浏览文件 @
2bccbe23
...
...
@@ -34,5 +34,85 @@ public class SysTAreaServiceImpl implements SysTAreaService{
outputObject
.
settotal
(
beans
.
size
());
}
}
/**
*
* @Title: querySysTAreaProvinceList
* @Description: 获取一级省行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysTAreaProvinceList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
sysTAreaDao
.
querySysTAreaProvinceList
(
map
);
if
(!
beans
.
isEmpty
()){
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
}
/**
*
* @Title: querySysTAreaCityList
* @Description: 获取二级市行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysTAreaCityList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
sysTAreaDao
.
querySysTAreaCityList
(
map
);
if
(!
beans
.
isEmpty
()){
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
}
/**
*
* @Title: querySysTAreaChildAreaList
* @Description: 获取三级县行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysTAreaChildAreaList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
sysTAreaDao
.
querySysTAreaChildAreaList
(
map
);
if
(!
beans
.
isEmpty
()){
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
}
/**
*
* @Title: querySysTAreaTownShipList
* @Description: 获取四级镇行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysTAreaTownShipList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
sysTAreaDao
.
querySysTAreaTownShipList
(
map
);
if
(!
beans
.
isEmpty
()){
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
}
}
skyeye-web/src/main/java/com/skyeye/authority/controller/SysTAreaController.java
浏览文件 @
2bccbe23
...
...
@@ -31,4 +31,68 @@ public class SysTAreaController {
sysTAreaService
.
querySysTAreaList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysTAreaProvinceList
* @Description: 获取一级省行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysTAreaController/querySysTAreaProvinceList"
)
@ResponseBody
public
void
querySysTAreaProvinceList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysTAreaService
.
querySysTAreaProvinceList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysTAreaCityList
* @Description: 获取二级市行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysTAreaController/querySysTAreaCityList"
)
@ResponseBody
public
void
querySysTAreaCityList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysTAreaService
.
querySysTAreaCityList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysTAreaChildAreaList
* @Description: 获取三级县行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysTAreaController/querySysTAreaChildAreaList"
)
@ResponseBody
public
void
querySysTAreaChildAreaList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysTAreaService
.
querySysTAreaChildAreaList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysTAreaTownShipList
* @Description: 获取四级镇行政区划信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysTAreaController/querySysTAreaTownShipList"
)
@ResponseBody
public
void
querySysTAreaTownShipList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysTAreaService
.
querySysTAreaTownShipList
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/SysTAreaMapper.xml
浏览文件 @
2bccbe23
...
...
@@ -13,4 +13,49 @@
WHERE 3 > a.level
</select>
<select
id=
"querySysTAreaProvinceList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name`
FROM
t_area a
WHERE a.level = '0'
</select>
<select
id=
"querySysTAreaCityList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name`
FROM
t_area a,
t_area b
WHERE a.level = '1'
AND a.parent_code_id = b.code_id
AND b.id = #{id}
</select>
<select
id=
"querySysTAreaChildAreaList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name`
FROM
t_area a,
t_area b
WHERE a.level = '2'
AND a.parent_code_id = b.code_id
AND b.id = #{id}
</select>
<select
id=
"querySysTAreaTownShipList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.`name`
FROM
t_area a,
t_area b
WHERE a.level = '3'
AND a.parent_code_id = b.code_id
AND b.id = #{id}
</select>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
2bccbe23
...
...
@@ -36,7 +36,16 @@
<property
id=
"images"
name=
"images"
ref=
"required"
var=
"图片Base64"
/>
</url>
<url
id=
"commontarea001"
path=
"/post/RmTypeController/queryRmTypeAllList"
val=
"获取所有小程序分类"
allUse=
"1"
>
<url
id=
"commontarea001"
path=
"/post/SysTAreaController/querySysTAreaProvinceList"
val=
"获取一级省行政区划信息"
allUse=
"1"
>
</url>
<url
id=
"commontarea002"
path=
"/post/SysTAreaController/querySysTAreaCityList"
val=
"获取二级市行政区划信息"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"省级行政区划id"
/>
</url>
<url
id=
"commontarea003"
path=
"/post/SysTAreaController/querySysTAreaChildAreaList"
val=
"获取三级县行政区划信息"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"市级行政区划id"
/>
</url>
<url
id=
"commontarea004"
path=
"/post/SysTAreaController/querySysTAreaTownShipList"
val=
"获取四级镇行政区划信息"
allUse=
"1"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"县级行政区划id"
/>
</url>
<!-- 公共请求结束 -->
...
...
skyeye-web/src/main/webapp/js/companymation/companymationadd.js
浏览文件 @
2bccbe23
...
...
@@ -3,12 +3,46 @@ 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
;
form
.
render
();
var
layContent
=
layedit
.
build
(
'
content
'
,
{
tool
:
[
'
strong
'
//加粗
,
'
italic
'
//斜体
,
'
underline
'
//下划线
,
'
del
'
//删除线
,
'
|
'
//分割线
,
'
left
'
//左对齐
,
'
center
'
//居中对齐
,
'
right
'
//右对齐
,
'
link
'
//超链接
,
'
unlink
'
//清除链接
,
'
face
'
//表情
]
});
form
.
render
();
//默认隐藏子公司
$
(
"
#parentIdBox
"
).
addClass
(
"
layui-hide
"
);
//加载行政区划-省
loadChildProvinceArea
();
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(formAddBean)
'
,
function
(
data
)
{
//表单验证
...
...
@@ -17,7 +51,7 @@ layui.config({
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
"
icon002
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
icon002
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
...
...
@@ -29,6 +63,96 @@ layui.config({
return
false
;
});
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 class="areaProvince" id="provinceId" 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 class="areaCity" 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 class="area" 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 class="areaTownShip" 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/companymationadd.html
浏览文件 @
2bccbe23
...
...
@@ -10,7 +10,41 @@
<body>
<div
style=
"width:600px;margin:0 auto;padding-top:20px;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
<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"
/>
</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"
checked
/>
<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"
>
</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"
/>
</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;"
></textarea>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录