Merge branch 'master' of e.coding.net:tsteam/urban-governance/system-city
This commit is contained in:
commit
698971901f
@ -40,6 +40,10 @@ public class BuildingHouseDTO {
|
|||||||
private String longitude;
|
private String longitude;
|
||||||
@ApiModelProperty(name = "latitude", value = "纬度")
|
@ApiModelProperty(name = "latitude", value = "纬度")
|
||||||
private String latitude;
|
private String latitude;
|
||||||
|
@ApiModelProperty(name = "rentalTime", value = "出租时间")
|
||||||
|
private String rentalTime;
|
||||||
|
@ApiModelProperty(name = "countMember", value = "家庭成员数量")
|
||||||
|
private String countMember;
|
||||||
|
|
||||||
public String getBuildingHouseId() {
|
public String getBuildingHouseId() {
|
||||||
return buildingHouseId == null ? "" : buildingHouseId.trim();
|
return buildingHouseId == null ? "" : buildingHouseId.trim();
|
||||||
@ -144,4 +148,20 @@ public class BuildingHouseDTO {
|
|||||||
public void setLatitude(String latitude) {
|
public void setLatitude(String latitude) {
|
||||||
this.latitude = latitude;
|
this.latitude = latitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRentalTime() {
|
||||||
|
return rentalTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRentalTime(String rentalTime) {
|
||||||
|
this.rentalTime = rentalTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCountMember() {
|
||||||
|
return countMember;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCountMember(String countMember) {
|
||||||
|
this.countMember = countMember;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,8 @@ public class BuildingHouseUserDTO {
|
|||||||
private String buildingHouseId;
|
private String buildingHouseId;
|
||||||
@ApiModelProperty(name = "userType", value = "人员类型")
|
@ApiModelProperty(name = "userType", value = "人员类型")
|
||||||
private String userType;
|
private String userType;
|
||||||
|
@ApiModelProperty(name = "relationship", value = "与户主关系")
|
||||||
|
private String relationship;
|
||||||
|
|
||||||
public String getBuildingHouseUserId() {
|
public String getBuildingHouseUserId() {
|
||||||
return buildingHouseUserId == null ? "" : buildingHouseUserId.trim();
|
return buildingHouseUserId == null ? "" : buildingHouseUserId.trim();
|
||||||
@ -104,4 +106,12 @@ public class BuildingHouseUserDTO {
|
|||||||
public void setUserType(String userType) {
|
public void setUserType(String userType) {
|
||||||
this.userType = userType;
|
this.userType = userType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRelationship() {
|
||||||
|
return relationship;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelationship(String relationship) {
|
||||||
|
this.relationship = relationship;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,8 @@ public class BuildingHouseVO {
|
|||||||
private String longitude;
|
private String longitude;
|
||||||
@ApiModelProperty(name = "latitude", value = "纬度")
|
@ApiModelProperty(name = "latitude", value = "纬度")
|
||||||
private String latitude;
|
private String latitude;
|
||||||
|
@ApiModelProperty(name = "rentalTime", value = "出租时间")
|
||||||
|
private String rentalTime;
|
||||||
|
|
||||||
public String getCityBuildingId() {
|
public String getCityBuildingId() {
|
||||||
return cityBuildingId == null ? "" : cityBuildingId.trim();
|
return cityBuildingId == null ? "" : cityBuildingId.trim();
|
||||||
@ -156,4 +158,12 @@ public class BuildingHouseVO {
|
|||||||
public void setLatitude(String latitude) {
|
public void setLatitude(String latitude) {
|
||||||
this.latitude = latitude;
|
this.latitude = latitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRentalTime() {
|
||||||
|
return rentalTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRentalTime(String rentalTime) {
|
||||||
|
this.rentalTime = rentalTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,8 @@ public class BuildingHouseUserVO {
|
|||||||
private String buildingHouseId;
|
private String buildingHouseId;
|
||||||
@ApiModelProperty(name = "userType", value = "人员类型")
|
@ApiModelProperty(name = "userType", value = "人员类型")
|
||||||
private String userType;
|
private String userType;
|
||||||
|
@ApiModelProperty(name = "relationship", value = "与户主关系")
|
||||||
|
private String relationship;
|
||||||
|
|
||||||
public String getCardType() {
|
public String getCardType() {
|
||||||
return cardType == null ? "" : cardType.trim();
|
return cardType == null ? "" : cardType.trim();
|
||||||
@ -88,10 +90,18 @@ public class BuildingHouseUserVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getUserType() {
|
public String getUserType() {
|
||||||
return userType;
|
return userType == null ? "" : userType.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserType(String userType) {
|
public void setUserType(String userType) {
|
||||||
this.userType = userType;
|
this.userType = userType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRelationship() {
|
||||||
|
return relationship;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelationship(String relationship) {
|
||||||
|
this.relationship = relationship;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.cm.systemcity.dao.buildinghouse.IBuildingHouseDao;
|
|||||||
import com.cm.systemcity.pojo.dtos.buildinghouse.BuildingHouseDTO;
|
import com.cm.systemcity.pojo.dtos.buildinghouse.BuildingHouseDTO;
|
||||||
import com.cm.systemcity.pojo.vos.buildinghouse.BuildingHouseVO;
|
import com.cm.systemcity.pojo.vos.buildinghouse.BuildingHouseVO;
|
||||||
import com.cm.systemcity.service.buildinghouse.IBuildingHouseService;
|
import com.cm.systemcity.service.buildinghouse.IBuildingHouseService;
|
||||||
|
import com.cm.systemcity.service.buildinghouseuser.IBuildingHouseUserService;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -28,6 +29,8 @@ public class BuildingHouseServiceImpl extends AbstractService implements IBuildi
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBuildingHouseDao buildingHouseDao;
|
private IBuildingHouseDao buildingHouseDao;
|
||||||
|
@Autowired
|
||||||
|
private IBuildingHouseUserService buildingHouseUserService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(BuildingHouseVO buildingHouseVO) throws Exception {
|
public void save(BuildingHouseVO buildingHouseVO) throws Exception {
|
||||||
@ -113,7 +116,15 @@ public class BuildingHouseServiceImpl extends AbstractService implements IBuildi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BuildingHouseDTO> list(Map<String, Object> params) {
|
public List<BuildingHouseDTO> list(Map<String, Object> params) {
|
||||||
return buildingHouseDao.list(params);
|
List<BuildingHouseDTO> list = buildingHouseDao.list(params);
|
||||||
|
if(null != list && list.size() > 0) {
|
||||||
|
for(BuildingHouseDTO buildingHouseDTO: list) {
|
||||||
|
params.put("buildingHouseId", buildingHouseDTO.getBuildingHouseId());
|
||||||
|
Integer count = buildingHouseUserService.count(params);
|
||||||
|
buildingHouseDTO.setCountMember(count.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<result column="owner_phone" property="ownerPhone"/>
|
<result column="owner_phone" property="ownerPhone"/>
|
||||||
<result column="longitude" property="longitude"/>
|
<result column="longitude" property="longitude"/>
|
||||||
<result column="latitude" property="latitude"/>
|
<result column="latitude" property="latitude"/>
|
||||||
|
<result column="rental_time" property="rentalTime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 新增房屋管理表 -->
|
<!-- 新增房屋管理表 -->
|
||||||
@ -34,6 +35,7 @@
|
|||||||
owner_phone,
|
owner_phone,
|
||||||
longitude,
|
longitude,
|
||||||
latitude,
|
latitude,
|
||||||
|
rental_time,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
modifier,
|
modifier,
|
||||||
@ -53,6 +55,7 @@
|
|||||||
#{ownerPhone},
|
#{ownerPhone},
|
||||||
#{longitude},
|
#{longitude},
|
||||||
#{latitude},
|
#{latitude},
|
||||||
|
#{rentalTime},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{modifier},
|
#{modifier},
|
||||||
@ -138,6 +141,9 @@
|
|||||||
<if test="latitude != null and latitude != ''">
|
<if test="latitude != null and latitude != ''">
|
||||||
latitude = #{latitude},
|
latitude = #{latitude},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="rentalTime != null and rentalTime != ''">
|
||||||
|
rental_time = #{rentalTime},
|
||||||
|
</if>
|
||||||
<if test="newHouseNumber != null and newHouseNumber != ''">
|
<if test="newHouseNumber != null and newHouseNumber != ''">
|
||||||
<if test="oldHouseNumber != null and oldHouseNumber != ''">
|
<if test="oldHouseNumber != null and oldHouseNumber != ''">
|
||||||
house_number = replace(house_number, #{oldHouseNumber}, #{newHouseNumber}),
|
house_number = replace(house_number, #{oldHouseNumber}, #{newHouseNumber}),
|
||||||
@ -174,6 +180,7 @@
|
|||||||
t1.owner_phone,
|
t1.owner_phone,
|
||||||
t1.longitude,
|
t1.longitude,
|
||||||
t1.latitude,
|
t1.latitude,
|
||||||
|
t1.rental_time,
|
||||||
t1.building_house_id
|
t1.building_house_id
|
||||||
FROM
|
FROM
|
||||||
city_building_house t1
|
city_building_house t1
|
||||||
@ -197,6 +204,7 @@
|
|||||||
<!-- 房屋管理表列表 -->
|
<!-- 房屋管理表列表 -->
|
||||||
<select id="list" parameterType="map" resultMap="buildingHouseDTO">
|
<select id="list" parameterType="map" resultMap="buildingHouseDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
DISTINCT
|
||||||
t1.building_house_id,
|
t1.building_house_id,
|
||||||
t1.city_building_id,
|
t1.city_building_id,
|
||||||
t1.city_building_name,
|
t1.city_building_name,
|
||||||
@ -210,6 +218,7 @@
|
|||||||
t1.owner_phone,
|
t1.owner_phone,
|
||||||
t1.longitude,
|
t1.longitude,
|
||||||
t1.latitude,
|
t1.latitude,
|
||||||
|
t1.rental_time,
|
||||||
1
|
1
|
||||||
FROM
|
FROM
|
||||||
city_building_house t1
|
city_building_house t1
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<result column="phone" property="phone"/>
|
<result column="phone" property="phone"/>
|
||||||
<result column="building_house_id" property="buildingHouseId"/>
|
<result column="building_house_id" property="buildingHouseId"/>
|
||||||
<result column="user_type" property="userType"/>
|
<result column="user_type" property="userType"/>
|
||||||
|
<result column="relationship" property="relationship"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 新增人房绑定表 -->
|
<!-- 新增人房绑定表 -->
|
||||||
@ -26,6 +27,7 @@
|
|||||||
phone,
|
phone,
|
||||||
building_house_id,
|
building_house_id,
|
||||||
user_type,
|
user_type,
|
||||||
|
relationship,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
modifier,
|
modifier,
|
||||||
@ -41,6 +43,7 @@
|
|||||||
#{phone},
|
#{phone},
|
||||||
#{buildingHouseId},
|
#{buildingHouseId},
|
||||||
#{userType},
|
#{userType},
|
||||||
|
#{relationship},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{modifier},
|
#{modifier},
|
||||||
@ -115,6 +118,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="userType != null and userType != ''">
|
<if test="userType != null and userType != ''">
|
||||||
user_type = #{userType},
|
user_type = #{userType},
|
||||||
|
</if>
|
||||||
|
<if test="relationship != null and relationship != ''">
|
||||||
|
relationship = #{relationship},
|
||||||
</if>
|
</if>
|
||||||
gmt_modified = #{gmtModified},
|
gmt_modified = #{gmtModified},
|
||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
@ -134,6 +140,7 @@
|
|||||||
t1.phone,
|
t1.phone,
|
||||||
t1.building_house_id,
|
t1.building_house_id,
|
||||||
t1.user_type,
|
t1.user_type,
|
||||||
|
t1.relationship,
|
||||||
t1.building_house_user_id
|
t1.building_house_user_id
|
||||||
FROM
|
FROM
|
||||||
city_building_house_user t1
|
city_building_house_user t1
|
||||||
@ -164,6 +171,7 @@
|
|||||||
t1.sex,
|
t1.sex,
|
||||||
t1.phone,
|
t1.phone,
|
||||||
t1.user_type,
|
t1.user_type,
|
||||||
|
t1.relationship,
|
||||||
t1.building_house_id,
|
t1.building_house_id,
|
||||||
1
|
1
|
||||||
FROM
|
FROM
|
||||||
@ -172,7 +180,6 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
AND (
|
AND (
|
||||||
<!-- 这里添加其他条件 -->
|
|
||||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
@ -212,6 +219,9 @@
|
|||||||
city_building_house_user t1
|
city_building_house_user t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
<if test="buildingHouseId != null and buildingHouseId != ''">
|
||||||
|
AND t1.building_house_id = #{buildingHouseId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -253,6 +253,16 @@
|
|||||||
[
|
[
|
||||||
{type:'checkbox', fixed: 'left'},
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'countMember', event:'countMember', width: 180, title: '家庭成员数量', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
rowData = '<span class="layui-badge layui-bg-blue" id="countMemberSpan">'+rowData+'</span>';
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
{field: 'cityBuildingName', width: 180, title: '楼宇名称', align:'center',
|
{field: 'cityBuildingName', width: 180, title: '楼宇名称', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
@ -290,24 +300,6 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'dataType', width: 180, title: '数据生成方式', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
if('1' == rowData) {
|
|
||||||
rowData = '自动生成';
|
|
||||||
}
|
|
||||||
if('2' == rowData) {
|
|
||||||
rowData = '手动录入';
|
|
||||||
}
|
|
||||||
if('3' == rowData) {
|
|
||||||
rowData = '批量导入';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'ownerName', width: 180, title: '房主姓名', align:'center',
|
{field: 'ownerName', width: 180, title: '房主姓名', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
@ -335,18 +327,18 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'houseStatus', fixed: 'right', width: 150, title: '租房记录', align:'center',
|
{field: 'houseStatus', fixed: 'right', width: 150, title: '租住记录', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="rentalHis">租住记录</a>';;
|
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="rentalHis">租住记录</a>';;
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'addUser', fixed: 'right', width: 150, title: '操作', align:'center',
|
/*{field: 'addUser', fixed: 'right', width: 150, title: '操作', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="addUser">绑定人员</a>';
|
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="addUser">绑定人员</a>';
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
page: true,
|
page: true,
|
||||||
@ -360,6 +352,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(currentPage) {
|
function reloadTable(currentPage) {
|
||||||
table.reload('dataTable', {
|
table.reload('dataTable', {
|
||||||
@ -415,8 +408,8 @@
|
|||||||
top.dialog.open({
|
top.dialog.open({
|
||||||
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [data.buildingHouseId]),
|
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [data.buildingHouseId]),
|
||||||
title: "房屋租住记录",
|
title: "房屋租住记录",
|
||||||
width: '80%',
|
width: '98%',
|
||||||
height: '80%',
|
height: '98%',
|
||||||
onClose: function() {
|
onClose: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
@ -514,6 +507,18 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function countMemberFun(data) {
|
||||||
|
top.dialog.open({
|
||||||
|
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [data.buildingHouseId]),
|
||||||
|
title: "房屋租住记录",
|
||||||
|
width: '98%',
|
||||||
|
height: '98%',
|
||||||
|
onClose: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//监听行单击事件
|
//监听行单击事件
|
||||||
table.on('tool(dataTable)', function(obj){
|
table.on('tool(dataTable)', function(obj){
|
||||||
var data = obj.data;
|
var data = obj.data;
|
||||||
@ -522,6 +527,8 @@
|
|||||||
}else if('addUser' == obj.event) {
|
}else if('addUser' == obj.event) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
addUser(data);
|
addUser(data);
|
||||||
|
}else if(obj.event === 'countMember'){
|
||||||
|
countMemberFun(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -35,39 +35,50 @@
|
|||||||
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
|
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item layui-row">
|
||||||
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
||||||
|
<input type="hidden" id="districtId" name="districtId" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<select name="houseStatus" id="houseStatus" lay-filter="houseStatus" lay-verify="required">
|
||||||
|
<option value="自住房">自住房</option>
|
||||||
|
<option value="出租房">出租房</option>
|
||||||
|
<option value="闲置">闲置</option>
|
||||||
|
<option value="待查">待查</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item" id="rentalTimeDiv" style="display: none;">
|
||||||
|
<label class="layui-form-label">出租时间</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
<input type="text" class="layui-input" readonly name="rentalTime" id="rentalTime" lay-filter="rentalTime" placeholder="出租时间">
|
||||||
<input type="hidden" id="districtId" name="districtId" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item layui-row">
|
||||||
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
<div class="layui-col-lg4">
|
||||||
<div class="layui-input-block">
|
<label class="layui-form-label">房主姓名</label>
|
||||||
<select name="houseStatus" id="houseStatus" lay-verify="required">
|
<div class="layui-input-block">
|
||||||
<option value="自住房">自住房</option>
|
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
||||||
<option value="出租房">出租房</option>
|
</div>
|
||||||
<option value="闲置">闲置</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="layui-col-lg4">
|
||||||
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
||||||
<label class="layui-form-label">房主姓名</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
||||||
<div class="layui-input-block">
|
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
||||||
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="layui-col-lg4">
|
||||||
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
||||||
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
||||||
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
||||||
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
|
||||||
<div class="layui-input-block" style="margin-left: 120px;">
|
|
||||||
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-row">
|
<div class="layui-form-item layui-row">
|
||||||
@ -121,6 +132,15 @@
|
|||||||
var viewerObj = {};
|
var viewerObj = {};
|
||||||
var selectedCommunities = [];
|
var selectedCommunities = [];
|
||||||
|
|
||||||
|
form.on('select(houseStatus)', function(data){
|
||||||
|
if('出租房' == data.value) {
|
||||||
|
$('#rentalTimeDiv').show();
|
||||||
|
initDate();
|
||||||
|
}else {
|
||||||
|
$('#rentalTimeDiv').hide();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||||
var point = new BMap.Point('109.85017859252311', '40.66017700460503');
|
var point = new BMap.Point('109.85017859252311', '40.66017700460503');
|
||||||
@ -197,59 +217,16 @@
|
|||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshDownloadTemplet(fileName, file) {
|
function initDate() {
|
||||||
var dataRander = {};
|
laydate.render({
|
||||||
dataRander[fileName] = file;
|
elem: '#rentalTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
|
||||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化文件列表
|
|
||||||
function initFileList(fileName, ids, callback) {
|
|
||||||
var dataForm = {};
|
|
||||||
dataForm[fileName] = ids;
|
|
||||||
form.val('dataForm', dataForm);
|
|
||||||
|
|
||||||
if(!ids) {
|
|
||||||
refreshDownloadTemplet(fileName, []);
|
|
||||||
if(callback) {
|
|
||||||
callback(fileName, []);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
|
||||||
ids: ids
|
|
||||||
}, null, function(code, data) {
|
|
||||||
refreshDownloadTemplet(fileName, data);
|
|
||||||
if(callback) {
|
|
||||||
callback(fileName, data);
|
|
||||||
}
|
|
||||||
}, function(code, data) {
|
|
||||||
top.dialog.msg(data.msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化视频
|
|
||||||
function initVideo(fileName, data) {
|
|
||||||
for(var i = 0, item; item = data[i++];) {
|
|
||||||
var player = new ckplayer({
|
|
||||||
container: '#'+ fileName + i,
|
|
||||||
variable: 'player',
|
|
||||||
flashplayer: false,
|
|
||||||
video: {
|
|
||||||
file: 'route/file/download/true/'+ item.fileId,
|
|
||||||
type: 'video/mp4'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
function initData() {
|
function initData() {
|
||||||
|
initDate();
|
||||||
}
|
}
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
@ -285,10 +262,6 @@
|
|||||||
$('.close').on('click', function() {
|
$('.close').on('click', function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 校验
|
|
||||||
form.verify({
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -35,39 +35,56 @@
|
|||||||
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
|
<input type="text" id="houseNumber" name="houseNumber" class="layui-input" value="" placeholder="请输入房屋编号(名称)" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item layui-row">
|
||||||
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">小区名称<span style="color: red;vertical-align: middle;">*</span></label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
||||||
|
<input type="hidden" id="districtId" name="districtId" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<select name="houseStatus" id="houseStatus" lay-filter="houseStatus" lay-verify="required">
|
||||||
|
<option value="自住房">自住房</option>
|
||||||
|
<option value="出租房">出租房</option>
|
||||||
|
<option value="闲置">闲置</option>
|
||||||
|
<option value="待查">待查</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item" id="rentalTimeDiv" style="display: none;">
|
||||||
|
<label class="layui-form-label">出租时间</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="districtName" name="districtName" class="layui-input" value="" placeholder="请输入小区名称" maxlength="255">
|
<input type="text" class="layui-input" readonly name="rentalTime" id="rentalTime" lay-filter="rentalTime" placeholder="出租时间">
|
||||||
<input type="hidden" id="districtId" name="districtId" />
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-row">
|
||||||
|
<div class="layui-col-lg4">
|
||||||
|
<label class="layui-form-label">房主姓名</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg4">
|
||||||
|
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
||||||
|
<div class="layui-input-block" style="margin-left: 120px;">
|
||||||
|
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg4">
|
||||||
|
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
||||||
|
<div class="layui-input-block" style="margin-left: 120px;">
|
||||||
|
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">房屋状态<span style="color: red;vertical-align: middle;">*</span></label>
|
<label class="layui-form-label" style="width: 160px;">家庭成员数量<span class="layui-badge layui-bg-blue" id="countMemberSpan">0</span></label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block" style="margin-left: 160px;">
|
||||||
<select name="houseStatus" id="houseStatus" lay-verify="required">
|
<input type="text" id="countMember" name="countMember" class="layui-input" value="" readonly placeholder="点击填写家庭成员" >
|
||||||
<option value="自住房">自住房</option>
|
|
||||||
<option value="出租房">出租房</option>
|
|
||||||
<option value="闲置">闲置</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">房主姓名</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" id="ownerName" name="ownerName" class="layui-input" value="" placeholder="请输入房主姓名" maxlength="255">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label" style="width: 120px;">房主身份证号</label>
|
|
||||||
<div class="layui-input-block" style="margin-left: 120px;">
|
|
||||||
<input type="text" id="ownerCard" name="ownerCard" class="layui-input" value="" placeholder="请输入房主身份证号" maxlength="20">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label" style="width: 120px;">房主联系方式</label>
|
|
||||||
<div class="layui-input-block" style="margin-left: 120px;">
|
|
||||||
<input type="text" id="ownerPhone" name="ownerPhone" class="layui-input" value="" placeholder="请输入房主联系方式" maxlength="11">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-row">
|
<div class="layui-form-item layui-row">
|
||||||
@ -123,6 +140,54 @@
|
|||||||
var viewerObj = {};
|
var viewerObj = {};
|
||||||
var selectedCommunities = [];
|
var selectedCommunities = [];
|
||||||
|
|
||||||
|
// 点击小区名称选择输入框,弹出层方法
|
||||||
|
$(document).on('click', '#countMember', function() {
|
||||||
|
rentalHis();
|
||||||
|
});
|
||||||
|
|
||||||
|
function rentalHis(data) {
|
||||||
|
top.dialog.open({
|
||||||
|
url: top.restAjax.path('route/buildinghouseuser/list.html?buildingHouseId={buildingHouseId}', [buildingHouseId]),
|
||||||
|
title: "房屋租住记录",
|
||||||
|
width: '98%',
|
||||||
|
height: '98%',
|
||||||
|
onClose: function() {
|
||||||
|
getUserCount();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUserCount() {
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/buildinghouseuser/count?buildingHouseId={buildingHouseId}', [buildingHouseId]), {}, null, function(code, data) {
|
||||||
|
console.log(data)
|
||||||
|
$('#countMemberSpan').html(data.data);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
form.on('select(houseStatus)', function(data){
|
||||||
|
if('出租房' == data.value) {
|
||||||
|
$('#rentalTimeDiv').show();
|
||||||
|
initDate();
|
||||||
|
}else {
|
||||||
|
$('#rentalTimeDiv').hide();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function initDate(value) {
|
||||||
|
laydate.render({
|
||||||
|
elem: '#rentalTime',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
value: value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function initMap(longitude,latitude) {
|
function initMap(longitude,latitude) {
|
||||||
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||||
var point = new BMap.Point(longitude, latitude);
|
var point = new BMap.Point(longitude, latitude);
|
||||||
@ -211,15 +276,6 @@
|
|||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshDownloadTemplet(fileName, file) {
|
|
||||||
var dataRander = {};
|
|
||||||
dataRander[fileName] = file;
|
|
||||||
|
|
||||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
|
||||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
function initData() {
|
function initData() {
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
@ -232,8 +288,13 @@
|
|||||||
id:data.districtId,
|
id:data.districtId,
|
||||||
name:data.districtName
|
name:data.districtName
|
||||||
});
|
});
|
||||||
|
getUserCount();
|
||||||
initMap(dataFormData['longitude'],dataFormData['latitude']);
|
initMap(dataFormData['longitude'],dataFormData['latitude']);
|
||||||
readonlyFun(data.dataType);
|
readonlyFun(data.dataType);
|
||||||
|
if(data.houseStatus == '出租房') {
|
||||||
|
$('#rentalTimeDiv').show();
|
||||||
|
initDate(data.houseStatus)
|
||||||
|
}
|
||||||
form.val('dataForm', dataFormData);
|
form.val('dataForm', dataFormData);
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
@ -278,10 +339,6 @@
|
|||||||
$('.close').on('click', function() {
|
$('.close').on('click', function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 校验
|
|
||||||
form.verify({
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -31,6 +31,20 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>-->
|
</div>-->
|
||||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||||
|
<!-- 表头按钮组 -->
|
||||||
|
<script type="text/html" id="headerToolBar">
|
||||||
|
<div class="layui-btn-group">
|
||||||
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||||
|
<i class="fa fa-lg fa-plus"></i> 新增
|
||||||
|
</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||||
|
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||||
|
</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,6 +73,7 @@
|
|||||||
table.render({
|
table.render({
|
||||||
elem: '#dataTable',
|
elem: '#dataTable',
|
||||||
id: 'dataTable',
|
id: 'dataTable',
|
||||||
|
toolbar: '#headerToolBar',
|
||||||
url: top.restAjax.path(tableUrl, [buildingHouseId]),
|
url: top.restAjax.path(tableUrl, [buildingHouseId]),
|
||||||
width: admin.screen() > 1 ? '100%' : '',
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
height: $win.height() - 90,
|
height: $win.height() - 90,
|
||||||
@ -70,6 +85,7 @@
|
|||||||
},
|
},
|
||||||
cols: [
|
cols: [
|
||||||
[
|
[
|
||||||
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
{field: 'name', width: 180, title: '姓名', align:'center',
|
{field: 'name', width: 180, title: '姓名', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
@ -98,15 +114,6 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'cardTypeName', width: 180, title: '证件类型名称', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'cardNumber', width: 180, title: '证件号码', align:'center',
|
{field: 'cardNumber', width: 180, title: '证件号码', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
@ -115,7 +122,16 @@
|
|||||||
}
|
}
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{field: 'relationship', width: 180, title: '与户主关系', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
page: true,
|
page: true,
|
||||||
@ -132,7 +148,7 @@
|
|||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(currentPage) {
|
function reloadTable(currentPage) {
|
||||||
table.reload('dataTable', {
|
table.reload('dataTable', {
|
||||||
url: top.restAjax.path(tableUrl, []),
|
url: top.restAjax.path(tableUrl, [buildingHouseId]),
|
||||||
where: {
|
where: {
|
||||||
keywords: $('#keywords').val(),
|
keywords: $('#keywords').val(),
|
||||||
startTime: $('#startTime').val(),
|
startTime: $('#startTime').val(),
|
||||||
@ -204,7 +220,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/buildinghouseuser/save.html', []),
|
content: top.restAjax.path('route/buildinghouseuser/save.html?buildingHouseId={buildingHouseId}', [buildingHouseId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
|
@ -22,46 +22,85 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item" style="display: none;">
|
||||||
<label class="layui-form-label">证件类型ID</label>
|
<label class="layui-form-label">证件类型ID</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="cardType" name="cardType" class="layui-input" value="" placeholder="请输入证件类型ID" maxlength="36">
|
<input type="text" id="cardType" name="cardType" class="layui-input" value="" placeholder="请输入证件类型ID" maxlength="36">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item" style="display: none;">
|
||||||
<label class="layui-form-label">证件类型名称</label>
|
<label class="layui-form-label">证件类型名称</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="cardTypeName" name="cardTypeName" class="layui-input" value="" placeholder="请输入证件类型名称" maxlength="255">
|
<input type="text" id="cardTypeName" name="cardTypeName" class="layui-input" value="" placeholder="请输入证件类型名称" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-row">
|
||||||
<label class="layui-form-label">证件号码</label>
|
<div class="layui-col-md3">
|
||||||
<div class="layui-input-block">
|
<div class="layui-form-item">
|
||||||
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
<label class="layui-form-label">身份证</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="idCardNumber" name="idCardNumber" style="width: 230px;" class="layui-input" value="" placeholder="请输入公民身份证进行检索">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3" style="margin-left: 50px;">
|
||||||
|
<div style="margin: 4px 4px;">
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-row">
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">姓名</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">性别</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-row">
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">证件号码</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">联系方式</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="11">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">姓名</label>
|
<label class="layui-form-label">与户主关系</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
<select name="relationship" id="relationship" lay-filter="relationship">
|
||||||
</div>
|
<option value="">请选择与户主关系</option>
|
||||||
</div>
|
<option value="户主">户主</option>
|
||||||
<div class="layui-form-item">
|
<option value="配偶">配偶</option>
|
||||||
<label class="layui-form-label">性别</label>
|
<option value="子女">子女</option>
|
||||||
<div class="layui-input-block">
|
<option value="儿媳">儿媳</option>
|
||||||
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
<option value="女婿">女婿</option>
|
||||||
</div>
|
<option value="孙女">孙女</option>
|
||||||
</div>
|
<option value="孙子">孙子</option>
|
||||||
<div class="layui-form-item">
|
<option value="父母">父母</option>
|
||||||
<label class="layui-form-label">联系方式</label>
|
<option value="祖父母">祖父母</option>
|
||||||
<div class="layui-input-block">
|
<option value="外祖父母">外祖父母</option>
|
||||||
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
<option value="兄弟">兄弟</option>
|
||||||
</div>
|
<option value="姐妹">姐妹</option>
|
||||||
</div>
|
<option value="外孙">外孙</option>
|
||||||
<div class="layui-form-item">
|
<option value="外孙女">外孙女</option>
|
||||||
<label class="layui-form-label">房屋ID</label>
|
<option value="旁系亲属">旁系亲属</option>
|
||||||
<div class="layui-input-block">
|
<option value="其他亲属">其他亲属</option>
|
||||||
<input type="text" id="buildingHouseId" name="buildingHouseId" class="layui-input" value="" placeholder="请输入房屋ID" maxlength="36">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin">
|
||||||
@ -93,62 +132,43 @@
|
|||||||
var wangEditor = window.wangEditor;
|
var wangEditor = window.wangEditor;
|
||||||
var wangEditorObj = {};
|
var wangEditorObj = {};
|
||||||
var viewerObj = {};
|
var viewerObj = {};
|
||||||
|
var buildingHouseId = top.restAjax.params(window.location.href).buildingHouseId;
|
||||||
|
|
||||||
|
$(document).on('click','#search',function(){
|
||||||
|
queryBasePopulationInfo($('#idCardNumber').val());
|
||||||
|
});
|
||||||
|
|
||||||
|
function queryBasePopulationInfo(idCardNumber){
|
||||||
|
if(!idCardNumber){
|
||||||
|
top.dialog.msg('请输入身份证号进行查询');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var loadIndex = layer.load(0);
|
||||||
|
top.restAjax.get(top.restAjax.path('api/buildinghouseuser/userMsg/{idCard}', [idCardNumber]),
|
||||||
|
{}, null, function(code, data) {
|
||||||
|
console.log(data.data);
|
||||||
|
if(!data.data) {
|
||||||
|
$('#cardNumber').val(idCardNumber);
|
||||||
|
return false;
|
||||||
|
}else {
|
||||||
|
$('#name').val(data.data.name);
|
||||||
|
$('#sex').val(data.data.sex);
|
||||||
|
$('#phone').val(data.data.phone);
|
||||||
|
$('#cardNumber').val(idCardNumber);
|
||||||
|
}
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
},function(){
|
||||||
|
|
||||||
|
},function () {
|
||||||
|
layer.close(loadIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshDownloadTemplet(fileName, file) {
|
|
||||||
var dataRander = {};
|
|
||||||
dataRander[fileName] = file;
|
|
||||||
|
|
||||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
|
||||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化文件列表
|
|
||||||
function initFileList(fileName, ids, callback) {
|
|
||||||
var dataForm = {};
|
|
||||||
dataForm[fileName] = ids;
|
|
||||||
form.val('dataForm', dataForm);
|
|
||||||
|
|
||||||
if(!ids) {
|
|
||||||
refreshDownloadTemplet(fileName, []);
|
|
||||||
if(callback) {
|
|
||||||
callback(fileName, []);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
|
||||||
ids: ids
|
|
||||||
}, null, function(code, data) {
|
|
||||||
refreshDownloadTemplet(fileName, data);
|
|
||||||
if(callback) {
|
|
||||||
callback(fileName, data);
|
|
||||||
}
|
|
||||||
}, function(code, data) {
|
|
||||||
top.dialog.msg(data.msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化视频
|
|
||||||
function initVideo(fileName, data) {
|
|
||||||
for(var i = 0, item; item = data[i++];) {
|
|
||||||
var player = new ckplayer({
|
|
||||||
container: '#'+ fileName + i,
|
|
||||||
variable: 'player',
|
|
||||||
flashplayer: false,
|
|
||||||
video: {
|
|
||||||
file: 'route/file/download/true/'+ item.fileId,
|
|
||||||
type: 'video/mp4'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
function initData() {
|
function initData() {
|
||||||
}
|
}
|
||||||
@ -156,6 +176,7 @@
|
|||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
form.on('submit(submitForm)', function(formData) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
formData.field['buildingHouseId'] = buildingHouseId;
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
@ -186,10 +207,6 @@
|
|||||||
$('.close').on('click', function() {
|
$('.close').on('click', function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 校验
|
|
||||||
form.verify({
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -22,52 +22,91 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item" style="display: none;">
|
||||||
<label class="layui-form-label">证件类型ID</label>
|
<label class="layui-form-label">证件类型ID</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="cardType" name="cardType" class="layui-input" value="" placeholder="请输入证件类型ID" maxlength="36">
|
<input type="text" id="cardType" name="cardType" class="layui-input" value="" placeholder="请输入证件类型ID" maxlength="36">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item" style="display: none;">
|
||||||
<label class="layui-form-label">证件类型名称</label>
|
<label class="layui-form-label">证件类型名称</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="cardTypeName" name="cardTypeName" class="layui-input" value="" placeholder="请输入证件类型名称" maxlength="255">
|
<input type="text" id="cardTypeName" name="cardTypeName" class="layui-input" value="" placeholder="请输入证件类型名称" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-row">
|
||||||
<label class="layui-form-label">证件号码</label>
|
<div class="layui-col-md3">
|
||||||
<div class="layui-input-block">
|
<div class="layui-form-item">
|
||||||
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
<label class="layui-form-label">身份证</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="idCardNumber" name="idCardNumber" style="width: 230px;" class="layui-input" value="" placeholder="请输入公民身份证进行检索">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md3" style="margin-left: 50px;">
|
||||||
|
<div style="margin: 4px 4px;">
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-row">
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">姓名</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">性别</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-row">
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">证件号码</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="cardNumber" name="cardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-lg6">
|
||||||
|
<label class="layui-form-label">联系方式</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="11">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">姓名</label>
|
<label class="layui-form-label">与户主关系</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="255">
|
<select name="relationship" id="relationship" lay-filter="relationship">
|
||||||
</div>
|
<option value="">请选择与户主关系</option>
|
||||||
</div>
|
<option value="户主">户主</option>
|
||||||
<div class="layui-form-item">
|
<option value="配偶">配偶</option>
|
||||||
<label class="layui-form-label">性别</label>
|
<option value="子女">子女</option>
|
||||||
<div class="layui-input-block">
|
<option value="儿媳">儿媳</option>
|
||||||
<input type="text" id="sex" name="sex" class="layui-input" value="" placeholder="请输入性别" maxlength="255">
|
<option value="女婿">女婿</option>
|
||||||
</div>
|
<option value="孙女">孙女</option>
|
||||||
</div>
|
<option value="孙子">孙子</option>
|
||||||
<div class="layui-form-item">
|
<option value="父母">父母</option>
|
||||||
<label class="layui-form-label">联系方式</label>
|
<option value="祖父母">祖父母</option>
|
||||||
<div class="layui-input-block">
|
<option value="外祖父母">外祖父母</option>
|
||||||
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="255">
|
<option value="兄弟">兄弟</option>
|
||||||
</div>
|
<option value="姐妹">姐妹</option>
|
||||||
</div>
|
<option value="外孙">外孙</option>
|
||||||
<div class="layui-form-item">
|
<option value="外孙女">外孙女</option>
|
||||||
<label class="layui-form-label">房屋ID</label>
|
<option value="旁系亲属">旁系亲属</option>
|
||||||
<div class="layui-input-block">
|
<option value="其他亲属">其他亲属</option>
|
||||||
<input type="text" id="buildingHouseId" name="buildingHouseId" class="layui-input" value="" placeholder="请输入房屋ID" maxlength="36">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-footer" style="left: 0;">
|
<div class="layui-footer" style="left: 0;">
|
||||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -96,61 +135,41 @@
|
|||||||
var wangEditorObj = {};
|
var wangEditorObj = {};
|
||||||
var viewerObj = {};
|
var viewerObj = {};
|
||||||
|
|
||||||
|
$(document).on('click','#search',function(){
|
||||||
|
queryBasePopulationInfo($('#idCardNumber').val());
|
||||||
|
});
|
||||||
|
|
||||||
|
function queryBasePopulationInfo(idCardNumber){
|
||||||
|
if(!idCardNumber){
|
||||||
|
top.dialog.msg('请输入身份证号进行查询');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var loadIndex = layer.load(0);
|
||||||
|
top.restAjax.get(top.restAjax.path('api/buildinghouseuser/userMsg/{idCard}', [idCardNumber]),
|
||||||
|
{}, null, function(code, data) {
|
||||||
|
console.log(data.data);
|
||||||
|
if(!data.data) {
|
||||||
|
$('#cardNumber').val(idCardNumber);
|
||||||
|
return false;
|
||||||
|
}else {
|
||||||
|
$('#name').val(data.data.name);
|
||||||
|
$('#sex').val(data.data.sex);
|
||||||
|
$('#phone').val(data.data.phone);
|
||||||
|
$('#cardNumber').val(idCardNumber);
|
||||||
|
}
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
},function(){
|
||||||
|
|
||||||
|
},function () {
|
||||||
|
layer.close(loadIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshDownloadTemplet(fileName, file) {
|
|
||||||
var dataRander = {};
|
|
||||||
dataRander[fileName] = file;
|
|
||||||
|
|
||||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
|
||||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化文件列表
|
|
||||||
function initFileList(fileName, ids, callback) {
|
|
||||||
var dataForm = {};
|
|
||||||
dataForm[fileName] = ids;
|
|
||||||
form.val('dataForm', dataForm);
|
|
||||||
|
|
||||||
if(!ids) {
|
|
||||||
refreshDownloadTemplet(fileName, []);
|
|
||||||
if(callback) {
|
|
||||||
callback(fileName, []);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
|
||||||
ids: ids
|
|
||||||
}, null, function(code, data) {
|
|
||||||
refreshDownloadTemplet(fileName, data);
|
|
||||||
if(callback) {
|
|
||||||
callback(fileName, data);
|
|
||||||
}
|
|
||||||
}, function(code, data) {
|
|
||||||
top.dialog.msg(data.msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化视频
|
|
||||||
function initVideo(fileName, data) {
|
|
||||||
for(var i = 0, item; item = data[i++];) {
|
|
||||||
var player = new ckplayer({
|
|
||||||
container: '#'+ fileName + i,
|
|
||||||
variable: 'player',
|
|
||||||
flashplayer: false,
|
|
||||||
video: {
|
|
||||||
file: 'route/file/download/true/'+ item.fileId,
|
|
||||||
type: 'video/mp4'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
function initData() {
|
function initData() {
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
@ -203,10 +222,6 @@
|
|||||||
$('.close').on('click', function() {
|
$('.close').on('click', function() {
|
||||||
closeBox();
|
closeBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 校验
|
|
||||||
form.verify({
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user