商家设置坐席id代码补充
parent
41bfd17cd0
commit
0b82ae7569
|
@ -89,6 +89,11 @@ export const getRefundGoodsAddress = () => {
|
|||
export const saveRefundGoodsAddress = (params) => {
|
||||
return putRequest(`/settings/storeAfterSaleAddress`, params)
|
||||
}
|
||||
//修改im商户id
|
||||
export const updatEmerchantId = (params) => {
|
||||
return putRequest(`/settings/merchantEuid`, params)
|
||||
}
|
||||
|
||||
|
||||
//修改保存库存预警数
|
||||
export const updateStockWarning = (params) => {
|
||||
|
@ -113,4 +118,3 @@ export const editShipTemplate = (id, params, headers) => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<TabPane label="基本信息" name="INFO">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="店铺名称">
|
||||
<Input v-model="storeName" disabled clearable style="width: 20%" />
|
||||
<Input v-model="storeName" disabled clearable style="width: 20%"/>
|
||||
</FormItem>
|
||||
<FormItem label="店铺地址" prop="address">
|
||||
<Input v-model="form.address" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 20%" />
|
||||
<Input v-model="form.address" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 20%"/>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="shopAddressDetail">
|
||||
<Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50" />
|
||||
<Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50"/>
|
||||
</FormItem>
|
||||
<FormItem label="店铺LOGO:">
|
||||
<upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb>
|
||||
|
@ -29,19 +29,20 @@
|
|||
<TabPane label="退货地址" name="REFUND_GOODS_ADDRESS">
|
||||
<Form ref="addressForm" :model="addressForm" :label-width="100" :rules="afterFormValidate">
|
||||
<FormItem label="收货人" prop="salesConsigneeName">
|
||||
<Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%" />
|
||||
<Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%"/>
|
||||
</FormItem>
|
||||
<FormItem label="收货人电话" prop="salesConsigneeMobile">
|
||||
<Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%" />
|
||||
<Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%"/>
|
||||
</FormItem>
|
||||
<FormItem label="售后地址">
|
||||
<Input v-model="region" disabled style="width: 20%" v-if="showRegion == false" />
|
||||
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" style="margin-left:8px">修改
|
||||
<Input v-model="region" disabled style="width: 20%" v-if="showRegion == false"/>
|
||||
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary"
|
||||
style="margin-left:8px">修改
|
||||
</Button>
|
||||
<regionMap style="width: 20%" @selected="selectedRegion" v-if="showRegion == true" />
|
||||
<regionMap style="width: 20%" @selected="selectedRegion" v-if="showRegion == true"/>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||
<Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50" />
|
||||
<Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50"/>
|
||||
</FormItem>
|
||||
|
||||
<Form-item>
|
||||
|
@ -54,10 +55,24 @@
|
|||
|
||||
<Form ref="stockWarningForm" :model="stockWarningForm" :label-width="100" :rules="stockWarningFormValidate">
|
||||
<FormItem label="预警数" prop="stockWarning">
|
||||
<Input v-model="stockWarningForm.stockWarning" type="number" maxlength="6" clearable style="width: 20%" />
|
||||
<Input v-model="stockWarningForm.stockWarning" type="number" maxlength="6" clearable style="width: 20%"/>
|
||||
</FormItem>
|
||||
<Form-item>
|
||||
<Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">修改
|
||||
<Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary"
|
||||
style="margin-right:5px">修改
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="客服设置" name="UDESK">
|
||||
|
||||
<Form ref="udeskForm" :model="udeskForm" :label-width="100" :rules="udeskFormValidate">
|
||||
<FormItem label="坐席id" prop="merchantEuid">
|
||||
<Input v-model="udeskForm.merchantEuid" maxlength="30" clearable style="width: 20%"/>
|
||||
</FormItem>
|
||||
<Form-item>
|
||||
<Button @click="merchantSubmit" :loading="submitLoading" type="primary"
|
||||
style="margin-right:5px">修改
|
||||
</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
|
@ -71,12 +86,13 @@
|
|||
|
||||
<script>
|
||||
import * as API_Shop from "@/api/shops";
|
||||
import { validateMobile } from "@/libs/validate";
|
||||
import {validateMobile} from "@/libs/validate";
|
||||
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
|
||||
import liliMap from "@/views/my-components/map/index";
|
||||
import regionMap from "@/views/lili-components/region";
|
||||
import * as RegExp from "@/libs/RegExp.js";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
export default {
|
||||
name: "shopSetting",
|
||||
components: {
|
||||
|
@ -103,14 +119,23 @@ export default {
|
|||
stockWarningForm: {
|
||||
stockWarning: "", // 库存预警数量
|
||||
},
|
||||
//im form
|
||||
udeskForm: {
|
||||
merchantEuid: ""
|
||||
},
|
||||
stockWarningFormValidate: {
|
||||
stockWarning: [
|
||||
{ required: true, message: "请输入库存预警数", trigger: "blur" },
|
||||
{required: true, message: "请输入库存预警数", trigger: "blur"},
|
||||
],
|
||||
},
|
||||
udeskFormValidate: {
|
||||
merchantEuid: [
|
||||
{required: true, message: "请输入店铺坐席ID", trigger: "blur"},
|
||||
],
|
||||
},
|
||||
afterFormValidate: {
|
||||
salesConsigneeMobile: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{required: true, message: "手机号不能为空", trigger: "blur"},
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
trigger: "blur",
|
||||
|
@ -118,10 +143,10 @@ export default {
|
|||
},
|
||||
],
|
||||
salesConsigneeName: [
|
||||
{ required: true, message: "请输入收货人", trigger: "blur" },
|
||||
{required: true, message: "请输入收货人", trigger: "blur"},
|
||||
],
|
||||
salesConsigneeDetail: [
|
||||
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||
{required: true, message: "请输入详细地址", trigger: "blur"},
|
||||
],
|
||||
},
|
||||
form: {
|
||||
|
@ -197,10 +222,13 @@ export default {
|
|||
this.form.storeCenter = res.result.storeCenter;
|
||||
Cookies.set("userInfoSeller", JSON.stringify(res.result));
|
||||
//库存预警数赋值
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.stockWarningForm.stockWarning = res.result.stockWarning + "";
|
||||
});
|
||||
if (res.result.merchantEuid) {
|
||||
//赋予坐席id
|
||||
this.udeskForm.merchantEuid = res.result.merchantEuid;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -243,6 +271,21 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选中的地址
|
||||
selectedRegion(val) {
|
||||
this.region = val[1];
|
||||
|
|
Loading…
Reference in New Issue