Browse Source

feat: 邀请入群配置 - 重置&邀请入群时间

zhengxy 10 months ago
parent
commit
55b0efd233

+ 45 - 8
project/src/components/manage/InviteIntoGroup/createData.vue

319
           </div>
319
           </div>
320
         </div>
320
         </div>
321
 
321
 
322
-        <div class="regulations s-i-time">
323
-          <label>上次邀请入群时间</label>
324
-          <div class="time">{{ last_supplementary_invite_time || '-'}}</div>
325
-        </div>
326
-        <div class="regulations s-i-time">
327
-          <label>下次邀请入群时间</label>
328
-          <div class="time">{{ next_supplementary_invite_time || '-'}}</div>
329
-        </div>
322
+        <template v-if="isEdit">
323
+          <div class="regulations s-i-time">
324
+            <label>上次邀请入群时间</label>
325
+            <div class="time">{{ last_supplementary_invite_time || '-'}}</div>
326
+            <el-popconfirm v-if="last_supplementary_invite_time" @confirm="handleRefresh" :title="`确定重置客户退群起止时间吗?`">
327
+              <div slot="reference" class="c-448AFF pointer btn">
328
+                <i class="el-icon-refresh" />重置
329
+              </div>
330
+            </el-popconfirm>
331
+          </div>
332
+          <div class="regulations s-i-time">
333
+            <label>下次邀请入群时间</label>
334
+            <div class="time">{{ next_supplementary_invite_time || '-'}}</div>
335
+          </div>
336
+        </template>
330
       </div>
337
       </div>
331
       <!-- E 客户补拉 -->
338
       <!-- E 客户补拉 -->
332
 
339
 
1073
     onClickDisabled() {
1080
     onClickDisabled() {
1074
       return false;
1081
       return false;
1075
     },
1082
     },
1083
+
1084
+    handleRefresh() {
1085
+      this.$loading(this.$loadingConfig);
1086
+      this.$axios
1087
+        .get(this.URL.BASEURL + this.URL.inviteRule_reset, {
1088
+          params: {
1089
+            rule_id: this.rule_id,
1090
+          },
1091
+        })
1092
+        .then((res) => {
1093
+          this.$loading(this.$loadingConfig).close();
1094
+          var res = res.data;
1095
+          if (res && res.errno == 0) {
1096
+            this.$message({
1097
+              message: '重置成功',
1098
+              type: "success",
1099
+            });
1100
+            this.detail()
1101
+          } else {
1102
+            this.$message({
1103
+              message: res.err,
1104
+              type: "warning",
1105
+            });
1106
+          }
1107
+        });
1108
+    },
1076
   },
1109
   },
1077
 };
1110
 };
1078
 </script>
1111
 </script>
1355
     color: #666;
1388
     color: #666;
1356
     font-size: 13px;
1389
     font-size: 13px;
1357
   }
1390
   }
1391
+  .btn {
1392
+    font-size: 13px;
1393
+    margin-left: 20px;
1394
+  }
1358
 }
1395
 }
1359
 </style>
1396
 </style>

+ 2 - 2
project/src/components/manage/InviteIntoGroup/inviteRuleList.vue

117
             >
117
             >
118
               编辑
118
               编辑
119
             </div>
119
             </div>
120
-            <el-popconfirm
120
+            <!-- <el-popconfirm
121
               @confirm="handleRefresh(scope.row)"
121
               @confirm="handleRefresh(scope.row)"
122
               :title="`确定重置【${scope.row.title}】退群客户的退群时间范围筛选吗?`"
122
               :title="`确定重置【${scope.row.title}】退群客户的退群时间范围筛选吗?`"
123
             >
123
             >
124
               <div slot="reference" class="c-448AFF pointer table_button">
124
               <div slot="reference" class="c-448AFF pointer table_button">
125
                 重置
125
                 重置
126
               </div>
126
               </div>
127
-            </el-popconfirm>
127
+            </el-popconfirm> -->
128
             <el-popconfirm
128
             <el-popconfirm
129
               @confirm="deleEvent(scope.row)"
129
               @confirm="deleEvent(scope.row)"
130
               :title="`确定删除【${scope.row.title}】?`"
130
               :title="`确定删除【${scope.row.title}】?`"