Commit 679acb14 authored by 王's avatar

期数bug&&盒子列表bug

parent ec73e610
......@@ -59,8 +59,8 @@
methods: {
getBoxTypeList(){
getBoxTypeListApi().then(res=>{
this.list = res;
if(this.nowId === '') {
this.list = res ? res : [];
if(this.nowId === '' && res) {
this.changeCateGory(res[0].id)
}
})
......
......@@ -174,11 +174,11 @@
this.getClassList()
})
} else {
getPeriodsApi({goods_id:this.goodsList[0].id}).then(res=>{
res.list.forEach(i=>{i.name = i.title});
this.goodsList[0].children = res.list;
this.periods = res.list[0]
})
// getPeriodsApi({goods_id:this.goodsList[0].id}).then(res=>{
// res.list.forEach(i=>{i.name = i.title});
// this.goodsList[0].children = res.list;
// this.periods = res.list[0]
// })
}
},
initPage(){
......@@ -221,6 +221,7 @@
this.getClassList();
},
getClassList(){
console.log('getClassList this.periods', this.periods)
if (!this.periods) return;
this.getTeacher();
let json = {
......
......@@ -173,6 +173,10 @@
page
},
methods: {
dateCompare(val){
let nowDate = CommonJs.dateFmt(new Date(),"yyyy-MM-dd");
return ((new Date(nowDate.replace(/-/g,"\/"))) > (new Date(val.replace(/-/g,"\/"))));
},
onPageChange(val){
this.nowPage = val
this.onSearch()
......@@ -216,7 +220,13 @@
this.newDialog.show = true;
},
onEdit(row){
console.log('onEdit', row);
if (this.dateCompare(row.start_at)) {
this.$message({
type: 'error',
message: '期数已开始,不能编辑!'
});
return;
}
let weekList = [];
if(row.rest_week_day){
row.rest_week_day.split(',').forEach((val)=>{
......
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