Commit 03065c12 authored by 黄媛媛's avatar 黄媛媛

去掉过期时间套餐,新增身高体重鞋子等参数判断

parent 6214bb28
......@@ -74,9 +74,9 @@
</div>
</el-popover>
<div v-if="mealType.pkgs">
<p v-show="mealType.pkgs.length>0" class="f14 pfR">套餐列表</p>
<p v-show="pkgsList.length>0" class="f14 pfR">套餐列表</p>
<div style="margin-top:16px" class="typeList">
<span :class="mealTypeindex==index?'mealactive':''" @click="getmealTypeItem(item,index)" v-for="(item,index) in mealType.pkgs" :key="index+100">
<span :class="mealTypeindex==index?'mealactive':''" @click="getmealTypeItem(item,index)" v-for="(item,index) in pkgsList" :key="index+100">
<font v-if="item.pkg_name">{{rePlace(item.pkg_name)}}</font>
</span>
......@@ -299,6 +299,7 @@ export default {
scrollTop:0,
rightFixed:"0",
noData: false,
pkgsList:[],
}
},
created(){
......@@ -420,7 +421,7 @@ export default {
this.msgObj.event_backup_data=item.is_hl;
},
getmealTypeItem(item,index){
this.msgObj.ProductPKGName=item.pkg_name;
this.msgObj.pkg_name=item.pkg_name;
this.msgObj.pkg_no=item.pkg_no;
this.mealTypeItem=item;
this.mealTypeindex=index;
......@@ -465,8 +466,20 @@ export default {
},
res => {
if (res.data.data.result === "00") {
let today= moment().format("YYYY-MM-DD");
this.pkgsList=[];
this.mealType=res.data.data;
console.log("this.mealType",this.mealType.pkgs)
console.log(moment('2019-08-29').isBefore(moment('2019-08-30')))
if(this.mealType.pkgs){
this.mealType.pkgs.forEach(item=>{
//
let endDate=item.online_e_date.substring(0,4)+"-"+item.online_e_date.substring(4,6)+"-"+item.online_e_date.substring(6,8);
if(today==endDate || moment(today).isBefore(moment(endDate))){
this.pkgsList.push(item);
}
})
}
this.msgObj.guid=this.mealType.guid;
if(this.mealType.sale_dates.saleDt){
this.dateList=this.mealType.sale_dates.saleDt;
......
......@@ -126,13 +126,11 @@ export default {
},methods:{
selectDate(item){
console.log(item)
let a=false;
a=moment(this.today).isBefore(moment(item.date_str));
if(item.date_str==this.today){
a=true;
}
console.log('a',a)
if(item.pkg_no &&item.pkg_no!="" && a){
this.$emit('SelectChild',item);
}
......
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