商家设置坐席id代码补充

master
Chopper 2021-12-09 20:21:46 +08:00
parent 41bfd17cd0
commit 0b82ae7569
2 changed files with 66 additions and 19 deletions

View File

@ -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) => {
}

View File

@ -36,7 +36,8 @@
</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">
<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"/>
</FormItem>
@ -57,7 +58,21 @@
<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>
@ -77,6 +92,7 @@ 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,11 +119,20 @@ export default {
stockWarningForm: {
stockWarning: "", //
},
//im form
udeskForm: {
merchantEuid: ""
},
stockWarningFormValidate: {
stockWarning: [
{required: true, message: "请输入库存预警数", trigger: "blur"},
],
},
udeskFormValidate: {
merchantEuid: [
{required: true, message: "请输入店铺坐席ID", trigger: "blur"},
],
},
afterFormValidate: {
salesConsigneeMobile: [
{required: true, message: "手机号不能为空", trigger: "blur"},
@ -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];