Commit bd61555a authored by 黄奎's avatar 黄奎

页面修改

parent 7b8ea0d7
......@@ -73,27 +73,28 @@
</q-td>
</template>
<!--设置课程-->
<template v-slot:body-cell-ClassName="props">
<template v-slot:body-cell-ClassId="props">
<span>
<template v-if="props.row.ClassName">
<template v-if="props.row.ClassId>0">
{{props.row.ClassName}}
</template>
<template v-else>
选择课程
选择班级
</template>
</span>&nbsp;
<i class="iconfont icon-edit" @click.stop="setClass(props.row)" title="点击修改班级状态">
<i class="iconfont icon-edit" @click.stop="setClass(props.row)" title="选择班级">
<q-popup-proxy>
<q-banner v-if="isShowClass">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">设置班级状态</div>
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="statusMsg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
<div style="margin:10px 0 15px 0;">选择班级</div>
<q-select standout="bg-primary text-white" option-value="ClassId" option-label="ClassName"
v-model="props.row.ClassId" :options="props.row.ClassList" emit-value map-options label="班级"
@input="changeClass(props.row)" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowClass=false"
<q-btn label="取消" flat color="grey-10" @click="isShowClass=true"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="setClassStatus()" />
@click="isShowClass=false" />
</q-card-actions>
</div>
</q-banner>
......@@ -154,6 +155,10 @@
saveCourseOffer,
queryCourseOfferInfo
} from "../../api/course/index";
import {
getClassDropDownList,
} from "../../api/school/index";
import {
date
} from "quasar";
......@@ -225,7 +230,14 @@
label: "小计金额",
align: "left",
field: row => row.ActualPrice.toFixed(2)
}
},
{
name: "ClassId",
required: true,
label: "班级",
align: "left",
field: row => row.ClassId
},
],
TreeCategoryList: [], //课程系列列表
pageInfo: {
......@@ -239,7 +251,7 @@
chosenCourse: null, //选中的课程
categoryOptions: [],
chosenCourses: [],
isShowClass:false,//选择班级
isShowClass: false, //选择班级
};
},
computed: {
......@@ -254,7 +266,25 @@
methods: {
//选择班级
setClass(item) {
this.isShowClass = true;
getClassDropDownList({
CourseId: item.CourseId
}).then(res => {
item.ClassList = [];
if (res.Code == 1) {
item.ClassList = res.Data;
}
});
},
changeClass(item) {
if (item.ClassId > 0) {
let val = item.ClassList.find(x => x.ClassId == item.ClassId);
if (val) {
item.ClassName = val.ClassName;
}
} else {
item.ClassName = ""
}
},
//初始化对象
initObj() {
......@@ -282,7 +312,7 @@
};
if (tempObj.OfferDetails && tempObj.OfferDetails.length > 0) {
this.model.OfferDetails = tempObj.OfferDetails;
this.chosenCourses = tempObj.OfferDetails
this.chosenCourses = tempObj.OfferDetails;
}
}
})
......
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