Commit f176a6f2 authored by 黄奎's avatar 黄奎

页面修改

parent e741641a
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row wrap" style="margin:20px 0" v-if="objOption.IsOpenCommission==1"> <div class="row wrap" style="margin:20px 0" v-if="objOption.IsOpenCommission==1">
<div class="col-12"> <div class="col-12">
<q-field filled class="col-6 q-pr-lg q-pb-lg"> <q-field filled class="col-6 q-pr-lg q-pb-lg">
 <template v-slot:control>  <template v-slot:control>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
</template> </template>
</el-input> </el-input>
</template> </template>
 </q-field>  </q-field>
</div> </div>
</div> </div>
<div class="text-caption q-mb-lg q-px-md text-grey-6">上课设置</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">上课设置</div>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
</div> </div>
<div class="row wrap" v-if="objOption.ClassStyle==1"> <div class="row wrap" v-if="objOption.ClassStyle==1">
<div class="col-6"> <div class="col-6">
<q-select filled stack-label multiple option-value="value" option-label="label" v-model="checkedArr" <q-select filled stack-label multiple option-value="value" option-label="label" v-model="checkedDays"
ref="ClassStyle" :options="weekList" label="选择周几" :dense="false" class="col-6 q-pr-lg q-pr-lg" emit-value ref="ClassStyle" :options="weekList" label="选择周几" :dense="false" class="col-6 q-pr-lg q-pr-lg" emit-value
map-options> map-options>
<template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }"> <template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }">
...@@ -215,9 +215,30 @@ ...@@ -215,9 +215,30 @@
</div> </div>
<div class="row wrap" v-if="objOption.ClassStyle==2||objOption.ClassStyle==3"> <div class="row wrap" v-if="objOption.ClassStyle==2||objOption.ClassStyle==3">
<div class="col-12"> <div class="col-12">
<q-date v-model="checkedDays" minimal range multiple style="width:100%" /> <q-date v-model="checkedDays" minimal multiple style="width:100%" />
</div> </div>
</div> </div>
<div class="row wrap" style="margin:20px 0;">
<div class="col-6">
学习时段
<q-btn style="margin-left:30px;" size="10px" @click="addPlanTime()" round color="primary"
icon="iconfont icon-img_haha" />
</div>
</div>
<template v-if="DefaultPlanTimeList&&DefaultPlanTimeList.length>0">
<div class="row wrap" v-for="(nItem,nIndex) in DefaultPlanTimeList" :key="nIndex+10000">
<div class="col-6">
<q-input filled stack-label maxlength="20" v-model="nItem.StartTime" :dense="false"
class="col-6 q-pr-lg q-pb-lg" label="开始时间" />
</div>
<div class="col-6" style="position:relative;">
<q-input filled stack-label maxlength="20" v-model="nItem.EndTime" :dense="false"
class="col-6 q-pr-lg q-pb-lg" label="结束时间" />
<q-btn style="position:absolute;right:-5px;top:20px;" size="6px" @click="deletePlanTime(nIndex)" round
color="red" icon="iconfont icon-guanbi1" />
</div>
</div>
</template>
<div class="row wrap" style="margin-top:30px;"> <div class="row wrap" style="margin-top:30px;">
<div class="col-6"> <div class="col-6">
<q-input filled stack-label maxlength="20" v-model="objOption.ClassHours" :dense="false" <q-input filled stack-label maxlength="20" v-model="objOption.ClassHours" :dense="false"
...@@ -294,7 +315,6 @@ ...@@ -294,7 +315,6 @@
SchoolList: [], //关联校区下拉数据 SchoolList: [], //关联校区下拉数据
ClassRoomList: [], //教室下拉数据 ClassRoomList: [], //教室下拉数据
ladderPriceList: [], //阶梯定价数组 ladderPriceList: [], //阶梯定价数组
checkedArr: [],
//上课设置 //上课设置
classSetList: [{ classSetList: [{
Name: '按周排课', Name: '按周排课',
...@@ -312,35 +332,37 @@ ...@@ -312,35 +332,37 @@
//周几 //周几
weekList: [{ weekList: [{
label: '周一', label: '周一',
value: '周一', value: '1',
icon: 1 icon: 1
}, { }, {
label: '周二', label: '周二',
value: '周二', value: '2',
icon: 2 icon: 2
}, { }, {
label: '周三', label: '周三',
value: '周三', value: '3',
icon: 3 icon: 3
}, { }, {
label: '周四', label: '周四',
value: '周四', value: '4',
icon: 4 icon: 4
}, { }, {
label: '周五', label: '周五',
value: '周五', value: '5',
icon: 5 icon: 5
}, { }, {
label: '周六', label: '周六',
value: '周六', value: '6',
icon: 6 icon: 6
}, { }, {
label: '周日', label: '周日',
value: '周日', value: '7',
icon: 7 icon: 7
}], }],
//选中日期 //选中日期/星期
checkedDays: [] checkedDays: [],
//默认上课时间数组
DefaultPlanTimeList: [],
} }
}, },
created() { created() {
...@@ -355,11 +377,11 @@ ...@@ -355,11 +377,11 @@
methods: { methods: {
//初始化表单 //初始化表单
initObj() { initObj() {
console.log(this.saveObj,'saveObj');
if (this.saveObj && this.saveObj.ClassId > 0) { if (this.saveObj && this.saveObj.ClassId > 0) {
getClassInfo({ getClassInfo({
ClassId: this.saveObj.ClassId ClassId: this.saveObj.ClassId
}).then(res => { }).then(res => {
console.log("rees", res.Data);
var TempData = res.Data; var TempData = res.Data;
this.objOption.ClassId = TempData.ClassId; this.objOption.ClassId = TempData.ClassId;
this.objOption.ClassName = TempData.ClassName; this.objOption.ClassName = TempData.ClassName;
...@@ -374,7 +396,7 @@ ...@@ -374,7 +396,7 @@
this.objOption.UpdateTime = TempData.UpdateTime; this.objOption.UpdateTime = TempData.UpdateTime;
this.objOption.Status = TempData.Status; this.objOption.Status = TempData.Status;
this.objOption.ClassPersion = TempData.ClassPersion; this.objOption.ClassPersion = TempData.ClassPersion;
this.objOption.OpenTime = TempData.OpenTime; //暂无 this.objOption.OpenTime = TempData.OpenTime; //暂无
this.objOption.EndOrderTime = TempData.EndOrderTime; this.objOption.EndOrderTime = TempData.EndOrderTime;
this.objOption.OriginalPrice = TempData.OriginalPrice; this.objOption.OriginalPrice = TempData.OriginalPrice;
this.objOption.SellPrice = TempData.SellPrice; this.objOption.SellPrice = TempData.SellPrice;
...@@ -386,10 +408,9 @@ ...@@ -386,10 +408,9 @@
this.objOption.ClassHours = TempData.ClassHours; this.objOption.ClassHours = TempData.ClassHours;
this.objOption.ClassStyle = TempData.ClassStyle; this.objOption.ClassStyle = TempData.ClassStyle;
this.objOption.ClassStatus = TempData.ClassStatus; this.objOption.ClassStatus = TempData.ClassStatus;
if(TempData.ClassStepPriceList&&TempData.ClassStepPriceList.length>0){ if (TempData.ClassStepPriceList && TempData.ClassStepPriceList.length > 0) {
this.ladderPriceList = TempData.ClassStepPriceList; this.ladderPriceList = TempData.ClassStepPriceList;
} }
console.log("rees", res.Data);
}) })
this.optionTitle = "修改班级信息" this.optionTitle = "修改班级信息"
} else { } else {
...@@ -399,46 +420,46 @@ ...@@ -399,46 +420,46 @@
//关闭弹窗 //关闭弹窗
closeCourseForm() { closeCourseForm() {
this.$emit('close'); this.$emit('close');
this.persistent = false this.persistent = false;
}, },
//保存班级 //保存班级
saveCourse() { saveCourse() {
this.saveCourseLoading = true this.saveCourseLoading = true
this.objOption.ClassStepPriceList = this.ladderPriceList; this.objOption.ClassStepPriceList = this.ladderPriceList;
if(this.objOption.ClassName==''){ if (this.objOption.ClassName == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请填写班级名称` message: `请填写班级名称`
}) })
return; return;
} }
if(this.objOption.ClassPersion==''){ if (this.objOption.ClassPersion == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请填写招生人数` message: `请填写招生人数`
}) })
return; return;
} }
if(this.objOption.OriginalPrice==''){ if (this.objOption.OriginalPrice == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请填写原价` message: `请填写原价`
}) })
return; return;
} }
if(this.objOption.SellPrice==''){ if (this.objOption.SellPrice == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请填写卖价` message: `请填写卖价`
}) })
return; return;
} }
if(this.objOption.IsOpenCommission==1){ if (this.objOption.IsOpenCommission == 1) {
if(this.objOption.CommissionValue==''){ if (this.objOption.CommissionValue == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -447,7 +468,7 @@ ...@@ -447,7 +468,7 @@
return; return;
} }
} }
if(this.objOption.ClassHours==''){ if (this.objOption.ClassHours == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -455,7 +476,10 @@ ...@@ -455,7 +476,10 @@
}) })
return; return;
} }
//选中的日期或星期
this.objOption.WeekDayList=this.checkedDays;
//默认上课时间
this.objOption.DefaultPlanTimeList = this.DefaultPlanTimeList;
saveClass(this.objOption).then(res => { saveClass(this.objOption).then(res => {
this.saveCourseLoading = false this.saveCourseLoading = false
this.$q.notify({ this.$q.notify({
...@@ -524,6 +548,18 @@ ...@@ -524,6 +548,18 @@
//删除阶梯定价 //删除阶梯定价
delStepPrice(index) { delStepPrice(index) {
this.ladderPriceList.splice(index, 1); this.ladderPriceList.splice(index, 1);
},
//添加学习时段
addPlanTime() {
var obj = {
StartTime: "",
EndTime: "",
}
this.DefaultPlanTimeList.push(obj);
},
//删除学习时段
deletePlanTime(index) {
this.DefaultPlanTimeList.splice(index, 1);
} }
}, },
} }
......
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