Commit 08b2be3a authored by 罗超's avatar 罗超

修改

parent 83b0a6f6
<template> <template>
<div class="page-body japaneseTrain"> <div class="page-body japaneseTrain">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="SId" option-label="SName" <q-select @input="resetSearch" standout="bg-primary text-white" option-value="SId" option-label="SName" v-model="msg.School_Id" :options="schoolList" emit-value map-options label="关联校区" />
v-model="msg.School_Id" :options="schoolList" emit-value map-options label="关联校区" /> </div>
</div> <div class="col-3">
<div class="col-3"> <q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ClassName" label="班级名称" @clear="resetSearch" />
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ClassName" label="班级名称" </div>
@clear="resetSearch" />
</div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="TId" option-label="TeacherName" <q-select @input="resetSearch" standout="bg-primary text-white" option-value="TId" option-label="TeacherName" v-model="msg.Teacher_Id" :options="TeacherList" emit-value map-options label="带班老师" />
v-model="msg.Teacher_Id" :options="TeacherList" emit-value map-options label="带班老师" /> </div>
</div> <div class="col-3">
<div class="col-3"> <q-select @input="resetSearch" standout="bg-primary text-white" option-value="CourseId" option-label="CourseName" v-model="msg.CouseId" :options="ClassList" emit-value map-options label="学习课程" />
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="CourseId" option-label="CourseName" </div>
v-model="msg.CouseId" :options="ClassList" emit-value map-options label="学习课程" />
</div>
<div class="col-3"> <div class="col-3">
<div class="col-3 Sysuser_Date"> <div class="col-3 Sysuser_Date">
<q-field filled> <q-field filled>
 <template v-slot:control>  <template v-slot:control>
<el-date-picker v-model="dateList" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;" <el-date-picker v-model="dateList" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"   range-separator="至"  start-placeholder="开学日期"  end-placeholder="结束日期">
  range-separator="至"  start-placeholder="开学日期"  end-placeholder="结束日期">   </el-date-picker>       
  </el-date-picker>        </template>
