Commit 83ff8152 by 胡悦

群发修改

1 parent 78b89ce4
...@@ -79,7 +79,7 @@ const customerCount = params => { ...@@ -79,7 +79,7 @@ const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count' params.method = 'entmicro.api.mass.detail.customer.filter.count'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
......
...@@ -405,6 +405,7 @@ export default { ...@@ -405,6 +405,7 @@ export default {
this.$refs.membersForm.remove(val) this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags) this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.key = new Date() this.key = new Date()
this.isUpdate = true
}, },
openLabel() { openLabel() {
this.dialogVisible = !this.dialogVisible this.dialogVisible = !this.dialogVisible
......
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
<div class="detail-item" style="margin-bottom: 0;"> <div class="detail-item" style="margin-bottom: 0;">
<div class="detail-label">群发对象:</div> <div class="detail-label">群发对象:</div>
<div class="detail-value"> <div class="detail-value">
在 在员工
<span v-for="(item, index) in basicInfo.userList" class="el-tag-item" :key="item.id"> <span v-for="(item, index) in limitUserList" class="el-tag-item" :key="index">
<el-tag type="info" v-if="index < 5"> <el-tag type="info" v-if="index < 3">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ item.staffName }} {{ item.staffName }}
</el-tag> </el-tag>
<el-tag type="info" v-if="basicInfo.userList.length > 5 && index == 5"> <el-tag type="info" v-if="basicInfo.userList.length > 3 && index == 3">
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{basicInfo.userList.length}})</span> <span slot="reference">...({{basicInfo.userList.length}})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
...@@ -57,13 +57,19 @@ ...@@ -57,13 +57,19 @@
</el-popover> </el-popover>
</el-tag> </el-tag>
</span> </span>
里满足以下条件中的{{basicInfo.customerCount ? basicInfo.customerCount : 0}}个{{form == 'customer' ? '客户' : '群聊'}} 中满足以下条件中的{{basicInfo.customerCount ? basicInfo.customerCount : 0}}个{{form == 'customer' ? '客户' : '群聊'}}
<!-- v-if="selectType == 2" <span v-for="(item, index) in basicInfo.userList" :key="item.id"> <!-- v-if="selectType == 2" <span v-for="(item, index) in basicInfo.userList" :key="item.id">
[{{item.staffName}}] [{{item.staffName}}]
<span v-show="basicInfo.userList.length -1 != index">、</span> <span v-show="basicInfo.userList.length -1 != index">、</span>
</span>--> </span>-->
</div> </div>
</div> </div>
<div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 1">
<div class="detail-condition-item">
<span class="name">性别</span>
<span>全部性别</span>
</div>
</div>
<div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 2"> <div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 2">
<div class="detail-condition-item"> <div class="detail-condition-item">
<span class="name">性别</span> <span class="name">性别</span>
...@@ -185,7 +191,7 @@ const STATUS = { ...@@ -185,7 +191,7 @@ const STATUS = {
'3': '待发送' '3': '待发送'
} }
const SEX = { const SEX = {
null: '全部', null: '全部性别',
'1': '男', '1': '男',
'2': '女', '2': '女',
'0': '未知性别' '0': '未知性别'
...@@ -206,7 +212,18 @@ export default { ...@@ -206,7 +212,18 @@ export default {
basicInfo: { basicInfo: {
condition: {} condition: {}
}, },
statistic: {} statistic: {},
limitUserList: []
}
},
watch: {
basicInfo(val) {
console.log(val)
if (val.userList.length > 4) {
this.limitUserList = val.userList.slice(0, 4)
} else {
this.limitUserList = val.userList
}
} }
}, },
mounted() { mounted() {
...@@ -286,7 +303,7 @@ export default { ...@@ -286,7 +303,7 @@ export default {
color: #939393; color: #939393;
} }
.el-tag-item { .el-tag-item {
margin-right: 10px; margin-right: 6px;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
...@@ -324,7 +341,7 @@ export default { ...@@ -324,7 +341,7 @@ export default {
line-height: 40px; line-height: 40px;
background: #f7f7f7; background: #f7f7f7;
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
min-width: 327px; min-width: 325px;
.name { .name {
display: inline-block; display: inline-block;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<div v-if="item.status != 0 || item.remindStatus == 1">已提醒</div> <div v-if="item.status != 0 || item.remindStatus == 1">已提醒</div>
<el-button <el-button
v-if="item.status == 0" v-if="item.status == 0"
:disabled="item.remindStatus == 1" :disabled="item.remindStatus == 1 || isDisabled"
size="mini" size="mini"
type="primary" type="primary"
@click="remind(item, index)" @click="remind(item, index)"
...@@ -151,12 +151,15 @@ export default { ...@@ -151,12 +151,15 @@ export default {
employeelist: [], employeelist: [],
customerlist: [], customerlist: [],
basicInfo: {}, basicInfo: {},
eventBus: new Vue() eventBus: new Vue(),
isDisabled: false
} }
}, },
mounted() { mounted() {
this.getCustomerDetail(() => {
this.getStaffList() this.getStaffList()
this.getCustomerList() this.getCustomerList()
})
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
...@@ -192,9 +195,15 @@ export default { ...@@ -192,9 +195,15 @@ export default {
}) })
} }
}, },
getCustomerDetail(id) { getCustomerDetail(callback) {
const id = this.$route.params.id
this.$apis.customerTransform.customerDetail({ id }).then(res => { this.$apis.customerTransform.customerDetail({ id }).then(res => {
this.basicInfo = res this.basicInfo = res
console.log(res)
const date = new Date(res.sendTime)
const currentDate = new Date()
this.isDisabled = date > currentDate
callback()
}) })
}, },
getStaffList(status = null) { getStaffList(status = null) {
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<span v-else> <span v-else>
<el-button <el-button
type="text" type="text"
:disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1) || new Date(scope.scope.sendTime) > new Date()"
@click="btnClick('remind', 1, scope.scope)" @click="btnClick('remind', 1, scope.scope)"
>提醒发送</el-button> >提醒发送</el-button>
<GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton> <GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!