Commit bd61555a authored by 黄奎's avatar 黄奎

页面修改

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