|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<!--新增门店-->
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog :is-show.sync="isShow" title="新增门店" type="form" :form="form">
|
|
|
|
|
<xy-dialog :is-show.sync="isShow" title="新增门店" type="form" :form="form" :rules="rules">
|
|
|
|
|
<template v-slot:belongsMerchant>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
@ -33,6 +33,15 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:address>
|
|
|
|
|
<div class="xy-table-item" style="margin-bottom: 20px;">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
地址选择
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<avue-map placeholder="请选择地址" :option="option" v-model="map" @mapClick="mapClick"></avue-map>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>地址:
|
|
|
|
|
@ -83,7 +92,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:extraFormBottom>
|
|
|
|
|
<avue-map size="small" :option="option" v-model="map" @mapClick="test"></avue-map>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
@ -99,12 +108,38 @@ export default {
|
|
|
|
|
belongsMerchant:'',
|
|
|
|
|
name:'',
|
|
|
|
|
password:'',
|
|
|
|
|
address:'',
|
|
|
|
|
contact:'',
|
|
|
|
|
contactNumber:'',
|
|
|
|
|
address:'',
|
|
|
|
|
lng:'',//经度
|
|
|
|
|
lat:'',//纬度
|
|
|
|
|
},
|
|
|
|
|
rules:{
|
|
|
|
|
belongsMerchant:[
|
|
|
|
|
{required:true,message:'请选择所属商家'}
|
|
|
|
|
],
|
|
|
|
|
name:[
|
|
|
|
|
{required:true,message:'请填写名称'}
|
|
|
|
|
],
|
|
|
|
|
password:[
|
|
|
|
|
{required:true,message:'请填写密码'}
|
|
|
|
|
],
|
|
|
|
|
contact:[
|
|
|
|
|
{required:true,message:'请填写联系人'}
|
|
|
|
|
],
|
|
|
|
|
contactNumber:[
|
|
|
|
|
{required:true,message:'请填写联系电话'}
|
|
|
|
|
],
|
|
|
|
|
address:[
|
|
|
|
|
{required:true,message:'请填写地址'}
|
|
|
|
|
],
|
|
|
|
|
lng:[
|
|
|
|
|
{required:true,message:'请选择定位'}
|
|
|
|
|
],
|
|
|
|
|
lat:[
|
|
|
|
|
{required:true,message:'请选择定位'}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
map:{
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -126,7 +161,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
test(r,p){
|
|
|
|
|
//地图点击
|
|
|
|
|
mapClick(r,p){
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.form.lat = p
|
|
|
|
|
this.form.lng = r
|
|
|
|
|
@ -137,6 +173,7 @@ export default {
|
|
|
|
|
map(newVal){
|
|
|
|
|
this.form.lat = newVal?.location?.lat
|
|
|
|
|
this.form.lng = newVal?.location?.lng
|
|
|
|
|
this.form.address = newVal?.formattedAddress
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
|