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