Просмотр исходного кода

自动创建群+配置转发客服功能

houxiaohua месяцев назад: 5
Родитель
Сommit
2b53942116

+ 1 - 1
index.html

@@ -7,4 +7,4 @@
7 7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8 8
         var s = document.getElementsByTagName("script")[0];
9 9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.8192e285d3266d8a06fdf7934a969430.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.9fd9291ba4b8362be222.js></script><script type=text/javascript src=./static/js/app.617db005c7c28554d55c.js></script></body></html>
10
+      })();</script><link href=./static/css/app.6ec5006c66833378caa521820a836c59.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.726ad71a3f643210b987.js></script><script type=text/javascript src=./static/js/app.dde67482a244c10f748b.js></script></body></html>

+ 6 - 0
project/src/assets/config/interface_api.js

@@ -451,6 +451,12 @@ var api = {
451 451
   inviteRule_ownerListOfCompany: '/api/chatGroup/ownerListOfCompany',
452 452
   system_sendNoticeList: '/api/massMsg/sendNoticeList', // 系统管理 - 系统消息
453 453
   system_sendNoticeListNew: '/api/massMsg/sendNoticeListNew', // 系统管理 - 系统消息(新)
454
+  forward_msg_customer_list: '/api/forwardChatGroup/forwardMemberList', // 获取已配置需转发消息的客服列表
455
+  create_chat_group_config_set: '/api/forwardChatGroup/setRule',  // 自动创建客户群设置
456
+  create_chat_group_config_list: '/api/forwardChatGroup/ruleList',  // 自动创建客户群配置列表
457
+  create_chat_group_config_change_status: '/api/forwardChatGroup/changeStatus',  // 自动创建客户群配置状态变更
458
+  create_chat_group_config_detail: '/api/forwardChatGroup/ruleDetail',  // 自动创建客户群配置详情
459
+  create_chat_group_config_del: '/api/forwardChatGroup/delRule',  // 删除自动创建客户群配置
454 460
 
455 461
   statistics_customerServiceDataTotal: '/api/statistics/customerServiceDataTotal',//客服数据统计总概
456 462
   pitcher_adqAccountBindUserList: '/api/pitcher/adqAccountBindUserList', // adq账号已绑定客服列表

+ 375 - 0
project/src/components/manage/InviteIntoGroup/createChatGroup/index.vue

@@ -0,0 +1,375 @@
1
+<template>
2
+    <div v-loading="loading" class="inviteRuleList-wrap">
3
+      <div class="screenBox" style="align-items: center; padding-right: 16px">
4
+        <div class="flex-align-center" style="flex: 1">
5
+          <!-- 搜索配置 -->
6
+          <self-input
7
+            style="width: auto"
8
+            label_name="关键词"
9
+            :hasLabel="false"
10
+            :noMarLeft="true"
11
+            @inputChange="
12
+              (val) => {
13
+                keyword = val;
14
+                init(1);
15
+              }
16
+            "
17
+          />
18
+          <!-- 关联客服 -->
19
+          <serviceSingle
20
+            style="width: auto"
21
+            title="群主"
22
+            placeholder="请选择"
23
+            @customerDefine="onChangeUser"
24
+          />
25
+          <!-- 状态 -->
26
+          <selfChannelV2
27
+            v-model="status"
28
+            type="enableStatus"
29
+            title="规则状态"
30
+            :labelWidth="true"
31
+            @change="onChangeStatus"
32
+          />
33
+        </div>
34
+        <el-button type="primary" size="mini" @click="createdMassMsg"
35
+          >新建配置</el-button
36
+        >
37
+      </div>
38
+      <div class="tableInfo">
39
+        <div>
40
+          <div class="flex">
41
+            <div class="totalCustom">
42
+              共有<span>{{ total }}</span
43
+              >条数据
44
+            </div>
45
+          </div>
46
+        </div>
47
+        <div class="flex">
48
+          <el-button type="primary" plain size="mini" @click="init(1, 'export')"
49
+            >导出Excel</el-button
50
+          >
51
+        </div>
52
+      </div>
53
+      <!-- table -->
54
+      <el-table
55
+        ref="multipleTable"
56
+        :height="height"
57
+        :data="tableData"
58
+        tooltip-effect="dark"
59
+        style="width: 100%"
60
+      >
61
+        <el-table-column
62
+          prop="title"
63
+          label="标题"
64
+          show-overflow-tooltip
65
+          align="center"
66
+          min-width="140"
67
+          fixed="left"
68
+        />
69
+        <el-table-column
70
+          prop="admin_name"
71
+          label="创建人"
72
+          show-overflow-tooltip
73
+          align="center"
74
+          min-width="140"
75
+        />
76
+        <el-table-column label="群名称前缀" align="center" min-width="140" prop="template_group_name" show-overflow-tooltip />
77
+
78
+        <el-table-column label="配置状态" align="center" min-width="120">
79
+          <template slot-scope="{ row }">
80
+            <el-switch
81
+              v-if="row.status !== ''"
82
+              v-model="row.status"
83
+              :active-value="1"
84
+              :inactive-value="0"
85
+              disabled
86
+              @click.native="onClickStatus(row)"
87
+            />
88
+            <div v-else>-</div>
89
+          </template>
90
+        </el-table-column>
91
+  
92
+        <el-table-column
93
+          min-width="140"
94
+          label="操作"
95
+          align="center"
96
+          fixed="right"
97
+        >
98
+          <template slot-scope="scope">
99
+            <div class="flex" style="justify-content: center">
100
+              <div
101
+                class="c-00B38A pointer table_button"
102
+                @click="goDetail(scope.row)"
103
+              >
104
+                编辑
105
+              </div>
106
+              <el-popconfirm
107
+                @confirm="deleEvent(scope.row)"
108
+                :title="`确定删除【${scope.row.title}】?`"
109
+              >
110
+                <div slot="reference" class="c-FF604D pointer table_button">
111
+                  删除
112
+                </div>
113
+              </el-popconfirm>
114
+            </div>
115
+          </template>
116
+        </el-table-column>
117
+      </el-table>
118
+      <div class="pagination" v-show="total > 0">
119
+        <el-pagination
120
+          background
121
+          :current-page="page"
122
+          @current-change="handleCurrentChange"
123
+          layout="prev, pager, next"
124
+          :page-count="Number(pages)"
125
+        />
126
+      </div>
127
+      <el-drawer size="1200px" :visible.sync="massMsgFlag" :with-header="false">
128
+        <createData
129
+          v-if="massMsgFlag"
130
+          ref="createMassMsg"
131
+          :rule_id="detail_rule_id"
132
+          :title="detail_rule_id ? '配置详情' : '新建配置'"
133
+          @close="detailClose"
134
+        />
135
+      </el-drawer>
136
+    </div>
137
+  </template>
138
+  <script>
139
+  import createData from "./setConfig.vue";
140
+  import selfInput from "@/components/assembly/screen/input.vue";
141
+  import serviceSingle from "@/components/assembly/screen/serviceSingle.vue";
142
+  import selfChannelV2 from "@/components/assembly/screen/channelV2.vue";
143
+  
144
+  export default {
145
+    components: {
146
+      selfInput,
147
+      createData,
148
+      serviceSingle,
149
+      selfChannelV2,
150
+    },
151
+    data() {
152
+      return {
153
+        massMsgFlag: false,
154
+        loading: false,
155
+        page: 1,
156
+        pages: 0,
157
+        total: 0,
158
+        page_size: 20,
159
+        tableData: [],
160
+        height: "",
161
+        detail_rule_id: "",
162
+        keyword: "",
163
+        user_id: "",
164
+        status: "",
165
+      };
166
+    },
167
+    created() {
168
+      this.height = document.documentElement.clientHeight - 290;
169
+      this.init(1);
170
+    },
171
+    methods: {
172
+      //删除
173
+      deleEvent(row) {
174
+        this.$loading(this.$loadingConfig);
175
+        this.$axios
176
+          .post(this.URL.BASEURL + this.URL.create_chat_group_config_del, {
177
+              rule_id: row.rule_id,
178
+          })
179
+          .then((res) => {
180
+            this.$loading(this.$loadingConfig).close();
181
+            var res = res.data;
182
+            if (res && res.errno == 0) {
183
+              this.init(1);
184
+            }
185
+            this.$message({
186
+              message: res.err,
187
+              type: "warning",
188
+            });
189
+          });
190
+      },
191
+      //重置
192
+      handleRefresh(row) {
193
+        this.$loading(this.$loadingConfig);
194
+        this.$axios
195
+          .get(this.URL.BASEURL + this.URL.inviteRule_reset, {
196
+            params: {
197
+              rule_id: row.rule_id,
198
+            },
199
+          })
200
+          .then((res) => {
201
+            this.$loading(this.$loadingConfig).close();
202
+            var res = res.data;
203
+            if (res && res.errno == 0) {
204
+              this.$message({
205
+                message: '重置成功',
206
+                type: "success",
207
+              });
208
+              this.init(this.page);
209
+            } else {
210
+              this.$message({
211
+                message: res.err,
212
+                type: "warning",
213
+              });
214
+            }
215
+          });
216
+      },
217
+      detailClose(val) {
218
+        if (val == "update") {
219
+          //编辑
220
+          this.init(this.page);
221
+        } else if (val == "update_new") {
222
+          //复制或者新建
223
+          this.init(1);
224
+          this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
225
+        }
226
+        this.massMsgFlag = false;
227
+      },
228
+      createdMassMsg() {
229
+        this.detail_rule_id = "";
230
+        this.massMsgFlag = true;
231
+      },
232
+      goDetail(data) {
233
+        this.detail_rule_id = data.rule_id;
234
+        this.massMsgFlag = true;
235
+      },
236
+      // 监听点击切换"状态"
237
+      async onClickStatus(row) {
238
+        try {
239
+          await this.$confirm(
240
+            `确定${row.status == 0 ? "启用" : "禁用"}【${row.title}】?`,
241
+            "提示",
242
+            {
243
+              confirmButtonText: "确定",
244
+              cancelButtonText: "取消",
245
+              type: "warning",
246
+            }
247
+          );
248
+          this.handleChangeStatus(row);
249
+        } catch (error) {
250
+          console.log(error);
251
+        }
252
+      },
253
+      // 执行“切换状态”
254
+      async handleChangeStatus({ rule_id, status }) {
255
+        try {
256
+          this.loading = true;
257
+          const url = `${this.URL.BASEURL}${this.URL.create_chat_group_config_change_status}`;
258
+          const params = {
259
+            rule_id,
260
+            status: status == 1 ? 0 : 1,
261
+          };
262
+          const { data: res = {} } = await this.$axios.post(url, params);
263
+          if (res && res.errno == 0) {
264
+            this.$message.success("操作成功");
265
+            this.init();
266
+          } else if (res.errno != 4002) {
267
+            this.$message.warning(res.err);
268
+          }
269
+        } catch (error) {
270
+          console.log(error);
271
+        } finally {
272
+          this.loading = false;
273
+        }
274
+      },
275
+  
276
+      init(page, type) {
277
+        if (type != "export") {
278
+          this.page = page ? page : this.page;
279
+        } else {
280
+          if (this.total == 0) {
281
+            this.$message({
282
+              message: "暂无数据可导出",
283
+              type: "warning",
284
+            });
285
+            return;
286
+          }
287
+        }
288
+        this.loading = true;
289
+        this.$axios
290
+          .get(this.URL.BASEURL + this.URL.create_chat_group_config_list, {
291
+            params: {
292
+              page: type == "export" ? 1 : this.page,
293
+              page_size:
294
+                type == "export"
295
+                  ? this.$store.state.exportNumber
296
+                  : this.page_size,
297
+              keyword: this.keyword,
298
+              user_id: this.user_id,
299
+              status: this.status,
300
+            },
301
+          })
302
+          .then((res) => {
303
+            var res = res.data;
304
+            this.loading = false;
305
+            if (res && res.errno == 0) {
306
+              if (type == "export") {
307
+                this.exportEvent(res.rst.data);
308
+              } else {
309
+                this.tableData = res.rst.data;
310
+                this.total = res.rst.pageInfo.total;
311
+                this.pages = res.rst.pageInfo.pages;
312
+              }
313
+            } else if (res.errno != 4002) {
314
+              this.$message.warning(res.err);
315
+            }
316
+          })
317
+          .catch((err) => {
318
+            this.loading = false;
319
+          });
320
+      },
321
+      handleCurrentChange(val) {
322
+        this.init(val);
323
+      },
324
+      onChangeUser(val) {
325
+        this.user_id = val ? val.user_id : "";
326
+        this.init(1);
327
+      },
328
+      onChangeStatus(val) {
329
+        this.status = val;
330
+        this.init(1);
331
+      },
332
+      exportEvent(data) {
333
+        let list = data;
334
+        let tHeader = ["标题", "创建人", "群名称前缀", "规则状态"];
335
+        let filterVal = ["title", "admin_name", "template_group_name", "status"];
336
+        list.forEach((item) => {
337
+          item.status =
338
+            item.status == 1 ? "启用" : item.status == 0 ? "禁用" : "-";
339
+        });
340
+        let excelDatas = [
341
+          {
342
+            tHeader: tHeader, // sheet表一头部
343
+            filterVal: filterVal, // 表一的数据字段
344
+            tableDatas: list, // 表一的整体json数据
345
+            sheetName: "", // 表一的sheet名字
346
+          },
347
+        ];
348
+        this.$exportOrder({
349
+          excelDatas,
350
+          name: `邀请入群配置(导出时间:${this.$getDay(0)})`,
351
+        });
352
+      },
353
+    },
354
+  };
355
+  </script>
356
+  <style lang="scss" scoped>
357
+  @import "@/style/list.scss";
358
+  .tableInfo {
359
+    height: 50px;
360
+  }
361
+  .table_button {
362
+    margin: 0 4px;
363
+    min-width: 26px;
364
+  }
365
+  
366
+  .inviteRuleList-wrap {
367
+    /deep/ .el-switch.is-disabled .el-switch__core {
368
+      cursor: pointer;
369
+    }
370
+    /deep/ .el-switch.is-disabled {
371
+      opacity: 1;
372
+    }
373
+  }
374
+  </style>
375
+  

+ 681 - 0
project/src/components/manage/InviteIntoGroup/createChatGroup/setConfig.vue

@@ -0,0 +1,681 @@
1
+<template>
2
+    <div class="createMassMsg" v-loading="loading">
3
+      <div class="self_drawer_title">
4
+        <div class="flex">
5
+          {{ title }}
6
+        </div>
7
+        <div class="flex-align-center">
8
+          <i class="el-icon-close pointer" @click="$emit('close')" />
9
+        </div>
10
+      </div>
11
+  
12
+      <div v-if="!loading" class="bg-ffffff content-wrap" style="padding: 15px 30px">
13
+        <div class="regulations">
14
+          <label>
15
+            <em>*</em>标题
16
+            <el-tooltip content="标题用于区分不同配置" placement="top">
17
+              <div><i class="el-icon-question"></i></div>
18
+            </el-tooltip>
19
+          </label>
20
+          <el-input
21
+            placeholder="请输入配置标题"
22
+            :disabled="!editFlag"
23
+            style="width: 300px"
24
+            v-model.trim="name"
25
+            clearable
26
+            size="small"
27
+          />
28
+        </div>
29
+        <div class="regulations">
30
+          <label>
31
+            <em>*</em>群名称前缀
32
+            <el-tooltip content="群名称会用前缀结合群个数生成" placement="top">
33
+              <div><i class="el-icon-question"></i></div>
34
+            </el-tooltip>
35
+          </label>
36
+          <el-input
37
+            placeholder="请输入群名称前缀"
38
+            :disabled="!editFlag"
39
+            style="width: 300px"
40
+            v-model.trim="chat_group_prefix"
41
+            clearable
42
+            size="small"
43
+          />
44
+        </div>
45
+        <div class="regulations">
46
+          <label>
47
+            <em>*</em>群个数
48
+            <el-tooltip content="自动创建的群个数" placement="top">
49
+              <div><i class="el-icon-question"></i></div>
50
+            </el-tooltip>
51
+          </label>
52
+          <el-input-number
53
+            placeholder="请输入群个数"
54
+            :min="1"
55
+            :disabled="!editFlag"
56
+            style="width: 180px"
57
+            v-model="number"
58
+            clearable
59
+            size="small"
60
+          />
61
+        </div>
62
+
63
+        <div class="regulations">
64
+          <label>
65
+            <em>*</em>群主
66
+            <el-tooltip
67
+              content="创建群的成员,结合【安卓设备绑定】中配置的客服使用"
68
+              placement="top"
69
+            >
70
+              <div><i class="el-icon-question"></i></div>
71
+            </el-tooltip>
72
+          </label>
73
+          <div>
74
+            <div style="display: flex">
75
+              <el-radio :disabled="!editFlag" v-model="is_for_all" :label="1"
76
+                >所有已绑定成员</el-radio
77
+              >
78
+              <el-radio :disabled="!editFlag" v-model="is_for_all" :label="0"
79
+                >筛选成员</el-radio
80
+              >
81
+            </div>
82
+            <self-customerservice
83
+              :disabled="!editFlag"
84
+              v-if="is_for_all == 0"
85
+              title=""
86
+              width="300px"
87
+              :afferent_users="user_id_list"
88
+              @customerDefine="
89
+                (val) => {
90
+                  user_id_list = val;
91
+                }
92
+              "
93
+            />
94
+          </div>
95
+        </div>
96
+
97
+        <div class="regulations">
98
+            <label><em>*</em>待邀请入群客户</label>
99
+            <el-select v-model="waitInviteCustomer" multiple aria-placeholder="请选择需要邀请入群的客户" style="width: 300px;">
100
+                <el-option v-for="item,index in customerList"
101
+                    :key="item.system_user_id"
102
+                    :label="getOptionLabel(item)"
103
+                    :value="item.system_user_id">
104
+                </el-option>
105
+            </el-select>
106
+        </div>
107
+  
108
+        <div class="regulations">
109
+          <label><em>*</em>群创建方式</label>
110
+          <div class="flex">
111
+            <el-radio
112
+              v-model="create_type"
113
+              :disabled="!editFlag"
114
+              :label="1"
115
+              >立即创建</el-radio
116
+            >
117
+            <el-radio v-model="create_type" :disabled="!editFlag" :label="2">定时创建</el-radio>
118
+          </div>
119
+        </div>
120
+        <div class="regulations" v-show="create_type == 2">
121
+          <label><em>*</em>创建时间</label>
122
+          <div class="send-time-item">
123
+            <div class="timeNums-wrap">
124
+                <el-date-picker v-model="do_time.date" :picker-options="pickerOptions" size="small" value-format="yyyy-MM-dd" type="date" style="width:160px" placeholder="选择日期">
125
+                </el-date-picker>
126
+                <el-time-picker v-model="do_time.time" size="small" format="HH:mm" value-format="HH:mm:ss" placeholder="请输入时间" style="width:130px"></el-time-picker>
127
+            </div>
128
+          </div>
129
+        </div>
130
+  
131
+        <div class="button_box">
132
+          <button
133
+            class="button"
134
+            v-if="editFlag && !isDisabledAll"
135
+            @click="massMsg_set"
136
+          >
137
+            确定
138
+          </button>
139
+        </div>
140
+  
141
+        <div
142
+          v-if="isDisabledAll"
143
+          class="disabled-wrap"
144
+          @click.stop="onClickDisabled"
145
+        />
146
+      </div>
147
+    </div>
148
+  </template>
149
+  <script>
150
+  import selfCustomerservice from "@/components/assembly/screen/customerService.vue";
151
+  import datePicker from "@/components/assembly/screen/datePicker.vue";
152
+  import screenPay from "@/components/assembly/screen/pay.vue";
153
+  import enterpriseTag from "@/components/assembly/screen/enterpriseTag.vue";
154
+  import _lodash from "lodash";
155
+  
156
+  export default {
157
+    components: {
158
+      selfCustomerservice,
159
+      datePicker,
160
+      screenPay,
161
+      enterpriseTag,
162
+    },
163
+    props: {
164
+      title: {
165
+        type: String,
166
+        default: () => "详情",
167
+      },
168
+      rule_id: {
169
+        type: String | Number,
170
+        default: () => "",
171
+      },
172
+    },
173
+    data() {
174
+      return {
175
+        customerList: [],
176
+        isDisabledAll: false,
177
+        loading: true,
178
+        editFlag: true,
179
+        name: "", //群发标题
180
+        chat_group_prefix: "",  // 客户群名称前缀
181
+        is_for_all: 1,
182
+        user_id_list: [],
183
+        waitInviteCustomer: [],
184
+        deleteChart: {},
185
+        create_type: 1, // 创建类型
186
+        pickerOptions: {
187
+            disabledDate (time) {
188
+              return time < Date.now() - 8.64e7;
189
+            },
190
+            shortcuts: [{
191
+            text: '今天',
192
+            onClick (picker) {
193
+                picker.$emit('pick', new Date());
194
+            }
195
+            }, {
196
+            text: '明天',
197
+            onClick (picker) {
198
+                const date = new Date();
199
+                date.setTime(date.getTime() + 3600 * 1000 * 24);
200
+                picker.$emit('pick', date);
201
+            }
202
+            }, {
203
+            text: '一周后',
204
+            onClick (picker) {
205
+                const date = new Date();
206
+                date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
207
+                picker.$emit('pick', date);
208
+            }
209
+            }]
210
+        },
211
+        do_time: {
212
+            date: '',
213
+            time: ''
214
+        },
215
+        number: ""
216
+      };
217
+    },
218
+    computed: {
219
+      isEdit() {
220
+        return !!this.rule_id;
221
+      },
222
+    },
223
+    created() {
224
+      this.$nextTick(() => {
225
+        this.forwardMsgCustomerList();
226
+        if (this.isEdit) {
227
+          //详情
228
+          this.detail();
229
+        } else {
230
+          this.loading = false;
231
+        }
232
+      });
233
+    },
234
+    methods: {
235
+      // 获取已配置需转发消息的客服列表
236
+      forwardMsgCustomerList() {
237
+        this.$loading(this.$loadingConfig);
238
+        this.$axios
239
+          .get(this.URL.BASEURL + this.URL.forward_msg_customer_list, {
240
+            params: {
241
+              kerword: '',
242
+            },
243
+          })
244
+          .then((res) => {
245
+            this.$loading(this.$loadingConfig).close();
246
+            var res = res.data;
247
+            if (res && res.errno == 0) {
248
+                this.customerList = res.rst
249
+            } else {
250
+                this.$message({
251
+                    message: res.err,
252
+                    type: "warning",
253
+                });
254
+            }
255
+          });
256
+      },
257
+      detail() {
258
+        //详情
259
+        this.loading = true;
260
+        this.$axios
261
+          .get(this.URL.BASEURL + this.URL.create_chat_group_config_detail, {
262
+            params: {
263
+              rule_id: this.rule_id,
264
+            },
265
+          })
266
+          .then((res) => {
267
+            var res = res.data;
268
+            this.loading = false;
269
+            if (res && res.errno == 0) {
270
+              //标题
271
+              this.name = res.rst.title;
272
+              //群主信息
273
+              this.user_id_list = res.rst.users ? res.rst.users : [];
274
+              if (res.rst.users && res.rst.users.length > 0) {
275
+                this.is_for_all = 0;
276
+              }
277
+  
278
+              // 创建类型
279
+              this.create_type = res.rst.create_type || 1;
280
+              // 执行时间点
281
+              if (res.rst.create_type == 2) {
282
+                this.do_time.date = res.rst.do_time.split(' ')[0];
283
+                this.do_time.time = res.rst.do_time.split(' ')[1];
284
+              }
285
+              // 群名称前缀
286
+              this.chat_group_prefix = res.rst.template_group_name;
287
+
288
+              // 群数量
289
+              this.number = res.rst.group_num;
290
+
291
+              // 待邀请入群的客户
292
+              this.waitInviteCustomer = res.rst.forward_users.split(',').map(function(item) {
293
+                return parseInt(item, 10);
294
+              });
295
+            } else if (res.errno != 4002) {
296
+              this.$message({
297
+                message: res.err,
298
+                type: "warning",
299
+              });
300
+            }
301
+          })
302
+          .catch((err) => {
303
+            this.loading = false;
304
+          });
305
+      },
306
+  
307
+      massMsg_set() {
308
+        let forwardUsers = this.waitInviteCustomer.join(',')
309
+
310
+        //提交
311
+        if (
312
+          this.is_for_all == 0 &&
313
+          (!this.user_id_list || this.user_id_list.length == 0)
314
+        ) {
315
+          this.$message.warning("请选择客服!");
316
+          return;
317
+        }
318
+
319
+        if (this.name == "") {
320
+          this.$message.warning("请输入标题!");
321
+          return;
322
+        }
323
+
324
+        if (this.chat_group_prefix == "") {
325
+          this.$message.warning("请输入客户群名称前缀!");
326
+          return;
327
+        }
328
+  
329
+        if (this.create_type == 2) {
330
+          if (!this.do_time.date || !this.do_time.time) {
331
+            this.$message.warning("请选择客户群创建时间");
332
+            return;
333
+          }
334
+        }
335
+
336
+        if(forwardUsers == []) {
337
+            this.$message.warning("请选择待邀请入群客户!");
338
+            return;
339
+        }
340
+  
341
+        this.$loading(this.$loadingConfig);
342
+        let params = {
343
+            is_for_all: this.is_for_all,
344
+            users:
345
+            this.user_id_list && this.user_id_list.length > 0
346
+              ? this.user_id_list.join(",")
347
+              : "",
348
+            title: this.name,
349
+            template_group_name: this.chat_group_prefix,
350
+            group_num: this.number,
351
+            forward_users: forwardUsers,
352
+            create_type: this.create_type,
353
+            do_time:
354
+                this.create_type == 2 ? this.do_time.date + ' ' +this.do_time.time : "",
355
+        };
356
+  
357
+        if (this.isEdit) {
358
+          params.rule_id = this.rule_id;
359
+        }
360
+  
361
+        this.$axios
362
+          .post(this.URL.BASEURL + this.URL.create_chat_group_config_set, params)
363
+          .then((res) => {
364
+            var res = res.data;
365
+            this.$loading(this.$loadingConfig).close();
366
+            if (res && res.errno == 0) {
367
+              if (!this.isEdit) {
368
+                //复制或者新建
369
+                this.$emit("close", "update_new");
370
+              } else {
371
+                //编辑
372
+                this.$emit("close", "update");
373
+              }
374
+            } else if (res.errno != 4002) {
375
+              this.$message({
376
+                message: res.err,
377
+                type: "warning",
378
+              });
379
+            }
380
+          })
381
+          .catch((err) => {
382
+            this.$loading(this.$loadingConfig).close();
383
+          });
384
+      },
385
+  
386
+      onClickDisabled() {
387
+        return false;
388
+      },
389
+      getOptionLabel(item) {
390
+        return `${item.corp_name} - ${item.user_name}`;
391
+      },
392
+
393
+    },
394
+  };
395
+  </script>
396
+  <style lang="scss" scoped>
397
+  @import "../create.scss";
398
+  
399
+  .listBox {
400
+    margin-left: 115px;
401
+    width: 730px;
402
+    margin-top: 10px;
403
+    background-color: #fbfbfb;
404
+    padding: 10px;
405
+  }
406
+  
407
+  .reversalAnimation {
408
+    transform: rotate(180deg);
409
+  }
410
+  
411
+  .createMassMsg {
412
+    .regulations {
413
+      .regulations-account {
414
+        width: 365px;
415
+        height: 40px;
416
+        border-radius: 3px;
417
+        border: 1px solid #dcdfe6;
418
+        color: #383e47;
419
+        font-size: 14px;
420
+        line-height: 20px;
421
+        padding: 0 7px;
422
+  
423
+        .icon {
424
+          width: 25px;
425
+          height: 25px;
426
+          background: #43b083;
427
+          border-radius: 4px;
428
+          color: #ffffff;
429
+          line-height: 25px;
430
+          text-align: center;
431
+          margin-right: 7px;
432
+        }
433
+      }
434
+  
435
+      .customer_all {
436
+        background: #edf8fd;
437
+        color: #383e47;
438
+        font-size: 14px;
439
+        line-height: 21px;
440
+        padding: 6px 15px;
441
+        margin-top: 10px;
442
+  
443
+        span {
444
+          color: #43b083;
445
+          font-weight: bold;
446
+        }
447
+      }
448
+    }
449
+  }
450
+  
451
+  .screeningCustomers {
452
+    width: 659px;
453
+    background: #fafafa;
454
+    border: 1px solid #e9e9e9;
455
+    padding: 15px;
456
+    padding-bottom: 0;
457
+    margin-top: 15px;
458
+  
459
+    .screeningItem {
460
+      display: flex;
461
+      align-items: center;
462
+      margin-bottom: 20px;
463
+  
464
+      label {
465
+        width: 80px;
466
+        color: #666666;
467
+        font-size: 14px;
468
+        line-height: 20px;
469
+        display: inline-block;
470
+        text-align: right;
471
+        line-height: 30px;
472
+      }
473
+  
474
+      .checkboxGroup {
475
+        label {
476
+          text-align: left;
477
+          width: 60px;
478
+        }
479
+      }
480
+  
481
+      .screening-hint {
482
+        color: #777777;
483
+        font-size: 14px;
484
+        line-height: 20px;
485
+        margin-top: 10px;
486
+      }
487
+    }
488
+  }
489
+  
490
+  .operationProcess {
491
+    width: 710px;
492
+    background: #fafafa;
493
+    padding: 15px;
494
+  
495
+    .process-title {
496
+      display: flex;
497
+      align-items: center;
498
+      justify-content: space-between;
499
+      margin-bottom: 16px;
500
+  
501
+      h3 {
502
+        color: #333333;
503
+        font-size: 15px;
504
+        font-weight: bold;
505
+      }
506
+  
507
+      .zhankai {
508
+        color: #666;
509
+        font-size: 13px;
510
+        cursor: pointer;
511
+        transition: all 0.5s;
512
+      }
513
+    }
514
+  
515
+    .process-hint {
516
+      font-size: 14px;
517
+      font-weight: 400;
518
+      color: rgba(0, 0, 0, 0.45);
519
+      line-height: 20px;
520
+      margin-bottom: 8px;
521
+    }
522
+  
523
+    .img {
524
+      width: 100%;
525
+    }
526
+  }
527
+  
528
+  .button_box {
529
+    margin: 40px 90px;
530
+    display: flex;
531
+    align-items: center;
532
+  }
533
+  
534
+  .button {
535
+    width: 178px;
536
+    height: 40px;
537
+    background: #00b38a;
538
+    border-radius: 5px;
539
+    color: #ffffff;
540
+    font-size: 14px;
541
+    border: none;
542
+    margin-right: 10px;
543
+  }
544
+  
545
+  .screeningCustomers .screeningItem .timeLineBox label {
546
+    width: initial;
547
+  }
548
+  .add-days-wrap {
549
+    display: flex;
550
+    align-items: center;
551
+    font-size: 14px;
552
+    color: #666;
553
+    .el-input {
554
+      width: 70px;
555
+      margin: 0 6px;
556
+      /deep/ .el-input__inner {
557
+        padding: 0 24px 0 8px;
558
+      }
559
+    }
560
+    .tips {
561
+      font-size: 12px;
562
+      color: #f9a527;
563
+      margin-left: 10px;
564
+    }
565
+  }
566
+  
567
+  .send-time-item {
568
+    display: flex;
569
+    align-items: flex-end;
570
+    flex-wrap: wrap;
571
+    margin-bottom: 20px;
572
+    &:last-child {
573
+      margin-bottom: 0;
574
+    }
575
+    .el-radio {
576
+      width: auto;
577
+      margin-right: 0;
578
+    }
579
+    .text {
580
+      flex-shrink: 0;
581
+    }
582
+    .el-input {
583
+      margin: 0 6px 0 0;
584
+      width: 80px;
585
+      font-size: 13px;
586
+    }
587
+    .timeNums-wrap {
588
+      .timeNums {
589
+        margin-top: 6px;
590
+        &:first-child {
591
+          margin-top: 0;
592
+        }
593
+        .el-date-editor {
594
+          width: 120px;
595
+        }
596
+        position: relative;
597
+        .el-icon-error {
598
+          position: absolute;
599
+          right: 0px;
600
+          top: -4px;
601
+          color: #f56c6c;
602
+          font-size: 14px;
603
+          cursor: pointer;
604
+        }
605
+      }
606
+    }
607
+    .add-btn {
608
+      margin-bottom: 6px;
609
+      display: flex;
610
+      align-items: center;
611
+      font-size: 13px;
612
+      color: #555;
613
+      cursor: pointer;
614
+      .el-icon-circle-plus-outline {
615
+        margin-left: 10px;
616
+        margin-right: 6px;
617
+        font-size: 16px;
618
+      }
619
+    }
620
+  }
621
+  .ml-80 {
622
+    margin-left: 80px;
623
+  }
624
+  .createMassMsg .regulations label {
625
+    width: 125px;
626
+  }
627
+  
628
+  .content-wrap {
629
+    position: relative;
630
+    .disabled-wrap {
631
+      position: absolute;
632
+      top: 0;
633
+      bottom: 0;
634
+      left: 0;
635
+      right: 0;
636
+      // background-color: rgba(0, 0, 0, 0.45);
637
+      cursor: not-allowed;
638
+      z-index: 999;
639
+    }
640
+  }
641
+  .regulations {
642
+    & > label {
643
+      display: flex;
644
+      .el-icon-question {
645
+        color: #999;
646
+        font-size: 14px;
647
+        margin-left: 2px;
648
+      }
649
+    }
650
+  
651
+    /deep/ .el-radio-group {
652
+      display: flex;
653
+      align-items: center;
654
+      .radio-tips-wrap {
655
+        display: flex;
656
+        align-items: center;
657
+        .el-radio__label {
658
+          display: flex;
659
+          .el-icon-question {
660
+            color: #999 !important;
661
+            font-size: 14px !important;
662
+            margin-left: 2px !important;
663
+          }
664
+        }
665
+      }
666
+    }
667
+  }
668
+  .createMassMsg .regulations.s-i-time {
669
+    display: flex;
670
+    align-items: center;
671
+    .time {
672
+      color: #666;
673
+      font-size: 13px;
674
+    }
675
+    .btn {
676
+      font-size: 13px;
677
+      margin-left: 20px;
678
+    }
679
+  }
680
+  </style>
681
+  

+ 17 - 0
project/src/components/manage/InviteIntoGroup/deviceBind/deviceBindDialog.vue

@@ -22,6 +22,19 @@
22 22
         <customerServiceCorpV2 title="" width="300px" :afferent_users="form.afferent_multiple_senders" @customerDefine="onChangeMultiCorpUsers" />
23 23
         <p style="font-size:13px;line-height:30px;color:#f9a527;margin-left:10px">*{{ isUpperLimitTips }}</p>
24 24
       </div>
25
+      <div class="regulations regulations2" style="align-items:center;">
26
+        <label style="width:90px;"><em>*</em>
27
+          消息转发
28
+        </label>
29
+        <el-switch
30
+            v-model="forward_status"
31
+            active-color="#00B38A"
32
+            inactive-color="#ddd"
33
+            :active-value="1"
34
+            :inactive-value="0"
35
+          />
36
+        <p style="font-size:13px;line-height:30px;color:#f9a527;margin-left:10px">*{{ shouldForwardTips }}</p>
37
+      </div>
25 38
       <div class="button_box">
26 39
         <button class="button" @click="onClickSubmit">保存</button>
27 40
       </div>
@@ -38,7 +51,9 @@ export default {
38 51
   props: ['currentDeviceId'],
39 52
   data () {
40 53
     return {
54
+      forward_status: true,
41 55
       isUpperLimitTips: '每个主体下最多只允许有一个客服',
56
+      shouldForwardTips: '开启转发消息后,客服收到的私聊消息会被转发给所有最近联系人,请谨慎操作',
42 57
       loading: true,
43 58
       form: {
44 59
         title: '',
@@ -75,6 +90,7 @@ export default {
75 90
         if (res && res.errno == 0) {
76 91
           this.form.title = res.rst.title;
77 92
           this.form.device_id = res.rst.device_id;
93
+          this.forward_status = res.rst.forward_status
78 94
           if (Array.isArray(res.rst.bind_list) && res.rst.bind_list.length) {
79 95
             this.form.afferent_multiple_senders = [...res.rst.bind_list]
80 96
             this.form.multiple_senders = res.rst.bind_list.map(b => ({
@@ -144,6 +160,7 @@ export default {
144 160
           corpid,
145 161
           user_id: user_list[0],
146 162
         })),
163
+        forward_status: this.forward_status
147 164
       }
148 165
       return JSON.parse(JSON.stringify(params))
149 166
     },

+ 4 - 0
project/src/components/manage/InviteIntoGroup/index.vue

@@ -3,6 +3,7 @@
3 3
     <div class="topTagBox flex" style="min-width: 1200px;" id="customerAnalysis">
4 4
       <div class="left flex-align-center">
5 5
         <div :class="['tagItem',tagType==2?'tagItem_active':'']" @click="changeType(2);">安卓设备绑定</div>
6
+        <div :class="['tagItem',tagType==4?'tagItem_active':'']" @click="changeType(4);">客户群创建配置</div>
6 7
         <div :class="['tagItem',tagType==1?'tagItem_active':'']" @click="changeType(1);">邀请入群配置</div>
7 8
         <div :class="['tagItem',tagType==3?'tagItem_active':'']" @click="changeType(3);">客户共享配置</div>
8 9
       </div>
@@ -10,6 +11,7 @@
10 11
     <deviceBind v-if="tagType==2" />
11 12
     <inviteRuleList v-if="tagType==1" />
12 13
     <customerShare v-if="tagType==3" />
14
+    <createChatGroup v-if="tagType==4" />
13 15
   </div>
14 16
 </template>
15 17
 
@@ -17,12 +19,14 @@
17 19
 import inviteRuleList from './inviteRuleList.vue'
18 20
 import deviceBind from './deviceBind/index.vue'
19 21
 import customerShare from './customerShare/index.vue'
22
+import createChatGroup from './createChatGroup/index.vue'
20 23
 export default {
21 24
   name: "InviteIntoGroup",
22 25
   components: {
23 26
     inviteRuleList,
24 27
     deviceBind,
25 28
     customerShare,
29
+    createChatGroup
26 30
   },
27 31
   data() {
28 32
     return {

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/css/app.8192e285d3266d8a06fdf7934a969430.css


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
static/js/11.622cb02c0f0cbb565b65.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/11.96158e73caa797d1c489.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/12.7a50b2efbb305a704803.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/13.85fc51d0db588a0ca489.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/14.eb5577144c16b993092b.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/15.b657d77c0f30c8828d75.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
static/js/17.b6d0f03f895aca7bb412.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/16.7367fc9abe4a786752c9.js


Разница между файлами не показана из-за своего большого размера
+ 2 - 2
static/js/app.617db005c7c28554d55c.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
static/js/manifest.9fd9291ba4b8362be222.js