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

页面修改

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