|
@@ -38,17 +38,16 @@
|
|
|
<el-form-item label="员工" prop="companyUserName">
|
|
<el-form-item label="员工" prop="companyUserName">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.companyUserName"
|
|
v-model="queryParams.companyUserName"
|
|
|
- placeholder="员工"
|
|
|
|
|
|
|
+ placeholder="所属员工"
|
|
|
clearable
|
|
clearable
|
|
|
size="small"
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
- <el-form-item label="用户ID" prop="userId">
|
|
|
|
|
|
|
+ <el-form-item label="会员ID" prop="userId">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.userId"
|
|
v-model="queryParams.userId"
|
|
|
- placeholder="请输入用户ID"
|
|
|
|
|
|
|
+ placeholder="请输入会员ID"
|
|
|
clearable
|
|
clearable
|
|
|
size="small"
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
@@ -73,6 +72,28 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="营期" prop="courseId">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryParams.periodId"
|
|
|
|
|
+ placeholder="请选择课程"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ remote
|
|
|
|
|
+ :remote-method="remoteMethod"
|
|
|
|
|
+ :loading="loadingPeriod"
|
|
|
|
|
+ @focus="handleFocus"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="dict in periodLists"
|
|
|
|
|
+ :key="dict.periodId"
|
|
|
|
|
+ :label="dict.periodName"
|
|
|
|
|
+ :value="parseInt(dict.periodId)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
<el-form-item label="课程" prop="courseId">
|
|
<el-form-item label="课程" prop="courseId">
|
|
|
<el-select filterable v-model="queryParams.courseId" placeholder="请选择课程" clearable size="small" @change="courseChange(queryParams.courseId)">
|
|
<el-select filterable v-model="queryParams.courseId" placeholder="请选择课程" clearable size="small" @change="courseChange(queryParams.courseId)">
|
|
|
<el-option
|
|
<el-option
|
|
@@ -94,7 +115,7 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
- <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
|
|
|
|
|
|
|
+ <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
|
|
|
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
|
|
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
@@ -134,9 +155,11 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="小节名称" align="center" prop="title" />
|
|
<el-table-column label="小节名称" align="center" prop="title" />
|
|
|
<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="fsNickName" />
|
|
|
<el-table-column label="会员电话" align="center" prop="phone" />
|
|
<el-table-column label="会员电话" align="center" prop="phone" />
|
|
|
- <el-table-column label="所属销售" align="center" prop="companyUserName" />
|
|
|
|
|
|
|
+ <el-table-column label="所属员工" align="center" prop="companyUserName" />
|
|
|
<el-table-column label="所属公司" align="center" prop="companyName" />
|
|
<el-table-column label="所属公司" align="center" prop="companyName" />
|
|
|
|
|
+ <el-table-column label="员工部门" align="center" prop="deptName" />
|
|
|
<el-table-column label="转帐金额" align="center" prop="amount" />
|
|
<el-table-column label="转帐金额" align="center" prop="amount" />
|
|
|
<el-table-column label="状态" align="center" prop="status" >
|
|
<el-table-column label="状态" align="center" prop="status" >
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -162,14 +185,14 @@
|
|
|
<el-form-item label="课程id" prop="courseId">
|
|
<el-form-item label="课程id" prop="courseId">
|
|
|
<el-input v-model="form.courseId" placeholder="请输入课程id" />
|
|
<el-input v-model="form.courseId" placeholder="请输入课程id" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="用户id" prop="userId">
|
|
|
|
|
- <el-input v-model="form.userId" placeholder="请输入用户id" />
|
|
|
|
|
|
|
+ <el-form-item label="会员id" prop="userId">
|
|
|
|
|
+ <el-input v-model="form.userId" placeholder="请输入会员id" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="小节id" prop="videoId">
|
|
<el-form-item label="小节id" prop="videoId">
|
|
|
<el-input v-model="form.videoId" placeholder="请输入小节id" />
|
|
<el-input v-model="form.videoId" placeholder="请输入小节id" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="公司员工id" prop="companyUserId">
|
|
|
|
|
- <el-input v-model="form.companyUserId" placeholder="请输入公司员工id" />
|
|
|
|
|
|
|
+ <el-form-item label="员工id" prop="companyUserId">
|
|
|
|
|
+ <el-input v-model="form.companyUserId" placeholder="请输入员工id" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="公司id" prop="companyId">
|
|
<el-form-item label="公司id" prop="companyId">
|
|
|
<el-input v-model="form.companyId" placeholder="请输入公司id" />
|
|
<el-input v-model="form.companyId" placeholder="请输入公司id" />
|
|
@@ -190,22 +213,22 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { courseList,videoList,listCourseRedPacketLog, getCourseRedPacketLog, delCourseRedPacketLog, addCourseRedPacketLog, updateCourseRedPacketLog, exportCourseRedPacketLog } from "@/api/course/courseRedPacketLog";
|
|
|
|
|
|
|
+import { courseList,videoList,getCourseRedPacketLog, delCourseRedPacketLog, addCourseRedPacketLog, updateCourseRedPacketLog, exportCourseRedPacketLog,listCourseRedPacketLogPage } from "@/api/course/courseRedPacketLog";
|
|
|
import { getCompanyList } from "@/api/company/company";
|
|
import { getCompanyList } from "@/api/company/company";
|
|
|
-import {treeselect} from "../../../api/company/companyDept";
|
|
|
|
|
import SelectTree from '@/components/TreeSelect/index.vue'
|
|
import SelectTree from '@/components/TreeSelect/index.vue'
|
|
|
import { getDeptData } from '@/api/system/employeeStats'
|
|
import { getDeptData } from '@/api/system/employeeStats'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "CourseRedPacketLog",
|
|
name: "CourseRedPacketLog",
|
|
|
- components: { SelectTree },
|
|
|
|
|
|
|
+ components: {SelectTree},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- selectedCompanyList: [],
|
|
|
|
|
companys:[],
|
|
companys:[],
|
|
|
|
|
+ selectedCompanyList: [],
|
|
|
deptList: [],
|
|
deptList: [],
|
|
|
// 遮罩层
|
|
// 遮罩层
|
|
|
- loading: false,
|
|
|
|
|
|
|
+ loading: true,
|
|
|
|
|
+ loadingPeriod: false,
|
|
|
// 导出遮罩层
|
|
// 导出遮罩层
|
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -218,6 +241,7 @@ export default {
|
|
|
showSearch: true,
|
|
showSearch: true,
|
|
|
activeName:"00",
|
|
activeName:"00",
|
|
|
courseLists:[],
|
|
courseLists:[],
|
|
|
|
|
+ periodLists:[],
|
|
|
videoList:[],
|
|
videoList:[],
|
|
|
// 总条数
|
|
// 总条数
|
|
|
total: 0,
|
|
total: 0,
|
|
@@ -227,6 +251,10 @@ export default {
|
|
|
title: "",
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
open: false,
|
|
|
|
|
+ queryPeriod: {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 20
|
|
|
|
|
+ },
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -243,6 +271,7 @@ export default {
|
|
|
phoneMk: null,
|
|
phoneMk: null,
|
|
|
sTime:null,
|
|
sTime:null,
|
|
|
eTime:null,
|
|
eTime:null,
|
|
|
|
|
+ userIds: null
|
|
|
},
|
|
},
|
|
|
createTime:null,
|
|
createTime:null,
|
|
|
// 表单参数
|
|
// 表单参数
|
|
@@ -253,43 +282,82 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
-
|
|
|
|
|
- getDeptData().then(response => {
|
|
|
|
|
- this.deptList = response.data;
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- getCompanyList().then(response => {
|
|
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ getCompanyList().then(response => {
|
|
|
this.companys = response.data;
|
|
this.companys = response.data;
|
|
|
});
|
|
});
|
|
|
courseList().then(response => {
|
|
courseList().then(response => {
|
|
|
this.courseLists = response.list;
|
|
this.courseLists = response.list;
|
|
|
});
|
|
});
|
|
|
|
|
+ getDeptData().then(response => {
|
|
|
|
|
+ this.deptList = response.data;
|
|
|
|
|
+ })
|
|
|
|
|
+ periodList(this.queryPeriod).then(response => {
|
|
|
|
|
+ this.periodLists = response.data;
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
// this.getList();
|
|
// this.getList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- handleClick(tab, event) {
|
|
|
|
|
|
|
+ // 远程搜索方法
|
|
|
|
|
+ async remoteMethod(query) {
|
|
|
|
|
+ this.searchKeyword = query
|
|
|
|
|
+ if (query !== '') {
|
|
|
|
|
+ this.loadingPeriod = true
|
|
|
|
|
+ await this.getPeriodList(query)
|
|
|
|
|
+ this.loadingPeriod = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 如果输入为空,可以清空列表或加载默认数据
|
|
|
|
|
+ this.periodLists = []
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 获取营期列表
|
|
|
|
|
+ async getPeriodList(keyword = '') {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ periodName: keyword, // 搜索关键词
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 50 // 根据需求调整
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const response = await periodList(params)
|
|
|
|
|
+ this.periodLists = response.data.list || response.data || []
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取营期列表失败:', error)
|
|
|
|
|
+ this.periodLists = []
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 下拉框获取焦点时加载数据
|
|
|
|
|
+ async handleFocus() {
|
|
|
|
|
+ if (this.periodLists.length === 0) {
|
|
|
|
|
+ this.getPeriodList();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ handleClick(tab, event) {
|
|
|
this.activeName=tab.name;
|
|
this.activeName=tab.name;
|
|
|
- this.queryParams.status=tab.name
|
|
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ if(tab.name == "00") {
|
|
|
|
|
+ this.queryParams.status = null;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.queryParams.status = tab.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.getList();
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
/** 查询短链课程看课记录列表 */
|
|
/** 查询短链课程看课记录列表 */
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
-
|
|
|
|
|
if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
|
|
if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
|
|
|
- this.queryParams.companyUserIds = this.selectedCompanyList;
|
|
|
|
|
|
|
+ this.queryParams.userIds = this.selectedCompanyList;
|
|
|
}else {
|
|
}else {
|
|
|
- this.queryParams.companyUserIds = [];
|
|
|
|
|
|
|
+ this.queryParams.userIds = [];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- listCourseRedPacketLog(this.queryParams).then(response => {
|
|
|
|
|
- console.log("response",response)
|
|
|
|
|
|
|
+ listCourseRedPacketLogPage(this.queryParams).then(response => {
|
|
|
this.courseRedPacketLogList = response.data.list;
|
|
this.courseRedPacketLogList = response.data.list;
|
|
|
this.total = response.data.total;
|
|
this.total = response.data.total;
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
change(){
|
|
change(){
|
|
|
if(this.createTime!=null){
|
|
if(this.createTime!=null){
|
|
@@ -302,7 +370,6 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
courseChange(row){
|
|
courseChange(row){
|
|
|
-
|
|
|
|
|
if(row==""){
|
|
if(row==""){
|
|
|
this.videoList=[]
|
|
this.videoList=[]
|
|
|
this.queryParams.videoId=null
|
|
this.queryParams.videoId=null
|
|
@@ -345,6 +412,10 @@ export default {
|
|
|
this.createTime=null;
|
|
this.createTime=null;
|
|
|
this.queryParams.sTime=null;
|
|
this.queryParams.sTime=null;
|
|
|
this.queryParams.eTime=null;
|
|
this.queryParams.eTime=null;
|
|
|
|
|
+ this.selectedCompanyList = [];
|
|
|
|
|
+ this.queryParams.pageNum = 1; // Reset to first page
|
|
|
|
|
+ this.queryParams.pageSize = 10; // Reset to default page size
|
|
|
|
|
+ this.queryParams.periodId=null;
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
@@ -403,18 +474,13 @@ export default {
|
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
|
},
|
|
},
|
|
|
- getSubCateList(pid){
|
|
|
|
|
- this.form.subCateId=null;
|
|
|
|
|
- if(pid == ''){
|
|
|
|
|
- this.subCategoryOptions=[];
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- getCateListByPid(pid).then(response => {
|
|
|
|
|
- this.subCategoryOptions = response.data;
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
|
|
+ if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
|
|
|
|
|
+ this.queryParams.userIds = this.selectedCompanyList;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.queryParams.userIds = [];
|
|
|
|
|
+ }
|
|
|
const queryParams = this.queryParams;
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
|
|
this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
@@ -436,7 +502,7 @@ export default {
|
|
|
this.download(response.msg);
|
|
this.download(response.msg);
|
|
|
this.exportLoading = false;
|
|
this.exportLoading = false;
|
|
|
}).catch(() => {}).finally(res=>{
|
|
}).catch(() => {}).finally(res=>{
|
|
|
- this.exportLoading = false;
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|