Commit fca5f56b authored by 黄奎's avatar 黄奎

新增页面

parent 16528502
......@@ -220,24 +220,24 @@ export function getClassOrderLogList(data) {
*
*/
export function quertClassOrderList(data) {
return request({
url: '/order/GetClassOrderList',
method: 'post',
data
})
}
return request({
url: '/order/GetClassOrderList',
method: 'post',
data
})
}
/**
* 学员退课申请
*
*/
export function SetBackClassApply(data) {
return request({
url: '/order/BackClassApply',
method: 'post',
data
})
}
return request({
url: '/order/BackClassApply',
method: 'post',
data
})
}
/**
* 点击获取订单详情
......@@ -262,3 +262,25 @@ export function UpdateOrderCommission(data) {
data
})
}
/**
* 获取续课分页列表
*/
export function queryRenewClass(data) {
return request({
url: '/Stu/GetRenewClass',
method: 'post',
data
})
}
/**
* 保存续费订单
*/
export function saveRenewOrder(data) {
return request({
url: '/Stu/RenewOrder',
method: 'post',
data
})
}
......@@ -7,19 +7,65 @@
<div class="text-h6">退课申请</div>
</q-card-section>
<div style="margin:20px;">
<q-table :loading="loading" no-data-label="暂无相关学员数据" flat class="sticky-column-table" separator="none"
:data="studentList" :columns="columns" hide-bottom row-key="Id">
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div style="min-width:190px;width:100%">
<q-btn v-if="props.row.GuestState==1" flat size="xs" icon="iconfont icon-shenhe" color="info"
style="font-weight:400" class="q-mr-xs" label="申请" @click="clickItem(props.row,1)" />
<q-btn v-if="props.row.AuditStatus==3" flat size="xs" icon="iconfont icon-ziyuan" color="warning"
style="font-weight:400" class="q-mr-xs" label="重新申请" @click="clickItem(props.row,2)" />
</div>
</q-td>
</template>
</q-table>
<table :loading="loading">
<thead>
<tr>
<th width="10%">
姓名
</th>
<th width="10%">
性别
</th>
<th width="10%">
年龄
</th>
<th width="10%">
联系电话
</th>
<th width="10%">
已上课时
</th>
<th width="10%">
状态
</th>
<th width="20%">
操作
</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in studentList" v-if="item.IsShow">
<td>
{{item.GuestName}}
</td>
<td>
{{item.SexStr}}
</td>
<td>
{{item.Age}}
</td>
<td>
{{item.Mobile}}
</td>
<td>
{{item.ClassHours}}
</td>
<td>
{{item.GuestStateStr}}
</td>
<td>
<q-btn v-if="item.GuestState==1" flat size="xs" icon="iconfont icon-shenhe" color="info" class="q-mr-xs"
label="申请" @click="clickItem(item,1)" />
<q-btn v-if="item.AuditStatus==3" flat size="xs" icon="iconfont icon-ziyuan" color="warning"
class="q-mr-xs" label="重新申请" @click="clickItem(item,2)" />
<template v-if="chooseItem&&chooseItem.Id==item.Id">
<q-btn flat size="xs" icon="iconfont icon-shenhe" color="info" class="q-mr-xs" label="取消申请"
@click="cancelApply" />
</template>
</td>
</tr>
</tbody>
</table>
<q-input filled stack-label :dense="false" v-model="applyReason" style="margin-top: 20px" type="textarea"
class="col-12" label="申请理由" />
<q-separator />
......@@ -108,8 +154,23 @@
this.getStudentList();
},
methods: {
//取消申请
cancelApply() {
this.chooseItem = {};
if (this.studentList && this.studentList.length > 0) {
this.studentList.forEach(item => {
item.IsShow = true;
})
}
},
//当前点击项
clickItem(item, type) {
if (this.studentList && this.studentList.length > 0) {
this.studentList.forEach(item => {
item.IsShow = false;
})
}
item.IsShow = true;
this.chooseItem = item;
},
//关闭弹窗
......@@ -132,6 +193,14 @@
},
//获取学员退课申请
saveOrderBackClass() {
if (!this.chooseItem) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择要申请的学员`
})
return;
}
var applyMsg = {
GuestId: this.chooseItem.Id,
OrderId: this.chooseItem.OrderId,
......
<!--续课-->
<template>
<q-dialog v-model="IsShowContinueClassDialog" content-class="bg-grey-1" persistent transition-show="scale"
transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">续课申请</div>
</q-card-section>
<div style="margin:20px;">
<table>
<thead>
<tr>
<th width="10%">
姓名
</th>
<th width="10%">
性别
</th>
<th width="10%">
年龄
</th>
<th width="10%">
联系电话
</th>
<th width="10%">
已上课时
</th>
<th width="10%">
状态
</th>
<th width="20%">
操作
</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in studentList" v-if="item.IsShow">
<td>
{{item.GuestName}}
</td>
<td>
{{item.SexStr}}
</td>
<td>
{{item.Age}}
</td>
<td>
{{item.Mobile}}
</td>
<td>
{{item.ClassHours}}
</td>
<td>
{{item.GuestStateStr}}
</td>
<td>
<q-btn v-if="item.GuestState==1" flat size="xs" icon="iconfont icon-shenhe" color="info" class="q-mr-xs"
label="续费" @click="clickItem(item)" />
<template v-if="chooseItem&&chooseItem.Id==item.Id">
<q-btn flat size="xs" icon="iconfont icon-shenhe" color="info" class="q-mr-xs" label="取消续费"
@click="cancelApply" />
</template>
</td>
</tr>
</tbody>
</table>
<q-card-section>
<div class="text-h6">课程列表</div>
</q-card-section>
<table>
<tbody>
<template v-for="(cItem,cIndex) in calssData">
<tr>
<td width="20%">
{{cItem.ClassName}}
<br>
{{cItem.CourseName}}
<br>
{{cItem.ClassHours}}
</td>
<td width="20%">
代课老师 {{cItem.TeacherName}}
<br>
上课教师 {{cItem.RoomName}}
<br>
开班时间 {{cItem.OpenTime}}
</td>
<td width="20%">
价格
<br>
续费价格 {{cItem.SellPrice}}
<br>
<template v-if="cItem.ClassStepPriceList&&cItem.ClassStepPriceList.length>0">
更多优惠价格
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"></span>
<q-popup-proxy>
<q-banner>
<div class="price-popup">
<div class="price-popup-item" v-for="(x,index2) in cItem.ClassStepPriceList" :key="index2"
style="margin: 5px 0">
<span style="color: #2D2D2D;font-weight: bold">{{x.PersionNum}}人报名<span
style="color:#2860FB;margin-left: 15px">{{x.PersionPrice.toFixed(2)}}</span></span>
</div>
</div>
</q-banner>
</q-popup-proxy>
</template>
</td>
<td width="20%">
招生信息
<br>
计划招收 {{cItem.ClassPersion}}
<br>
已招收 {{cItem.OrderStudentCount}}
</td>
<td rowspan="2" width="20%">
<a style="cursor:pointer" @click="clickClassItem(cItem)">选择此班</a>
</td>
</tr>
<tr>
<td colspan="4">
OP备注 {{cItem.InnerRemark}}
</td>
</tr>
</template>
</tbody>
</table>
<q-input filled stack-label :dense="false" v-model="SaleRemark" style="margin-top: 20px" type="textarea"
class="col-12" label="销售备注" />
<q-separator />
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeContinueClassForm" />
<q-btn label="确认续费" color="accent" class="q-px-md" style="font-weight:400 !important" @click="setRenewOrder" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
getOrderGuestPageList,
saveRenewOrder,
queryRenewClass
} from '../../api/sale/sale'
export default {
name: "backclass-form",
props: {
saveObj: {
type: Object,
default: null,
},
},
data() {
return {
IsShowContinueClassDialog: true,
continueClassMsg: {
OrderId: 0,
ClassId: 0,
pageIndex: 1,
pageSize: 1000,
GuestState: 1,
},
SaleRemark: "", //申请理由
loading: false,
studentList: [], //学员列表
chooseItem: {}, //当前选择项
classMsg: {
pageIndex: 1, //当前页码
pageSize: 5, //每页显示条数
rowsPerPage: 5,
School_Id: 0, //校区
ClassType: 0, //班级类型
StartTime: "", //开课开始时间
EndTime: "", //开课结束时间
TeacherName: "", //教师姓名
CouseId: 0, //课程编号
ClassId: 0, //原班级编号
},
classPageCount: 0,
calssData: [],
classItem: {}, //当前点击的班级
}
},
created() {
this.continueClassMsg.OrderId = this.saveObj.OrderId;
this.continueClassMsg.ClassId = this.saveObj.ClassId;
this.classMsg.ClassId = this.saveObj.ClassId;
this.getStudentList();
},
methods: {
//取消申请
cancelApply() {
this.chooseItem = {};
if (this.studentList && this.studentList.length > 0) {
this.studentList.forEach(item => {
item.IsShow = true;
})
}
},
//当前点击项
clickItem(item) {
if (this.studentList && this.studentList.length > 0) {
this.studentList.forEach(item => {
item.IsShow = false;
})
}
item.IsShow = true;
this.chooseItem = item;
this.getRenewClassList();
},
//关闭弹窗
closeContinueClassForm() {
this.IsShowContinueClassDialog = false;
this.SaleRemark = "";
this.continueClassMsg.OrderId = 0;
this.continueClassMsg.ClassId = 0;
this.chooseItem = {};
this.$emit('close');
},
//获取订单学员列表
getStudentList() {
this.studentList = [];
getOrderGuestPageList(this.continueClassMsg).then(res => {
if (res.Code == 1) {
this.studentList = res.Data.PageData;
}
})
},
//获取续课列表
getRenewClassList() {
queryRenewClass(this.classMsg).then(res => {
if (res.Code == 1) {
this.classPageCount = res.Data.PageCount;
this.calssData = res.Data.PageData;
}
})
},
clickClassItem(cItem) {
this.classItem = cItem;
},
//确认续费
setRenewOrder() {
if (!this.classItem) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择要续费的班级`
})
return;
}
var Class_Price = this.classItem.SellPrice; //单价
var PreferPrice = this.classItem.SellPrice;; //应收
if (this.classItem.ClassStepPriceList && this.classItem.ClassStepPriceList.length > 0) {
this.classItem.ClassStepPriceList.forEach(item => {
if (item.PersionNum == 1) {
Class_Price = item.PersionPrice;
PreferPrice = item.PersionPrice;
}
});
}
var applyMsg = {
GuestId: this.chooseItem.Id,
OrderId: this.chooseItem.OrderId,
SaleRemark: this.SaleRemark,
ClassId: this.classItem.ClassId,
Class_Price: Class_Price,
PreferPrice: PreferPrice,
};
if (!applyMsg.GuestId) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择要申请的学员`
})
return;
}
saveRenewOrder(applyMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '续费成功!',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
this.IsShowContinueClassDialog = false
}
})
}
}
}
</script>
<!--订单列表-->
<template>
<div class="classorder">
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0" style="">
......@@ -117,7 +118,7 @@
<q-item-label @click="showBackClassForm(item)">退课</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-close-popup v-if="isShowClass" style="display:none;">
<q-item clickable v-close-popup v-close-popup v-if="isShowClass">
<q-item-section>
<q-item-label @click="showContinueClass(item)">续课</q-item-label>
</q-item-section>
......@@ -499,6 +500,10 @@
<!-- 修改提成和额外奖励 -->
<money-form v-if="isShowMoney" :data="moneyObj" :type="CommonType" @close="closeMoneyForm" @success="refreshMoney">
</money-form>
<!--续课申请-->
<continueclass-form v-if="isShowContinueClass" :save-obj="orderObj" @close="closeContinueClassForm"
@success="refreshClassOrder"></continueclass-form>
</div>
</template>
......@@ -508,12 +513,13 @@
import transOrderForm from '../sale/transOrder-form' //转交订单
import backclassForm from '../sale/backclass-form' //退课申请
import moneyForm from '../sale/money-form' //修改提成和额外奖励
import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form';
import continueclassForm from '../sale/continueclass-form' //续课申请
import {
cancelClassOrder, //取消订单
} from '../../api/sale/sale'
import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form';
import {
queryEmployee //员工列表
} from '../../api/users/user'
......@@ -525,7 +531,8 @@
myOrderForm,
classinfoForm,
backclassForm,
moneyForm
moneyForm,
continueclassForm
},
props: {
//正常订单
......@@ -566,7 +573,6 @@
}
},
created() {
this.Employee()
},
mounted() {},
......@@ -587,6 +593,11 @@
this.orderObj = item;
this.isShowContinueClass = true;
},
//关闭续课申请
closeContinueClassForm() {
this.orderObj = {};
this.isShowContinueClass = false;
},
//显示退课申请
showBackClassForm(item) {
this.orderObj = item;
......
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