</template> </q-field>
</q-field> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
<div class="page-content" > <div class="page-content">
<div style="width: 100%;display: flex;justify-content: space-between"> <div style="width: 100%;display: flex;justify-content: space-between">
<span style="font-size: 20px;font-weight: 400; ">日语培训产品列表</span> <span style="font-size: 20px;font-weight: 400; ">日语培训产品列表</span>
<span><q-toggle v-model="msg.Q_CanApply" label="只看有余位" class="q-mb-md" false-value="0" true-value="1" @input="resetSearch"/></span> <span>
</div> <q-toggle v-model="msg.Q_CanApply" label="只看有余位" class="q-mb-md" false-value="0" true-value="1" @input="resetSearch" />
<div class="productQueryList" v-loading='loading'> </span>
<ul v-if="data.length!=0"> </div>
<li v-for="(item,index) in data" :key="index"> <div class="productQueryList" v-loading='loading'>
<div class="dline"> <ul v-if="data.length!=0">
<div class="d1"> <li v-for="(item,index) in data" :key="index">
<div class="di-title">{{item.ClassName}}</div> <div class="dline">
<div class="di-c" style="margin-top: 25px;"><img src="../../assets/images/administration/kezname.png" alt="" style="width: 14px;height: 14px;margin-right: 5px;">{{item.CourseName}}</div> <div class="d1">
<div class="di-c"><img src="../../assets/images/administration/period.png" alt="" style="width: 14px;height: 14px;margin-right: 5px;">{{item.ClassHours?item.ClassHours:'0'}}课时</div> <div class="di-title">{{item.ClassName}}</div>
</div> <div class="di-c" style="margin-top: 25px;"><img src="../../assets/images/administration/kezname.png" alt="" style="width: 14px;height: 14px;margin-right: 5px;">{{item.CourseName}}</div>
<div class="d2"> <div class="di-c"><img src="../../assets/images/administration/period.png" alt="" style="width: 14px;height: 14px;margin-right: 5px;">{{item.ClassHours?item.ClassHours:'0'}}课时</div>
<div class="row" style="align-items: center"> <span class="d2-n">带课老师</span><img :src="item.TeacherHead" alt="" style="width: 26px;height: 26px;border-radius: 4px;margin-right: 5px;color: #2961FE">{{item.TeacherName}}</div> </div>
<div><span class="d2-n">上课教室</span>{{item.RoomName}}</div> <div class="d2">
<div><span class="d2-n">上课时间</span><span style="text-decoration:underline;color:#111111;cursor: pointer">{{item.ClassStyleName}} </span><span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px" ></span> <div class="row" style="align-items: center"> <span class="d2-n">带课老师</span><img :src="item.TeacherHead" alt="" style="width: 26px;height: 26px;border-radius: 4px;margin-right: 5px;color: #2961FE">{{item.TeacherName}}</div>
<q-popup-proxy> <div><span class="d2-n">上课教室</span>{{item.RoomName}}</div>
<q-banner> <div><span class="d2-n">上课时间</span><span style="text-decoration:underline;color:#111111;cursor: pointer">{{item.ClassStyleName}} </span><span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"></span>
<div class="price-popup" style="padding: 10px"> <q-popup-proxy>
<div class="popup-top"> <q-banner>
<div style="color:#2D2D2D;font-size: 14px;font-weight: bold" >上课时间</div> <div class="price-popup" style="padding: 10px">
<div style="background: #EEEEEF;font-size: 12px;color: #2D2D2D;font-weight: bold;height: 40px;width: 454px;line-height: 40px;display: flex;justify-content: space-around;margin-top: 20px" v-if="item.ClassStyle==1"> <div class="popup-top">
<span>周末</span> <div style="color:#2D2D2D;font-size: 14px;font-weight: bold">上课时间</div>
<span>周一</span> <div style="background: #EEEEEF;font-size: 12px;color: #2D2D2D;font-weight: bold;height: 40px;width: 454px;line-height: 40px;display: flex;justify-content: space-around;margin-top: 20px" v-if="item.ClassStyle==1">
<span>周二</span> <span>周末</span>
<span>周三</span> <span>周一</span>
<span>周四</span> <span>周二</span>
<span>周五</span> <span>周三</span>
<span>周六</span> <span>周四</span>
</div> <span>周五</span>
<div v-if="item.ClassStyle==1" style="font-size: 12px;color: #2D2D2D;font-weight: bold;height: 40px;width: 454px;line-height: 40px;display: flex;justify-content: space-around;border-bottom: 1px solid rgba(138, 138, 138, 0.09);margin-bottom: 20px"> <span>周六</span>
<span v-for="(j,k) in item.weeks" :key="k" style="width: 24.5px;"> </div>
<img src="../../assets/images/administration/gou.png" alt="" style="width: 16px;height: 12px" v-if="j.select==true"> <div v-if="item.ClassStyle==1" style="font-size: 12px;color: #2D2D2D;font-weight: bold;height: 40px;width: 454px;line-height: 40px;display: flex;justify-content: space-around;border-bottom: 1px solid rgba(138, 138, 138, 0.09);margin-bottom: 20px">
</span> <span v-for="(j,k) in item.weeks" :key="k" style="width: 24.5px;">
</div> <img src="../../assets/images/administration/gou.png" alt="" style="width: 16px;height: 12px" v-if="j.select==true">
<div v-if="item.ClassStyle==2" class="row wrap" style="width: 454px;"> </span>
<div v-for="(j,k) in item.month" style="width: 45.4px;height: 30px;line-height: 30px;text-align: center;font-size: 12px;color: #2D2D2D;margin-top: 10px;!important"> </div>
<div :style="{'width': '45.4px','height': '30px',background:j.select==true?'rgba(41, 97, 254, 0.2)':'#FFF'}"> <div v-if="item.ClassStyle==2" class="row wrap" style="width: 454px;">
{{j.name}} <div v-for="(j,k) in item.month" style="width: 45.4px;height: 30px;line-height: 30px;text-align: center;font-size: 12px;color: #2D2D2D;margin-top: 10px;!important">
</div> <div :style="{'width': '45.4px','height': '30px',background:j.select==true?'rgba(41, 97, 254, 0.2)':'#FFF'}">
{{j.name}}
</div>
</div>
</div>
<div v-if="item.ClassStyle==3">
<el-calendar v-model="elvalue" id="calendar" style="width: 500px;">
<!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法-->
<template slot="dateCell" slot-scope="{date, data}" class="row" style="height: 45px">
<!--自定义内容-->
<div class="calendar-day">{{ data.day.split('-').slice(2).join('-') }}</div>
<div v-for="x in item.ClassPlanList">
<div v-if="x.ClassDate == data.day" style="align-items: center;justify-content: center;margin-top: 15px" class="row">
<img src="../../assets/images/administration/gou.png" alt="" style="width: 16px;height: 12px">
</div>
</div>
</template>
</el-calendar>
</div>
<div style="color:#2D2D2D;font-size: 14px;font-weight: bold;">课程安排</div>
<div style="width:100%;height: 40px;background: #EEEEEF;font-size: 12px;color: #2D2D2D;font-weight: 600;margin-top: 20px;display: flex;align-items: center">
<div style="width: 50%;padding-left: 20px">
课节
</div>
<div>时间</div>
</div>
<div style="font-size: 12px;color: #2D2D2D;font-weight: bold;height: 40px;width: 454px;line-height: 40px;display: flex;border-bottom: 1px solid rgba(138, 138, 138, 0.09);" v-for="(zx,zi) in item.ClassTimeList" :key="zi">
<div style="width: 50%;padding-left: 20px">
第{{zi+1}}节
</div>
<div>{{zx.StartTime}}-{{zx.EndTime}}</div>
</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div> </div>
</div> </div>
<div v-if="item.ClassStyle==3"> <div class="d3">
<el-calendar v-model="elvalue" id="calendar" style="width: 500px;"> <div style="margin: 0">招生信息</div>
<!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法--> <div><span class="d2-n">开始上课时间</span><span class="d3-s">{{item.OpenTime}}</span></div>
<template slot="dateCell" slot-scope="{date, data}" class="row" style="height: 45px"> <div><span class="d2-n">截止报名时间</span><span class="d3-s">{{item.EndOrderTime}}</span></div>
<!--自定义内容--> </div>
<div class="calendar-day" >{{ data.day.split('-').slice(2).join('-') }}</div> <div class="d4">
<div v-for="x in item.ClassPlanList"> <div style="margin: 0">价格信息</div>
<div v-if="x.ClassDate == data.day" style="align-items: center;justify-content: center;margin-top: 15px" class="row"> <div><span class="d2-n">原价</span><span>{{item.OriginalPrice.toFixed(2)}}</span></div>
<img src="../../assets/images/administration/gou.png" alt="" style="width: 16px;height: 12px" > <div><span class="d2-n">售价</span><span style="color:#f5576c;font-weight: bold">{{item.SellPrice.toFixed(2)}}</span></div>
</div> <div v-if="item.IsStepPrice==1 && item.ClassStepPriceList.length>0" style="cursor: pointer">
</div> 更多优惠价格<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"></span>
</template> <q-popup-proxy>
</el-calendar> <q-banner>
</div> <div class="price-popup">
<div style="color:#2D2D2D;font-size: 14px;font-weight: bold;">课程安排</div> <div class="price-popup-item" v-for="(x,index2) in item.ClassStepPriceList" :key="index2" style="margin: 5px 0">
<div style="width:100%;height: 40px;background: #EEEEEF;font-size: 12px;color: #2D2D2D;font-weight: 600;margin-top: 20px;display: flex;align-items: center"> <span style="color: #2D2D2D;font-weight: bold">{{x.PersionNum}}人报名<span style="color:#2860FB;margin-left: 15px">{{x.PersionPrice.toFixed(2)}}</span></span>
<div style="width: 50%;padding-left: 20px"> </div>
课节 </div>
</q-banner>
</q-popup-proxy>
</div> </div>
<div>时间</div> </div>
</div> <div class="d5">
<div style="font-size: 12px;color: #2D2D2D;font-weight: bold;height: 40px;width: 454px;line-height: 40px;display: flex;border-bottom: 1px solid rgba(138, 138, 138, 0.09);" <div style="margin: 0">名额信息</div>
v-for="(zx,zi) in item.ClassTimeList" :key="zi" <div><span class="d2-n">计划招生人数</span><span>{{item.ClassPersion}}人</span></div>
> <div><span class="d2-n">剩余招生名额</span><span style="color:#f5576c;font-weight: bold">{{item.SurplusNum}}人</span></div>
<div style="width: 50%;padding-left: 20px"> </div>
第{{zi+1}}节 <div class="d7">
<q-btn color="primary" label="立即下单" v-if="item.IsCanApply==1" @click="placeAnorder(item)" />
<div v-if="item.IsCanApply==0">
<img src="../../assets/images/administration/bmym.png" alt="" style="width: 64px;height: 62px;margin-right: 15px" v-if="item.SurplusNum==0">
<img src="../../assets/images/administration/guoqi.png" alt="" style="width: 64px;height: 62px" v-if="getEXPDate(item.EndOrderTime)==true">
</div> </div>
<div>{{zx.StartTime}}-{{zx.EndTime}}</div>
</div>
</div> </div>
</div> </div>
</q-banner>
</q-popup-proxy> <div class="d6 row">
</div> <p style="color:#f5576c;font-weight: bold"><span style="color:#2D2D2D;">OP备注:</span>{{item.OutRemark}}</p>
</div> <div class="progress">
<div class="d3"> <q-linear-progress size="5px" color="#3FC4FF" :value="(item.OrderStudentCount/item.ClassPersion)" rounded />
<div style="margin: 0">招生信息</div>
<div><span class="d2-n">开始上课时间</span><span class="d3-s">{{item.OpenTime}}</span></div>
<div><span class="d2-n">截止报名时间</span><span class="d3-s">{{item.EndOrderTime}}</span></div>
</div>
<div class="d4">
<div style="margin: 0">价格信息</div>
<div><span class="d2-n">原价</span><span>{{item.OriginalPrice.toFixed(2)}}</span></div>
<div><span class="d2-n">售价</span><span style="color:#f5576c;font-weight: bold">{{item.SellPrice.toFixed(2)}}</span></div>
<div v-if="item.IsStepPrice==1 && item.ClassStepPriceList.length>0" style="cursor: pointer">
更多优惠价格<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 item.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>
</div> </div>
</q-banner> </li>
</q-popup-proxy> <li style="border: none;display: flex;justify-content: flex-end;background: white;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end" color="primary" :input="true">
</q-pagination>
</li>
</ul>
<div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div>
</div>
<q-dialog v-model="dialog" maximized full-height seamless position="right">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="drawerTop">
<div style="display:flex;align-items:center;margin-left:10px;">
<span class="drawer_Span">学员报名</span>
</div>
</div> </div>
</div> <div style="padding:20px 15px;">
<div class="d5"> <q-input filled stack-label maxlength="100" :dense="false" v-model="enrollMsg.GuestNum" type="number" @input="peopleNumber" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" />
<div style="margin: 0">名额信息</div> <q-input filled stack-label :dense="false" v-model="enrollMsg.Unit_Price" :disable="UPrice==true?false:true" @blur="priceNumber" class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
<div><span class="d2-n">计划招生人数</span><span>{{item.ClassPersion}}人</span></div> <q-toggle v-model="UPrice" label="高于定价收生" class="q-mb-md" @change="resetSearch" />
<div><span class="d2-n">剩余招生名额</span><span style="color:#f5576c;font-weight: bold">{{item.SurplusNum}}人</span></div> <q-select standout="bg-primary text-white" option-value="Id" option-label="Name" v-model="enrollMsg.OrderSource" :options="SourceEnumList" emit-value map-options label="客人来源" />
</div> <q-input filled stack-label type="textarea" :dense="false" v-model="enrollMsg.SaleRemark" style="margin-top: 20px" class="col-12" label="备注" />
<div class="d7"> <div style="margin:30px 10px 0 0;">
<q-btn color="primary" label="立即下单" v-if="item.IsCanApply==1" @click="placeAnorder(item)"/> <q-btn class="q-mr-md" label="取消" @click="dialog=false" />
<div v-if="item.IsCanApply==0"> <q-btn color="accent" class="q-mr-md" label="保存" @click="saveSatMsg()" />
<img src="../../assets/images/administration/bmym.png" alt="" style="width: 64px;height: 62px;margin-right: 15px" v-if="item.SurplusNum==0"> </div>
<img src="../../assets/images/administration/guoqi.png" alt="" style="width: 64px;height: 62px" v-if="getEXPDate(item.EndOrderTime)==true">
</div> </div>
</div>
</div>
<div class="d6 row"> </q-card>
<p style="color:#f5576c;font-weight: bold"><span style="color:#2D2D2D;">OP备注:</span>{{item.OutRemark}}</p> <div class="dialog-out-close" @click="dialog=false" style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
<div class="progress"> <q-icon name="iconfont icon-jujue1" size="26px" />
<q-linear-progress size="5px" color="#3FC4FF" :value="(item.OrderStudentCount/item.ClassPersion)" rounded/>
</div>
</div>
</li>
<li style="border: none;display: flex;justify-content: flex-end;background: white;padding: 5px 20px">
<q-pagination
v-model="msg.pageIndex"
:max="pageCount"
@input="changePage"
class="full-width justify-end" color="primary" :input="true"
>
</q-pagination>
</li>
</ul>
<div v-else style="width: 100%;color: #999999;text-align: center;font-size: 20px">暂无数据</div>
</div>
<q-dialog v-model="dialog" maximized full-height seamless position="right" >
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="drawerTop">
<div style="display:flex;align-items:center;margin-left:10px;">
<span class="drawer_Span">学员报名</span>
</div> </div>
</div> </q-dialog>
<div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" v-model="enrollMsg.GuestNum" type="number" @input="peopleNumber"
class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" />
<q-input filled stack-label :dense="false" v-model="enrollMsg.Unit_Price" :disable="UPrice==true?false:true" @blur="priceNumber"
class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
<q-toggle v-model="UPrice" label="高于定价收生" class="q-mb-md" @change="resetSearch"/>
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="enrollMsg.OrderSource" :options="SourceEnumList" emit-value map-options label="客人来源" />
<q-input filled stack-label type="textarea" :dense="false" v-model="enrollMsg.SaleRemark" style="margin-top: 20px"
class="col-12" label="备注" />
<div style="margin:30px 10px 0 0;">
<q-btn class="q-mr-md" label="取消" @click="dialog=false" />
<q-btn color="accent" class="q-mr-md" label="保存" @click="saveSatMsg()" />
</div>
</div>
</q-card>
<div class="dialog-out-close" @click="dialog=false"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
<q-icon name="iconfont icon-jujue1" size="26px" />
</div>
</q-dialog>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import {
getClassPruductList,//获取日语培训列表 getClassPruductList, //获取日语培训列表
getOrderSourceEnumList,//获取订单来源 枚举 getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder,//新增 修改订单 setClassOrder, //新增 修改订单
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import { import {
getSchoolDropdown, //获取校区列表 getSchoolDropdown, //获取校区列表
getTeacherDropDownList, getTeacherDropDownList,
} from '../../api/school/index'; } from '../../api/school/index';
import { import {
queryCourseDropdownList, queryCourseDropdownList,
} from '../../api/course/index' } from '../../api/course/index'
export default { export default {
components: { components: {
}, },
data() { data() {
return { return {
dialog:false, dialog: false,
data: [], data: [],
loading: false, loading: false,
dateList:[],//开学时间 dateList: [], //开学时间
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
ClassName: '', //班级名称 ClassName: '', //班级名称
StartTime:'',//开始时间 StartTime: '', //开始时间
EndTime:'',//结束时间 EndTime: '', //结束时间
School_Id: 0, //关联校区 School_Id: 0, //关联校区
CouseId:0,//课程id CouseId: 0, //课程id
Teacher_Id:0,//教师id Teacher_Id: 0, //教师id
Q_CanApply:"0",//是否可以报名 1是 Q_CanApply: "0", //是否可以报名 1是
}, },
enrollMsg:{ enrollMsg: {
ClassId:0, ClassId: 0,
GuestNum:1, GuestNum: 1,
Unit_Price:0,//成交单价 Unit_Price: 0, //成交单价
PreferPrice:0,//应收总额 PreferPrice: 0, //应收总额
OrderSource:0,//客人来源 枚举 OrderSource: 0, //客人来源 枚举
SaleRemark:'',//备注 SaleRemark: '', //备注
}, },
//关联校区列表 //关联校区列表
schoolList: [], schoolList: [],
pageCount: 0, pageCount: 0,
selectitem:{}, selectitem: {},
UPrice:false, UPrice: false,
UnitPrice:0,//用于可以输入单价的验证 UnitPrice: 0, //用于可以输入单价的验证
SourceEnumList:[], SourceEnumList: [],
ClassList: [], //关联课程下拉数据 ClassList: [], //关联课程下拉数据
TeacherList: [], //关联教师下拉数据 TeacherList: [], //关联教师下拉数据
elvalue:new Date(), elvalue: new Date(),
} }
}, },
created() { created() {
this.getSchool(); this.getSchool();
this.getOrderSEList() this.getOrderSEList()
this.CourseList(); this.CourseList();
this.GetTeacherList(); this.GetTeacherList();
}, },
mounted() { mounted() {
let nowDay = new Date(); let nowDay = new Date();
this.dateList = [nowDay,nowDay] var year = nowDay.getFullYear();    //年
this.getList(); var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate();   //日
this.dateList[0] = year+'-'+month+'-'+day;
this.getList();
}, },
methods: { methods: {
//获取校区列表 //获取校区列表
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
var tempArray = res.Data; var tempArray = res.Data;
if (!tempArray) { if (!tempArray) {
tempArray = []; tempArray = [];
}
tempArray.unshift({
SId: 0,
SName: "不限"
})
this.schoolList = tempArray;
}
})
},
getOrderSEList() {
getOrderSourceEnumList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
this.SourceEnumList = tempArray;
this.enrollMsg.OrderSource = tempArray[0].Id;
}
})
},
getEXPDate(time) { //判断是否过期
var str = time.replace(/年/g, "/").replace(/月/g, "/").replace(/日/g, "");
var date = new Date(str).getTime();
var now = new Date().getTime() + 86400;
if (date < now) {
return true //过期
} else {
return false //没过期
} }
tempArray.unshift({ },
SId: 0, //获取课程
SName: "不限" CourseList() {
queryCourseDropdownList({}).then(res => {
if (res.Code == 1) {
this.ClassList = res.Data;
this.ClassList.unshift({
CourseId: 0,
CourseName: "不限"
})
}
}) })
this.schoolList = tempArray; },
} //获取教师下拉
}) GetTeacherList() {
}, getTeacherDropDownList({}).then(res => {
getOrderSEList(){ if (res.Code == 1) {
getOrderSourceEnumList({}).then(res => { this.TeacherList = res.Data;
if (res.Code == 1) { this.TeacherList.unshift({
var tempArray = res.Data; TId: 0,
this.SourceEnumList = tempArray; TeacherName: "不限"
this.enrollMsg.OrderSource = tempArray[0].Id; })
} }
})
},
getEXPDate(time){//判断是否过期
var str = time.replace(/年/g,"/").replace(/月/g,"/").replace(/日/g,"");
var date = new Date(str ).getTime();
var now = new Date().getTime()+86400;
if(date < now) {
return true //过期
} else {
return false //没过期
}
},
//获取课程
CourseList() {
queryCourseDropdownList({}).then(res => {
if (res.Code == 1) {
this.ClassList = res.Data;
this.ClassList.unshift({
CourseId: 0,
CourseName: "不限"
}) })
} },
})
}, //翻页
//获取教师下拉 changePage(val) {
GetTeacherList() { this.msg.pageIndex = val;
getTeacherDropDownList({}).then(res => { this.getList()
if (res.Code == 1) { },
this.TeacherList = res.Data; resetSearch() {
this.TeacherList.unshift({ this.msg.pageIndex = 1;
TId: 0, this.getList()
TeacherName: "不限" },
//获取菜单分页列表
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 = '';
}
this.loading = true;
getClassPruductList(this.msg).then(res => {
this.loading = false
this.data = res.Data.PageData
this.pageCount = res.Data.PageCount;
this.data.forEach(x => {
if (x.ClassStyle == 1) {
let weekList = [ //定义一个数组
{
id: 7,
select: false
},
{
id: 1,
select: false
},
{
id: 2,
select: false
},
{
id: 3,
select: false
},
{
id: 4,
select: false
},
{
id: 5,
select: false
},
{
id: 6,
select: false
},
];
weekList.forEach(j => {
x.ClassPlanList.forEach(z => {
if (j.id == z.WeekDay) {
j.select = true
}
})
})
x.weeks = weekList
} else if (x.ClassStyle == 2) {
let data = [];
for (let i = 0; i < 31; i++) {
let obj = {
name: i + 1,
select: false
};
x.ClassPlanList.forEach(j => {
if (j.WeekDay == i + 1) {
obj.select = true
}
})
data.push(obj)
}
x.month = data;
}
})
}).catch(() => {
this.loading = false
}) })
} },
}) getSortFun(order, sortBy) {
}, var ordAlpah = (order == 'asc') ? '>' : '<';
var sortFun = new Function('a', 'b', 'return a.' + sortBy + ordAlpah + 'b.' + sortBy + '?1:-1');
//翻页 return sortFun;
changePage(val) { },
this.msg.pageIndex = val; countPrice(num) {
this.getList() let array = [];
}, if (this.selectitem.ClassStepPriceList && this.selectitem.ClassStepPriceList.length) {
resetSearch() { this.selectitem.ClassStepPriceList.forEach(x => {
this.msg.pageIndex = 1; let obj = {
this.getList() PersionNum: x.PersionNum,
}, PersionPrice: x.PersionPrice,
//获取菜单分页列表 }
getList() { array.push(obj)
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 = '';
}
this.loading = true;
getClassPruductList(this.msg).then(res => {
this.loading = false
this.data = res.Data.PageData
this.pageCount = res.Data.PageCount;
this.data.forEach(x=>{
if(x.ClassStyle==1){
let weekList = [//定义一个数组
{id:7,select:false},
{id:1,select:false},
{id:2,select:false},
{id:3,select:false},
{id:4,select:false},
{id:5,select:false},
{id:6,select:false},
];
weekList.forEach(j=>{
x.ClassPlanList.forEach(z=>{
if(j.id == z.WeekDay){
j.select=true
}
}) })
}) let fz = false
x.weeks = weekList let a = 0;
}else if(x.ClassStyle==2){ array.forEach(x => {
let data = []; if (x.PersionNum == num) {
for(let i = 0;i<31;i++){ fz = true;
let obj ={ a = x.PersionPrice
name:i+1, }
select:false
};
x.ClassPlanList.forEach(j=>{
if(j.WeekDay == i+1){
obj.select=true
}
}) })
data.push(obj) if (fz == false) {
array.push({
PersionNum: num
})
array.sort(this.getSortFun('asc', 'PersionNum')); //升序排序
var idx;
for (var i = 0; i < array.length; i++) {
if (array[i].PersionNum == num) {
idx = i;
}
}
idx = Math.max(0, idx - 1);
if (array[idx].PersionPrice) {
return array[idx].PersionPrice
} else {
return this.selectitem.SellPrice
}
} else {
return a
}
} } else {
x.month = data; return this.selectitem.SellPrice
} }
}) },
placeAnorder(item) {
}).catch(() => { this.selectitem = item;
this.loading = false this.dialog = true;
}) this.enrollMsg.ClassId = item.ClassId;
}, this.enrollMsg.SaleRemark = ''; //清空备注
getSortFun(order, sortBy){ this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum)
var ordAlpah = (order == 'asc') ? '>' : '<'; this.UnitPrice = this.enrollMsg.Unit_Price
var sortFun = new Function('a', 'b', 'return a.' + sortBy + ordAlpah + 'b.' + sortBy + '?1:-1'); },
return sortFun; peopleNumber(val) {
}, if (val > this.selectitem.SurplusNum) {
countPrice(num){ this.enrollMsg.GuestNum = this.selectitem.SurplusNum
let array =[] ;
if(this.selectitem.ClassStepPriceList && this.selectitem.ClassStepPriceList.length){
this.selectitem.ClassStepPriceList.forEach(x=>{
let obj ={
PersionNum:x.PersionNum,
PersionPrice:x.PersionPrice,
}
array.push(obj)
})
let fz =false
let a =0;
array.forEach(x=>{
if(x.PersionNum==num){
fz=true;
a = x.PersionPrice
} }
}) if (val == '') {
if(fz==false){ this.enrollMsg.GuestNum = 1
array.push({PersionNum:num})
array.sort(this.getSortFun('asc', 'PersionNum'));//升序排序
var idx;
for(var i=0;i<array.length;i++){
if(array[i].PersionNum == num){
idx = i;
}
} }
idx = Math.max(0,idx - 1); this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum)
if(array[idx].PersionPrice){ this.UnitPrice = this.enrollMsg.Unit_Price
return array[idx].PersionPrice },
}else { priceNumber(val) { //大于的时候赋值
return this.selectitem.SellPrice if (this.enrollMsg.Unit_Price < this.UnitPrice) {
this.enrollMsg.Unit_Price = this.UnitPrice
} }
}else { },
return a saveSatMsg() { //立即报名
} this.enrollMsg.PreferPrice = this.enrollMsg.GuestNum * this.enrollMsg.Unit_Price
setClassOrder(this.enrollMsg).then(res => {
}else { if (res.Code == 1) {
return this.selectitem.SellPrice this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '报名成功!',
position: 'top'
})
this.getList()
this.dialog = false;
this.enrollMsg = { //清空数据
ClassId: 0,
GuestNum: 1,
Unit_Price: 0, //成交单价
PreferPrice: 0, //应收总额
OrderSource: 0, //客人来源 枚举
SaleRemark: '', //备注
}
}
}).catch(() => {
})
} }
}
}
</script>
<style>
li {
list-style-type: none;
}
.japaneseTrain ul {
padding: 0px
}
}, .japaneseTrain li {
placeAnorder(item){ background: rgba(221, 222, 224, 0.2);
this.selectitem= item; border-radius: 4px;
this.dialog = true; margin-top: 15px
this.enrollMsg.ClassId = item.ClassId; }
this.enrollMsg.SaleRemark = ''; //清空备注
this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum)
this.UnitPrice = this.enrollMsg.Unit_Price
},
peopleNumber(val){
if(val>this.selectitem.SurplusNum){
this.enrollMsg.GuestNum=this.selectitem.SurplusNum
}
if(val==''){
this.enrollMsg.GuestNum=1
}
this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum)
this.UnitPrice = this.enrollMsg.Unit_Price
},
priceNumber(val){//大于的时候赋值
if(this.enrollMsg.Unit_Price<this.UnitPrice ){
this.enrollMsg.Unit_Price = this.UnitPrice
}
},
saveSatMsg(){//立即报名
this.enrollMsg.PreferPrice = this.enrollMsg.GuestNum*this.enrollMsg.Unit_Price
setClassOrder(this.enrollMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '报名成功!',
position: 'top'
})
this.getList()
this.dialog = false;
this.enrollMsg={//清空数据
ClassId:0,
GuestNum:1,
Unit_Price:0,//成交单价
PreferPrice:0,//应收总额
OrderSource:0,//客人来源 枚举
SaleRemark:'',//备注
}
}
}).catch(() => {
}) .japaneseTrain li .dline {
} display: table;
} width: 100%;
} display: flex;
flex-direction: row
}
</script> .japaneseTrain li .d1,
<style> .japaneseTrain li .d2,
li{ .japaneseTrain li .d3,
list-style-type:none ; .japaneseTrain li .d4,
} .japaneseTrain li .d5 {
.japaneseTrain ul{padding: 0px} width: 18%;
.japaneseTrain li{background: rgba(221, 222, 224, 0.2);border-radius: 4px;margin-top:15px} padding: 20px 20px 10px;
.japaneseTrain li .dline{display: table;width: 100%;display: flex;flex-direction: row} }
.japaneseTrain li .d1,.japaneseTrain li .d2,.japaneseTrain li .d3,.japaneseTrain li .d4,.japaneseTrain li .d5{width: 18%;padding:20px 20px 10px;}
.japaneseTrain li .d7{flex:1;width: 1px;display: flex;flex-direction: row;align-items: center;justify-content: center} .japaneseTrain li .d7 {
.japaneseTrain li .d1 .di-title{font-size: 16px;color: #111111;} flex: 1;
.japaneseTrain li .d1 .di-c{font-size: 14px;display: flex;align-items: center;line-height: 28px;color: #111111} width: 1px;
.japaneseTrain li .d6{padding:10px 20px;width: 100%;height: inherit;position: relative;border-top: 1px solid #DDDEE0} display: flex;
.japaneseTrain li .d6 .progress{width: 100%;height: 5px;position: absolute;left: 0;bottom: 0} flex-direction: row;
.japaneseTrain li .d2 div{margin: 10px 0;font-size: 14px;color: #111111;} align-items: center;
.japaneseTrain li .d2-n{font-size: 12px;color: #999999;margin-right: 20px} justify-content: center
.japaneseTrain li .d3 .d3-s{color: #f5576c;font-weight: bold} }
.japaneseTrain li .d3 div{margin: 10px 0 ;font-size: 14px;}
.japaneseTrain li .d4 div{font-size: 14px;color: #111111;margin: 10px 0 ;} .japaneseTrain li .d1 .di-title {
.japaneseTrain li .d5 div{font-size: 14px;color: #111111;margin: 10px 0 ;} font-size: 16px;
.japaneseTrain .price-popup{border-radius: 4px;} color: #111111;
.japaneseTrain .el-range-editor .el-range-input { }
.japaneseTrain li .d1 .di-c {
font-size: 14px;
display: flex;
align-items: center;
line-height: 28px;
color: #111111
}
.japaneseTrain li .d6 {
padding: 10px 20px;
width: 100%;
height: inherit;
position: relative;
border-top: 1px solid #DDDEE0
}
.japaneseTrain li .d6 .progress {
width: 100%;
height: 5px;
position: absolute;
left: 0;
bottom: 0
}
.japaneseTrain li .d2 div {
margin: 10px 0;
font-size: 14px;
color: #111111;
}
.japaneseTrain li .d2-n {
font-size: 12px;
color: #999999;
margin-right: 20px
}
.japaneseTrain li .d3 .d3-s {
color: #f5576c;
font-weight: bold
}
.japaneseTrain li .d3 div {
margin: 10px 0;
font-size: 14px;
}
.japaneseTrain li .d4 div {
font-size: 14px;
color: #111111;
margin: 10px 0;
}
.japaneseTrain li .d5 div {
font-size: 14px;
color: #111111;
margin: 10px 0;
}
.japaneseTrain .price-popup {
border-radius: 4px;
}
.japaneseTrain .el-range-editor .el-range-input {
background: none; background: none;
} }
.japaneseTrain .el-range-editor.el-input__inner {
.japaneseTrain .el-range-editor.el-input__inner {
background-color: transparent; background-color: transparent;
} }
.japaneseTrain .q-mb-md{
.japaneseTrain .q-mb-md {
margin-bottom: 0; margin-bottom: 0;
} }
.japaneseTrain .month-item{
.japaneseTrain .month-item {
display: inline-block; display: inline-block;
width: 45.5px; width: 45.5px;
height: 45.4px; height: 45.4px;
...@@ -538,9 +639,9 @@ ...@@ -538,9 +639,9 @@
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
color: #2D2D2D; color: #2D2D2D;
} }
.price-popup .el-calendar-table .el-calendar-day{
height:60px;
}
.price-popup .el-calendar-table .el-calendar-day {
height: 60px;
}
</style> </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