|
|
@@ -68,7 +68,11 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="企微客户名称" prop="name" width="110px"/>
|
|
|
+ <el-table-column label="企微客户名称" prop="name" width="130px" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <external-contact-name-cell :row="scope.row" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="销售企微昵称" align="center" prop="qwUserName" width="120px"/>
|
|
|
<el-table-column label="企微部门" align="center" prop="departmentName" width="120px"/>
|
|
|
<el-table-column label="用户类别" align="center" prop="type">
|
|
|
@@ -127,12 +131,6 @@
|
|
|
<dict-tag :options="transferStatusOptions" :value="scope.row.transferStatus"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="是否被拉黑" align="center" prop="manageStatusName" width="130px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.manageStatusName || (scope.row.manageStatus === 2 ? '是' : scope.row.manageStatus === 1 ? '否' : '-') }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="拉黑原因" align="center" prop="manageRemark" show-overflow-tooltip />
|
|
|
<el-table-column label="企业id" align="center" prop="corpId" />
|
|
|
<el-table-column label="重粉看课历史" width="140px" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -198,13 +196,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listExternalContact, getExternalContact, updateExternalContact } from "@/api/qw/externalContact";
|
|
|
+import { listExternalContact, updateExternalContact } from "@/api/qw/externalContact";
|
|
|
import PaginationMore from '@/components/PaginationMore/index.vue'
|
|
|
import RepeatCourseHistoryDrawer from './RepeatCourseHistoryDrawer.vue'
|
|
|
+import ExternalContactNameCell from './ExternalContactNameCell.vue'
|
|
|
|
|
|
export default {
|
|
|
name: "ExternalContact",
|
|
|
- components: { PaginationMore, RepeatCourseHistoryDrawer },
|
|
|
+ components: { PaginationMore, RepeatCourseHistoryDrawer, ExternalContactNameCell },
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
@@ -322,24 +321,39 @@ export default {
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
handleUpdate(row) {
|
|
|
+ if (!row.fsUserId) {
|
|
|
+ this.$message.warning("未绑定小程序会员,无法修改拉黑状态");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.reset();
|
|
|
- const id = row.id;
|
|
|
- getExternalContact(id).then(response => {
|
|
|
- this.form = response.data;
|
|
|
- this.form.manageStatus = this.form.manageStatus != null ? Number(this.form.manageStatus) : 1;
|
|
|
- this.open = true;
|
|
|
- this.title = "修改企微客户";
|
|
|
- });
|
|
|
+ this.form = {
|
|
|
+ id: row.id,
|
|
|
+ fsUserId: row.fsUserId,
|
|
|
+ manageStatus: row.manageStatus != null ? Number(row.manageStatus) : 1,
|
|
|
+ manageRemark: row.manageRemark || null
|
|
|
+ };
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改企微客户";
|
|
|
},
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
- if (valid && this.form.id != null) {
|
|
|
- updateExternalContact(this.form).then(() => {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ if (!valid || this.form.id == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.form.fsUserId) {
|
|
|
+ this.$message.warning("未绑定小程序会员,无法修改拉黑状态");
|
|
|
+ return;
|
|
|
}
|
|
|
+ const payload = {
|
|
|
+ id: this.form.id,
|
|
|
+ manageStatus: this.form.manageStatus,
|
|
|
+ manageRemark: this.form.manageRemark
|
|
|
+ };
|
|
|
+ updateExternalContact(payload).then(() => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
}
|