Commit ba37be7a authored by zhengke's avatar zhengke

修改

parent 02bc1efd
......@@ -251,9 +251,9 @@
<q-page>
<div class="order-buy">
<ul class="tab-list">
<li>01. 填寫訂購單</li>
<li>02. 付款方式</li>
<li class="is-checked">03. 填寫旅客資料</li>
<!-- <li>01. 填寫訂購單</li>
<li>02. 付款方式</li> -->
<li class="is-checked">01. 填寫旅客資料</li>
</ul>
<div class="Order_content">
<div class="order-info">
......@@ -290,7 +290,7 @@
<!-- 旅客资料开始 -->
<div class="order-info-block" v-if="shape==1">
<div class="buy-title">旅客資料
<q-btn color="amber" @click="SavePassenger()" style="float:right;font-size:17px;font-weight:bold;"
<q-btn color="amber" @click="SavePassenger()" type="submit" style="float:right;font-size:17px;font-weight:bold;"
label="儲存" />
</div>
<div class="member-data" v-for="(item,index) in GuestObj.list" :key="index">
......@@ -625,7 +625,7 @@
for (var i = 0; i < tempObj.GuestNum; i++) {
tempObj.list.push(this.GetGuestObj());
}
} else if (tempObj.list.length > 0 && tempObj.list.length < tempObj.GuestNum) {
} else if (tempObj.list.length > 0) {
var newArray = [];
var tempArray = JSON.parse(JSON.stringify(tempObj.list));
if (tempArray && tempArray.length > 0) {
......@@ -650,14 +650,13 @@
newArray.push(obj);
});
}
for (var i = tempObj.list.length; i < tempObj.GuestNum; i++) {
newArray.push(this.GetGuestObj());
if(tempObj.list.length < tempObj.GuestNum){
for (var i = tempObj.list.length; i < tempObj.GuestNum; i++) {
newArray.push(this.GetGuestObj());
}
}
tempObj.list = [];
tempObj.list = newArray;
tempObj.list.forEach(x=>{
x.isShow=true;
})
}
}
this.GuestObj = tempObj;
......@@ -667,6 +666,17 @@
}
});
},
getConnect(){
this.$refs.myForm.validate().then(success => {
if (success) {
// yay, models are correct
}
else {
// oh no, user has filled in
// at least one invalid value
}
})
},
//保存旅客信息
SavePassenger() {
var that = this;
......@@ -680,6 +690,13 @@
"sellorder_post_SetTravelGuestList", this.GuestObj.list,
res => {
if (res.data.resultCode == 1) {
this.$q.notify({
type: 'negative',
message: res.data.message,
position: 'top',
color:'secondary',
timeout: 2000, // 以毫秒为单位; 0意味着没有超时
})
this.getTravelGuest();
}else{
this.$q.notify({
......
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