Commit d36f1c3c by 匡雅琴

预发布bug解决

1 parent 193766f3
......@@ -1067,13 +1067,20 @@
provincecode = addressData.provincecode
}
// 获取省市
var provinceIdx = fullAddress.province
var cityIdx = fullAddress.city ? fullAddress.city : fullAddress.district
var provinceIdx = ''
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 = ['北京市', '天津市', '上海市', '重庆市']
var municipality = municipalities.find(item => item == provinceIdx)
if (municipality) {
cityIdx = cityIdx.slice(0, 2) + '城区'
console.log(cityIdx);
if (municipality === '重庆市') {
provincecode = provincecode.slice(0, 4)
provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县')
......@@ -1113,7 +1120,6 @@
}
})
var city = cityInfo.find(item => item.name == cityIdx)
console.log(city);
merchantForm.cityCode = city.adcode
merchantForm.cityName = city.name
$('#startc').val(merchantForm.cityName)
......
......@@ -704,6 +704,7 @@
// businessScopeCustomize
if (res.code == '0') {
roleData = helper.clone(true, res.data)
console.log(roleData, '====');
for (var i in basicArr) {
// if (basicArr[i] == 'businessTypeName' && roleData.businessScopeCustomize) {
// roleData.businessTypeName = roleData.businessTypeName ? roleData.businessTypeName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
......@@ -717,6 +718,12 @@
$('#sapBox').removeClass('hide')
}
roleData.bussinessBegintime ? $('#businessTime').text(roleData.bussinessBegintime + '-' + roleData.bussinessEndtime) : $('#businessTime').text('-')
if (roleData.provinceName) {
roleData.merchantAddress ? $('#merchantAddress').text(roleData.merchantAddress) : $('#merchantAddress').text(roleData.provinceName + ' ' + roleData.cityName)
} else {
$('#merchantAddress').text('-')
}
// roleData.merchantAddress
// var effectiveTimeNameEl = $('#effectiveTimeName')
// if (roleData.merchantAccountLevel == 4) { // 门店
// if (roleData.status == 1 || roleData.status == 5) {
......
......@@ -1089,6 +1089,7 @@
}
}
})
console.log(cityInfo);
var city = cityInfo.find(item => item.name == cityIdx)
merchantForm.cityCode = city.adcode
merchantForm.cityName = city.name
......
......@@ -67,10 +67,10 @@
</button>
</div>
<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>
<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 class="layui-form-item">
<input name="merchantAddress" id="merchantAddress" class="layui-input" placeholder="请输入详细地址,如道路、门牌号等">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!