|
@@ -13,12 +13,12 @@
|
13
|
13
|
<div class="regulations" style="margin-bottom:20px;">
|
14
|
14
|
<label>选择模板</label>
|
15
|
15
|
<div>
|
16
|
|
- <el-select v-model="tempGroupId" class="select-cls" style="width:200px;" size="small" placeholder="请选择模板分组" filterable @change="onChangeTempGroupId">
|
|
16
|
+ <el-select v-model="tempGroupId" class="select-cls" style="width:200px;" size="small" placeholder="请选择模板分组" filterable @change="onChangeTempGroupId" :disabled="isFromSysMsg">
|
17
|
17
|
<el-option v-for="tempGroup in tempGroupOptions" :key="tempGroup.group_id" :label="tempGroup.title" :value="tempGroup.group_id" />
|
18
|
18
|
</el-select>
|
19
|
19
|
</div>
|
20
|
20
|
<div style="margin-left:10px;">
|
21
|
|
- <el-select v-model="selectedTempId" class="select-cls" style="width:200px;" size="small" placeholder="请选择模板" filterable @change="onChangeTempId">
|
|
21
|
+ <el-select v-model="selectedTempId" class="select-cls" style="width:200px;" size="small" placeholder="请选择模板" filterable @change="onChangeTempId" :disabled="isFromSysMsg">
|
22
|
22
|
<el-option v-for="temp in templateOptions" :key="temp.template_id" :label="temp.title" :value="temp.template_id" />
|
23
|
23
|
</el-select>
|
24
|
24
|
</div>
|
|
@@ -31,7 +31,7 @@
|
31
|
31
|
<div style="margin-top: 10px;" class="screeningCustomers">
|
32
|
32
|
<div class="screeningItem">
|
33
|
33
|
<label>性别:</label>
|
34
|
|
- <el-checkbox-group class="checkboxGroup" v-model="gender">
|
|
34
|
+ <el-checkbox-group class="checkboxGroup" v-model="gender" :disabled="isFromSysMsg">
|
35
|
35
|
<el-checkbox label="1">男性</el-checkbox>
|
36
|
36
|
<el-checkbox label="2">女性</el-checkbox>
|
37
|
37
|
<el-checkbox label="0">未知性别</el-checkbox>
|
|
@@ -39,27 +39,29 @@
|
39
|
39
|
</div>
|
40
|
40
|
<div class="screeningItem">
|
41
|
41
|
<label>付费情况:</label>
|
42
|
|
- <screen-pay title="" width="355px" :reset='resetFlag' @payChange="payChange" :afferent_obj='payInfo' style="margin:0" />
|
|
42
|
+ <screen-pay title="" width="355px" :reset='resetFlag' @payChange="payChange" :afferent_obj='payInfo' style="margin:0" :disabled="isFromSysMsg" />
|
43
|
43
|
</div>
|
44
|
44
|
|
45
|
45
|
<div class="screeningItem" style="align-items: flex-start;">
|
46
|
46
|
<label><em>*</em>添加客服时间:</label>
|
47
|
47
|
<div class="send-time-wrap">
|
48
|
48
|
<div v-for="(conf, idx) in send_conf" :key="idx" class="send-time-item">
|
49
|
|
- <el-input v-model.trim="conf.natural_day" size="mini" maxlength="3" clearable @input="onInputDays($event, idx)" @change="onChangeDays($event, idx)" />
|
|
49
|
+ <el-input v-model.trim="conf.natural_day" size="mini" maxlength="3" clearable @input="onInputDays($event, idx)" @change="onChangeDays($event, idx)" :disabled="isFromSysMsg" />
|
50
|
50
|
<span class="text">天 </span>
|
51
|
51
|
<!-- S 天数为1时 设置添加时间段 -->
|
52
|
|
- <el-time-picker v-if="conf.natural_day == 1" v-model="conf.add_time" is-range size="mini" placeholder="客户添加起止时间" start-placeholder="起始时间" end-placeholder="截止时间" value-format="HH:mm:ss" :clearable="false" class="add-time" @change="onChangeAddTime($event, idx)" />
|
|
52
|
+ <el-time-picker v-if="conf.natural_day == 1" v-model="conf.add_time" is-range size="mini" placeholder="客户添加起止时间" start-placeholder="起始时间" end-placeholder="截止时间" value-format="HH:mm:ss" :clearable="false" class="add-time" @change="onChangeAddTime($event, idx)" :disabled="isFromSysMsg" />
|
53
|
53
|
<!-- E 天数为1时 设置添加时间段 -->
|
54
|
54
|
<span class="text">当天</span>
|
55
|
55
|
<div class="timeNums-wrap">
|
56
|
56
|
<div class="timeNums">
|
57
|
|
- <el-time-picker v-model="conf.send_time" size="mini" placeholder="请选择" value-format="HH:mm:ss" :clearable="false" />
|
|
57
|
+ <el-time-picker v-model="conf.send_time" size="mini" placeholder="请选择" value-format="HH:mm:ss" :clearable="false" :disabled="isFromSysMsg" />
|
58
|
58
|
</div>
|
59
|
59
|
</div>
|
60
|
60
|
<span class="text">提醒发送</span>
|
61
|
|
- <i v-if="idx > 0" class="el-icon-error" @click="onClickDelConf(idx)" />
|
62
|
|
- <i v-if="idx === send_conf.length -1" class="el-icon-circle-plus-outline" @click="onClickAddConf" />
|
|
61
|
+ <template v-if="!isFromSysMsg">
|
|
62
|
+ <i v-if="idx > 0" class="el-icon-error" @click="onClickDelConf(idx)" />
|
|
63
|
+ <i v-if="idx === send_conf.length -1" class="el-icon-circle-plus-outline" @click="onClickAddConf" />
|
|
64
|
+ </template>
|
63
|
65
|
</div>
|
64
|
66
|
</div>
|
65
|
67
|
</div>
|
|
@@ -70,11 +72,11 @@
|
70
|
72
|
<div class="regulations" style="margin-bottom:20px;align-items:center;">
|
71
|
73
|
<label><em>*</em>选择分组</label>
|
72
|
74
|
<div>
|
73
|
|
- <el-select v-model="group_id" class="select-cls" style="width:300px;" size="small" placeholder="请选择" filterable clearable @change="onChangeGroupId">
|
|
75
|
+ <el-select v-model="group_id" class="select-cls" style="width:300px;" size="small" placeholder="请选择" filterable clearable @change="onChangeGroupId" :disabled="isFromSysMsg">
|
74
|
76
|
<el-option v-for="group in groupOptions" :key="group.group_id" :label="group.title" :value="group.group_id" />
|
75
|
77
|
</el-select>
|
76
|
78
|
</div>
|
77
|
|
- <div class="newGroupCss" @click="onClickCreateGroup">新建分组</div>
|
|
79
|
+ <div v-if="!isFromSysMsg" class="newGroupCss" @click="onClickCreateGroup">新建分组</div>
|
78
|
80
|
</div>
|
79
|
81
|
<!-- E 选择分组 -->
|
80
|
82
|
|
|
@@ -82,12 +84,12 @@
|
82
|
84
|
<h3 class="bigTitle">编辑群发消息</h3>
|
83
|
85
|
<div class="regulations regulations2">
|
84
|
86
|
<label><em>*</em>标题</label>
|
85
|
|
- <el-input placeholder="例:活动推送/拉新等" style="width:300px" v-model.trim="name" clearable size="small" />
|
|
87
|
+ <el-input placeholder="例:活动推送/拉新等" style="width:300px" v-model.trim="name" clearable size="small" :disabled="isFromSysMsg" />
|
86
|
88
|
<p style="font-size:13px;line-height:30px;color:#f9a527;margin-left:10px">*仅作为企业内部人员记录群发摘要,不会推送给客户</p>
|
87
|
89
|
</div>
|
88
|
90
|
<div class="regulations regulations2">
|
89
|
91
|
<label style="margin-top:4px"><em>*</em>内容</label>
|
90
|
|
- <edit-con v-if="isShowEditCon" ref="editCon" :afferent_content='content' :afferent_attachments='attachments' @editContent="(val) => { content = val }" @changeAttachment='getAttachment' />
|
|
92
|
+ <edit-con v-if="isShowEditCon" ref="editCon" :afferent_content='content' :afferent_attachments='attachments' @editContent="(val) => { content = val }" @changeAttachment='getAttachment' :disabled="isFromSysMsg" />
|
91
|
93
|
</div>
|
92
|
94
|
<div class="regulations regulations2">
|
93
|
95
|
<label></label>
|
|
@@ -101,7 +103,7 @@
|
101
|
103
|
<img v-if="processFlag" src="@/assets/img/exterprise-mass-send.png" class="img" alt="">
|
102
|
104
|
</div>
|
103
|
105
|
</div>
|
104
|
|
- <div class="button_box">
|
|
106
|
+ <div v-if="!isFromSysMsg" class="button_box">
|
105
|
107
|
<button class="button" @click="massMsg_set">应用规则</button>
|
106
|
108
|
</div>
|
107
|
109
|
</div>
|
|
@@ -129,7 +131,7 @@ import { getIntegerNumber, isJSON } from '@/assets/js/common'
|
129
|
131
|
|
130
|
132
|
export default {
|
131
|
133
|
components: { selfChannel, selfCustomerservice, customerServiceCorpV2, datePicker, enterpriseTag, editCon, screenPay, pushGroupDialog },
|
132
|
|
- props: ['title', 'rule_id', 'isCopy', 'createTempGroupId', 'createTemplateId', 'createGroupId'],
|
|
134
|
+ props: ['title', 'rule_id', 'isCopy', 'createTempGroupId', 'createTemplateId', 'createGroupId', 'sysMsgCorpid'], //sysMsgCorpid是否来自“系统消息” 系统消息查看详情不可编辑
|
133
|
135
|
data () {
|
134
|
136
|
return {
|
135
|
137
|
loading: true,
|
|
@@ -171,6 +173,9 @@ export default {
|
171
|
173
|
isEdit() {
|
172
|
174
|
return this.rule_id && !this.isCopy
|
173
|
175
|
},
|
|
176
|
+ isFromSysMsg() {
|
|
177
|
+ return !!this.sysMsgCorpid
|
|
178
|
+ },
|
174
|
179
|
},
|
175
|
180
|
created () {
|
176
|
181
|
this.handleGetTempGroupOptions()
|
|
@@ -205,11 +210,11 @@ export default {
|
205
|
210
|
detail () {//详情
|
206
|
211
|
this.loading = true
|
207
|
212
|
this.isShowEditCon = false
|
208
|
|
- this.$axios.get(this.URL.BASEURL + this.URL.smartPushV2_detail, {
|
209
|
|
- params: {
|
210
|
|
- rule_id: this.rule_id
|
211
|
|
- }
|
212
|
|
- }).then((res) => {
|
|
213
|
+ const params = {
|
|
214
|
+ rule_id: this.rule_id
|
|
215
|
+ }
|
|
216
|
+ if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
|
|
217
|
+ this.$axios.get(this.URL.BASEURL + this.URL.smartPushV2_detail, { params }).then((res) => {
|
213
|
218
|
var res = res.data
|
214
|
219
|
this.loading = false
|
215
|
220
|
this.isShowEditCon = true
|
|
@@ -561,6 +566,7 @@ export default {
|
561
|
566
|
|
562
|
567
|
async handleGetGroupOptions() {
|
563
|
568
|
const params = { status: 1, page: 1, page_size: 1000 }
|
|
569
|
+ if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
|
564
|
570
|
const { data: res = {} } = await this.$axios.post(this.URL.BASEURL + this.URL.smartPushV3_groupList, params)
|
565
|
571
|
if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
|
566
|
572
|
this.groupOptions = res.rst.data;
|
|
@@ -585,6 +591,7 @@ export default {
|
585
|
591
|
|
586
|
592
|
async handleGetTempGroupOptions() {
|
587
|
593
|
const params = { status: 1, page: 1, page_size: 1000 }
|
|
594
|
+ if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
|
588
|
595
|
const { data: res = {} } = await this.$axios.post(this.URL.BASEURL + this.URL.smartPushV3_tempGroupList, params)
|
589
|
596
|
if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
|
590
|
597
|
this.tempGroupOptions = [
|
|
@@ -605,6 +612,7 @@ export default {
|
605
|
612
|
|
606
|
613
|
async handleGetTemplateOptions() {
|
607
|
614
|
const params = { group_id: this.tempGroupId, status: 1, page: 1, page_size: 1000 }
|
|
615
|
+ if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
|
608
|
616
|
const { data: res = {} } = await this.$axios.get(this.URL.BASEURL + this.URL.smartPushV3_templateList, { params })
|
609
|
617
|
if (res && res.errno == 0 && Array.isArray(res.rst.data)) {
|
610
|
618
|
this.templateOptions = res.rst.data;
|
|
@@ -622,6 +630,7 @@ export default {
|
622
|
630
|
async handleGetTempDetail() {
|
623
|
631
|
try {
|
624
|
632
|
const params = { template_id: this.selectedTempId }
|
|
633
|
+ if (this.sysMsgCorpid) { params.corpid = this.sysMsgCorpid }
|
625
|
634
|
const { data: res = {} } = await this.$axios.get(this.URL.BASEURL + this.URL.smartPushV3_templateDetail, { params })
|
626
|
635
|
if (res && res.errno == 0) {
|
627
|
636
|
if (res.rst.send_conf) {
|
|
@@ -900,4 +909,7 @@ export default {
|
900
|
909
|
margin-left: 10px;
|
901
|
910
|
cursor: pointer;
|
902
|
911
|
}
|
|
912
|
+/deep/ .el-input.is-disabled .el-input__inner {
|
|
913
|
+ color: #666;
|
|
914
|
+}
|
903
|
915
|
</style>
|