Commit 2474dc99 authored by 黄奎's avatar 黄奎

页面修改

parent b399b1db
<template>
<div class="b2bcustomer">
<div class="full-width flex no-wrap items-center q-mb-sm">
<q-tabs
v-model="msg.StuStage"
active-color="primary"
dense
outside-arrows
align="left"
style="width:70%"
@input="getStudent"
>
<q-tab
v-for="(item, index) in stagelist"
:key="index"
:name="item.StuStage"
>
<q-tabs v-model="msg.StuStage" active-color="primary" dense outside-arrows align="left" style="width:70%"
@input="getStudent">
<q-tab v-for="(item, index) in stagelist" :key="index" :name="item.StuStage">
{{ item.StuStageName }}({{ item.StuNum }})
</q-tab>
</q-tabs>
<q-input
outlined
dense
v-model="msg.StuName"
label="昵称"
@input="getStudent"
/>
<q-input outlined dense v-model="msg.StuName" label="昵称" @input="getStudent" />
</div>
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table"
separator="none"
:data="list"
:columns="columns"
row-key="Id"
>
<!-- <template v-slot:body-cell-StuIcon="props">
<q-td auto-width :props="props">
<q-avatar size="md" v-if="props.value">
<img :src="props.value" />
</q-avatar>
<q-avatar
size="md"
color="teal-10"
text-color="white"
v-if="!props.value"
>
{{ props.row.StuName.substring(0, 1) }}</q-avatar
>
</q-td>
</template> -->
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" :data="list" :columns="columns" row-key="Id">
<template v-slot:body-cell-StuName="props">
<q-td :props="props">
<div class="text-blue cursor-pointer" @click="getStuRight(props.row)">
......@@ -61,204 +21,181 @@
</template>
<template v-slot:body-cell-StuSex="props">
<q-td :props="props">
<q-badge
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 1 ? '女' : '男'"
/>
<q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 1 ? '女' : '男'" />
</q-td>
</template>
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-toggle
size="md"
color="primary"
:false-value="1"
:true-value="0"
v-model="props.row.Status"
title="注意:关闭后,学员将无法正常使用."
@input="deleteStudentInfo(props.row)"
/>
<q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status"
title="注意:关闭后,学员将无法正常使用." @input="deleteStudentInfo(props.row)" />
</q-td>
</template>
<template v-slot:bottom>
<q-pagination
class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
<stuDetail
v-if="isShowStuRight"
:save-obj="stuOption"
@close="closeStuForm"
></stuDetail>
<stuDetail v-if="isShowStuRight" :save-obj="stuOption" @close="closeStuForm"></stuDetail>
</div>
</template>
<script>
import { getStudentPage } from "../../../api/school";
import { getCustomerStuStageStatistics } from "../../../api/sale/peemanagement";
import stuDetail from "../../../components/school/student/studentRight-form";
export default {
components: {
stuDetail
},
props: {
Id: {
type: Number,
default: 0
}
},
data() {
return {
loading: false,
list: [],
pageCount: 0,
columns: [
// {
// name: "StuIcon",
// label: "",
// field: "StuIcon",
// align: "left"
// },
{
name: "StuName",
required: true,
label: "昵称",
align: "left",
field: row => row.StuName
},
{
name: "StuSex",
label: "性别",
field: "StuSex",
align: "left"
},
{
name: "StuBirthStr",
label: "出生日期",
field: "StuBirthStr",
align: "left"
},
{
name: "StuTel",
label: "手机号码",
field: "StuTel",
align: "left"
},
{
name: "CreateTypeStr",
label: "客户来源",
field: "CreateTypeStr",
align: "left"
},
{
name: "StuStageName",
label: "客户阶段",
field: "StuStageName",
align: "left"
import {
getStudentPage
} from "../../../api/school";
import {
getCustomerStuStageStatistics
} from "../../../api/sale/peemanagement";
import stuDetail from "../../../components/school/student/studentRight-form";
export default {
components: {
stuDetail
},
props: {
Id: {
type: Number,
default: 0
}
},
data() {
return {
loading: false,
list: [],
pageCount: 0,
columns: [
{
name: "StuName",
required: true,
label: "昵称",
align: "left",
field: row => row.StuName
},
{
name: "StuSex",
label: "性别",
field: "StuSex",
align: "left"
},
{
name: "StuBirthStr",
label: "出生日期",
field: "StuBirthStr",
align: "left"
},
{
name: "StuTel",
label: "手机号码",
field: "StuTel",
align: "left"
},
{
name: "CreateTypeStr",
label: "客户来源",
field: "CreateTypeStr",
align: "left"
},
{
name: "StuStageName",
label: "客户阶段",
field: "StuStageName",
align: "left"
},
{
name: "CreateTimeStr",
label: "创建时间",
field: "CreateTimeStr",
align: "left"
}
],
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
StuName: "",
StuTel: "",
Status: "-1",
School_Id: 0,
CustomerId: 0,
StuStage: 0
},
{
name: "CreateTimeStr",
label: "创建时间",
field: "CreateTimeStr",
align: "left"
}
// {
// name: "CreateByName",
// label: "负责人",
// align: "left",
// field: "CreateByName"
// }
],
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
StuName: "",
StuTel: "",
Status: "-1",
School_Id: 0,
CustomerId: 0,
StuStage: 0
stagelist: [],
stuOption: {},
isShowStuRight: false
};
},
methods: {
getStudent() {
this.msg.CategoryId = this.Id;
this.loading = true;
getStudentPage(this.msg)
.then(res => {
this.loading = false;
this.list = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
},
stagelist: [],
stuOption: {},
isShowStuRight: false
};
},
methods: {
getStudent() {
this.msg.CustomerId = this.Id;
this.loading = true;
getStudentPage(this.msg)
.then(res => {
this.loading = false;
this.list = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
getStage() {
getCustomerStuStageStatistics({
CategoryId: this.Id
}).then(res => {
this.stagelist = res.Data;
const total = res.Data.reduce((pre, cur) => {
return cur.StuNum + pre;
}, 0);
const obj = {
StuStage: 0,
StuStageName: "全部",
StuNum: total
};
this.stagelist.unshift(obj);
});
},
changePage(val) {
this.msg.pageIndex = val;
this.getStudent();
},
closeStuForm() {
this.isShowStuRight = false;
},
//点击学生姓名弹出
getStuRight(obj) {
if (obj) {
this.stuOption = obj;
} else {
this.stuOption = {};
}
this.isShowStuRight = true;
}
},
getStage() {
getCustomerStuStageStatistics({ CustomerId: this.Id }).then(res => {
this.stagelist = res.Data;
const total = res.Data.reduce((pre, cur) => {
return cur.StuNum + pre;
}, 0);
const obj = {
StuStage: 0,
StuStageName: "全部",
StuNum: total
};
this.stagelist.unshift(obj);
});
},
changePage(val) {
this.msg.pageIndex = val;
mounted() {
this.getStudent();
},
closeStuForm() {
this.isShowStuRight = false;
},
//点击学生姓名弹出
getStuRight(obj) {
if (obj) {
this.stuOption = obj;
} else {
this.stuOption = {};
}
this.isShowStuRight = true;
this.getStage();
}
},
mounted() {
this.getStudent();
this.getStage();
}
};
};
</script>
<style lang="scss">
.b2bcustomer ::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.b2bcustomer ::-webkit-scrollbar-track {
background: #fff;
border-radius: 2px;
}
.b2bcustomer ::-webkit-scrollbar-thumb {
background: #444;
border-radius: 10px;
}
.b2bcustomer ::-webkit-scrollbar-thumb:hover {
background: #999;
}
.b2bcustomer ::-webkit-scrollbar-corner {
background: #204754;
}
</style>
.b2bcustomer ::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.b2bcustomer ::-webkit-scrollbar-track {
background: #fff;
border-radius: 2px;
}
.b2bcustomer ::-webkit-scrollbar-thumb {
background: #444;
border-radius: 10px;
}
.b2bcustomer ::-webkit-scrollbar-thumb:hover {
background: #999;
}
.b2bcustomer ::-webkit-scrollbar-corner {
background: #204754;
}
</style>
\ No newline at end of file
......@@ -2,15 +2,7 @@
<div class=" myOrder q-pb-lg">
<div class="row q-my-xs">
<div class="col-6">
<q-input
@input="resetSearch"
clearable
filled
v-model="msg.OrderId"
label="订单号"
dense
maxlength="10"
/>
<q-input @input="resetSearch" clearable filled v-model="msg.OrderId" label="订单号" dense maxlength="10" />
</div>
</div>
<div class="row wrap q-gutter-xs q-my-xs" v-if="data.Statistics">
......@@ -39,392 +31,223 @@
</div>
<div style="width:100%;overflow:auto">
<orderlist
:dataList="data.List"
:authObj="authObj"
@success="refreshClassOrder"
:modityOrderType="3"
ref="orderL"
>
<orderlist :dataList="data.List" :authObj="authObj" @success="refreshClassOrder" :modityOrderType="3"
ref="orderL">
</orderlist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination
v-model="msg.pageIndex"
:max="pageCount"
@input="changePage"
class="full-width justify-end"
color="primary"
:input="true"
>
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
color="primary" :input="true">
</q-pagination>
</div>
</div>
<classinfo-form
v-if="isShowClassInfo"
:seting-obj="classObjOption"
@close="closeClass"
@success="refreshClassOrder"
>
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass"
@success="refreshClassOrder">
</classinfo-form>
</div>
</template>
<script>
import {
getMyOrderStatisticsPageList, //获取订单列表
getOrderStateEnumList //订单状态
} from "../../../api/sale/sale";
import {
queryCourseDropdownList,
getCourseSubject
} from "../../../api/course/index";
import myOrderForm from "../../../components/sale/myOrder-form";
import classinfoForm from "../../../components/course/classinfo-form";
import orderlist from "./b2bOrderlist";
import { queryEmployee } from "../../../api/users/user";
import { EduDownLoad } from "../../../api/common/common";
export default {
props: {
Id: {
type: Number,
default: 0
}
},
components: {
myOrderForm,
classinfoForm,
orderlist
},
data() {
return {
dialog: false,
data: {},
loading: false,
dateList: [], //报名时间
dateList2: [], //开班时间
msg: {
pageIndex: 1,
pageSize: 8,
OrderId: "", //订单号
GuestName: "", //客人名称
ClassName: "", //班级名称
CouseId: 0, //课程id
StartTime: "", //报名开始时间
EndTime: "", //报名结束时间
OPStartTime: "", //开班开始时间
OPEndTime: "", //开班结束时间
Q_NotCollect: "0", //查询未收齐 1是 0否
OrderState: 0, //订单状态 枚举
Q_OrderState: 1, //查询 1正常订单 2取消订单 (默认传1 如果 选择了订单状态 则传 0)
Q_OrderBy: 2, //写死 =2
PlatformTax: 0, //平台税金
EnterID: "", //业务员id
ClassNo: "", //班号
HelpEnterId: "", //关联教师
CourseSubject: "", //所属科目
CustomerId: 0
},
//订单状态
OrderStateList: [],
pageCount: 0,
CourseList: [], //关联课程下拉数据
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
showone: false,
//权限判断
authObj: {
isShowGuestBtn: 0, //显示新增学员名单按钮
isShowFinanceBtn: false, //显示财务单据按钮
isShowTransOrder: false, //显示转交订单按钮
isShowSaleRemark: false, //显示修改销售备注
isShowBackClass: false, //显示退课按钮
isShowRenewClass: false, //显示续课按钮
isShowEdit: false, //不显示修改按钮
isShowBackClass: false, //不显示退课
isShowRenewClass: false //不显示续课
},
EmployeeList: [], //业务员
AllemployeeList: [],
TeacherList: [], //关联教师
AllTeacherList: [],
CourseSubjectList: [] //科目列表
};
},
created() {
if (this.$route.query.OrderId) {
this.msg.OrderId = this.$route.query.OrderId;
}
// let nowDay = new Date();
// var year = nowDay.getFullYear(); //年
// var month = nowDay.getMonth() + 1; //月
// var day = nowDay.getDate(); //日
// var currentDay = year + '-' + month + '-' + day;
// this.msg.StartTime = currentDay
// if (this.$route.query.StartTime) {
// this.msg.StartTime = this.$route.query.StartTime + '-01';
// }
// if (this.$route.query.EndTime) {
// this.msg.EndTime = this.$route.query.EndTime + '-01';
// }
if (this.$route.query.EnterID) {
this.msg.EnterID = Number(this.$route.query.EnterID);
}
if (this.$route.query.ClassName) {
this.msg.ClassName = decodeURI(this.$route.query.ClassName);
}
this.queryCourseSubject();
this.getOrderState();
this.getCourseList();
},
mounted() {
this.getList();
this.getEmployee(0);
this.getglteacher();
},
methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
});
},
//订单状态
getOrderState() {
getOrderStateEnumList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
Id: 0,
Name: "不限"
});
this.OrderStateList = tempArray;
}
});
},
//获取课程
getCourseList() {
queryCourseDropdownList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
CourseId: 0,
CourseName: "不限"
});
this.CourseList = tempArray;
}
});
},
//翻页
changePage(val) {
if (this.showone == true) {
this.msg.pageIndex = val;
this.getList();
} else {
this.showone = true;
import {
getMyOrderStatisticsPageList, //获取订单列表
getOrderStateEnumList //订单状态
} from "../../../api/sale/sale";
import {
queryCourseDropdownList,
getCourseSubject
} from "../../../api/course/index";
import myOrderForm from "../../../components/sale/myOrder-form";
import classinfoForm from "../../../components/course/classinfo-form";
import orderlist from "./b2bOrderlist";
import {
queryEmployee
} from "../../../api/users/user";
import {
EduDownLoad
} from "../../../api/common/common";
export default {
props: {
Id: {
type: Number,
default: 0
}
},
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
components: {
myOrderForm,
classinfoForm,
orderlist
},
//获取菜单分页列表
getList() {
// if (this.dateList && this.dateList.length > 0) {
// this.msg.StartTime = this.dateList[0];
// this.msg.EndTime = this.dateList[1];
// } else {
// this.msg.StartTime = '';
// this.msg.EndTime = '';
// }
if (this.dateList2 && this.dateList2.length > 0) {
this.msg.OPStartTime = this.dateList2[0];
this.msg.OPEndTime = this.dateList2[1];
} else {
this.msg.OPStartTime = "";
this.msg.OPEndTime = "";
}
this.msg.CustomerId = this.Id;
let msg = JSON.parse(JSON.stringify(this.msg));
if (msg.OrderId == "" || msg.OrderId == null) {
msg.OrderId = 0;
}
this.loading = true;
getMyOrderStatisticsPageList(msg)
.then(res => {
this.data = res.Data.PageData;
let OrderIds = [];
this.data.List.forEach(x => {
OrderIds.push(x.OrderId);
});
this.loading = false;
OrderIds = OrderIds.join(",");
if (this.data.List.length > 0) {
this.$refs.orderL.getOrderFinanceList(OrderIds, 1);
}
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
data() {
return {
dialog: false,
data: {},
loading: false,
dateList: [], //报名时间
dateList2: [], //开班时间
msg: {
pageIndex: 1,
pageSize: 8,
OrderId: "", //订单号
GuestName: "", //客人名称
ClassName: "", //班级名称
CouseId: 0, //课程id
StartTime: "", //报名开始时间
EndTime: "", //报名结束时间
OPStartTime: "", //开班开始时间
OPEndTime: "", //开班结束时间
Q_NotCollect: "0", //查询未收齐 1是 0否
OrderState: 0, //订单状态 枚举
Q_OrderState: 1, //查询 1正常订单 2取消订单 (默认传1 如果 选择了订单状态 则传 0)
Q_OrderBy: 2, //写死 =2
PlatformTax: 0, //平台税金
EnterID: "", //业务员id
ClassNo: "", //班号
HelpEnterId: "", //关联教师
CourseSubject: "", //所属科目
CustomerId: 0,
CategoryId: 0,
},
//订单状态
OrderStateList: [],
pageCount: 0,
CourseList: [], //关联课程下拉数据
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
showone: false,
//权限判断
authObj: {
isShowGuestBtn: 0, //显示新增学员名单按钮
isShowFinanceBtn: false, //显示财务单据按钮
isShowTransOrder: false, //显示转交订单按钮
isShowSaleRemark: false, //显示修改销售备注
isShowBackClass: false, //显示退课按钮
isShowRenewClass: false, //显示续课按钮
isShowEdit: false, //不显示修改按钮
isShowBackClass: false, //不显示退课
isShowRenewClass: false //不显示续课
},
};
},
//刷新页面
refreshClassOrder() {
created() {},
mounted() {
this.getList();
},
getClassInfo(obj) {
//打开班级详情组件
this.classObjOption = obj;
this.isShowClassInfo = true;
},
//关闭班级信息弹窗
closeClass() {
this.isShowClassInfo = false;
},
getglteacher() {
var qMsg = {
AccountTypeStr: 2
};
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
let obj = {
Id: "",
EmployeeName: "不限"
};
this.TeacherList.unshift(obj);
this.AllTeacherList = JSON.parse(JSON.stringify(this.TeacherList));
}
});
},
//筛选关联老师
filterFn3(val, update) {
update(() => {
if (val === "") {
this.TeacherList = JSON.parse(JSON.stringify(this.AllTeacherList));
methods: {
//翻页
changePage(val) {
if (this.showone == true) {
this.msg.pageIndex = val;
this.getList();
} else {
const needle = val.toLowerCase();
this.TeacherList = this.AllTeacherList.filter(
v => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
this.showone = true;
}
});
},
//业务员
getEmployee(id) {
var qMsg = {
Dept_Id: 0
};
qMsg.Dept_Id = id;
queryEmployee(qMsg)
.then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
let obj = {
Id: "",
EmployeeName: "不限"
};
this.EmployeeList.unshift(obj);
this.AllemployeeList = JSON.parse(
JSON.stringify(this.EmployeeList)
);
}
})
.catch(() => {});
},
//筛选业务员
filterFn2(val, update) {
update(() => {
if (val === "") {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList));
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(
v => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
},
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//获取菜单分页列表
getList() {
this.msg.CategoryId = this.Id;
let msg = JSON.parse(JSON.stringify(this.msg));
if (msg.OrderId == "" || msg.OrderId == null) {
msg.OrderId = 0;
}
});
},
goexport() {
//导出
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/order/GetOrderPageListStatisticsToExcel",
msg,
"订单列表.xls"
);
this.loading = true;
console.log("msg",msg);
getMyOrderStatisticsPageList(msg)
.then(res => {
this.data = res.Data.PageData;
let OrderIds = [];
this.data.List.forEach(x => {
OrderIds.push(x.OrderId);
});
this.loading = false;
OrderIds = OrderIds.join(",");
if (this.data.List.length > 0) {
this.$refs.orderL.getOrderFinanceList(OrderIds, 1);
}
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
},
//刷新页面
refreshClassOrder() {
this.getList();
},
getClassInfo(obj) {
//打开班级详情组件
this.classObjOption = obj;
this.isShowClassInfo = true;
},
//关闭班级信息弹窗
closeClass() {
this.isShowClassInfo = false;
},
}
}
};
};
</script>
<style scoped>
li {
list-style-type: none;
}
li {
list-style-type: none;
}
.myOrder ul {
padding: 0px;
}
.myOrder ul {
padding: 0px;
}
.myOrder .price-popup {
border-radius: 4px;
}
.myOrder .price-popup {
border-radius: 4px;
}
.myOrder .el-range-editor .el-range-input {
background: transparent;
}
.myOrder .el-range-editor .el-range-input {
background: transparent;
}
.myOrder .el-range-editor.el-input__inner {
background-color: transparent;
}
.myOrder .el-range-editor.el-input__inner {
background-color: transparent;
}
.myOrder .q-mb-md {
margin-bottom: 0;
}
.myOrder .q-mb-md {
margin-bottom: 0;
}
.myOrder .stics {
padding: 5px 10px;
background: #dddee0;
border-radius: 4px;
font-size: 14px;
color: #000000;
font-weight: bold;
white-space: nowrap;
}
.myOrder .stics {
padding: 5px 10px;
background: #dddee0;
border-radius: 4px;
font-size: 14px;
color: #000000;
font-weight: bold;
white-space: nowrap;
}
.myOrder .stics .stics-name {
color: #2d2d2d;
font-weight: 600;
margin-right: 10px;
}
.myOrder .stics .stics-name {
color: #2d2d2d;
font-weight: 600;
margin-right: 10px;
}
.myOrder .tis {
margin: 10px 0;
align-items: center;
}
.myOrder .tis {
margin: 10px 0;
align-items: center;
}
.myOrder .tis .tis-k {
width: 10px;
height: 10px;
margin-right: 8px;
}
.myOrder .tis .tis-k {
width: 10px;
height: 10px;
margin-right: 8px;
}
.myOrder .tis span {
font-size: 14px;
color: #2d2d2d;
font-weight: 600;
margin-right: 20px;
}
.myOrder .tis span {
font-size: 14px;
color: #2d2d2d;
font-weight: 600;
margin-right: 20px;
}
.myOrder .el-input__inner {
border: none !important;
background: transparent !important;
}
</style>
.myOrder .el-input__inner {
border: none !important;
background: transparent !important;
}
</style>
\ No newline at end of file
......@@ -109,7 +109,7 @@
"QQ",
"WeChatNo",
],
tabCheck: 1,
tabCheck: 2,
//审核状态列表
ApproveStateList: [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment