Commit 83ff8152 by 胡悦

群发修改

1 parent 78b89ce4
......@@ -79,7 +79,7 @@ const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count'
return http({
url: URL,
method: 'GET',
method: 'POST',
data: params,
sign: true
})
......
......@@ -405,6 +405,7 @@ export default {
this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.key = new Date()
this.isUpdate = true
},
openLabel() {
this.dialogVisible = !this.dialogVisible
......
......@@ -37,13 +37,13 @@
<div class="detail-item" style="margin-bottom: 0;">
<div class="detail-label">群发对象:</div>
<div class="detail-value">
在
<span v-for="(item, index) in basicInfo.userList" class="el-tag-item" :key="item.id">
<el-tag type="info" v-if="index < 5">
在员工
<span v-for="(item, index) in limitUserList" class="el-tag-item" :key="index">
<el-tag type="info" v-if="index < 3">
<i class="el-icon-user-solid"></i>
{{ item.staffName }}
</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">
<span slot="reference">...({{basicInfo.userList.length}})</span>
<div class="entmicro-hover">
......@@ -57,13 +57,19 @@
</el-popover>
</el-tag>
</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">
[{{item.staffName}}]
<span v-show="basicInfo.userList.length -1 != index">、</span>
</span>-->
</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-item">
<span class="name">性别</span>
......@@ -185,7 +191,7 @@ const STATUS = {
'3': '待发送'
}
const SEX = {
null: '全部',
null: '全部性别',
'1': '男',
'2': '女',
'0': '未知性别'
......@@ -206,7 +212,18 @@ export default {
basicInfo: {
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() {
......@@ -286,7 +303,7 @@ export default {
color: #939393;
}
.el-tag-item {
margin-right: 10px;
margin-right: 6px;
&:last-child {
margin-right: 0;
}
......@@ -324,7 +341,7 @@ export default {
line-height: 40px;
background: #f7f7f7;
border: 1px solid #d8d8d8;
min-width: 327px;
min-width: 325px;
.name {
display: inline-block;
......
......@@ -50,7 +50,7 @@
<div v-if="item.status != 0 || item.remindStatus == 1">已提醒</div>
<el-button
v-if="item.status == 0"
:disabled="item.remindStatus == 1"
:disabled="item.remindStatus == 1 || isDisabled"
size="mini"
type="primary"
@click="remind(item, index)"
......@@ -151,12 +151,15 @@ export default {
employeelist: [],
customerlist: [],
basicInfo: {},
eventBus: new Vue()
eventBus: new Vue(),
isDisabled: false
}
},
mounted() {
this.getStaffList()
this.getCustomerList()
this.getCustomerDetail(() => {
this.getStaffList()
this.getCustomerList()
})
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -192,9 +195,15 @@ export default {
})
}
},
getCustomerDetail(id) {
getCustomerDetail(callback) {
const id = this.$route.params.id
this.$apis.customerTransform.customerDetail({ id }).then(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) {
......
......@@ -50,7 +50,7 @@
<span v-else>
<el-button
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)"
>提醒发送</el-button>
<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!