删除debugger,证照信息需要上传正反面,修改店铺信息,地址回显,bug修改,代码优化,店铺详情展示优化
parent
cfc5c94f5a
commit
14a8695cc9
|
@ -138,7 +138,7 @@
|
|||
|
||||
<script>
|
||||
import Promotion from './Promotion.vue';
|
||||
import PicZoom from 'vue-piczoom'; // 图片放大 https://github.com/826327700/vue-piczoom
|
||||
import PicZoom from 'vue-piczoom'; // 图片放大
|
||||
import { collectGoods, isCollection, receiveCoupon, cancelCollect } from '@/api/member.js';
|
||||
import { addCartGoods } from '@/api/cart.js';
|
||||
export default {
|
||||
|
@ -173,7 +173,6 @@ export default {
|
|||
methods: {
|
||||
select (index, value) { // 选择规格
|
||||
this.$set(this.currentSelceted, index, value);
|
||||
|
||||
let selectedSkuId = this.goodsSpecList.find((i) => {
|
||||
let matched = true;
|
||||
let specValues = i.specValues.filter((j) => j.specName !== 'images');
|
||||
|
@ -200,7 +199,6 @@ export default {
|
|||
};
|
||||
this.loading = true;
|
||||
addCartGoods(params).then(res => {
|
||||
debugger;
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||
|
@ -208,7 +206,6 @@ export default {
|
|||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
console.log('catch');
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
<Button type="info" :loading="uploadLoading1">证照上传</Button>
|
||||
</Upload>
|
||||
<div class="describe">
|
||||
请压缩图片在2M以内,格式为gif,jpg,png,并确保文字清晰,以免上传或审核失败
|
||||
请压缩图片在2M以内,身份证正反面两张照片,确保图片清晰无缺角
|
||||
</div>
|
||||
<div
|
||||
class="img-list"
|
||||
|
@ -299,8 +299,8 @@ export default {
|
|||
// 上传之前
|
||||
beforeUpload1 () {
|
||||
this.uploadLoading1 = true;
|
||||
if (this.form.legalPhoto.length >= 3) {
|
||||
this.$Message.warning('最多上传三张图片')
|
||||
if (this.form.legalPhoto.length >= 2) {
|
||||
this.$Message.warning('最多上传两张图片')
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
@ -313,8 +313,6 @@ export default {
|
|||
handleSuccess1 (res, file) {
|
||||
this.uploadLoading1 = false;
|
||||
this.form.legalPhoto.push(res.result);
|
||||
console.log(res);
|
||||
console.log(file);
|
||||
},
|
||||
// 上传失败
|
||||
uploadErr () {
|
||||
|
|
|
@ -3,59 +3,39 @@
|
|||
<Cascader
|
||||
:data="data"
|
||||
:load-data="loadData"
|
||||
change-on-select
|
||||
@on-visible-change="handleChangeOnSelect"
|
||||
v-model="addr"
|
||||
placeholder="请选择地址"
|
||||
@on-change="change"
|
||||
style="width: 350px"
|
||||
></Cascader>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import * as API_Setup from "@/api/common.js";
|
||||
import {getChildRegion} from '@/api/common.js';
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
data: [], // 地区数据
|
||||
selected: [], // 已选地区
|
||||
id: 0, // 默认id
|
||||
changeOnSelect: false, // 选择时变动
|
||||
addr: [] // 已选数据
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
props: ['addressId'],
|
||||
mounted () {},
|
||||
methods: {
|
||||
// 选择地区回调
|
||||
change(val, selectedData) {
|
||||
change (val, selectedData) { // 选择地区
|
||||
/**
|
||||
* @returns [regionId,region]
|
||||
*/
|
||||
this.$emit("selected", [
|
||||
this.$emit('selected', [
|
||||
val,
|
||||
selectedData[selectedData.length - 1].__label.split("/"),
|
||||
selectedData[selectedData.length - 1].__label.split('/')
|
||||
]);
|
||||
},
|
||||
/**
|
||||
* 动态设置change-on-select的值
|
||||
* 当级联选择器弹窗展开时,设置change-on-select为true,即可以点选菜单选项值发生变化
|
||||
* 当级联选择器弹窗关闭时,设置change-on-select为false,即能够设置初始值
|
||||
*/
|
||||
handleChangeOnSelect(value) {
|
||||
this.changeOnSelect = value;
|
||||
},
|
||||
// 加载地区数据
|
||||
loadData(item, callback) {
|
||||
loadData (item, callback) { // 加载数据
|
||||
item.loading = true;
|
||||
API_Setup.getChildRegion(item.value).then((res) => {
|
||||
getChildRegion(item.value).then((res) => {
|
||||
if (res.result.length <= 0) {
|
||||
item.loading = false;
|
||||
this.selected = item;
|
||||
|
||||
/**
|
||||
* 处理数据并返回
|
||||
*/
|
||||
} else {
|
||||
res.result.forEach((child) => {
|
||||
item.loading = false;
|
||||
|
@ -64,54 +44,138 @@ export default {
|
|||
value: child.id,
|
||||
label: child.name,
|
||||
loading: false,
|
||||
children: [],
|
||||
children: []
|
||||
};
|
||||
|
||||
if (
|
||||
child.level == "street" ||
|
||||
item.label == "香港特别行政区" ||
|
||||
item.label == "澳门特别行政区"
|
||||
) {
|
||||
if (child.level === 'street' || item.label === '香港特别行政区') {
|
||||
item.children.push({
|
||||
value: child.id,
|
||||
label: child.name,
|
||||
label: child.name
|
||||
});
|
||||
} else {
|
||||
item.children.push(data);
|
||||
}
|
||||
});
|
||||
this.selected = item;
|
||||
callback();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 初始化
|
||||
init() {
|
||||
API_Setup.getChildRegion(this.id).then((res) => {
|
||||
let way = [];
|
||||
|
||||
res.result.forEach((item) => {
|
||||
let data;
|
||||
async init () { // 初始化地图数据
|
||||
let data = await getChildRegion(0);
|
||||
let arr = [];
|
||||
data.result.forEach((item) => {
|
||||
let obj;
|
||||
// 台湾省做处理
|
||||
if (item.name == "台湾省") {
|
||||
data = {
|
||||
if (item.name === '台湾省') {
|
||||
obj = {
|
||||
value: item.id,
|
||||
label: item.name,
|
||||
label: item.name
|
||||
};
|
||||
} else {
|
||||
data = {
|
||||
obj = {
|
||||
value: item.id,
|
||||
label: item.name,
|
||||
loading: false,
|
||||
children: [],
|
||||
children: []
|
||||
};
|
||||
}
|
||||
way.push(data);
|
||||
arr.push(obj);
|
||||
});
|
||||
this.data = way;
|
||||
this.data = arr;
|
||||
},
|
||||
async reviewData () {
|
||||
// 数据回显
|
||||
let addr = JSON.parse(JSON.stringify(this.addressId.split(',')));
|
||||
let length = addr.length;
|
||||
let data = await getChildRegion(0);
|
||||
let arr0 = [];
|
||||
let arr1 = [];
|
||||
let arr2 = [];
|
||||
// 第一级数据
|
||||
data.result.forEach((item) => {
|
||||
let obj;
|
||||
// 台湾省做处理
|
||||
if (item.name === '台湾省') {
|
||||
obj = {
|
||||
value: item.id,
|
||||
label: item.name
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
value: item.id,
|
||||
label: item.name,
|
||||
loading: false,
|
||||
children: []
|
||||
};
|
||||
}
|
||||
arr0.push(obj);
|
||||
});
|
||||
// 根据选择的数据来加载数据列表
|
||||
if (length > 0) {
|
||||
let children = await getChildRegion(addr[0]);
|
||||
children = this.handleData(children.result);
|
||||
arr0.forEach((e) => {
|
||||
if (e.value === addr[0]) {
|
||||
e.children = arr1 = children;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (length > 1) {
|
||||
let children = await getChildRegion(addr[1]);
|
||||
children = this.handleData(children.result);
|
||||
arr1.forEach((e) => {
|
||||
if (e.value === addr[1]) {
|
||||
e.children = arr2 = children;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (length > 2) {
|
||||
let children = await getChildRegion(addr[2]);
|
||||
children = this.handleData(children.result);
|
||||
arr2.forEach((e) => {
|
||||
if (e.value === addr[2]) {
|
||||
e.children = children;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.data = arr0;
|
||||
this.addr = addr;
|
||||
},
|
||||
handleData (data) {
|
||||
// 处理接口数据
|
||||
let item = [];
|
||||
data.forEach((child) => {
|
||||
let obj = {
|
||||
value: child.id,
|
||||
label: child.name,
|
||||
loading: false,
|
||||
children: []
|
||||
};
|
||||
|
||||
if (child.level === 'street' || item.label === '香港特别行政区') {
|
||||
item.push({
|
||||
value: child.id,
|
||||
label: child.name
|
||||
});
|
||||
} else {
|
||||
item.push(obj);
|
||||
}
|
||||
});
|
||||
return item;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
addressId: {
|
||||
handler: function (v) {
|
||||
if (v) {
|
||||
this.reviewData();
|
||||
} else {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<p class="item">
|
||||
<span class="label">身份证照片:</span>
|
||||
<span class="info">
|
||||
<img style="height: 100px;width: 90px" :src="storeInfo.legalPhoto">
|
||||
<img style="height: 100px;width: 100px" class="mr_10" v-for="item in storeInfo.legalPhoto" :src="item" :key="item">
|
||||
</span>
|
||||
</p>
|
||||
<p class="item">
|
||||
|
@ -144,7 +144,7 @@
|
|||
<p class="item">
|
||||
<span class="label">营业执照电子版:</span>
|
||||
<span class="info">
|
||||
<img style="height: 100px;width: 90px" :src="storeInfo.licencePhoto">
|
||||
<img style="height: 100px;width: 100px" :src="storeInfo.licencePhoto">
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
@ -846,6 +846,7 @@
|
|||
//因switch开关需要用到true或者false 所以进行一次格式化
|
||||
this.storeInfo.storeDisable = this.storeInfo.storeDisable === "OPEN" ? true : false
|
||||
this.checkAllGroup = this.storeInfo.goodsManagementCategory.split(",");
|
||||
this.storeInfo.legalPhoto = this.storeInfo.legalPhoto.split(",");
|
||||
});
|
||||
},
|
||||
//店铺状态改变事件
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<Card>
|
||||
<Button class="mb_10" v-if="shopForm.storeDisable === 'APPLYING'" type="primary" @click="audit">审核</Button>
|
||||
<Tabs v-model="tabName" :animated="false" style="overflow: visible">
|
||||
<Form ref="shopForm" :model="shopForm" :label-width="130" label-position="right" :rules="shopValidate">
|
||||
<Form ref="shopForm" :model="shopForm" :label-width="130" label-position="right" :rules="shopValidate" @on-validate="formValidate">
|
||||
|
||||
<TabPane label="基本信息" class="tab" name="base">
|
||||
<Divider orientation="left">基本信息</Divider>
|
||||
<!-- 遮罩层 -->
|
||||
|
@ -13,7 +14,6 @@
|
|||
<div class="item">
|
||||
<Input disabled v-model="shopForm.memberName" />
|
||||
<Button @click="selectMember()" v-if="!$route.query.shopId">选择会员</Button>
|
||||
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="storeName">
|
||||
|
@ -57,35 +57,34 @@
|
|||
</FormItem>
|
||||
|
||||
<FormItem label="店铺简介" prop="storeDesc" style="width: 350px">
|
||||
<Input v-model="shopForm.storeDesc" type="textarea" :rows="4" clearable style="width: 400px" />
|
||||
<Input v-model="shopForm.storeDesc" type="textarea" :rows="4" maxlength="200"
|
||||
show-word-limit clearable style="width: 400px" />
|
||||
</FormItem>
|
||||
<br>
|
||||
<Divider orientation="left">退货收件地址</Divider>
|
||||
<FormItem label="收件人姓名" prop="salesConsigneeName">
|
||||
<FormItem label="收件人姓名">
|
||||
<Input v-model="shopForm.salesConsigneeName" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="收件人手机" prop="salesConsigneeMobile">
|
||||
<FormItem label="收件人手机">
|
||||
<Input v-model="shopForm.salesConsigneeMobile" clearable maxlength="11" style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="地址信息" prop="salesConsigneeAddressPath">
|
||||
<Input v-model="shopForm.salesConsigneeAddressPath" 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: 350px" @selected="selectedConsigneeRegion" v-if="showRegion == true" />
|
||||
<FormItem label="地址信息">
|
||||
<region style="width: 350px" @selected="selectedConsigneeRegion" :addressId="returnAddress" />
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||
<FormItem label="详细地址">
|
||||
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<Divider orientation="left">腾讯云智服</Divider>
|
||||
<FormItem label="唯一标识" prop="salesConsigneeDetail">
|
||||
<FormItem label="唯一标识">
|
||||
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
|
||||
<FormItem label="小程序唯一标识">
|
||||
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</div>
|
||||
</TabPane>
|
||||
|
||||
<!-- 入驻信息 -->
|
||||
<TabPane label="入驻信息" class="tab" name="entry">
|
||||
<!-- 遮罩层 -->
|
||||
|
@ -99,11 +98,8 @@
|
|||
<FormItem label="公司电话" prop="companyPhone">
|
||||
<Input v-model="shopForm.companyPhone" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="公司所在地" >
|
||||
<Input v-model="shopForm.companyAddressPath" disabled style="width: 260px" 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: 350px" @selected="selectedRegion" v-if="showRegion == true" />
|
||||
<FormItem label="公司所在地" prop="companyAddressIdPath">
|
||||
<region style="width: 350px" @selected="selectedRegion" :addressId="address" />
|
||||
</FormItem>
|
||||
<FormItem label="公司详细地址" prop="companyAddress">
|
||||
<Input v-model="shopForm.companyAddress" clearable style="width: 350px" />
|
||||
|
@ -145,11 +141,10 @@
|
|||
<FormItem label="法人证件号" prop="legalId">
|
||||
<Input v-model="shopForm.legalId" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="法人身份证照片" ref="legalPhoto">
|
||||
<Avatar style="height: 100px;width: 100px" v-if="shopForm.legalPhoto" shape="square" icon="ios-person" size="default" :src="shopForm.legalPhoto" />
|
||||
<div>
|
||||
<Button @click="handleCLickImg('legalPhoto')" type="primary">选择图片</Button>
|
||||
</div>
|
||||
<FormItem label="法人身份证照片" prop="legalPhoto">
|
||||
<Avatar class="legal-photo" shape="square" size="100" icon="md-add" @click.native="handleCLickImg('legalPhoto', 0)" :src="shopForm.legalPhoto[0]" />
|
||||
<Avatar class="ml_10 legal-photo" shape="square" size="100" icon="md-add" @click.native="handleCLickImg('legalPhoto', 1)" :src="shopForm.legalPhoto[1]" />
|
||||
<span>点击图片上传身份证正反面,要求身份证清晰,四角无缺漏</span>
|
||||
</FormItem>
|
||||
|
||||
<Divider orientation="left">结算银行信息</Divider>
|
||||
|
@ -259,6 +254,8 @@ export default {
|
|||
isRead: false, // 是否只读,只有在店铺通过审核才可修改
|
||||
selectedFormBtnName: "", // 点击图片绑定form
|
||||
picModalFlag: false, // 图片选择器
|
||||
address: '', // 地址
|
||||
returnAddress: '', // 退货地址
|
||||
memberModalFlag: false, // 商家账号
|
||||
settlementShow: false, // 是否展示结算日输入框
|
||||
addSettlementConfirmBtn: false, // 添加结算日确认按钮
|
||||
|
@ -299,6 +296,9 @@ export default {
|
|||
message: "员工总数不能为空",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
companyAddressIdPath: [
|
||||
{ required: true, message: "请选择公司地址", },
|
||||
],
|
||||
registeredCapital: [
|
||||
{
|
||||
|
@ -348,6 +348,7 @@ export default {
|
|||
settlementBankJointName: [
|
||||
{ required: true, message: "支行联行号不能为空", },
|
||||
],
|
||||
|
||||
salesConsigneeMobile: [
|
||||
{
|
||||
type: "string",
|
||||
|
@ -360,16 +361,17 @@ export default {
|
|||
indeterminate: true, // 复选框全选样式
|
||||
checkAll: false, // 全选
|
||||
checkAllGroup: [], // 全选数组
|
||||
showRegion: false, // 显示地区
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
settlementCycle: [], // 结算周期
|
||||
shopForm: { // 店铺数据
|
||||
settlementCycle: "",
|
||||
selfOperated: "",
|
||||
selfOperated: false,
|
||||
memberName: "",
|
||||
companyName: "",
|
||||
addressPath: "",
|
||||
addressIdPath: "",
|
||||
companyAddressPath: "",
|
||||
companyAddressIdPath: "",
|
||||
companyAddress: "",
|
||||
companyEmail: "",
|
||||
employeeNum: 1,
|
||||
|
@ -381,7 +383,7 @@ export default {
|
|||
licencePhoto: "",
|
||||
legalName: "",
|
||||
legalId: "",
|
||||
legalPhoto: "",
|
||||
legalPhoto: ['', ''],
|
||||
companyPhone: "",
|
||||
settlementBankAccountName: "",
|
||||
settlementBankAccountNum: "",
|
||||
|
@ -396,6 +398,7 @@ export default {
|
|||
categories: [], // 分类
|
||||
|
||||
infoResult: {}, // 店铺详情
|
||||
picIndex: '', // 存储身份证图片下标,方便赋值
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -455,26 +458,40 @@ export default {
|
|||
this.day = 1;
|
||||
|
||||
},
|
||||
// 选择地址
|
||||
// 选择公司地址
|
||||
selectedRegion(val) {
|
||||
this.$set(this.shopForm, "companyAddressIdPath", val[0]);
|
||||
this.$set(this.shopForm, "companyAddressPath", val[1]);
|
||||
this.$set(this.shopForm, 'companyAddressIdPath', val[0].toString());
|
||||
this.$set(
|
||||
this.shopForm,
|
||||
'companyAddressPath',
|
||||
val[1].toString().replace(/\s/g, '')
|
||||
);
|
||||
},
|
||||
// 选中的地址
|
||||
// 选择退货收件地址
|
||||
selectedConsigneeRegion(val) {
|
||||
this.shopForm.salesConsigneeAddressPath = val[1];
|
||||
this.shopForm.salesConsigneeAddressId = val[0];
|
||||
this.$set(this.shopForm, 'salesConsigneeAddressId', val[0].toString());
|
||||
this.$set(
|
||||
this.shopForm,
|
||||
'salesConsigneeAddressPath',
|
||||
val[1].toString().replace(/\s/g, '')
|
||||
);
|
||||
},
|
||||
// 选择图片modal
|
||||
handleCLickImg(val) {
|
||||
handleCLickImg(val, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModalFlag = true;
|
||||
this.selectedFormBtnName = val;
|
||||
this.picIndex = index
|
||||
},
|
||||
// 图片回显
|
||||
callbackSelected(val) {
|
||||
this.picModalFlag = false;
|
||||
if (this.picIndex===0 || this.picIndex === 1) {
|
||||
this.shopForm[this.selectedFormBtnName][this.picIndex] = val.url;
|
||||
} else {
|
||||
this.shopForm[this.selectedFormBtnName] = val.url;
|
||||
}
|
||||
this.picIndex = ''
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
|
@ -491,18 +508,23 @@ export default {
|
|||
let index = this.tabNameList.indexOf(this.tabName) - 1
|
||||
this.tabName = this.tabNameList[index]
|
||||
},
|
||||
formValidate (prop, status, error) { // 表单校验规则
|
||||
console.log(prop, status, error);
|
||||
},
|
||||
// 获取店铺详情
|
||||
getShopDetail() {
|
||||
shopDetail(this.shopId).then((res) => {
|
||||
if (res.result) {
|
||||
if (res.success) {
|
||||
this.infoResult = res.result;
|
||||
this.shopForm = res.result;
|
||||
console.warn(this.shopForm);
|
||||
this.checkAllGroup = this.shopForm.goodsManagementCategory.split(",");
|
||||
if (this.shopForm.settlementCycle != "")
|
||||
this.shopForm.settlementCycle.split(",").forEach((e) => {
|
||||
this.settlementCycle.push(e);
|
||||
});
|
||||
if (this.shopForm.settlementCycle) {
|
||||
this.settlementCycle = this.shopForm.settlementCycle.split(',')
|
||||
}
|
||||
this.shopForm.legalPhoto = this.shopForm.legalPhoto.split(',')
|
||||
|
||||
this.address = this.shopForm.companyAddressIdPath;
|
||||
this.returnAddress = this.shopForm.salesConsigneeAddressId;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -514,23 +536,20 @@ export default {
|
|||
this.$Message.error("请确认当前所填结算日信息");
|
||||
return;
|
||||
}
|
||||
if (valid) {
|
||||
//校验经营类目
|
||||
if (this.checkAllGroup == "") {
|
||||
this.$Message.error("请选择店铺经营类目");
|
||||
this.tabName = 'cagetory'
|
||||
return;
|
||||
}
|
||||
//校验公司所在地
|
||||
if (this.shopForm.companyAddressPath == "") {
|
||||
this.$Message.error("请选择公司所在地");
|
||||
return;
|
||||
}
|
||||
//处理结算日 去掉最后一个逗号存储
|
||||
this.shopForm.goodsManagementCategory = this.checkAllGroup;
|
||||
this.shopForm.settlementCycle = this.settlementCycle;
|
||||
if (valid) {
|
||||
const params = JSON.parse(JSON.stringify(this.shopForm))
|
||||
//处理经营类目,结算日
|
||||
params.goodsManagementCategory = this.checkAllGroup;
|
||||
params.settlementCycle = this.settlementCycle;
|
||||
if (this.shopId) {
|
||||
delete this.shopForm.memberId;
|
||||
shopEdit(this.shopId, this.shopForm).then((res) => {
|
||||
delete params.memberId;
|
||||
shopEdit(this.shopId, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("编辑成功");
|
||||
this.$router.push({ name: "shopList" });
|
||||
|
@ -538,11 +557,11 @@ export default {
|
|||
});
|
||||
} else {
|
||||
//添加店铺单独需要检验的参数
|
||||
if (this.shopForm.memberName == "") {
|
||||
if (params.memberName == "") {
|
||||
this.$Message.error("请选择开店的会员");
|
||||
return;
|
||||
}
|
||||
shopAdd(this.shopForm).then((resp) => {
|
||||
shopAdd(params).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$Message.success("添加成功");
|
||||
this.shopForm = {};
|
||||
|
@ -553,7 +572,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
//获取地址
|
||||
// 点击定位获取店铺地址
|
||||
getAddress(item) {
|
||||
this.shopForm.storeCenter = item.position.lat + "," + item.position.lng;
|
||||
this.$set(this.shopForm, "storeAddressPath", item.addr);
|
||||
|
@ -678,4 +697,9 @@ export default {
|
|||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
.legal-photo{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -505,7 +505,6 @@ export default {
|
|||
* @value 参数选项值
|
||||
*/
|
||||
selectParams(paramsGroup, groupIndex, params, paramsIndex, value) {
|
||||
debugger
|
||||
if (!this.baseInfoForm.goodsParamsDTOList[groupIndex]) {
|
||||
this.baseInfoForm.goodsParamsDTOList[groupIndex] = {
|
||||
groupId: '',
|
||||
|
|
Loading…
Reference in New Issue