门店获取经纬度
This commit is contained in:
@ -119,7 +119,7 @@ public class CompanyStore extends BaseEntity
|
||||
private BigDecimal daishouRatio;
|
||||
|
||||
/** 标签 1.可租车 2.可换电 3.二手车,多个用,号隔开,例如1,2,3 */
|
||||
@Excel(name = "标签 1.可租车 2.可换电 3.二手车,多个用,号隔开,例如1,2,3")
|
||||
@Excel(name = "标签")
|
||||
private String label;
|
||||
|
||||
/** 运营公司id */
|
||||
|
||||
@ -56,6 +56,11 @@ public class CompanyStoreServiceImpl implements ICompanyStoreService
|
||||
{
|
||||
companyStore.setCreateTime(DateUtils.getNowDate());
|
||||
companyStore.setUpdateTime(DateUtils.getNowDate());
|
||||
if(companyStore.getAuditStatus().equals("1")){
|
||||
companyStore.setStatus("0");
|
||||
}else{
|
||||
companyStore.setStatus("0");
|
||||
}
|
||||
return companyStoreMapper.insertCompanyStore(companyStore);
|
||||
}
|
||||
|
||||
@ -69,6 +74,11 @@ public class CompanyStoreServiceImpl implements ICompanyStoreService
|
||||
public int updateCompanyStore(CompanyStore companyStore)
|
||||
{
|
||||
companyStore.setUpdateTime(DateUtils.getNowDate());
|
||||
if(companyStore.getAuditStatus().equals("1")){
|
||||
companyStore.setStatus("0");
|
||||
}else{
|
||||
companyStore.setStatus("0");
|
||||
}
|
||||
return companyStoreMapper.updateCompanyStore(companyStore);
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属运营商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorName" id="operatorName" class="form-control" type="hidden" >
|
||||
<input name="operatorName" id="operatorName" class="form-control" type="hidden" th:field="*{operatorName}">
|
||||
<select name="operatorId" id="operator-select" class="form-control m-b" required>
|
||||
<option value="">请选择运营商</option>
|
||||
</select>
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属运营商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorName" id="operatorName" class="form-control" type="hidden" >
|
||||
<input name="operatorName" id="operatorName" class="form-control" type="hidden" th:field="*{operatorName}">
|
||||
<select name="operatorId" id="operator-select" class="form-control m-b" required>
|
||||
<option value="">请选择运营商</option>
|
||||
</select>
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<th:block th:include="include :: header('新增门店')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=XG7BZ-WIZ34-E4PUJ-FQFQF-P6PSS-MMBP2"></script>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
@ -66,19 +67,27 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="detailedAddress" class="form-control" type="text" required>
|
||||
<input id="detailedAddress" name="detailedAddress" class="form-control" type="text" required>
|
||||
<!-- <button type="button" id="searchBtn">搜索</button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">地图定位:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="map-container" id="mapContainer"></div>
|
||||
<p>提示:可以拖动地图中的标记来精确定位</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">纬度:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="latitude" class="form-control" type="text" required>
|
||||
<input id="latitude" name="latitude" readonly class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">经度:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="longitude" class="form-control" type="text" required>
|
||||
<input id="longitude" name="longitude" readonly class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -317,6 +326,34 @@
|
||||
$("#areatreeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 初始化地图
|
||||
let map, marker;
|
||||
|
||||
function initMap() {
|
||||
// var position = document.getElementById("position");
|
||||
|
||||
var center = new TMap.LatLng(28.228302,112.938901);//设置中心点坐标
|
||||
//初始化地图
|
||||
var map = new TMap.Map("mapContainer", {
|
||||
center: center
|
||||
});
|
||||
|
||||
//绑定点击事件
|
||||
map.on("click",function(evt){
|
||||
var lat = evt.latLng.getLat().toFixed(6);
|
||||
var lng = evt.latLng.getLng().toFixed(6);
|
||||
// position.innerHTML = lat + "," + lng;
|
||||
|
||||
$("#latitude").val(lat);
|
||||
$("#longitude").val(lng);
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化地图
|
||||
window.onload = initMap;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -4,6 +4,7 @@
|
||||
<th:block th:include="include :: header('修改门店')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=XG7BZ-WIZ34-E4PUJ-FQFQF-P6PSS-MMBP2"></script>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
@ -70,16 +71,23 @@
|
||||
<input name="detailedAddress" th:field="*{detailedAddress}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">地图定位:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="map-container" id="mapContainer"></div>
|
||||
<p>提示:可以拖动地图中的标记来精确定位</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">纬度:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="latitude" th:field="*{latitude}" class="form-control" type="text" required>
|
||||
<input id="latitude" name="latitude" th:field="*{latitude}" readonly class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">经度:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="longitude" th:field="*{longitude}" class="form-control" type="text" required>
|
||||
<input id="longitude" name="longitude" th:field="*{longitude}" readonly class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -341,5 +349,32 @@
|
||||
$("#areatreeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
||||
// 初始化地图
|
||||
let map, marker;
|
||||
|
||||
function initMap() {
|
||||
// var position = document.getElementById("position");
|
||||
|
||||
var center = new TMap.LatLng(28.228302,112.938901);//设置中心点坐标
|
||||
//初始化地图
|
||||
var map = new TMap.Map("mapContainer", {
|
||||
center: center
|
||||
});
|
||||
|
||||
//绑定点击事件
|
||||
map.on("click",function(evt){
|
||||
var lat = evt.latLng.getLat().toFixed(6);
|
||||
var lng = evt.latLng.getLng().toFixed(6);
|
||||
// position.innerHTML = lat + "," + lng;
|
||||
|
||||
$("#latitude").val(lat);
|
||||
$("#longitude").val(lng);
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化地图
|
||||
window.onload = initMap;
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user