2021-05-13 10:56:04 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="search">
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<Card style="margin-left: 10px">
|
|
|
|
|
<Tabs v-model="type" @on-click="handleClickType">
|
|
|
|
|
<TabPane label="基本信息" name="INFO">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<FormItem label="店铺名称">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="storeName" disabled clearable style="width: 20%" />
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<FormItem label="店铺地址" prop="storeAddressPath">
|
|
|
|
|
<span>{{ form.storeAddressPath }}</span>
|
|
|
|
|
<Button style="margin-left: 10px;" @click="handleChangeAddress('storeAddress')">选择</Button>
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="详细地址" prop="shopAddressDetail">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50" />
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
2023-08-03 10:37:53 +08:00
|
|
|
|
<FormItem label="店铺LOGO">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb>
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="店铺简介" prop="content" class="wangEditor">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input type="textarea" :rows="8" v-model="form.storeDesc" style="width: 30%"></Input>
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
2022-03-03 11:33:53 +08:00
|
|
|
|
<FormItem label="店铺楼层" prop="content" class="wangEditor">
|
2022-03-03 11:26:50 +08:00
|
|
|
|
<i-switch v-model="form.pageShow" @on-change="pageShow"></i-switch>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<span class="desc">店铺楼层装修是否开启,开启后移动端PC端将会自动展示装修的内容</span>
|
2022-03-03 11:26:50 +08:00
|
|
|
|
</FormItem>
|
2022-11-22 17:17:37 +08:00
|
|
|
|
<FormItem label="开启自提" prop="content" class="wangEditor">
|
|
|
|
|
<i-switch v-model="form.selfPickFlag" @on-change="changeSelfPickFlag"></i-switch>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<span class="desc">店铺是否开启自提功能</span>
|
2022-11-22 17:17:37 +08:00
|
|
|
|
</FormItem>
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<Form-item>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right: 5px">修改
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</Button>
|
|
|
|
|
</Form-item>
|
|
|
|
|
</Form>
|
|
|
|
|
</TabPane>
|
2022-09-01 18:52:11 +08:00
|
|
|
|
<TabPane label="发货地址">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Form ref="addressGoods" :model="addressGoods" :label-width="100" :rules="addressGoodsValidate">
|
2022-09-01 18:52:11 +08:00
|
|
|
|
<FormItem label="发货人姓名" prop="salesConsignorName">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="addressGoods.salesConsignorName" maxlength="11" clearable style="width: 20%">
|
2022-09-01 18:52:11 +08:00
|
|
|
|
</Input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="发货人手机号" prop="salesConsignorMobile">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="addressGoods.salesConsignorMobile" maxlength="11" clearable style="width: 20%">
|
2022-09-01 18:52:11 +08:00
|
|
|
|
</Input>
|
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="地址" prop="salesConsignorAddressId">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<span>{{ addressGoods.salesConsignorAddressPath }}</span>
|
|
|
|
|
<Button style="margin-left: 10px;" @click="handleChangeAddress('addressGoods')">选择</Button>
|
2022-09-01 18:52:11 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<!-- <FormItem label="地址名称" prop="salesConsignorAddressPath">
|
|
|
|
|
<Input
|
|
|
|
|
v-model="addressGoods.salesConsignorAddressPath"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 20%"
|
|
|
|
|
>
|
|
|
|
|
</Input>
|
|
|
|
|
</FormItem> -->
|
|
|
|
|
<FormItem label="详细地址" prop="salesConsignorDetail">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="addressGoods.salesConsignorDetail" clearable style="width: 20%">
|
2022-09-01 18:52:11 +08:00
|
|
|
|
</Input>
|
|
|
|
|
</FormItem>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Button @click="setAddressGoods" type="primary" style="margin-left: 8px">确认
|
2022-09-01 18:52:11 +08:00
|
|
|
|
</Button>
|
|
|
|
|
</Form>
|
|
|
|
|
</TabPane>
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<TabPane label="退货地址" name="REFUND_GOODS_ADDRESS">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Form ref="addressForm" :model="addressForm" :label-width="100" :rules="afterFormValidate">
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<FormItem label="收货人" prop="salesConsigneeName">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%" />
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="收货人电话" prop="salesConsigneeMobile">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%" />
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="售后地址">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<span>{{ addressForm.salesConsigneeAddressPath }}</span>
|
|
|
|
|
<Button style="margin-left: 10px;" @click="handleChangeAddress('salesConsigneeAddressPath')">选择</Button>
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50" />
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
2021-05-13 10:56:04 +08:00
|
|
|
|
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<Form-item>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Button @click="afterHandleSubmit" :loading="submitLoading" type="primary" style="margin-right: 5px">修改
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</Button>
|
|
|
|
|
</Form-item>
|
|
|
|
|
</Form>
|
|
|
|
|
</TabPane>
|
|
|
|
|
<TabPane label="库存预警" name="STOCK_WARNING">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Form ref="stockWarningForm" :model="stockWarningForm" :label-width="100" :rules="stockWarningFormValidate">
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<FormItem label="预警数" prop="stockWarning">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<InputNumber :min="0" :max="99999" v-model="stockWarningForm.stockWarning" type="number" maxlength="6"
|
|
|
|
|
clearable style="width: 20%" />
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</FormItem>
|
2023-03-31 18:16:33 +08:00
|
|
|
|
|
2021-08-20 17:45:57 +08:00
|
|
|
|
<Form-item>
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary"
|
|
|
|
|
style="margin-right: 5px">修改
|
2021-12-09 20:21:46 +08:00
|
|
|
|
</Button>
|
|
|
|
|
</Form-item>
|
|
|
|
|
</Form>
|
|
|
|
|
</TabPane>
|
2023-03-31 18:16:33 +08:00
|
|
|
|
<!-- Udesk 坐席功能 后续维护 -->
|
|
|
|
|
<!-- <TabPane label="客服设置" name="UDESK">
|
2022-02-09 20:49:49 +08:00
|
|
|
|
<Form
|
|
|
|
|
ref="udeskForm"
|
|
|
|
|
:model="udeskForm"
|
|
|
|
|
:label-width="100"
|
|
|
|
|
:rules="udeskFormValidate"
|
|
|
|
|
>
|
2021-12-09 20:21:46 +08:00
|
|
|
|
<FormItem label="坐席id" prop="merchantEuid">
|
2022-02-09 20:49:49 +08:00
|
|
|
|
<Input
|
|
|
|
|
v-model="udeskForm.merchantEuid"
|
|
|
|
|
maxlength="30"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 20%"
|
|
|
|
|
/>
|
2021-12-09 20:21:46 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
<Form-item>
|
2022-02-09 20:49:49 +08:00
|
|
|
|
<Button
|
|
|
|
|
@click="merchantSubmit"
|
|
|
|
|
:loading="submitLoading"
|
|
|
|
|
type="primary"
|
|
|
|
|
style="margin-right: 5px"
|
|
|
|
|
>修改
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</Button>
|
|
|
|
|
</Form-item>
|
|
|
|
|
</Form>
|
2023-03-31 18:16:33 +08:00
|
|
|
|
</TabPane> -->
|
2021-08-20 17:45:57 +08:00
|
|
|
|
</Tabs>
|
|
|
|
|
</Card>
|
2021-05-13 10:56:04 +08:00
|
|
|
|
|
2023-08-02 10:53:14 +08:00
|
|
|
|
<multipleMap ref="map" @callback="callbackAddress" />
|
2021-05-13 10:56:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import * as API_Shop from "@/api/shops";
|
2022-02-09 20:49:49 +08:00
|
|
|
|
import { validateMobile } from "@/libs/validate";
|
2021-05-13 10:56:04 +08:00
|
|
|
|
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
|
|
|
|
import multipleMap from "@/views/my-components/map/multiple-map";
|
2021-05-13 10:56:04 +08:00
|
|
|
|
import * as RegExp from "@/libs/RegExp.js";
|
2021-08-20 17:45:57 +08:00
|
|
|
|
import Cookies from "js-cookie";
|
2021-05-13 10:56:04 +08:00
|
|
|
|
export default {
|
|
|
|
|
name: "shopSetting",
|
|
|
|
|
components: {
|
|
|
|
|
uploadPicThumb,
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
|
|
|
|
multipleMap
|
2021-05-13 10:56:04 +08:00
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-08-02 10:53:14 +08:00
|
|
|
|
currentKey: "", //存储当前点击地址的key
|
|
|
|
|
showMap: false, // 是否展示地图
|
2021-08-20 17:45:57 +08:00
|
|
|
|
type: "INFO",
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2021-05-13 10:56:04 +08:00
|
|
|
|
storeName: "", //店铺名称
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2021-05-13 10:56:04 +08:00
|
|
|
|
regionId: [], // 地区id
|
2021-08-20 17:45:57 +08:00
|
|
|
|
addressForm: {
|
|
|
|
|
// 退货地址
|
2021-05-13 10:56:04 +08:00
|
|
|
|
salesConsigneeName: "", // 收货人姓名
|
|
|
|
|
salesConsigneeMobile: "", // 收货人电话
|
|
|
|
|
salesConsigneeAddressId: "", // 售后地址id,逗号分割
|
2021-08-20 17:45:57 +08:00
|
|
|
|
salesConsigneeAddressPath: "", // 售后地址,逗号分割
|
2021-05-13 10:56:04 +08:00
|
|
|
|
salesConsigneeDetail: "", // 详细地址
|
|
|
|
|
},
|
|
|
|
|
//库存预警form
|
|
|
|
|
stockWarningForm: {
|
2023-07-21 11:17:40 +08:00
|
|
|
|
stockWarning: 0, // 库存预警数量
|
2021-05-13 10:56:04 +08:00
|
|
|
|
},
|
2021-12-09 20:21:46 +08:00
|
|
|
|
//im form
|
|
|
|
|
udeskForm: {
|
2022-02-09 20:49:49 +08:00
|
|
|
|
merchantEuid: "",
|
2021-12-09 20:21:46 +08:00
|
|
|
|
},
|
2021-05-13 10:56:04 +08:00
|
|
|
|
stockWarningFormValidate: {
|
|
|
|
|
stockWarning: [
|
2023-08-02 10:53:14 +08:00
|
|
|
|
{ required: true, type: 'number', message: "请输入库存预警数", trigger: "blur" },
|
2021-12-09 20:21:46 +08:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
udeskFormValidate: {
|
|
|
|
|
merchantEuid: [
|
2022-02-09 20:49:49 +08:00
|
|
|
|
{ required: true, message: "请输入店铺坐席ID", trigger: "blur" },
|
2021-05-13 10:56:04 +08:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
afterFormValidate: {
|
|
|
|
|
salesConsigneeMobile: [
|
2022-02-09 20:49:49 +08:00
|
|
|
|
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
2021-05-13 10:56:04 +08:00
|
|
|
|
{
|
|
|
|
|
pattern: RegExp.mobile,
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
message: "请输入正确的手机号",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
salesConsigneeName: [
|
2022-02-09 20:49:49 +08:00
|
|
|
|
{ required: true, message: "请输入收货人", trigger: "blur" },
|
2021-05-13 10:56:04 +08:00
|
|
|
|
],
|
|
|
|
|
salesConsigneeDetail: [
|
2022-02-09 20:49:49 +08:00
|
|
|
|
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
2021-05-13 10:56:04 +08:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
form: {
|
|
|
|
|
// 添加或编辑表单对象初始化数据
|
|
|
|
|
storeAddressPath: "", // 店铺地址中文
|
2021-09-22 15:08:34 +08:00
|
|
|
|
storeCenter: "", // 经度 + 纬度
|
2021-05-13 10:56:04 +08:00
|
|
|
|
longitude: "", //经度
|
|
|
|
|
latitude: "", //纬度
|
|
|
|
|
storeAddressDetail: "", //详细地址
|
|
|
|
|
storeAddressIdPath: "", //地址
|
|
|
|
|
storeDesc: "", // 店铺描述
|
2022-11-22 17:17:37 +08:00
|
|
|
|
pageShow: false,
|
|
|
|
|
selfPickFlag: false,
|
2021-05-13 10:56:04 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
|
|
|
formValidate: {
|
|
|
|
|
addressName: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入地址名称",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
longitude: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入地址经度",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
latitude: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入地址纬度",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
mobile: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入地址纬度",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
validator: validateMobile,
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
storeAddressDetail: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请输入详细地址",
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
submitLoading: false, // 添加或编辑提交状态
|
2022-09-01 18:52:11 +08:00
|
|
|
|
//发货地址
|
|
|
|
|
addressGoods: {
|
2023-08-02 10:53:14 +08:00
|
|
|
|
salesConsignorName: " ",
|
|
|
|
|
salesConsignorMobile: " ",
|
2022-09-01 18:52:11 +08:00
|
|
|
|
salesConsignorAddressId: " ",
|
|
|
|
|
salesConsignorAddressPath: " ",
|
|
|
|
|
salesConsignorDetail: " ",
|
|
|
|
|
},
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2022-09-01 18:52:11 +08:00
|
|
|
|
addressGoodsValidate: {
|
|
|
|
|
salesConsignorName: [
|
|
|
|
|
{ required: true, message: "请输入发货人姓名", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
salesConsignorMobile: [
|
|
|
|
|
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
|
|
|
|
{
|
|
|
|
|
pattern: RegExp.mobile,
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
message: "请输入正确的手机号",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
salesConsignorDetail: [
|
|
|
|
|
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
2021-05-13 10:56:04 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-08-02 10:53:14 +08:00
|
|
|
|
// 回调地址
|
|
|
|
|
callbackAddress(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.currentKey === 'storeAddress') {
|
|
|
|
|
this.form.storeAddressPath = paths
|
|
|
|
|
this.form.storeAddressIdPath = ids
|
|
|
|
|
this.form.storeCenter = val.data[val.data.length - 1].center
|
|
|
|
|
}
|
|
|
|
|
if (this.currentKey === 'addressGoods') {
|
|
|
|
|
this.addressGoods.salesConsignorAddressPath = paths
|
|
|
|
|
this.addressGoods.salesConsignorAddressId = ids
|
|
|
|
|
}
|
|
|
|
|
if (this.currentKey === 'salesConsigneeAddressPath') {
|
|
|
|
|
this.addressForm.salesConsigneeAddressPath = paths
|
|
|
|
|
this.addressForm.salesConsigneeAddressId = ids
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (this.currentKey === 'storeAddressstoreAddress') {
|
|
|
|
|
this.form.storeAddressPath = val.data.addr;
|
|
|
|
|
this.form.storeAddressIdPath = val.data.addrId;
|
|
|
|
|
this.form.storeCenter = val.data.position.lng + "," + val.data.position.lat;
|
|
|
|
|
}
|
|
|
|
|
if (this.currentKey === 'addressGoods') {
|
|
|
|
|
this.addressGoods.salesConsignorAddressPath = val.data.addr;
|
|
|
|
|
this.addressGoods.salesConsignorAddressId = val.data.addrId;
|
|
|
|
|
}
|
|
|
|
|
if (this.currentKey === 'salesConsigneeAddressPath') {
|
|
|
|
|
this.addressForm.salesConsigneeAddressPath = val.data.addr;
|
|
|
|
|
this.addressForm.salesConsigneeAddressId = val.data.addrId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 修改地址
|
|
|
|
|
handleChangeAddress(key) {
|
|
|
|
|
this.currentKey = key
|
|
|
|
|
this.$refs.map.open();
|
|
|
|
|
},
|
2021-07-19 18:03:35 +08:00
|
|
|
|
// 初始化数据
|
2021-05-13 10:56:04 +08:00
|
|
|
|
init() {
|
|
|
|
|
this.getShopInfo();
|
2022-09-01 18:52:11 +08:00
|
|
|
|
this.getDeliverAddress()
|
|
|
|
|
},
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setAddressGoods() {
|
2022-09-01 18:52:11 +08:00
|
|
|
|
console.log(this.$refs.addressGoods)
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2022-09-01 18:52:11 +08:00
|
|
|
|
this.$refs.addressGoods.validate((valid) => {
|
|
|
|
|
if (valid) {
|
2023-08-02 10:53:14 +08:00
|
|
|
|
API_Shop.editDeliverAddress(this.addressGoods).then(res => {
|
|
|
|
|
if (res.success) {
|
2022-09-01 18:52:11 +08:00
|
|
|
|
this.$Message.success("修改成功")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-05-13 10:56:04 +08:00
|
|
|
|
},
|
|
|
|
|
//获取店铺信息
|
|
|
|
|
getShopInfo() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
API_Shop.getShopInfo().then((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.form = res.result;
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2021-05-13 10:56:04 +08:00
|
|
|
|
this.storeName = res.result.storeName;
|
2021-09-22 15:08:34 +08:00
|
|
|
|
this.form.storeCenter = res.result.storeCenter;
|
2021-08-04 17:51:43 +08:00
|
|
|
|
Cookies.set("userInfoSeller", JSON.stringify(res.result));
|
2021-05-13 10:56:04 +08:00
|
|
|
|
//库存预警数赋值
|
|
|
|
|
this.$nextTick(() => {
|
2023-07-21 11:17:40 +08:00
|
|
|
|
this.stockWarningForm.stockWarning = res.result.stockWarning;
|
2021-05-13 10:56:04 +08:00
|
|
|
|
});
|
2021-12-09 20:21:46 +08:00
|
|
|
|
if (res.result.merchantEuid) {
|
|
|
|
|
//赋予坐席id
|
|
|
|
|
this.udeskForm.merchantEuid = res.result.merchantEuid;
|
|
|
|
|
}
|
2021-05-13 10:56:04 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2022-08-26 17:12:48 +08:00
|
|
|
|
pageShow(type) {
|
2022-03-03 11:26:50 +08:00
|
|
|
|
this.form.pageShow = type
|
2022-08-26 17:12:48 +08:00
|
|
|
|
},
|
2023-08-02 10:53:14 +08:00
|
|
|
|
changeSelfPickFlag(item) {
|
|
|
|
|
if (item) {
|
2022-11-22 17:17:37 +08:00
|
|
|
|
this.form.selfPickFlag = item
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-08-02 10:53:14 +08:00
|
|
|
|
getDeliverAddress() {
|
|
|
|
|
API_Shop.getDeliverAddress().then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.result != '' && res.result != null) {
|
2022-09-01 18:52:11 +08:00
|
|
|
|
this.addressGoods = res.result;
|
|
|
|
|
this.regionGoods = res.result.salesConsignorAddressPath;
|
|
|
|
|
this.regionIdS = res.result.salesConsignorAddressId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2022-03-03 11:26:50 +08:00
|
|
|
|
},
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2021-05-13 10:56:04 +08:00
|
|
|
|
//重置
|
|
|
|
|
handleReset() {
|
|
|
|
|
this.$refs.form.resetFields();
|
|
|
|
|
},
|
|
|
|
|
//提交保存
|
|
|
|
|
handleSubmit() {
|
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
API_Shop.saveShopInfo(this.form).then((res) => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$Message.success("修改成功");
|
|
|
|
|
this.getShopInfo();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//修改库存预警数
|
|
|
|
|
stockWarningHandleSubmit() {
|
|
|
|
|
this.$refs.stockWarningForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
API_Shop.updateStockWarning(this.stockWarningForm).then((res) => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$Message.success("修改成功");
|
|
|
|
|
this.getShopInfo();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2021-12-09 20:21:46 +08:00
|
|
|
|
merchantSubmit() {
|
|
|
|
|
this.$refs.udeskForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
API_Shop.updatEmerchantId(this.udeskForm).then((res) => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$Message.success("修改成功");
|
|
|
|
|
this.getShopInfo();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2023-08-02 10:53:14 +08:00
|
|
|
|
|
2021-05-13 10:56:04 +08:00
|
|
|
|
//tab切换
|
|
|
|
|
handleClickType(v) {
|
|
|
|
|
//退款
|
|
|
|
|
if (v == "INFO") {
|
|
|
|
|
this.getShopInfo();
|
|
|
|
|
}
|
|
|
|
|
//退货
|
|
|
|
|
if (v == "REFUND_GOODS_ADDRESS") {
|
|
|
|
|
this.getRefundGoodsAddress();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//获取商家退货地址
|
|
|
|
|
getRefundGoodsAddress() {
|
|
|
|
|
API_Shop.getRefundGoodsAddress().then((res) => {
|
|
|
|
|
if (res.result != null) {
|
|
|
|
|
this.addressForm = res.result;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//提交保存
|
|
|
|
|
afterHandleSubmit() {
|
|
|
|
|
this.$refs.addressForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
API_Shop.saveRefundGoodsAddress(this.addressForm).then((res) => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$Message.success("修改成功");
|
|
|
|
|
this.getRefundGoodsAddress();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.init();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
2023-03-31 18:16:33 +08:00
|
|
|
|
<style scoped lang="scss">
|
2023-08-02 10:53:14 +08:00
|
|
|
|
.desc {
|
2023-03-31 18:16:33 +08:00
|
|
|
|
margin-left: 10px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
</style>
|