|
|
|
@ -288,6 +288,14 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="商户地区:" prop="district_id"> |
|
|
|
|
<el-cascader ref="tree" v-model="merData.district_id" :props="props"></el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<div style="width: 460px;margin-left: 150px;"> |
|
|
|
|
<Maps v-if="mapKey" ref="mapChild" class="map-sty" :map-key="mapKey" :lat="Number(merData.lat || 34.34127)" :lon="Number(merData.long || 108.93984)" :address="merData.mer_address" @getCoordinates="getCoordinates" /> |
|
|
|
|
</div> |
|
|
|
@ -412,7 +420,7 @@ |
|
|
|
|
// +---------------------------------------------------------------------- |
|
|
|
|
// | Author: CRMEB Team <admin@crmeb.com> |
|
|
|
|
// +---------------------------------------------------------------------- |
|
|
|
|
import { storeGetInfoApi, marginCode, marginRecordLst, marginRefund } from '@/api/setting' |
|
|
|
|
import { storeGetInfoApi, marginCode, marginRecordLst, marginRefund,getArea } from '@/api/setting' |
|
|
|
|
import { getBaseInfo, merchantUpdate } from '@/api/user.js' |
|
|
|
|
import Maps from '@/components/map/map.vue' |
|
|
|
|
import { getToken } from '@/utils/auth' |
|
|
|
@ -514,6 +522,7 @@ export default { |
|
|
|
|
value1: "", |
|
|
|
|
value2: "", |
|
|
|
|
merData: { |
|
|
|
|
district_id:null, |
|
|
|
|
delivery_way: [], |
|
|
|
|
mer_take_name: '', |
|
|
|
|
mer_take_phone: '', |
|
|
|
@ -523,6 +532,55 @@ export default { |
|
|
|
|
mer_take_location: '', |
|
|
|
|
id: 0, |
|
|
|
|
mer_take_status: 0 }, // 默认数据 |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
lazy: true, |
|
|
|
|
lazyLoad (node, resolve) { |
|
|
|
|
console.log(node) |
|
|
|
|
const { level } = node; |
|
|
|
|
if(level==0){ |
|
|
|
|
getArea(0).then(res=>{ |
|
|
|
|
|
|
|
|
|
let nodes=res.data.map(item=>{ |
|
|
|
|
return{ |
|
|
|
|
value:item.id, |
|
|
|
|
label:item.name, |
|
|
|
|
leaf:false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
resolve(nodes); |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}else if(level==1){ |
|
|
|
|
getArea(node.value).then(res=>{ |
|
|
|
|
|
|
|
|
|
let nodes=res.data.map(item=>{ |
|
|
|
|
return{ |
|
|
|
|
value:item.id, |
|
|
|
|
label:item.name, |
|
|
|
|
leaf:false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
resolve(nodes); |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}else if(level==2){ |
|
|
|
|
getArea(node.value).then(res=>{ |
|
|
|
|
|
|
|
|
|
let nodes=res.data.map(item=>{ |
|
|
|
|
return{ |
|
|
|
|
value:item.id, |
|
|
|
|
label:item.name, |
|
|
|
|
leaf:true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
resolve(nodes); |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
myHeaders: { 'X-Token': getToken() }, |
|
|
|
|
uploadedQualifications: [], // 资质图片列表 |
|
|
|
|
merPicList:[],//店铺相册 |
|
|
|
@ -682,7 +740,7 @@ export default { |
|
|
|
|
if (valid) { |
|
|
|
|
const dataKey = Object.keys(this.rules) |
|
|
|
|
const reqData = {}; |
|
|
|
|
[...dataKey, 'mer_state', 'long', 'lat', 'mini_banner', 'service_phone'].map(item => { |
|
|
|
|
[...dataKey, 'mer_state', 'long', 'lat', 'mini_banner', 'service_phone','district_id'].map(item => { |
|
|
|
|
reqData[item] = this.merData[item] |
|
|
|
|
}) |
|
|
|
|
reqData.type = this.infoType |
|
|
|
|