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

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

parent 6214bb28
...@@ -74,9 +74,9 @@ ...@@ -74,9 +74,9 @@
</div> </div>
</el-popover> </el-popover>
<div v-if="mealType.pkgs"> <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"> <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> <font v-if="item.pkg_name">{{rePlace(item.pkg_name)}}</font>
</span> </span>
...@@ -299,6 +299,7 @@ export default { ...@@ -299,6 +299,7 @@ export default {
scrollTop:0, scrollTop:0,
rightFixed:"0", rightFixed:"0",
noData: false, noData: false,
pkgsList:[],
} }
}, },
created(){ created(){
...@@ -420,7 +421,7 @@ export default { ...@@ -420,7 +421,7 @@ export default {
this.msgObj.event_backup_data=item.is_hl; this.msgObj.event_backup_data=item.is_hl;
}, },
getmealTypeItem(item,index){ getmealTypeItem(item,index){
this.msgObj.ProductPKGName=item.pkg_name; this.msgObj.pkg_name=item.pkg_name;
this.msgObj.pkg_no=item.pkg_no; this.msgObj.pkg_no=item.pkg_no;
this.mealTypeItem=item; this.mealTypeItem=item;
this.mealTypeindex=index; this.mealTypeindex=index;
...@@ -465,8 +466,20 @@ export default { ...@@ -465,8 +466,20 @@ export default {
}, },
res => { res => {
if (res.data.data.result === "00") { if (res.data.data.result === "00") {
let today= moment().format("YYYY-MM-DD");
this.pkgsList=[];
this.mealType=res.data.data; 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; this.msgObj.guid=this.mealType.guid;
if(this.mealType.sale_dates.saleDt){ if(this.mealType.sale_dates.saleDt){
this.dateList=this.mealType.sale_dates.saleDt; this.dateList=this.mealType.sale_dates.saleDt;
......
...@@ -47,15 +47,68 @@ ...@@ -47,15 +47,68 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="guide_langList.length>0" label="导览语系"> <el-form-item v-if="guide_langList.length>0" label="导览语系">
<el-select @change="GenderSelect" size="mini" style="margin-right:8px" v-model="freeMsg.guide_lang" filterable placeholder="请选择"> <el-select @change="GenderSelect" size="mini" style="margin-right:8px" v-model="freeMsg.guide_lang" filterable placeholder="请选择">
<el-option <el-option
v-for="item in guide_langList" v-for="item in guide_langList"
:key="item.code" :key="item.code"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="身高" v-show="concatObj.height_s">
<el-input placeholder="身高" size="mini" style="width:100px" v-model="freeMsg.height"></el-input>
</el-form-item>
<el-form-item label="身高单位" v-show="concatObj.height_unit_s">
<el-select @change="GenderSelect" size="mini" style="margin-right:8px" v-model="freeMsg.height_unit" filterable placeholder="请选择">
<el-option
v-for="item in concatObj.height_unitList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="体重" v-show="concatObj.weight_s">
<el-input placeholder="体重" size="mini" style="width:100px" v-model="freeMsg.weight"></el-input>
</el-form-item>
<el-form-item label="体重单位" v-show="concatObj.weight_unit_s">
<el-select @change="GenderSelect" size="mini" style="margin-right:8px" v-model="freeMsg.weight_unit" filterable placeholder="请选择">
<el-option
v-for="item in concatObj.weight_unitList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="鞋子尺寸" v-show="concatObj.shoe_s">
<el-input placeholder="鞋子尺寸" size="mini" style="width:100px" v-model="freeMsg.shoe"></el-input>
</el-form-item>
<el-form-item label="鞋子单位" v-show="concatObj.shoe_unit_s">
<el-select @change="GenderSelect" size="mini" style="margin-right:8px" v-model="freeMsg.shoe_unit" filterable placeholder="请选择">
<el-option
v-for="item in concatObj.shoe_unitList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="鞋子类型" v-show="concatObj.shoe_type_s">
<el-select @change="GenderSelect" size="mini" style="margin-right:8px" v-model="freeMsg.shoe_type" filterable placeholder="请选择">
<el-option
v-for="item in concatObj.shoe_typeList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -67,7 +120,7 @@ ...@@ -67,7 +120,7 @@
<el-form v-show="listform.customNew.length>0" class="OrderConForm" ref="listform" :model="listform" label-width="100px"> <el-form v-show="listform.customNew.length>0" class="OrderConForm" ref="listform" :model="listform" label-width="100px">
<!-- 必填多个客户freeMsg --> <!-- 必填多个客户freeMsg -->
<div class="commomStyle"> <div class="commomStyle">
<div v-show="item.cus_type!='contact'" v-for="(item,index) in listform.customNew" :key="index"> <div v-show="item.cus_type!='contact' && item.cus_type!='send'" v-for="(item,index) in listform.customNew" :key="index">
<div class="titleDiv"> <div class="titleDiv">
<span class="redSpan"></span> <span class="redSpan"></span>
<span class="f18 pfR">客户资料</span> <span class="f18 pfR">客户资料</span>
...@@ -313,6 +366,7 @@ export default { ...@@ -313,6 +366,7 @@ export default {
form:{}, form:{},
freeMsg:{ freeMsg:{
custom:[], custom:[],
}, },
booking_field:{}, booking_field:{},
markMsg:{ markMsg:{
...@@ -338,6 +392,7 @@ export default { ...@@ -338,6 +392,7 @@ export default {
} }
}, },
concat:false, concat:false,
send:false,
payObj:{ payObj:{
type:'02', type:'02',
credit_card:{}, credit_card:{},
...@@ -352,6 +407,19 @@ export default { ...@@ -352,6 +407,19 @@ export default {
}, },
mobile_device:{}, mobile_device:{},
mobile_deviceStatus:false, mobile_deviceStatus:false,
concatObj:{
height_s:false,
height_unit_s:false,
weight_unitList:[],
shoe_s:false,
shoe_type_s:false,
shoe_typeList:[],
shoe_unit_s:false,
shoe_unitList:[],
weight_s:false,
weight_unit_s:false,
weight_unitList:[],
},
} }
}, },
created(){ created(){
...@@ -362,6 +430,11 @@ export default { ...@@ -362,6 +430,11 @@ export default {
this.freeMsg.custom=[]; this.freeMsg.custom=[];
this.freeMsg.pay={}; this.freeMsg.pay={};
this.freeMsg.buyer_tel_country_code="86"; this.freeMsg.buyer_tel_country_code="86";
this.freeMsg.buyer_tel_number="13183813102";
this.freeMsg.buyer_email="13183813102@qq.com";
this.freeMsg.pay={ this.freeMsg.pay={
type: "02", type: "02",
// credit_card: { // credit_card: {
...@@ -429,7 +502,57 @@ export default { ...@@ -429,7 +502,57 @@ export default {
this.Error("请输入预订人的电子邮件"); this.Error("请输入预订人的电子邮件");
return; return;
} }
// concatObj:{
// height_s:false,
// height_unit_s:false,
// shoe_s:false,
// shoe_type_s:false,
// shoe_unit_s:false,
// weight_s:false,
// weight_unit_s:false,
// },
if(this.concatObj.height_s){
if(this.freeMsg.height=="" || !this.freeMsg.height){
this.Error("请输入身高!");
return;
}
}
if(this.concatObj.height_unit_s){
if(this.freeMsg.height_unit=="" || !this.freeMsg.height_unit){
this.Error("请输入身高单位!");
return;
}
}
if(this.concatObj.shoe_s){
if(this.freeMsg.shoe=="" || !this.freeMsg.shoe){
this.Error("请输入鞋子尺寸!");
return;
}
}
if(this.concatObj.shoe_type_s){
if(this.freeMsg.shoe_type=="" || !this.freeMsg.shoe_type){
this.Error("请输入鞋子类型!");
return;
}
}
if(this.concatObj.shoe_unit_s){
if(this.freeMsg.shoe_unit=="" || !this.freeMsg.shoe_unit){
this.Error("请输入鞋子单位!");
return;
}
}
if(this.concatObj.weight_s){
if(this.freeMsg.weight=="" || !this.freeMsg.weight){
this.Error("请输入体重!");
return;
}
}
if(this.concatObj.weight_unit_s){
if(this.freeMsg.weight_unit=="" || !this.freeMsg.weight_unit){
this.Error("请输入体重单位!");
return;
}
}
if(this.concat){ if(this.concat){
if(this.listform.customNew.length>0){ if(this.listform.customNew.length>0){
...@@ -438,6 +561,14 @@ export default { ...@@ -438,6 +561,14 @@ export default {
this.listform.customNew.push(msg); this.listform.customNew.push(msg);
} }
} }
if(this.send){
if(this.listform.customNew.length>0){
let msg=Object.assign({},this.listform.customNew[0]);
msg.cus_type="send";
this.listform.customNew.push(msg);
}
}
if(this.trafficState){ if(this.trafficState){
this.freeMsg.traffic=this.traffic; this.freeMsg.traffic=this.traffic;
} }
...@@ -589,6 +720,9 @@ export default { ...@@ -589,6 +720,9 @@ export default {
if(item=="contact"){ if(item=="contact"){
this.concat=true; this.concat=true;
} }
if(item=="send"){
this.send=true;
}
if(item=="cus_02"){ if(item=="cus_02"){
this.markMsg.peopleType=2; this.markMsg.peopleType=2;
for(let i=0;i<peoplenum;i++){ for(let i=0;i<peoplenum;i++){
...@@ -653,6 +787,36 @@ export default { ...@@ -653,6 +787,36 @@ export default {
}; };
this.mobile_deviceStatus=true; this.mobile_deviceStatus=true;
} }
// 身高等
if(customObj.height){
this.concatObj.height_s=true;
}
if(customObj.height_unit){
this.concatObj.height_unit_s=true;
this.concatObj.height_unitList=customObj.height_unit.list_option;
}
if(customObj.shoe){
this.concatObj.shoe_s=true;
}
if(customObj.shoe_type){
this.concatObj.shoe_type_s=true;
this.concatObj.shoe_typeList=customObj.shoe_type.list_option;
}
if(customObj.shoe_unit){
this.concatObj.shoe_unit_s=true;
this.concatObj.shoe_unitList=customObj.shoe_unit.list_option;
}
if(customObj.weight){
this.concatObj.weight_s=true;
}
if(customObj.weight_unit){
this.concatObj.weight_unit_s=true;
this.concatObj.weight_unitList=customObj.weight_unit.list_option;
}
} }
......
...@@ -126,13 +126,11 @@ export default { ...@@ -126,13 +126,11 @@ export default {
},methods:{ },methods:{
selectDate(item){ selectDate(item){
console.log(item)
let a=false; let a=false;
a=moment(this.today).isBefore(moment(item.date_str)); a=moment(this.today).isBefore(moment(item.date_str));
if(item.date_str==this.today){ if(item.date_str==this.today){
a=true; a=true;
} }
console.log('a',a)
if(item.pkg_no &&item.pkg_no!="" && a){ if(item.pkg_no &&item.pkg_no!="" && a){
this.$emit('SelectChild',item); 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