Commit 1f9b468f authored by 黄奎's avatar 黄奎

样式调整

parent 9763c0ec
<template>
<div class="page-content"
:class="[$q.platform.is.desktop?'':'']">
<div class="page-content" :class="[$q.platform.is.desktop?'':'']">
<q-table v-if="$q.platform.is.desktop" :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
:visible-columns="visibleColumns" row-key="name">
<template v-slot:top>
<div class="q-table__title"
:class="[$q.platform.is.desktop?'col-2':'col-12']">试听开课管理</div>
<div class="q-table__title" :class="[$q.platform.is.desktop?'col-2':'col-12']">试听开课管理</div>
<q-space />
</template>
<template v-slot:body-cell-ReservationDate="props">
<q-td>
......@@ -41,12 +38,8 @@
</template>
</q-table>
<template v-if="$q.platform.is.mobile">
<q-card
class="light-shadow q-pa-md bg-grey-1 rounded-borders q-mb-md"
flat
v-for="(x, index) in data"
:key="index"
>
<q-card class="light-shadow q-pa-md bg-grey-1 rounded-borders q-mb-md" flat v-for="(x, index) in data"
:key="index">
<div class="row justify-between">
<div>学生:<span class="text-blue-5">{{x.StuName}}</span></div>
<div>试听日期:<span class="text-blue-5">{{timeFormatSeconds(x.ReservationDate)}}</span></div>
......@@ -67,8 +60,8 @@
</div>
</div>
<div class="row justify-end">
<q-btn label="修改" color="primary" flat @click="editVisitor(x)"/>
<q-btn label="删除" color="red-6" flat @click="DeleteVisitorReserve(x.Id)"/>
<q-btn label="修改" color="primary" flat @click="editVisitor(x)" />
<q-btn label="删除" color="red-6" flat @click="DeleteVisitorReserve(x.Id)" />
</div>
</q-card>
</template>
......@@ -103,8 +96,7 @@
},
data() {
return {
columns: [
{
columns: [{
name: 'StuName',
label: '学生名称',
align: 'left',
......@@ -161,7 +153,7 @@
],
//表格可见列
visibleColumns: [
'StuName','ReservationDate', 'Demand', 'ClassDateStr', 'TeacherName', 'LessonName', 'RoomName', 'TeacherId'
'StuName', 'ReservationDate', 'Demand', 'ClassDateStr', 'TeacherName', 'LessonName', 'RoomName', 'TeacherId'
], //可见列
reserveObj: {},
isShowReserve: false,
......@@ -181,10 +173,10 @@
},
methods: {
//获得年月日时分秒
//传入日期//例:2020-10-27T14:36:23
timeFormatSeconds(time,type) {
let timeStr="";
if(time==='0001-01-01T00:00:00'){
//传入日期//例:2020-10-27T14:36:23
timeFormatSeconds(time, type) {
let timeStr = "";
if (time === '0001-01-01T00:00:00') {
return timeStr;
}
var d = time ? new Date(time) : new Date();
......@@ -193,19 +185,19 @@
var day = d.getDate();
if (month < 10) month = '0' + month;
if (day < 10) day = '0' + day;
if(type==2){
if (type == 2) {
var hours = d.getHours();
var min = d.getMinutes();
var seconds = d.getSeconds();
if (hours < 0) hours = '0' + hours;
if (min < 10) min = '0' + min;
if (seconds < 10) seconds = '0' + seconds;
timeStr+= ' ' + hours + ':' + min + ':' + seconds;
timeStr += ' ' + hours + ':' + min + ':' + seconds;
}
timeStr=year + '-' + month + '-' + day +timeStr;
return timeStr;
},
timeStr = year + '-' + month + '-' + day + timeStr;
return timeStr;
},
//编辑试听
editVisitor(obj) {
this.reserveObj = obj
......@@ -250,7 +242,9 @@ return timeStr;
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -82,11 +82,8 @@
<q-card-actions align="right" class="bg-white q-mx-md ">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" v-close-popup />
<q-btn @click="$refs.stepper.previous()" color="primary" label="上一步" v-if="step > 1" />
<!-- <template v-if="mode == 3 && step == 2">
<q-btn label="保存" color="primary" @click="saveCourseForm" />
</template>
<template v-else>-->
<template >
<template>
<q-btn @click="next" color="primary" label="下一步" v-if="step < 3" />
<q-btn label="保存" color="primary" :loading="loading1" @click="saveOrderForm" v-if="step == 3" />
</template>
......@@ -97,25 +94,24 @@
</template>
<script>
import {
import {
getClassPruductList, //获取日语培训列表
setClassOrder, //新增 修改订单
getOrderGuestRenewState
} from "../../../api/sale/sale";
import {
} from "../../../api/sale/sale";
import {
getSchoolDropdown, //获取校区列表
getTeacherDropDownList
} from "../../../api/school/index";
import {
} from "../../../api/school/index";
import {
queryCourseDropdownList,
getCourseSubject
} from "../../../api/course/index";
import Mode from "./transfer-order/tickMode";
import Course from "./transfer-order/courselist";
import orderForm from "./transfer-order/order-form";
import yueke from "./transfer-order/yueke";
import vipcourse from "./transfer-order/vipcourse";
export default {
} from "../../../api/course/index";
import Mode from "./transfer-order/tickMode";
import Course from "./transfer-order/courselist";
import orderForm from "./transfer-order/order-form";
import yueke from "./transfer-order/yueke";
import vipcourse from "./transfer-order/vipcourse";
export default {
props: {
select: {
type: Array,
......@@ -180,7 +176,7 @@ export default {
ClassNo: "", //班号
CourseSubject: "", //所属科目
IsQuerySalePlat: 1,
SaleState:1,//显示正常的课程
SaleState: 1, //显示正常的课程
},
courseData: [], //课程列表
coursePageCount: 0, //课程页数
......@@ -193,13 +189,13 @@ export default {
allClassList: [],
loading1: false, //防止多次点击
mode: 1,
selectedCourseList: [],//多选课程
selectedCourseList: [], //多选课程
};
},
watch:{
mode:{
handler(n){
this.selectedCourseList=[]
watch: {
mode: {
handler(n) {
this.selectedCourseList = []
}
}
},
......@@ -301,17 +297,15 @@ export default {
this.saveObj = val[0];
this.saveObj.Unit_Price = this.saveObj.SellPrice;
this.defaultCourse = val;
this.saveObj.OrderCourseList =[];
this.saveObj.OrderCourseList = [];
this.saveObj.OrderCourseList.push(JSON.parse(JSON.stringify(this.saveObj)));
this.saveObj.TextbookFee=0;
this.saveObj.CoursewareFee=0;
this.saveObj.TextbookFee = 0;
this.saveObj.CoursewareFee = 0;
} else {
this.saveObj = {};
this.saveObj.Unit_Price = 0;
this.defaultCourse = [];
}
},
// 选择课程
selectCourse(val) {
......@@ -321,32 +315,28 @@ export default {
}
this.saveObj = {};
this.saveObj.Unit_Price = 0;
this.saveObj.OrderCourseList =[];
if(this.selectedCourseList&&this.selectedCourseList.length>0){
this.selectedCourseList.forEach((item,index) => {
if(index==0){
this.saveObj.OrderCourseList = [];
if (this.selectedCourseList && this.selectedCourseList.length > 0) {
this.selectedCourseList.forEach((item, index) => {
if (index == 0) {
this.saveObj = JSON.parse(JSON.stringify(item));
this.saveObj.Unit_Price = item.SellPrice;
this.saveObj.PreferPrice = item.SellPrice;
}
else{
this.saveObj.CourseName+="、"+item.CourseName
this.saveObj.SellPrice+=Number(item.SellPrice)
this.saveObj.Unit_Price+=Number(item.SellPrice)
this.saveObj.TotalClassHours+=Number(item.TotalClassHours)
this.saveObj.DiscountMoney=0;//number(item.DiscountMoney)
this.saveObj.LessPrice=0;
this.saveObj.TextbookFee+=Number(item.TextbookFee)
this.saveObj.PreferPrice +=Number(item.SellPrice)
this.saveObj.CoursewareFee+=Number(item.CoursewareFee)
} else {
this.saveObj.CourseName += "、" + item.CourseName
this.saveObj.SellPrice += Number(item.SellPrice)
this.saveObj.Unit_Price += Number(item.SellPrice)
this.saveObj.TotalClassHours += Number(item.TotalClassHours)
this.saveObj.DiscountMoney = 0; //number(item.DiscountMoney)
this.saveObj.LessPrice = 0;
this.saveObj.TextbookFee += Number(item.TextbookFee)
this.saveObj.PreferPrice += Number(item.SellPrice)
this.saveObj.CoursewareFee += Number(item.CoursewareFee)
}
});
this.saveObj.OrderCourseList =[];
this.saveObj.OrderCourseList =this.selectedCourseList;
this.saveObj.OrderCourseList = [];
this.saveObj.OrderCourseList = this.selectedCourseList;
}
console.log("this.saveObj",this.saveObj);
console.log("this.selectedCourseList",this.selectedCourseList);
},
next() {
if (this.step == 1 && this.mode <= 0) {
......@@ -370,7 +360,7 @@ export default {
return;
}
if (
(this.mode == 2||this.mode == 3) &&
(this.mode == 2 || this.mode == 3) &&
(!this.saveObj.ClassId || this.saveObj.ClassId == 0)
) {
this.$q.notify({
......@@ -436,15 +426,17 @@ export default {
this.loading1 = false;
}
}
};
};
</script>
<style scoped>
/deep/.el-input__inner {
/deep/.el-input__inner {
background-color: transparent;
border: none;
}
}
/deep/.q-stepper__step-inner {
/deep/.q-stepper__step-inner {
padding: 0 24px;
}
}
</style>
......@@ -3,103 +3,54 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-4">
<q-input
@input="resetSearch"
clearable
filled
v-model="msg.ClassName"
label="课程名称"
@clear="resetSearch"
maxlength="20"
/>
<q-input @input="resetSearch" clearable filled v-model="msg.ClassName" label="课程名称" @clear="resetSearch"
maxlength="20" />
</div>
<!-- <div class="col-4">
<select-tree
:treeData="TreeCategoryList"
:defaultArray="returnString"
nodeKey="CateId"
:multiple="true"
labelKey="CateName"
childrenKey="ChildList"
tipText="课程系列"
@getChild="getChild"
></select-tree>
</div> -->
<div class="col-4">
<q-select
@input="resetSearch"
filled
v-model="msg.CourseSubject"
:options="CourseSubjectList"
option-label="SubjectName"
option-value="Id"
emit-value
map-options
label="所属科目"
clearable
/>
<q-select @input="resetSearch" filled v-model="msg.CourseSubject" :options="CourseSubjectList"
option-label="SubjectName" option-value="Id" emit-value map-options label="所属科目" clearable />
</div>
<div class="col-4">
<p class="yueke-title">已选:</p>
<p class="yueke-CourseName" v-for="(item,index) in selection">
</div>
</div>
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-8">
<p class="yueke-title">已选课程:<font class="yueke-CourseName" v-for="(item,index) in selection"
:key="`s_`+index">
<span>{{index+1}}</span>
{{item.CourseName}}
</font>
</p>
</div>
</div>
</div>
<!-- @update:selected="emitSel" single
:selected-rows-label="getSelectedString"
-->
<q-table
:pagination="msg"
:selection="mode==2?'multiple':'single'"
:selected.sync="selection"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table sticky-two-header-table"
separator="none"
:data="dataList"
:columns="columns"
row-key="ClassId"
@update:selected="emitSel"
:selected-rows-label="getSelectedString"
table-class="table"
>
<q-table :pagination="msg" :selection="mode==2?'multiple':'single'" :selected.sync="selection"
no-data-label="暂无相关数据" flat class="sticky-tow-column-table sticky-two-header-table" separator="none"
:data="dataList" :columns="columns" row-key="ClassId" @update:selected="emitSel"
:selected-rows-label="getSelectedString" table-class="table">
<template v-slot:body-cell-CourseName="props">
<q-td :props="props">
{{ props.row.CourseName }}
</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>
</div>
</template>
<script>
import {
queryCoursePage,
queryCourseCategoryTree,
deleteCourseInfo,
querySaleplatList,
import {
getCourseSubject
} from "../../../../api/course/index";
import {
} from "../../../../api/course/index";
import {
getClassPruductList //获取日语培训列表
} from "../../../../api/sale/sale";
// import selectTree from "../../../../components/common/select-tree";
export default {
} from "../../../../api/sale/sale";
export default {
components: {
// selectTree
},
props: {
select: {
......@@ -114,8 +65,7 @@ export default {
data() {
return {
selection: [],
columns: [
{
columns: [{
name: "CourseName",
label: "课程",
field: "CourseName",
......@@ -128,17 +78,10 @@ export default {
align: "left",
field: row => row.CourseSubjectName
},
// {
// name: "CateName",
// required: true,
// label: "系列",
// align: "left",
// field: row => row.CateName
// },
{
name: "SellPrice",
required: true,
label: "直客价",
label: "售价",
align: "left",
field: row => row.SellPrice.toFixed(2)
},
......@@ -147,23 +90,9 @@ export default {
required: true,
label: "价格类型",
align: "left",
field: row => row.SellPriceType == 1 ? '课程总价' : (row.SellPriceType==2?'课时单价':'')
field: row => row.SellPriceType == 1 ? '课程总价' : (row.SellPriceType == 2 ? '课时单价' : '')
}
],
// msg: {
// pageIndex: 1,
// pageSize: 10,
// rowsPerPage: 10,
// CourseName: "",
// QCateIds: "",
// IsQPrice: 1,
// Status: "0",
// Saleplat: 0,
// CourseSubject: "", //所属科目
// ClassScrollType :2
// },
msg: {
pageIndex: 1,
pageSize: 8,
......@@ -179,15 +108,12 @@ export default {
JoinEndTime: "", //报名截止日期结束
ClassNo: "", //班号
CourseSubject: "", //所属科目
CourseName:"",
ClassScrollType :2,
IsQuerySalePlat:1,
QIsVipCourse:0,
CourseName: "",
ClassScrollType: 2,
IsQuerySalePlat: 1,
QIsVipCourse: 0,
},
CourseSubjectList: [],
//课程分类树形列表
TreeCategoryList: [],
returnString: [], //默认值
dataList: [],
pageCount: 0
};
......@@ -196,64 +122,38 @@ export default {
this.selection = this.select;
this.getCourseList();
this.queryCourseSubject();
// this.getCategorytree();
},
methods: {
// 多选
getSelectedString () {
return this.selection.length === 0 ? '' : `${this.selection.length} record${this.selection.length > 1 ? 's' : ''} selected of ${this.dataList.length}`
getSelectedString() {
return this.selection.length === 0 ? '' :
`${this.selection.length} record${this.selection.length > 1 ? 's' : ''} selected of ${this.dataList.length}`
},
emitSel(val) {
this.$emit("select", val);
},
//获取课程分页列表
getCourseList() {
if(this.mode==2){
this.msg.QIsVipCourse=1;
}else if(this.mode==3){
this.msg.QIsVipCourse=2;
if (this.mode == 2) {
this.msg.QIsVipCourse = 1;
} else if (this.mode == 3) {
this.msg.QIsVipCourse = 2;
}
getClassPruductList(this.msg).then(res => {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
});
},
// 课程翻页
changePage(val) {
this.msg.pageIndex = val;
this.getCourseList();
},
//获取分页列表
// getCourseList() {
// this.loading = true;
// queryCoursePage(this.msg)
// .then(res => {
// this.loading = false;
// this.dataList = res.Data.PageData;
// this.pageCount = res.Data.PageCount;
// })
// .catch(() => {
// this.loading = false;
// });
// },
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getCourseList();
},
//翻页
// changePage(val) {
// this.msg.pageIndex = val;
// this.getCourseList();
// },
getCategorytree() {
this.TreeCategoryList = [];
var qMsg = {};
queryCourseCategoryTree(qMsg).then(res => {
this.TreeCategoryList = res.Data;
});
},
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
......@@ -272,48 +172,53 @@ export default {
this.getCourseList();
}
}
};
};
</script>
<style>
.table {
.table {
max-height: 400px;
}
}
.table::-webkit-scrollbar {
.table::-webkit-scrollbar {
width: 5px;
height: 5px;
}
}
.table::-webkit-scrollbar-track {
.table::-webkit-scrollbar-track {
background: #fff;
border-radius: 2px;
}
}
.table::-webkit-scrollbar-thumb {
.table::-webkit-scrollbar-thumb {
background: #444;
border-radius: 10px;
}
}
.table::-webkit-scrollbar-thumb:hover {
.table::-webkit-scrollbar-thumb:hover {
background: #999;
}
}
.table::-webkit-scrollbar-corner {
.table::-webkit-scrollbar-corner {
background: #204754;
}
.yueke-title{
}
.yueke-title {
margin-top: 0;
margin-bottom: 0;
}
.yueke-CourseName{
}
.yueke-CourseName {
margin-right: 5px;
white-space:nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
margin-top: 5px;
margin-bottom: 0;
}
.yueke-CourseName span{
}
.yueke-CourseName span {
color: #2961fe;
}
}
</style>
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