Commit c3031f38 by huaying

fix: 客户列表-批量导入下拉数据添加权限

parent 85428afe
......@@ -24,6 +24,14 @@ const authCode = {
memberInteractionSwitch: 'memberInteractionSwitch', // 会员成就互动类-开关
memberInteractionSetAmount: 'memberInteractionSetAmount', // 会员成就互动类-配置额度
memberInteractionSetAward: 'memberInteractionSetAward', // 会员成就互动类-配置奖励
//客户列表页面 批量导入中的下拉框数据
importMember: 'importMember', //会员导入
importIncreaseOfPoints: 'importIncreaseOfPoints', //积分增加
importPointDeduction: 'importPointDeduction', //积分扣除
importGradeAdjustment: 'importGradeAdjustment', //等级调整
importServiceStore: 'importServiceStore', //服务门店/专属导购调整
importMappingFreeze: 'importMappingFreeze', //批量冻结会员
importMappingUnfreeze: 'importMappingUnfreeze', //批量解冻会员
};
export default authCode;
......@@ -24,12 +24,16 @@
@change="handleChangeType"
:disabled="importList.length < 2"
>
<template v-for="item in importList">
<el-option
:label="item.importValue"
:value="item.importType"
v-for="item in importList"
:key="item"
></el-option>
v-if="getCodeAuth(item.btnCode)"
:limit-code="getCode(item.btnCode)"
:key="item">
</el-option>
</template>
</el-select>
</el-form-item>
<el-form-item label="选择文件" prop="file" required>
......@@ -58,8 +62,10 @@
import url from "@/components/axios/url";
import { checkFalse } from "../../../../static/js/checkStatus";
import { doFetch } from "@/components/axios/api";
import authMethods from "@/mixins/auth";
export default {
mixins: [authMethods],
props: {
dialogVisible: {
type: Boolean,
......@@ -72,15 +78,13 @@ export default {
{
importType: 15,
importValue: "批量冻结会员",
btnCode: 'memberBatchImport'
},
{
importType: 16,
importValue: "huiyua年四季度回访",
},
{
importType: 17,
importValue: "会员导入",
},
importValue: "批量解冻会员",
btnCode: 'memberBatchImport'
}
],
},
},
......@@ -124,6 +128,7 @@ export default {
watch: {
importList:{
handler(n){
n = n.filter(item=> item.btnCode);
let value = '';
if(n && n.length){
value = n[0].importType;
......@@ -163,7 +168,7 @@ export default {
importTable() {
this.$refs.formByImport.validateField("importValue", (err) => {
if (!err) {
// console.log(this.formByImport.fileList);
console.log(this.formByImport.fileList);
let {fileList,importValue} = this.formByImport;
if (fileList.length) {
this.load = true;
......
......@@ -51,30 +51,37 @@ export default {
{
importType: 18,
importValue: "会员导入",
btnCode: 'importMember'
},
{
importType: 11,
importValue: "积分增加",
btnCode: 'importIncreaseOfPoints'
},
{
importType: 12,
importValue: "积分扣除",
btnCode: 'importPointDeduction'
},
{
importType: 13,
importValue: "等级调整",
btnCode: 'importGradeAdjustment'
},
{
importType: 14,
importValue: "服务门店/专属导购调整",
btnCode: 'importServiceStore'
},
{
importType: 15,
importValue: "批量冻结会员",
btnCode: 'importMappingFreeze'
},
{
importType: 16,
importValue: "批量解冻会员",
btnCode: 'importMappingUnfreeze'
},
],
sceneValue: "member", // 人群筛选器场景值
......@@ -253,6 +260,13 @@ export default {
});
},
mounted() {
this.importList = this.importList.map((item, index)=>{
if(this.getCodeAuth(item.btnCode)){
return item;
}else{
return {};
}
})
this.getFindMemberFields();
this.getAjaxMembers();
this.getEnterpriseInfo();
......
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