|
@@ -2,6 +2,26 @@
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
<!-- Search Form -->
|
|
<!-- Search Form -->
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
|
|
+ <el-form-item label="项目" prop="projectId">
|
|
|
|
|
+ <el-select v-model="queryParams.projectId" placeholder="请选择项目" clearable size="small" >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in projectOptions"
|
|
|
|
|
+ :key="item.dictValue"
|
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="会员ID" prop="userId">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model="queryParams.userId"
|
|
|
|
|
+ placeholder="请输入会员ID"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="昵称" prop="nickname">
|
|
<el-form-item label="昵称" prop="nickname">
|
|
|
<el-input
|
|
<el-input
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
@@ -74,19 +94,7 @@
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- <!-- 操作按钮区域 -->
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="warning"
|
|
|
|
|
- icon="el-icon-d-arrow-right"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- :disabled="multiple"
|
|
|
|
|
- @click="handleTransfer"
|
|
|
|
|
- v-hasPermi="['company:user:transfer']"
|
|
|
|
|
- >转移</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
+
|
|
|
<!-- Tab Selection -->
|
|
<!-- Tab Selection -->
|
|
|
<!-- <el-tabs v-model="queryParams.tabValue" @tab-click="handleTabChange">-->
|
|
<!-- <el-tabs v-model="queryParams.tabValue" @tab-click="handleTabChange">-->
|
|
|
<!-- <el-tab-pane label="全部" name="0"></el-tab-pane>-->
|
|
<!-- <el-tab-pane label="全部" name="0"></el-tab-pane>-->
|
|
@@ -143,9 +151,14 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
<!-- User Table -->
|
|
<!-- User Table -->
|
|
|
- <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
|
|
|
|
|
+ <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" border>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="ID" align="center" prop="userId" />
|
|
<el-table-column label="ID" align="center" prop="userId" />
|
|
|
|
|
+ <el-table-column label="项目" align="center" prop="projectId">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="昵称" align="center" prop="nickname" />
|
|
<el-table-column label="昵称" align="center" prop="nickname" />
|
|
|
<el-table-column label="头像" align="center" width="80">
|
|
<el-table-column label="头像" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -180,12 +193,19 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="标签" align="center" prop="tag" show-overflow-tooltip />
|
|
<el-table-column label="标签" align="center" prop="tag" show-overflow-tooltip />
|
|
|
<el-table-column label="最后看课时间" align="center" prop="lastWatchDate" width="160" />
|
|
<el-table-column label="最后看课时间" align="center" prop="lastWatchDate" width="160" />
|
|
|
- <el-table-column label="停课天数" align="center" prop="stopWatchDays" />
|
|
|
|
|
|
|
+<!-- <el-table-column label="停课天数" align="center" prop="stopWatchDays" />-->
|
|
|
<el-table-column label="注册时间" align="center" prop="createTime" width="160" />
|
|
<el-table-column label="注册时间" align="center" prop="createTime" width="160" />
|
|
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
|
|
<el-table-column label="所属员工" align="center" prop="companyUserNickName" />
|
|
<el-table-column label="所属员工" align="center" prop="companyUserNickName" />
|
|
|
<el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
|
|
+ v-hasPermi="['store:user:edit']"
|
|
|
|
|
+ >修改</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
@@ -286,35 +306,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <!-- 客户转移对话框 (可选,更复杂的转移逻辑可能需要) -->
|
|
|
|
|
-
|
|
|
|
|
- <el-dialog title="客户转移" :visible.sync="openTransferDialog" width="500px" append-to-body>
|
|
|
|
|
- <el-form ref="transferForm" :model="transferForm" label-width="100px" :rules="cusTransfer">
|
|
|
|
|
- <el-alert
|
|
|
|
|
- title="会经过总后台审核后才进行转移"
|
|
|
|
|
- type="warning">
|
|
|
|
|
- </el-alert>
|
|
|
|
|
- <el-form-item label="转移至销售" prop="targetUserId">
|
|
|
|
|
- <el-select v-model="transferForm.targetUserId" remote placeholder="请选择" filterable clearable>
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="dict in companyUserList"
|
|
|
|
|
- :key="`${dict.nickName} - ${dict.userName}`"
|
|
|
|
|
- :label="`${dict.nickName} - ${dict.userName}`"
|
|
|
|
|
- :value="dict.userId">
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="转移原因" prop="content">
|
|
|
|
|
- <el-input type="textarea" v-model="transferForm.content" placeholder="转移原因"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <p>确定要转移选中的 <strong>{{ ids.length }}</strong> 个客户吗?</p>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
|
- <el-button type="danger" @click="submitTransfer">提交申请</el-button>
|
|
|
|
|
- <el-button @click="cancelTransfer">取 消</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
<el-drawer
|
|
<el-drawer
|
|
|
:with-header="false"
|
|
:with-header="false"
|
|
|
size="75%"
|
|
size="75%"
|
|
@@ -327,7 +318,6 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
|
|
import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
|
|
|
-import {transferUser} from "@/api/users/user";
|
|
|
|
|
import {getUserList} from "@/api/company/companyUser";
|
|
import {getUserList} from "@/api/company/companyUser";
|
|
|
import userDetails from '@/views/store/components/userDetails.vue';
|
|
import userDetails from '@/views/store/components/userDetails.vue';
|
|
|
export default {
|
|
export default {
|
|
@@ -336,7 +326,6 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
show:{
|
|
show:{
|
|
|
-
|
|
|
|
|
open:false,
|
|
open:false,
|
|
|
},
|
|
},
|
|
|
cusTransfer: {
|
|
cusTransfer: {
|
|
@@ -389,7 +378,8 @@ export default {
|
|
|
missCourseStatus: "0",
|
|
missCourseStatus: "0",
|
|
|
continueMissCourseSort: "0",
|
|
continueMissCourseSort: "0",
|
|
|
registerStartTime: null,
|
|
registerStartTime: null,
|
|
|
- registerEndTime: null
|
|
|
|
|
|
|
+ registerEndTime: null,
|
|
|
|
|
+ projectId: null,
|
|
|
},
|
|
},
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
form: {},
|
|
form: {},
|
|
@@ -405,7 +395,8 @@ export default {
|
|
|
status: [
|
|
status: [
|
|
|
{ required: true, message: "状态不能为空", trigger: "change" }
|
|
{ required: true, message: "状态不能为空", trigger: "change" }
|
|
|
]
|
|
]
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ projectOptions: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -418,6 +409,9 @@ export default {
|
|
|
this.getDicts("user_status").then(response => {
|
|
this.getDicts("user_status").then(response => {
|
|
|
this.statusOptions = response.data;
|
|
this.statusOptions = response.data;
|
|
|
});
|
|
});
|
|
|
|
|
+ this.getDicts("sys_course_project").then(response => {
|
|
|
|
|
+ this.projectOptions = response.data;
|
|
|
|
|
+ });
|
|
|
this.getTagOptions();
|
|
this.getTagOptions();
|
|
|
this.getSalesOptions();
|
|
this.getSalesOptions();
|
|
|
},
|
|
},
|
|
@@ -428,29 +422,6 @@ export default {
|
|
|
this.$refs.userDetails.getDetails(row.userId);
|
|
this.$refs.userDetails.getDetails(row.userId);
|
|
|
}, 1);
|
|
}, 1);
|
|
|
},
|
|
},
|
|
|
- /** 提交转移按钮 (如果使用对话框) */
|
|
|
|
|
-
|
|
|
|
|
- submitTransfer() {
|
|
|
|
|
- this.$refs["transferForm"].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- transferUser({
|
|
|
|
|
- userIds: this.ids,
|
|
|
|
|
- targetCompanyUserId: this.transferForm.targetUserId,
|
|
|
|
|
- content: this.transferForm.content
|
|
|
|
|
- }).then(response => {
|
|
|
|
|
- if (response.code === 200) {
|
|
|
|
|
- this.msgSuccess(response.msg);
|
|
|
|
|
- this.openTransferDialog = false;
|
|
|
|
|
- this.getList();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.msgError(response.msg || "转移失败");
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.msgError("转移请求失败");
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
// 重置表单
|
|
// 重置表单
|
|
|
resetForm() {
|
|
resetForm() {
|
|
|
this.linkForm={
|
|
this.linkForm={
|
|
@@ -513,11 +484,11 @@ export default {
|
|
|
|
|
|
|
|
/** 获取销售员工选项 */
|
|
/** 获取销售员工选项 */
|
|
|
getSalesOptions() {
|
|
getSalesOptions() {
|
|
|
- this.salesOptions = [
|
|
|
|
|
- { userId: 1, nickName: "销售A" },
|
|
|
|
|
- { userId: 2, nickName: "销售B" },
|
|
|
|
|
- { userId: 3, nickName: "销售C" }
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ getUserList().then(res=>{
|
|
|
|
|
+ if(res.code === 200) {
|
|
|
|
|
+ this.salesOptions = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/** 获取看课状态类型 */
|
|
/** 获取看课状态类型 */
|
|
@@ -682,7 +653,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 获取项目对应名称 */
|
|
|
|
|
+ getProjectLabel(projectId) {
|
|
|
|
|
+ return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|