Commit f176a6f2 authored by 黄奎's avatar 黄奎

页面修改

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