Commit a4c4e6c1 by 胡悦

修改筛选成员

1 parent d4b1543c
......@@ -36,7 +36,7 @@
</div>
</el-form-item>
<el-form-item label="选择客户" prop="selectType">
<el-radio-group @change="selectChange" v-model="basicForm.selectType">
<el-radio-group v-model="basicForm.selectType">
<el-radio :label="1">全部成员</el-radio>
<el-radio :label="2">筛选成员</el-radio>
</el-radio-group>
......@@ -56,6 +56,7 @@
<el-select
v-model="basicForm.condition.chatId"
@change="valueChange"
@focus="groupFocus"
multiple
collapse-tags
placeholder="请选择"
......@@ -425,14 +426,21 @@ export default {
// this.$refs.selectLabel.init(this.tagging)
},
valueChange(val) {
console.log(val)
this.isUpdate = true
},
getGroupList() {
this.$apis.customerTransform.groupList({}).then(res => {
console.log(res)
this.groupList = res
})
if (this.basicForm.userList && this.basicForm.userList.length != 0) {
const staffIds = this.basicForm.userList.map(item => item.staffId)
console.log(staffIds)
this.$apis.customerTransform.groupList({ staffIds }).then(res => {
this.groupList = res
})
} else {
this.$message({
type: 'error',
message: '请选择群发账号'
})
}
},
getSiftMembers() {
const params = {
......@@ -457,7 +465,6 @@ export default {
},
// 查看群发人数
viewMembers() {
console.log(this.basicForm)
if (!this.basicForm.userList || this.basicForm.userList.length == 0) {
this.$message({
type: 'error',
......@@ -466,9 +473,7 @@ export default {
return
}
const params = this.getSiftMembers()
console.log(params)
this.$apis.customerTransform.customerCount(params).then(res => {
console.log(res)
this.groupNumber = res
this.isUpdate = false
})
......@@ -489,11 +494,13 @@ export default {
}
}
},
selectChange(val) {
console.log(val)
if (val == 2) {
this.getGroupList()
groupFocus() {
if (this.basicForm.condition && this.basicForm.condition.chatId) {
this.basicForm.condition.chatId = []
this.groupList = []
this.isUpdate = true
}
this.getGroupList()
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!