Commit ac62b13c by 无尘

fix: 更新loading

parent e6d23581
...@@ -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-12-21 10:17:13 * @LastEditTime: 2020-12-22 15:52:53
--> -->
<template> <template>
<div class="customer-assign-wrap"> <div class="customer-assign-wrap">
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
<el-tab-pane label="分配策略" name="first"></el-tab-pane> <el-tab-pane label="分配策略" name="first"></el-tab-pane>
<el-tab-pane label="顾客列表" name="second"></el-tab-pane> <el-tab-pane label="顾客列表" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<div v-if="activeName == 'first'" class="customer-assign-set"> <div v-if="activeName == 'first'" class="customer-assign-set" v-loading="loadingSet" >
<div class="m-b-10"> <div class="m-b-10">
<el-checkbox v-model="customerSetData.unbindClerkDisMemberFlag">解绑导购code,顾客自动分配给店长</el-checkbox> <el-checkbox v-model="customerSetData.unbindClerkDisMemberFlag">解绑导购code,顾客自动分配给店长</el-checkbox>
<div class="font-12 color-909399 set-tip-item">注:保存勾选项后,解绑当前导购code,该导购cede名下的顾客会分配到店长,在移动端可重新分配顾客</div> <div class="font-12 color-909399 set-tip-item">注:保存勾选项后,解绑当前导购code,该导购cede名下的顾客会分配到店长,在移动端可重新分配顾客</div>
</div> </div>
<div class="m-t-46 p-l-20"> <div class="m-t-46 p-l-20">
<el-button type="primary" :loading="loadingSet" @click="submitSet">保存</el-button> <el-button type="primary" @click="submitSet">保存</el-button>
</div> </div>
</div> </div>
<div v-if="activeName == 'second'" class="list-body flex"> <div v-if="activeName == 'second'" class="list-body flex">
...@@ -267,6 +267,7 @@ export default { ...@@ -267,6 +267,7 @@ export default {
*/ */
getSetData() { getSetData() {
const that = this; const that = this;
that.loadingSet = true;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId, wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
...@@ -274,6 +275,7 @@ export default { ...@@ -274,6 +275,7 @@ export default {
}; };
getCustomerSet(para, { headers: { sign: that.brandId } }) getCustomerSet(para, { headers: { sign: that.brandId } })
.then(res => { .then(res => {
that.loadingSet = false;
if (res.result && !!res.result.length) { if (res.result && !!res.result.length) {
res.result.forEach(ele => { res.result.forEach(ele => {
that.customerSetData[ele.switchCode] = ele.switchFlag == 1 ? true : false; that.customerSetData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
...@@ -285,7 +287,7 @@ export default { ...@@ -285,7 +287,7 @@ export default {
} }
}) })
.catch(function(error) { .catch(function(error) {
that.loadingSet = false;
}); });
}, },
/** /**
......
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