!206 修复合作方bug

Merge pull request !206 from 德仔/develop
This commit is contained in:
德仔
2021-04-15 16:15:57 +08:00
committed by Gitee
4 changed files with 31 additions and 12 deletions

View File

@ -526,7 +526,7 @@ export default {
this.fansChannelOptions = response.data;
});
this.getDicts("cus_account").then((response) => {
if (this.userRemark && this.userRemark.includes("|")) {
if (this.isPartner) {
const accRange = this.userRemark.split("|");
this.accountIdOptions = accRange.reduce((arr, accId) => {
const tarObj = response.data.find((obj) => obj.dictValue === accId);
@ -542,6 +542,9 @@ export default {
this.getList();
},
computed: {
isPartner() {
return this.roles && this.roles.includes("partner");
},
...mapGetters([
// 售前字典
"preSaleIdOptions",
@ -553,6 +556,8 @@ export default {
"nutriAssisIdOptions",
//
"userRemark",
//
"roles",
]),
},
methods: {

View File

@ -587,7 +587,7 @@ export default {
return this.device === "mobile";
},
isPartner() {
return this.userRemark && this.userRemark.includes("|");
return this.roles && this.roles.includes("partner");
},
...mapGetters([
// 售前字典
@ -611,6 +611,8 @@ export default {
//
"userRemark",
//
"roles",
//
"device",
]),
},
@ -620,7 +622,7 @@ export default {
this.payTypeIdOptions = response.data;
});
this.getDicts("cus_account").then((response) => {
if (this.userRemark && this.userRemark.includes("|")) {
if (this.isPartner) {
const accRange = this.userRemark.split("|");
this.accountIdOptions = accRange.reduce((arr, accId) => {
const tarObj = response.data.find((obj) => obj.dictValue === accId);