feat: ✨ 管理端使用最新地址选择器,默认在config关闭高德地图功能,开启后可继续使用
parent
8a43335b75
commit
8b33dbe8d7
|
@ -1,55 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<Button @click="enable = true">语言设定</Button>
|
||||
<Modal v-model="enable" draggable sticky scrollable :mask="false" :title="title">
|
||||
|
||||
<Tabs closable type="card" @on-tab-remove="handleTabRemove" :value="language[0].title">
|
||||
<TabPane v-for="(item,index) in language" :key="index" :label="item.title" :name="item.title">
|
||||
<Input v-model="item.___i18n" />
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {language} from "./languages";
|
||||
export default {
|
||||
/**
|
||||
* tabs 循环的语言内容格式 [{'title':'test','value':'val'}]
|
||||
*/
|
||||
props: {
|
||||
value: {
|
||||
type: null,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
language: {
|
||||
handler(val) {
|
||||
this.$emit("language", { language: [...val], val: this.value });
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
language,
|
||||
tabVal: "",
|
||||
enable: false, //是否开启modal
|
||||
title: "转换语言",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 删除tab标签将没有用的语音进行删除
|
||||
handleTabRemove(tab) {
|
||||
this.language = this.language.filter((item) => {
|
||||
return item.value != tab;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
|
@ -1 +0,0 @@
|
|||
export const language = [{ title: "中文",value:1 }, { title: "英文" ,value:2}];
|
|
@ -1,31 +1,23 @@
|
|||
<template>
|
||||
<div class="map">
|
||||
<Modal v-model="showMap" title="选择地址" width="800">
|
||||
<div class="address">{{ addrContent.address }}</div>
|
||||
<div id="map-container"></div>
|
||||
|
||||
<div class="search-con">
|
||||
<Input
|
||||
placeholder="输入关键字搜索"
|
||||
id="input-map"
|
||||
v-model="mapSearch"
|
||||
/>
|
||||
<ul>
|
||||
<li
|
||||
v-for="(tip, index) in tips"
|
||||
:key="index"
|
||||
@click="selectAddr(tip.location)"
|
||||
>
|
||||
<p>{{ tip.name }}</p>
|
||||
<p>{{ tip.district + tip.address }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<Button type="default" @click="showMap = false">取消</Button>
|
||||
<Button type="primary" :loading="loading" @click="ok">确定</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<div class="address">{{ addrContent.address }}</div>
|
||||
<div id="map-container"></div>
|
||||
|
||||
<div class="search-con">
|
||||
<Input placeholder="输入关键字搜索" id="input-map" v-model="mapSearch" />
|
||||
<ul>
|
||||
<li v-for="(tip, index) in tips" :key="index" @click="selectAddr(tip.location)">
|
||||
<p>{{ tip.name }}</p>
|
||||
<p>{{ tip.district + tip.address }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div slot="footer" class="footer">
|
||||
|
||||
<Button type="primary" :loading="loading" @click="ok">确定</Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -34,10 +26,11 @@ import { getRegion } from "@/api/common.js";
|
|||
|
||||
const config = require('@/config/index')
|
||||
export default {
|
||||
name: "map",
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
showMap: false, // modal显隐
|
||||
showMap: false, // 地图显隐
|
||||
mapSearch: "", // 地图搜索
|
||||
map: null, // 初始化地图
|
||||
autoComplete: null, // 初始化搜索方法
|
||||
|
@ -55,23 +48,26 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
ok() {
|
||||
// 确定选择
|
||||
this.loading = true;
|
||||
const params = {
|
||||
cityCode: this.addrContent.regeocode.addressComponent.citycode,
|
||||
townName: this.addrContent.regeocode.addressComponent.township,
|
||||
};
|
||||
getRegion(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.addrContent.addr = res.result.name.replace(/,/g, " ");
|
||||
this.addrContent.addrId = res.result.id;
|
||||
this.loading = false;
|
||||
this.showMap = false;
|
||||
this.$emit("getAddress", this.addrContent);
|
||||
}
|
||||
});
|
||||
|
||||
if (this.addrContent && this.addrContent.regeocode) {
|
||||
const params = {
|
||||
cityCode: this.addrContent.regeocode.addressComponent.citycode,
|
||||
townName: this.addrContent.regeocode.addressComponent.township,
|
||||
};
|
||||
getRegion(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.addrContent.addr = res.result.name.replace(/,/g, " ");
|
||||
this.addrContent.addrId = res.result.id;
|
||||
this.loading = false;
|
||||
|
||||
this.$emit("getAddress", this.addrContent);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$Message.error('未获取到坐标信息!请查看高德API配置是否正确')
|
||||
}
|
||||
|
||||
},
|
||||
// 初始化地图组件
|
||||
init() {
|
||||
AMapLoader.load({
|
||||
key: this.config.aMapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
|
@ -88,7 +84,8 @@ export default {
|
|||
version: "1.1", // AMapUI 缺省 1.1
|
||||
plugins: ["misc/PositionPicker"], // 需要加载的 AMapUI ui插件
|
||||
},
|
||||
}).then((AMap) => {
|
||||
})
|
||||
.then((AMap) => {
|
||||
let that = this;
|
||||
this.map = new AMap.Map("map-container", {
|
||||
zoom: 12,
|
||||
|
@ -120,7 +117,8 @@ export default {
|
|||
that.positionPicker.on("success", function (positionResult) {
|
||||
that.addrContent = positionResult;
|
||||
});
|
||||
}).catch((e) => {});
|
||||
})
|
||||
.catch((e) => { });
|
||||
},
|
||||
searchOfMap(val) {
|
||||
// 地图搜索
|
||||
|
@ -160,16 +158,20 @@ export default {
|
|||
right: 20px;
|
||||
top: 64px;
|
||||
width: 260px;
|
||||
|
||||
ul {
|
||||
width: 260px;
|
||||
height: 400px;
|
||||
height: 360px;
|
||||
overflow: scroll;
|
||||
|
||||
li {
|
||||
padding: 5px;
|
||||
|
||||
p:nth-child(2) {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #eee;
|
||||
cursor: pointer;
|
||||
|
@ -183,4 +185,9 @@ export default {
|
|||
// color: $theme_color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: right;
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -8,6 +8,7 @@ module.exports = {
|
|||
//FIXME 请检查当前高德key创建的日期,如果2021年12月02日之前申请的 无需填写安全密钥
|
||||
aMapSecurityJsCode:"2bd0fbf621881f4c77be74f0e76495f3", // 高德web端js申请的安全密钥
|
||||
aMapKey: "7f11113750315d8543daaf5c3ba353ca", //高德web端js申请的api key
|
||||
aMapSwitch:false, //是否开启高德定位
|
||||
website: "https://www.pickmall.cn", //官网地址
|
||||
enableCDN: true, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10003, //端口
|
||||
|
|
|
@ -18,7 +18,7 @@ import util from '@/libs/util'
|
|||
|
||||
import * as filters from '@/utils/filters' // global filter
|
||||
import liliDialog from '@/components/lili-dialog'
|
||||
import i18nBox from '@/components/i18n-translate'
|
||||
|
||||
import {md5} from '@/utils/md5.js';
|
||||
|
||||
// 打印
|
||||
|
@ -56,7 +56,7 @@ Vue.use(copyViewUi, {
|
|||
});
|
||||
|
||||
Vue.component('liliDialog', liliDialog)
|
||||
Vue.component('i18nBox', i18nBox)
|
||||
|
||||
|
||||
|
||||
// 挂载全局使用的方法
|
||||
|
|
|
@ -55,12 +55,6 @@ export const otherRouter = {
|
|||
name: "shop",
|
||||
component: () => import("@/views/seller/shop/shopList.vue")
|
||||
},
|
||||
{
|
||||
path: "shop-operation",
|
||||
title: "店铺操作",
|
||||
name: "shop-operation",
|
||||
component: () => import("@/views/seller/shop/shopOperation.vue")
|
||||
},
|
||||
{
|
||||
path: "shop-detail",
|
||||
title: "店铺详细",
|
||||
|
|
|
@ -200,12 +200,10 @@ import { homeStatistics, hotGoods, hotShops, getNoticePage } from "@/api/index";
|
|||
import * as API_Goods from "@/api/goods";
|
||||
import { Chart } from "@antv/g2";
|
||||
import * as API_Member from "@/api/member";
|
||||
// import i18nBox from '@/components/i18n-translate'
|
||||
|
||||
export default {
|
||||
name: "home",
|
||||
// components:{
|
||||
// i18nBox
|
||||
// },
|
||||
|
||||
data() {
|
||||
return {
|
||||
// 测试数据
|
||||
|
|
|
@ -85,26 +85,23 @@
|
|||
<DatePicker type="date" format="yyyy-MM-dd" v-model="form.birthday" style="width: 220px"></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="所在地" prop="mail">
|
||||
<div class="form-item" v-if="!updateRegion">
|
||||
<Input disabled style="width: 250px" :value="form.region" />
|
||||
<Button type="text" @click="() => {
|
||||
this.updateRegion = !this.updateRegion;
|
||||
}">修改</Button>
|
||||
</div>
|
||||
<div class="form-item" v-else>
|
||||
<region style="width: 250px" @selected="selectedRegion" />
|
||||
</div>
|
||||
{{ form.region || '暂无地址' }}
|
||||
|
||||
|
||||
<Button style="margin-left: 10px;" @click="$refs.map.open()">选择</Button>
|
||||
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Modal>
|
||||
<Modal width="1200px" v-model="picModelFlag">
|
||||
<ossManage @callback="callbackSelected" ref="ossManage" />
|
||||
</Modal>
|
||||
<multipleMap ref="map" @callback="selectedRegion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import region from "@/components/region";
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
import * as API_Member from "@/api/member.js";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
import * as RegExp from "@/libs/RegExp.js";
|
||||
|
@ -112,7 +109,7 @@ import * as RegExp from "@/libs/RegExp.js";
|
|||
export default {
|
||||
name: "member",
|
||||
components: {
|
||||
region,
|
||||
multipleMap,
|
||||
ossManage,
|
||||
},
|
||||
data() {
|
||||
|
@ -121,7 +118,7 @@ export default {
|
|||
descFlag: false, //编辑查看框
|
||||
loading: true, // 表单加载状态
|
||||
addFlag: false, // modal显隐控制
|
||||
updateRegion: false, // 地区
|
||||
|
||||
addMemberForm: {
|
||||
// 添加用户表单
|
||||
mobile: "",
|
||||
|
@ -382,7 +379,7 @@ export default {
|
|||
editPerm(val) {
|
||||
this.descTitle = `查看用户 ${val.username}`;
|
||||
this.descFlag = true;
|
||||
this.updateRegion = false;
|
||||
|
||||
this.getMemberInfo(val.id);
|
||||
},
|
||||
addMember() {
|
||||
|
@ -434,8 +431,18 @@ export default {
|
|||
|
||||
// 选中的地址
|
||||
selectedRegion(val) {
|
||||
this.region = val[1];
|
||||
this.regionId = val[0];
|
||||
if(val.type === 'select'){
|
||||
const paths = val.data.map(item => item.name).join(',')
|
||||
const ids = val.data.map(item => item.id).join(',')
|
||||
|
||||
this.$set(this.form,'region',paths)
|
||||
this.$set(this.form,'regionId',ids)
|
||||
|
||||
}
|
||||
else{
|
||||
this.$set(this.form,'region',val.data.addr)
|
||||
this.$set(this.form,'regionId',val.data.addrId)
|
||||
}
|
||||
},
|
||||
//查看会员
|
||||
detail(row) {
|
||||
|
@ -466,13 +473,13 @@ export default {
|
|||
|
||||
// 提交修改数据
|
||||
handleSubmitModal() {
|
||||
const { nickName, sex, username, face, newPassword,id } = this.form;
|
||||
const { nickName, sex, username, face, newPassword,id,regionId,region } = this.form;
|
||||
let time = new Date(this.form.birthday);
|
||||
let birthday = this.form.birthday=== undefined?'':
|
||||
time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
|
||||
let submit = {
|
||||
regionId: this.form.regionId,
|
||||
region: this.form.region,
|
||||
regionId,
|
||||
region,
|
||||
nickName,
|
||||
username,
|
||||
sex,
|
||||
|
@ -480,10 +487,7 @@ export default {
|
|||
face,
|
||||
id
|
||||
};
|
||||
if (this.region != "undefined") {
|
||||
submit.regionId = this.regionId;
|
||||
submit.region = this.region;
|
||||
}
|
||||
|
||||
if (newPassword) {
|
||||
submit.password = this.md5(newPassword);
|
||||
}
|
||||
|
|
|
@ -331,8 +331,8 @@
|
|||
<Input v-model="addressForm.mobile" clearable style="width: 80%" maxlength="11"/>
|
||||
</FormItem>
|
||||
<FormItem label="收货人地址" prop="consigneeAddressPath">
|
||||
<Input v-model="addressForm.consigneeAddressPath" @on-focus="$refs.liliMap.showMap = true" clearable
|
||||
style="width: 80%"/>
|
||||
<span>{{ addressForm.consigneeAddressPath || '暂无地址' }}</span>
|
||||
<Button @click="$refs.map.open()" style="margin-left: 10px;">选择</Button>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="detail">
|
||||
<Input v-model="addressForm.detail" maxlength="35" clearable style="width: 80%"/>
|
||||
|
@ -352,24 +352,23 @@
|
|||
<Button type="primary" :loading="submitLoading" @click="addressSubmit">保存</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<liliMap ref="liliMap" @getAddress="getAddress"></liliMap>
|
||||
<multipleMap ref="map" @callback="getAddress"></multipleMap>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import region from "@/components/region";
|
||||
|
||||
import * as API_Member from "@/api/member.js";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
import liliMap from "@/components/map/index";
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
import * as RegExp from '@/libs/RegExp.js';
|
||||
import * as API_Order from "@/api/order.js";
|
||||
|
||||
export default {
|
||||
name: "memberDetail",
|
||||
components: {
|
||||
region,
|
||||
ossManage,
|
||||
liliMap
|
||||
multipleMap
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -381,7 +380,9 @@
|
|||
addressModalVisible: false, //会员地址操作弹出框
|
||||
addressForm: {
|
||||
id: "",
|
||||
isDefault: "0"
|
||||
isDefault: "0",
|
||||
consigneeAddressPath:"",
|
||||
consigneeAddressIdPath:""
|
||||
|
||||
},//会员地址操作form
|
||||
selectDate: null, // 选择时间段
|
||||
|
@ -1004,12 +1005,24 @@
|
|||
|
||||
},
|
||||
//获取地址
|
||||
getAddress(item) {
|
||||
this.$set(this.addressForm, 'consigneeAddressPath', item.addr)
|
||||
this.$set(this.addressForm, 'consigneeAddressIdPath', item.addrId)
|
||||
this.addressForm.address = item.address
|
||||
this.addressForm.lat = item.position.lat
|
||||
this.addressForm.lon = item.position.lng
|
||||
getAddress(val) {
|
||||
if (val.type === 'select') {
|
||||
const paths = val.data.map(item => item.name).join(',')
|
||||
const ids = val.data.map(item => item.id).join(',')
|
||||
|
||||
this.$set(this.addressForm,'consigneeAddressPath',paths)
|
||||
this.$set(this.addressForm,'consigneeAddressIdPath',ids)
|
||||
|
||||
// 解析center 转为经纬度
|
||||
const coord = val.data[val.data.length - 1].center.split(',')
|
||||
this.addressForm.lat = coord[1]
|
||||
this.addressForm.lon = coord[0]
|
||||
}else{
|
||||
this.$set(this.addressForm,'consigneeAddressPath', val.data.addr)
|
||||
this.$set(this.addressForm,'consigneeAddressIdPath',val.data.addrId)
|
||||
this.addressForm.lat = val.data.position.lat
|
||||
this.addressForm.lon = val.data.position.lng
|
||||
}
|
||||
},
|
||||
//删除会员地址
|
||||
memberAddressRemove(v) {
|
||||
|
|
|
@ -134,40 +134,29 @@
|
|||
></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="所在地" prop="mail">
|
||||
<div class="form-item" v-if="!updateRegion">
|
||||
<Input disabled style="width: 250px" :value="formValidate.region" />
|
||||
<Button
|
||||
type="text"
|
||||
@click="
|
||||
() => {
|
||||
this.updateRegion = !this.updateRegion;
|
||||
}
|
||||
"
|
||||
>修改
|
||||
</Button>
|
||||
</div>
|
||||
<div class="form-item" v-else>
|
||||
<region style="width: 250px" @selected="selectedRegion" />
|
||||
</div>
|
||||
{{ formValidate.region || '暂无地址' }}
|
||||
<Button style="margin-left: 10px;" @click="$refs.map.open()">选择</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Modal>
|
||||
<Modal width="1200px" v-model="picModelFlag">
|
||||
<ossManage @callback="callbackSelected" ref="ossManage" />
|
||||
</Modal>
|
||||
<multipleMap ref="map" @callback="selectedRegion" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import region from "@/components/region";
|
||||
|
||||
import * as API_Member from "@/api/member.js";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
export default {
|
||||
name: "memberRecycle",
|
||||
components: {
|
||||
region,
|
||||
|
||||
ossManage,
|
||||
multipleMap
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -176,7 +165,7 @@ export default {
|
|||
descFlag: false, //编辑查看框
|
||||
openSearch: true, // 显示搜索
|
||||
loading: true, // 表单加载状态
|
||||
updateRegion: false, // 显示所在地
|
||||
|
||||
searchForm: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
|
@ -363,7 +352,7 @@ export default {
|
|||
editPerm(val) {
|
||||
this.descTitle = `查看用户 ${val.username}`;
|
||||
this.descFlag = true;
|
||||
this.updateRegion = false;
|
||||
|
||||
this.getMemberInfo(val.id);
|
||||
},
|
||||
/**
|
||||
|
@ -394,8 +383,18 @@ export default {
|
|||
|
||||
// 选中的地址
|
||||
selectedRegion(val) {
|
||||
this.region = val[1];
|
||||
this.regionId = val[0];
|
||||
if(val.type === 'select'){
|
||||
const paths = val.data.map(item => item.name).join(',')
|
||||
const ids = val.data.map(item => item.id).join(',')
|
||||
|
||||
this.$set(this.formValidate,'region',paths)
|
||||
this.$set(this.formValidate,'regionId',ids)
|
||||
|
||||
}
|
||||
else{
|
||||
this.$set(this.formValidate,'region',val.data.addr)
|
||||
this.$set(this.formValidate,'regionId',val.data.addrId)
|
||||
}
|
||||
},
|
||||
|
||||
//详细
|
||||
|
@ -427,14 +426,14 @@ export default {
|
|||
|
||||
// 提交修改数据
|
||||
handleSubmitModal() {
|
||||
const { nickName, sex, username, face, newPassword, id } =
|
||||
const { nickName, sex, username, face, newPassword, id ,regionId,region} =
|
||||
this.formValidate;
|
||||
let time = new Date(this.formValidate.birthday);
|
||||
let birthday =
|
||||
time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
|
||||
let submit = {
|
||||
regionId: this.regionId || "",
|
||||
region: this.region || "",
|
||||
regionId:regionId,
|
||||
region: region,
|
||||
nickName,
|
||||
username,
|
||||
sex,
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import region from "@/components/region";
|
||||
|
||||
import * as API_Member from "@/api/member.js";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
// 积分历史页面
|
||||
name: "point",
|
||||
components: {
|
||||
region,
|
||||
|
||||
ossManage,
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -345,11 +345,8 @@
|
|||
<Input v-model="addressForm.consigneeMobile" size="large" maxlength="11"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="地址信息" prop="consigneeAddressPath">
|
||||
<Input v-model="addr" disabled style="width: 305px" v-if="showRegion == false" />
|
||||
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary"
|
||||
icon="ios-create-outline" style="margin-left: 8px">修改
|
||||
</Button>
|
||||
<region style="width: 400px" @selected="selectedRegion" v-if="showRegion == true" />
|
||||
{{ addr }}
|
||||
<Button type="default" @click="$refs.map.open()">选择</Button>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="consigneeDetail">
|
||||
<Input v-model="addressForm.consigneeDetail" size="large" maxlength="50"></Input>
|
||||
|
@ -433,18 +430,23 @@
|
|||
<Button type="primary" v-print="printInfoObj">打印发货单</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
|
||||
<multipleMap ref="map" @callback="selectedRegion" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as API_Order from "@/api/order";
|
||||
import * as RegExp from "@/libs/RegExp.js";
|
||||
import region from "@/components/region";
|
||||
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
import vueQr from "vue-qr";
|
||||
export default {
|
||||
name: "orderList",
|
||||
components: {
|
||||
region,
|
||||
|
||||
multipleMap,
|
||||
"vue-qr": vueQr,
|
||||
},
|
||||
data () {
|
||||
|
@ -458,10 +460,10 @@ export default {
|
|||
extraHead: '',//头部文字 默认空
|
||||
},
|
||||
loading: false, //加载表格
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
|
||||
addr: "", //地区
|
||||
regionId: [], //地区id
|
||||
showRegion: false, // 显示地区
|
||||
|
||||
|
||||
orderLogInfo: [], //订单日志数据
|
||||
orderLogModal: false, //弹出调整价格框
|
||||
checkedLogistics: [], //选中的物流公司集合
|
||||
|
@ -638,11 +640,7 @@ export default {
|
|||
gotoHomes () {
|
||||
return false
|
||||
},
|
||||
//修改地址
|
||||
regionClick () {
|
||||
this.showRegion = true;
|
||||
this.regionId = "";
|
||||
},
|
||||
|
||||
//确认收款
|
||||
confirmPrice () {
|
||||
this.$Modal.confirm({
|
||||
|
@ -719,8 +717,17 @@ export default {
|
|||
},
|
||||
// 选中的地址
|
||||
selectedRegion (val) {
|
||||
this.addr = val[1];
|
||||
this.regionId = val[0];
|
||||
if(val.type === 'select'){
|
||||
const paths = val.data.map(item => item.name).join(',')
|
||||
const ids = val.data.map(item => item.id).join(',')
|
||||
this.$set(this,'addr',paths)
|
||||
this.$set(this,'regionId',ids)
|
||||
}
|
||||
else{
|
||||
this.$set(this,'addr',val.data.addr)
|
||||
this.$set(this,'regionId',val.data.addrId)
|
||||
}
|
||||
|
||||
},
|
||||
//订单取消
|
||||
orderCancel () {
|
||||
|
@ -761,7 +768,6 @@ export default {
|
|||
//弹出修改收货地址框
|
||||
editAddress () {
|
||||
this.addressModal = true;
|
||||
this.showRegion = false;
|
||||
this.addr = this.orderInfo.order.consigneeAddressPath;
|
||||
this.regionId = this.orderInfo.order.consigneeAddressIdPath;
|
||||
this.addressForm.consigneeName = this.orderInfo.order.consigneeName;
|
||||
|
|
|
@ -37,14 +37,9 @@
|
|||
<script>
|
||||
import {
|
||||
getShopListData,
|
||||
shopAudit
|
||||
} from "@/api/shops";
|
||||
import shopOperation from "./shopOperation";
|
||||
export default {
|
||||
name: "shop",
|
||||
components: {
|
||||
shopOperation,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
|
|
|
@ -566,7 +566,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import region from "@/components/region";
|
||||
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
import * as RegExp from '@/libs/RegExp.js';
|
||||
import {getCategoryTree} from "@/api/goods";
|
||||
|
@ -577,7 +577,7 @@
|
|||
export default {
|
||||
name: "member",
|
||||
components: {
|
||||
region,
|
||||
|
||||
ossManage,
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -232,6 +232,7 @@ export default {
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
type:"default",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<FormItem label="会员名称" prop="memberName">
|
||||
<div class="item">
|
||||
<Input disabled v-model="shopForm.memberName" />
|
||||
<Button @click="selectMember()" v-if="!$route.query.shopId"
|
||||
<Button type="default" @click="selectMember()" v-if="!$route.query.shopId"
|
||||
>选择会员</Button
|
||||
>
|
||||
</div>
|
||||
|
@ -39,9 +39,21 @@
|
|||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="店铺定位" prop="shopCenter">
|
||||
<!-- <Input v-model="shopForm.storeCenter" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 350px" /> -->
|
||||
<Button
|
||||
<FormItem label="店铺所在地" prop="storeAddressPath">
|
||||
<span>{{shopForm.storeAddressPath || '暂无地址'}}</span>
|
||||
<Button style="margin-left: 10px;" type="default" @click="handleClickAddress('storeAddressPath')">选择</Button>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="店铺详细地址" prop="storeAddressDetail">
|
||||
<Input
|
||||
v-model="shopForm.storeAddressDetail"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<!-- <FormItem label="店铺定位" prop="shopCenter">
|
||||
<Button
|
||||
type="info"
|
||||
v-if="!shopForm.storeCenter"
|
||||
@click="$refs.liliMap.showMap = true"
|
||||
|
@ -50,22 +62,9 @@
|
|||
<Button type="success" v-else @click="$refs.liliMap.showMap = true"
|
||||
>已定位</Button
|
||||
>
|
||||
</FormItem>
|
||||
</FormItem> -->
|
||||
|
||||
|
||||
<FormItem label="店铺所在地" prop="storeAddressPath">
|
||||
<Input
|
||||
disabled
|
||||
v-model="shopForm.storeAddressPath"
|
||||
style="width: 350px"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="店铺详细地址" prop="storeAddressDetail">
|
||||
<Input
|
||||
v-model="shopForm.storeAddressDetail"
|
||||
clearable
|
||||
style="width: 350px"
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="店铺logo" class="storeLogo">
|
||||
<Avatar
|
||||
|
@ -112,11 +111,8 @@
|
|||
/>
|
||||
</FormItem>
|
||||
<FormItem label="地址信息">
|
||||
<region
|
||||
style="width: 350px"
|
||||
@selected="selectedConsigneeRegion"
|
||||
:addressId="returnAddress"
|
||||
/>
|
||||
{{ shopForm.salesConsigneeAddressPath || '暂无地址' }}
|
||||
<Button style="margin-left: 10px;" type="default" @click="handleClickAddress('salesConsigneeAddressPath')">选择</Button>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址">
|
||||
<Input
|
||||
|
@ -150,11 +146,13 @@
|
|||
<Input v-model="shopForm.companyPhone" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="公司所在地" prop="companyAddressIdPath">
|
||||
<region
|
||||
<span>{{ shopForm.companyAddressPath }}</span>
|
||||
<Button style="margin-left: 10px;" @click="handleClickAddress('companyAddressPath')">选择</Button>
|
||||
<!-- <region
|
||||
style="width: 350px"
|
||||
@selected="selectedRegion"
|
||||
:addressId="address"
|
||||
/>
|
||||
/> -->
|
||||
</FormItem>
|
||||
<FormItem label="公司详细地址" prop="companyAddress">
|
||||
<Input v-model="shopForm.companyAddress" clearable style="width: 350px" />
|
||||
|
@ -374,7 +372,7 @@
|
|||
</Button>
|
||||
</div>
|
||||
</Card>
|
||||
<liliMap ref="liliMap" @getAddress="getAddress"></liliMap>
|
||||
|
||||
|
||||
<Modal width="1200px" v-model="picModalFlag">
|
||||
<ossManage @callback="callbackSelected" ref="ossManage" />
|
||||
|
@ -405,6 +403,8 @@
|
|||
>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
<multipleMap ref="map" @callback="getAddress" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -414,17 +414,15 @@ import ossManage from "@/views/sys/oss-manage/ossManage";
|
|||
import { getCategoryTree } from "@/api/goods";
|
||||
import { shopDetail, shopAdd, shopEdit, getShopByMemberId, shopAudit } from "@/api/shops";
|
||||
import uploadPicInput from "@/components/lili/upload-pic-input";
|
||||
import region from "@/components/region";
|
||||
import liliMap from "@/components/map/index";
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
|
||||
export default {
|
||||
name: "shop-operation",
|
||||
components: {
|
||||
uploadPicInput,
|
||||
ossManage,
|
||||
region,
|
||||
memberLayout,
|
||||
liliMap,
|
||||
multipleMap,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -448,6 +446,7 @@ export default {
|
|||
shopValidate: {
|
||||
// 表单验证规则
|
||||
memberName: [{ required: true, message: "会员不能为空" }],
|
||||
storeAddressPath: [{ required: true, message: "店铺地址不能为空" }],
|
||||
storeName: [{ required: true, message: "店铺名称不能为空" }],
|
||||
companyAddress: [{ required: true, message: "公司地址不能为空" }],
|
||||
storeAddressDetail: [{ required: true, message: "店铺详细地址不能为空" }],
|
||||
|
@ -511,6 +510,8 @@ export default {
|
|||
settlementCycle: [], // 结算周期
|
||||
shopForm: {
|
||||
// 店铺数据
|
||||
storeAddressPath:"",
|
||||
|
||||
settlementCycle: "",
|
||||
selfOperated: "false",
|
||||
memberName: "",
|
||||
|
@ -546,9 +547,16 @@ export default {
|
|||
|
||||
infoResult: {}, // 店铺详情
|
||||
picIndex: "", // 存储身份证图片下标,方便赋值
|
||||
currentAddress:"", //当前选中的地址
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 选择地址
|
||||
handleClickAddress(val){
|
||||
this.currentAddress = val;
|
||||
this.$refs.map.open();
|
||||
|
||||
},
|
||||
// 选择会员的回调
|
||||
callbackMember(val) {
|
||||
if (val) {
|
||||
|
@ -723,10 +731,43 @@ export default {
|
|||
});
|
||||
},
|
||||
// 点击定位获取店铺地址
|
||||
getAddress(item) {
|
||||
this.shopForm.storeCenter = item.position.lng + "," + item.position.lat;
|
||||
this.$set(this.shopForm, "storeAddressPath", item.addr);
|
||||
this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
|
||||
getAddress(val) {
|
||||
if (val.type === 'select') {
|
||||
const paths = val.data.map(item => item.name).join(',')
|
||||
|
||||
const ids = val.data.map(item => item.id).join(',')
|
||||
|
||||
if(this.currentAddress === 'storeAddressPath'){
|
||||
this.$set(this.shopForm, "storeAddressPath", paths);
|
||||
this.$set(this.shopForm, "storeAddressIdPath", ids);
|
||||
|
||||
this.shopForm.center = val.data[val.data.length - 1].center
|
||||
}else if(this.currentAddress === 'salesConsigneeAddressPath'){
|
||||
this.$set(this.shopForm, "salesConsigneeAddressPath", paths);
|
||||
this.$set(this.shopForm, "salesConsigneeAddressId", ids);
|
||||
}else if(this.currentAddress === 'companyAddressPath'){
|
||||
this.$set(this.shopForm, "companyAddressPath", paths);
|
||||
this.$set(this.shopForm, "companyAddressIdPath", ids);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
if(this.currentAddress === 'storeAddressPath'){
|
||||
this.shopForm.storeCenter = val.data.position.lng + "," + val.data.position.lat;
|
||||
this.$set(this.shopForm, "storeAddressPath", val.data.addr);
|
||||
this.$set(this.shopForm, "storeAddressIdPath", val.data.addrId);
|
||||
}else if(this.currentAddress === 'salesConsigneeAddressPath'){
|
||||
this.$set(this.shopForm, "salesConsigneeAddressPath", val.data.addr);
|
||||
this.$set(this.shopForm, "salesConsigneeAddressId", val.data.addrId);
|
||||
}else if(this.currentAddress === 'companyAddressPath'){
|
||||
this.$set(this.shopForm, "companyAddressPath", val.data.addr);
|
||||
this.$set(this.shopForm, "companyAddressIdPath", val.data.addrId);
|
||||
}
|
||||
|
||||
console.log(this.shopForm.storeAddressPath)
|
||||
|
||||
}
|
||||
},
|
||||
// 全部选中
|
||||
handleCheckAll() {
|
||||
|
|
|
@ -95,7 +95,11 @@ export default {
|
|||
},
|
||||
// 选择完成
|
||||
finished() {
|
||||
const params = this.chiosend.filter((item) => item.value !== "");
|
||||
if(!this.chiosend[0]){
|
||||
this.$Message.error("请选择地址")
|
||||
return
|
||||
}
|
||||
const params = this.chiosend.filter((item) => item!=="" && item.value !== "");
|
||||
this.enableMap = false;
|
||||
this.$emit('callback', {
|
||||
type: this.mapDefault,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<FormItem label="详细地址" prop="shopAddressDetail">
|
||||
<Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50" />
|
||||
</FormItem>
|
||||
<FormItem label="店铺LOGO:">
|
||||
<FormItem label="店铺LOGO">
|
||||
<upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb>
|
||||
</FormItem>
|
||||
<FormItem label="店铺简介" prop="content" class="wangEditor">
|
||||
|
|
Loading…
Reference in New Issue