Commit 9fb0caef authored by 黄奎's avatar 黄奎

页面修改

parent 9488d898
...@@ -217,24 +217,22 @@ ...@@ -217,24 +217,22 @@
field: row => row.ActualPrice.toFixed(2) field: row => row.ActualPrice.toFixed(2)
} }
], ],
TreeCategoryList: [], TreeCategoryList: [], //课程系列列表
pageInfo: { pageInfo: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12 rowsPerPage: 12
}, },
courses: [], courseList: [], //课程列表
courseOptions: [], courseOptions: [],
chosenCategory: null, chosenCategory: null, //选中的系列
chosenCourse: null, chosenCourse: null, //选中的课程
categoryOptions: [], categoryOptions: [],
chosenCourses: [] chosenCourses: []
}; };
}, },
computed: { computed: {
quomodel() {
}
}, },
created() { created() {
this.getCategorytree(); this.getCategorytree();
...@@ -269,6 +267,7 @@ ...@@ -269,6 +267,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
} }
} }
}) })
...@@ -291,6 +290,7 @@ ...@@ -291,6 +290,7 @@
}; };
} }
}, },
//保存报价单
saveOffice() { saveOffice() {
this.$refs.EffectiveEnd.validate(); this.$refs.EffectiveEnd.validate();
this.$refs.CustomerType.validate(); this.$refs.CustomerType.validate();
...@@ -337,6 +337,7 @@ ...@@ -337,6 +337,7 @@
}); });
} }
}, },
//获取课程系列
getCategorytree() { getCategorytree() {
this.TreeCategoryList = []; this.TreeCategoryList = [];
var qMsg = {}; var qMsg = {};
...@@ -346,18 +347,20 @@ ...@@ -346,18 +347,20 @@
this.getCourses(); this.getCourses();
}); });
}, },
//获取课程列表
getCourses() { getCourses() {
this.courses = []; this.courseList = [];
var qMsg = { var qMsg = {
CourseName: "", CourseName: "",
CateId: 0, CateId: 0,
IsQPrice: 1 IsQPrice: 1
}; };
queryCourseDropdownList(qMsg).then(res => { queryCourseDropdownList(qMsg).then(res => {
this.courses = res.Data; this.courseList = res.Data;
this.courseOptions = this.courses; this.courseOptions = this.courseList;
}); });
}, },
//系列筛选
filterFn(val, update, abort) { filterFn(val, update, abort) {
update(() => { update(() => {
this.categoryOptions = this.TreeCategoryList.filter( this.categoryOptions = this.TreeCategoryList.filter(
...@@ -365,24 +368,27 @@ ...@@ -365,24 +368,27 @@
); );
}); });
}, },
//课程筛选
filterCourseFn(val, update, abort) { filterCourseFn(val, update, abort) {
update(() => { update(() => {
this.courseOptions = this.courses.filter( this.courseOptions = this.courseList.filter(
v => v.CourseName.indexOf(val) > -1 v => v.CourseName.indexOf(val) > -1
); );
}); });
}, },
//系列改变
changeCategory() { changeCategory() {
this.courseOptions = this.courses.filter( this.courseOptions = this.courseList.filter(
v => v.CateId == this.chosenCategory v => v.CateId == this.chosenCategory
); );
this.$forceUpdate(); this.$forceUpdate();
}, },
//添加课程
addCourse() { addCourse() {
this.$refs.JoinNum.validate(); this.$refs.JoinNum.validate();
this.$refs.CustomerType.validate(); this.$refs.CustomerType.validate();
if (!this.$refs.JoinNum.hasError && !this.$refs.CustomerType.hasError) { if (!this.$refs.JoinNum.hasError && !this.$refs.CustomerType.hasError) {
let val = this.courses.find(x => x.CourseId == this.chosenCourse); let val = this.courseList.find(x => x.CourseId == this.chosenCourse);
if (val) { if (val) {
let temp = this.chosenCourses.find(x => x.CourseId == val.CourseId); let temp = this.chosenCourses.find(x => x.CourseId == val.CourseId);
if (!temp) { if (!temp) {
...@@ -532,6 +538,9 @@ ...@@ -532,6 +538,9 @@
}); });
return result; return result;
}, },
},
watch: {
} }
}; };
......
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