Commit bbf93b5a by 无尘

fix: 修改设置

parent c420c39b
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-20 14:36:37 * @Date: 2020-08-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-08 18:07:43 * @LastEditTime: 2020-09-09 09:50:49
--> -->
<template> <template>
<div class="customer-assign-wrap"> <div class="customer-assign-wrap">
...@@ -214,10 +214,16 @@ export default { ...@@ -214,10 +214,16 @@ export default {
*/ */
setData() { setData() {
const that = this; const that = this;
let openCodes = [];
for(let i in that.customerShowData) {
if(that.customerShowData[i]){
openCodes.push(i);
}
}
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId, wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
unbindClerkDisMemberFlag: that.customerSetData.unbindClerkDisMemberFlag ? 1 : '0', openCodes: openCodes.join(','),
switchType: 2 switchType: 2
}; };
saveCustomerSet(para) saveCustomerSet(para)
...@@ -246,8 +252,9 @@ export default { ...@@ -246,8 +252,9 @@ export default {
}; };
getCustomerSet(para) getCustomerSet(para)
.then(res => { .then(res => {
res.result.unbindClerkDisMemberFlag = res.result.unbindClerkDisMemberFlag == 1 ? true : false; res.result.forEach(ele => {
that.customerSetData = res.result || []; that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
});
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 10:16:37 * @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-08 18:05:09 * @LastEditTime: 2020-09-09 09:49:41
--> -->
<template> <template>
<div class="common-app-right"> <div class="common-app-right">
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
<div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在微商城的消费订单</div> <div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在微商城的消费订单</div>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<el-checkbox class="w-195" v-model="customerShowData.showWmOrderFlag">展示微盟商城的订单</el-checkbox>
<div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在微盟商城的消费订单</div>
</div>
<div class="m-b-20">
<el-tooltip class="item" effect="dark" content="勾选后将会在“顾客详情页”进行显示" placement="top-start"> <span class="font-14 color-606266 m-r-20 common-bottom-border">导购联系顾客方式:</span></el-tooltip> <el-tooltip class="item" effect="dark" content="勾选后将会在“顾客详情页”进行显示" placement="top-start"> <span class="font-14 color-606266 m-r-20 common-bottom-border">导购联系顾客方式:</span></el-tooltip>
<el-checkbox v-model="customerShowData.clerkAddMemberFlag">添加会员/发消息</el-checkbox> <el-checkbox v-model="customerShowData.clerkAddMemberFlag">添加会员/发消息</el-checkbox>
<el-checkbox v-model="customerShowData.clerkContactPhoneFlag">电话</el-checkbox> <el-checkbox v-model="customerShowData.clerkContactPhoneFlag">电话</el-checkbox>
...@@ -83,14 +87,16 @@ export default { ...@@ -83,14 +87,16 @@ export default {
*/ */
setData() { setData() {
const that = this; const that = this;
let openCodes = [];
for(let i in that.customerShowData) {
if(that.customerShowData[i]){
openCodes.push(i);
}
}
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
showAllOrderFlag: that.customerShowData.showAllOrderFlag ? 1 : '0', openCodes: openCodes.join(','),
showMallOrderFlag: that.customerShowData.showMallOrderFlag ? 1 : '0',
showWmOrderFlag: that.customerShowData.showWmOrderFlag ? 1 : '0',
clerkContactPhoneFlag: that.customerShowData.clerkContactPhoneFlag ? 1 : '0',
clerkContactSmsFlag: that.customerShowData.clerkContactSmsFlag ? 1 : '0',
clerkAddMemberFlag: that.customerShowData.clerkAddMemberFlag ? 1 : '0',
switchType: 1 switchType: 1
}; };
saveCustomerSet(para) saveCustomerSet(para)
...@@ -114,17 +120,15 @@ export default { ...@@ -114,17 +120,15 @@ export default {
getCustomerData() { getCustomerData() {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId,
switchType: '1',
}; };
getCustomerSet(para) getCustomerSet(para)
.then(res => { .then(res => {
res.result.showAllOrderFlag = res.result.showAllOrderFlag == 1 ? true : false; res.result.forEach(ele => {
res.result.showMallOrderFlag = res.result.showMallOrderFlag == 1 ? true : false; that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
res.result.showWmOrderFlag = res.result.showWmOrderFlag == 1 ? true : false; });
res.result.clerkContactPhoneFlag = res.result.clerkContactPhoneFlag == 1 ? true : false;
res.result.clerkContactSmsFlag = res.result.clerkContactSmsFlag == 1 ? true : false;
res.result.clerkAddMemberFlag = res.result.clerkAddMemberFlag == 1 ? true : false;
that.customerShowData = res.result || [];
}) })
.catch(function(error) { .catch(function(error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment