Commit 2e11abb6 by 匡雅琴

Merge branch 'huy_dev_v2.1.0' into kuangyq_v2.1.1

2 parents 6e66a428 d36f1c3c
...@@ -382,6 +382,7 @@ ...@@ -382,6 +382,7 @@
} }
}) })
treeTab.tabChange('roleAuth', authList[0].accounttypeId) treeTab.tabChange('roleAuth', authList[0].accounttypeId)
$(window).resize();
} }
} }
}) })
......
...@@ -640,6 +640,7 @@ ...@@ -640,6 +640,7 @@
var provinceInfoList = [] var provinceInfoList = []
var cityInfo = [] var cityInfo = []
var addressData = {}
// 省市区 // 省市区
getProvinceList() getProvinceList()
// com.getSelect({ // com.getSelect({
...@@ -1054,16 +1055,32 @@ ...@@ -1054,16 +1055,32 @@
merchantForm.lat = res.lat merchantForm.lat = res.lat
merchantForm.lng = res.lng merchantForm.lng = res.lng
merchantForm.merchantAddress = res.merchantAddress merchantForm.merchantAddress = res.merchantAddress
var fullAddress = res.geocoderAddress.addressComponent var fullAddress = ''
var provincecode = ''
if (res.geocoderAddress) {
fullAddress = res.geocoderAddress.addressComponent
provincecode = res.geocoderAddress.adcode
addressData.fullAddress = res.geocoderAddress.addressComponent
addressData.provincecode = res.geocoderAddress.adcode
} else {
fullAddress = addressData.fullAddress
provincecode = addressData.provincecode
}
// 获取省市 // 获取省市
var provincecode = res.geocoderAddress.adcode var provinceIdx = ''
var provinceIdx = fullAddress.province var cityIdx = ''
var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district if (fullAddress) {
provinceIdx = fullAddress.province
cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
} else {
provinceIdx = merchantForm.provinceName
cityIdx = merchantForm.cityName
provincecode = merchantForm.cityCode
}
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provinceIdx) var municipality = municipalities.find(item => item == provinceIdx)
if (municipality) { if (municipality) {
cityIdx = cityIdx.slice(0, 2) + '城区' cityIdx = cityIdx.slice(0, 2) + '城区'
console.log(cityIdx);
if (municipality === '重庆市') { if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4) provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县') provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县')
...@@ -1095,7 +1112,6 @@ ...@@ -1095,7 +1112,6 @@
select: function (data) { select: function (data) {
const { value } = data const { value } = data
if (value) { if (value) {
console.log(cityInfo);
merchantForm.cityName = value merchantForm.cityName = value
var cityChange = cityInfo.find(item => item.name == value) var cityChange = cityInfo.find(item => item.name == value)
merchantForm.cityCode = cityChange.adcode merchantForm.cityCode = cityChange.adcode
...@@ -1104,7 +1120,6 @@ ...@@ -1104,7 +1120,6 @@
} }
}) })
var city = cityInfo.find(item => item.name == cityIdx) var city = cityInfo.find(item => item.name == cityIdx)
console.log(city);
merchantForm.cityCode = city.adcode merchantForm.cityCode = city.adcode
merchantForm.cityName = city.name merchantForm.cityName = city.name
$('#startc').val(merchantForm.cityName) $('#startc').val(merchantForm.cityName)
......
...@@ -631,6 +631,7 @@ ...@@ -631,6 +631,7 @@
} }
var provinceInfoList = [] var provinceInfoList = []
var cityInfo = [] var cityInfo = []
var addressData = {}
// 省市区 // 省市区
getProvinceList() getProvinceList()
// com.getSelect({ // com.getSelect({
...@@ -1064,9 +1065,18 @@ ...@@ -1064,9 +1065,18 @@
merchantForm.lat = res.lat merchantForm.lat = res.lat
merchantForm.lng = res.lng merchantForm.lng = res.lng
merchantForm.merchantAddress = res.merchantAddress merchantForm.merchantAddress = res.merchantAddress
var fullAddress = res.geocoderAddress.addressComponent var fullAddress = ''
var provincecode = ''
if (res.geocoderAddress) {
fullAddress = res.geocoderAddress.addressComponent
provincecode = res.geocoderAddress.adcode
addressData.fullAddress = res.geocoderAddress.addressComponent
addressData.provincecode = res.geocoderAddress.adcode
} else {
fullAddress = addressData.fullAddress
provincecode = addressData.provincecode
}
// 获取省市 // 获取省市
var provincecode = res.geocoderAddress.adcode
var provinceIdx = fullAddress.province var provinceIdx = fullAddress.province
var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
......
...@@ -704,6 +704,7 @@ ...@@ -704,6 +704,7 @@
// businessScopeCustomize // businessScopeCustomize
if (res.code == '0') { if (res.code == '0') {
roleData = helper.clone(true, res.data) roleData = helper.clone(true, res.data)
console.log(roleData, '====');
for (var i in basicArr) { for (var i in basicArr) {
// if (basicArr[i] == 'businessTypeName' && roleData.businessScopeCustomize) { // if (basicArr[i] == 'businessTypeName' && roleData.businessScopeCustomize) {
// roleData.businessTypeName = roleData.businessTypeName ? roleData.businessTypeName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize // roleData.businessTypeName = roleData.businessTypeName ? roleData.businessTypeName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
...@@ -717,7 +718,12 @@ ...@@ -717,7 +718,12 @@
$('#sapBox').removeClass('hide') $('#sapBox').removeClass('hide')
} }
roleData.bussinessBegintime ? $('#businessTime').text(roleData.bussinessBegintime + '-' + roleData.bussinessEndtime) : $('#businessTime').text('-') roleData.bussinessBegintime ? $('#businessTime').text(roleData.bussinessBegintime + '-' + roleData.bussinessEndtime) : $('#businessTime').text('-')
roleData.merchantAddress ? $('#merchantAddress').text(roleData.merchantAddress) : roleData.provinceName ? $('#merchantAddress').text(roleData.provinceName + ' ' + roleData.cityName) : $('#merchantAddress').text('-') if (roleData.provinceName) {
roleData.merchantAddress ? $('#merchantAddress').text(roleData.merchantAddress) : $('#merchantAddress').text(roleData.provinceName + ' ' + roleData.cityName)
} else {
$('#merchantAddress').text('-')
}
// roleData.merchantAddress
// var effectiveTimeNameEl = $('#effectiveTimeName') // var effectiveTimeNameEl = $('#effectiveTimeName')
// if (roleData.merchantAccountLevel == 4) { // 门店 // if (roleData.merchantAccountLevel == 4) { // 门店
// if (roleData.status == 1 || roleData.status == 5) { // if (roleData.status == 1 || roleData.status == 5) {
......
...@@ -630,6 +630,7 @@ ...@@ -630,6 +630,7 @@
} }
var provinceInfoList = [] var provinceInfoList = []
var cityInfo = [] var cityInfo = []
var addressData = {}
// 省市区 // 省市区
getProvinceList() getProvinceList()
// com.getSelect({ // com.getSelect({
...@@ -944,7 +945,6 @@ ...@@ -944,7 +945,6 @@
if (treeObj) { if (treeObj) {
let getCheckedNodes = treeObj.getCheckedNodes(true) let getCheckedNodes = treeObj.getCheckedNodes(true)
const getCheckedKeys = treeObj.getCheckedNodes(true).map(item => item.id) const getCheckedKeys = treeObj.getCheckedNodes(true).map(item => item.id)
console.log(getCheckedKeys)
getCheckedNodes = getCheckedNodes.filter(item => item.children) getCheckedNodes = getCheckedNodes.filter(item => item.children)
merchantForm.merchantBrandList = getCheckedNodes.map(car => { merchantForm.merchantBrandList = getCheckedNodes.map(car => {
let merchantBrandId = [] let merchantBrandId = []
...@@ -958,7 +958,6 @@ ...@@ -958,7 +958,6 @@
merchantBrandId merchantBrandId
} }
}) })
console.log(merchantForm.merchantBrandList)
params.merchantBrandListJson = JSON.stringify(merchantForm.merchantBrandList) params.merchantBrandListJson = JSON.stringify(merchantForm.merchantBrandList)
} }
if (merchantForm.merchantFiles.length) { if (merchantForm.merchantFiles.length) {
...@@ -1025,16 +1024,33 @@ ...@@ -1025,16 +1024,33 @@
merchantForm.lat = res.lat merchantForm.lat = res.lat
merchantForm.lng = res.lng merchantForm.lng = res.lng
merchantForm.merchantAddress = res.merchantAddress merchantForm.merchantAddress = res.merchantAddress
var fullAddress = res.geocoderAddress.addressComponent var fullAddress = ''
var provincecode = ''
if (res.geocoderAddress) {
fullAddress = res.geocoderAddress.addressComponent
provincecode = res.geocoderAddress.adcode
addressData.fullAddress = res.geocoderAddress.addressComponent
addressData.provincecode = res.geocoderAddress.adcode
} else {
fullAddress = addressData.fullAddress
provincecode = addressData.provincecode
}
// 获取省市 // 获取省市
var provincecode = res.geocoderAddress.adcode // 如果没有点击地图地址,省市信息从返回数据读取
var provinceIdx = fullAddress.province var provinceIdx = ''
var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district var cityIdx = ''
if (fullAddress) {
provinceIdx = fullAddress.province
cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
} else {
provinceIdx = merchantForm.provinceName
cityIdx = merchantForm.cityName
provincecode = merchantForm.cityCode
}
const municipalities = ['北京市', '天津市', '上海市', '重庆市'] const municipalities = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provinceIdx) var municipality = municipalities.find(item => item == provinceIdx)
if (municipality) { if (municipality) {
cityIdx = cityIdx.slice(0, 2) + '城区' cityIdx = cityIdx.slice(0, 2) + '城区'
console.log(cityIdx);
if (municipality === '重庆市') { if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4) provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县') provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县')
...@@ -1051,7 +1067,6 @@ ...@@ -1051,7 +1067,6 @@
} }
} }
$('#addrEl').val(merchantForm.merchantAddress) $('#addrEl').val(merchantForm.merchantAddress)
console.log(provinceInfoList);
var province = provinceInfoList.find(item => item.name.indexOf(provinceIdx) != -1) var province = provinceInfoList.find(item => item.name.indexOf(provinceIdx) != -1)
$('#startp').val(province.name) $('#startp').val(province.name)
cityInfo = province.districtList cityInfo = province.districtList
...@@ -1074,6 +1089,7 @@ ...@@ -1074,6 +1089,7 @@
} }
} }
}) })
console.log(cityInfo);
var city = cityInfo.find(item => item.name == cityIdx) var city = cityInfo.find(item => item.name == cityIdx)
merchantForm.cityCode = city.adcode merchantForm.cityCode = city.adcode
merchantForm.cityName = city.name merchantForm.cityName = city.name
......
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
</button> </button>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-inline" style="width: 400px; height: 300px;"> <div class="layui-input-inline" style="width: 100%; height: 300px;">
<div id="container"></div> <div id="container"></div>
</div> </div>
<div class="poi-list layui-input-inline poi-list" id="pois"></div> <!-- <div class="poi-list layui-input-inline poi-list" id="pois"></div> -->
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<input name="merchantAddress" id="merchantAddress" class="layui-input" placeholder="请输入详细地址,如道路、门牌号等"> <input name="merchantAddress" id="merchantAddress" class="layui-input" placeholder="请输入详细地址,如道路、门牌号等">
......
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
} }
}) })
treeTab.tabChange('roleAuth', authList[0].accounttypeId) treeTab.tabChange('roleAuth', authList[0].accounttypeId)
$(window).resize();
} }
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!