Commit a4c4e6c1 by 胡悦

修改筛选成员

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