|
|
@ -37,7 +37,7 @@ |
|
|
|
<h3 class="t14 tw-font-bold tw-mb-[30px] md:t16 tw-block"> |
|
|
|
輸入攤位數量 |
|
|
|
</h3> |
|
|
|
<selectExhibitionBooth @booth-select="getBoothSelect"></selectExhibitionBooth> |
|
|
|
<selectExhibitionBooth @booth-select="getBoothSelect" ref="ref_selectExhibitionBooth"></selectExhibitionBooth> |
|
|
|
</div> |
|
|
|
<!-- 選擇展覽 --> |
|
|
|
<div v-else class="group tw-mb-[40px] tw-px-[20px] tw-py-[30px] tw-rounded-[20px] tw-bg-white"> |
|
|
@ -487,7 +487,7 @@ export default { |
|
|
|
this.isLoading = false; |
|
|
|
}); |
|
|
|
|
|
|
|
// this.discount(); |
|
|
|
console.log(this.$refs.ref_selectExhibition) |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
let vm = this; |
|
|
@ -676,8 +676,6 @@ export default { |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
|
|
|
|
console.log('getExhibitions: ', data) |
|
|
|
|
|
|
|
if(data.length>0){ |
|
|
|
this.selectExhibitionList = data.map((item) => { |
|
|
|
return { |
|
|
@ -698,8 +696,6 @@ export default { |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
|
|
|
|
console.log('getServiceItems: ', data) |
|
|
|
|
|
|
|
if(data.length>0){ |
|
|
|
this.typeGroupList = data.map((item) => { |
|
|
|
if(item.ItemType=="02"){ |
|
|
@ -733,8 +729,6 @@ export default { |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
|
|
|
|
console.log('getPackages: ', data) |
|
|
|
|
|
|
|
if(data.length>0){ |
|
|
|
this.selectPackageList = data.map((item) => { |
|
|
|
return { |
|
|
@ -754,8 +748,6 @@ export default { |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
|
|
|
|
console.log('getQuantitySelects: ', data) |
|
|
|
|
|
|
|
if(data.length>0){ |
|
|
|
this.quantitySelectList = data; |
|
|
|
} |
|
|
@ -788,8 +780,6 @@ export default { |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
|
|
|
|
console.log('getServiceData: ', data) |
|
|
|
|
|
|
|
if(data){ |
|
|
|
this.content.name = data.ServiceName; |
|
|
|
this.content.highlights = data.Features; |
|
|
@ -849,8 +839,6 @@ export default { |
|
|
|
if(response && response.data && response.data.DATA && response.data.DATA.rel){ |
|
|
|
let data = response.data.DATA.rel |
|
|
|
|
|
|
|
console.log('getInfoItem: ', data); |
|
|
|
|
|
|
|
if(data.length>0){ |
|
|
|
this.expenseRules = data; |
|
|
|
} |
|
|
@ -889,72 +877,155 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
bookNow() { |
|
|
|
let validators = this.$refs.ref_selectExhibition.validators(); |
|
|
|
|
|
|
|
console.log("this.$refs.ref_selectExhibition:" + this.$refs.ref_selectExhibition); |
|
|
|
|
|
|
|
if(validators==false){ |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.selectExhibitionServiceList.length>0){ |
|
|
|
for(let i=0;i<this.selectExhibitionServiceList.length;i++){ |
|
|
|
let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0]; |
|
|
|
if(ref !=undefined){ |
|
|
|
validators = ref.validators(); |
|
|
|
if(this.serviceID == false){ |
|
|
|
|
|
|
|
let validators = this.$refs.ref_selectExhibition.validators(); |
|
|
|
|
|
|
|
console.log(validators) |
|
|
|
|
|
|
|
console.log("this.$refs.ref_selectExhibition:", this.$refs.ref_selectExhibition); |
|
|
|
|
|
|
|
if(validators==false){ |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.selectExhibitionServiceList.length>0){ |
|
|
|
for(let i=0;i<this.selectExhibitionServiceList.length;i++){ |
|
|
|
let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0]; |
|
|
|
if(ref !=undefined){ |
|
|
|
validators = ref.validators(); |
|
|
|
if(validators==false){ |
|
|
|
ref.show = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let selectExhibitionData = this.$refs.ref_selectExhibition.formData; |
|
|
|
let selectExhibitionServiceData = []; |
|
|
|
if(this.selectExhibitionServiceList.length>0){ |
|
|
|
for(let i=0;i<this.selectExhibitionServiceList.length;i++){ |
|
|
|
let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0]; |
|
|
|
if(ref !=undefined){ |
|
|
|
let target = ref.formData; |
|
|
|
selectExhibitionServiceData.push(target); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let quantityData = this.$refs.ref_quantitySelectGroup.formData; |
|
|
|
|
|
|
|
console.log(quantityData) |
|
|
|
|
|
|
|
if(quantityData.selectList.length>0){ |
|
|
|
if(this.showCardItem){ |
|
|
|
validators = this.$refs.ref_quantitySelectGroup.validators(); |
|
|
|
if(validators==false){ |
|
|
|
ref.show = true; |
|
|
|
this.pickupServiceShow = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
validators = this.$refs.ref_pickupService.validators(); |
|
|
|
if(validators==false){ |
|
|
|
this.pickupServiceShow = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// let pickupServiceData = this.$refs. ref_pickupService.formData; |
|
|
|
if(this.rulesShow){ |
|
|
|
this.ChangeCosts(null); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.$router.push( |
|
|
|
{ |
|
|
|
path: this.localePath("/service/checkout/" + this.$route.params.id), |
|
|
|
//携带需要传递的参数 |
|
|
|
query: { |
|
|
|
selectExhibitionData: encodeURIComponent(JSON.stringify(selectExhibitionData)), |
|
|
|
selectExhibitionServiceData: encodeURIComponent(JSON.stringify(selectExhibitionServiceData)), |
|
|
|
quantityData: encodeURIComponent(JSON.stringify(quantityData)), |
|
|
|
// pickupServiceData: encodeURIComponent(JSON.stringify(pickupServiceData)), |
|
|
|
totalPrice: this.totalPrice, |
|
|
|
currencyName: encodeURIComponent(this.currencyName), |
|
|
|
previewFile: encodeURIComponent(this.previewFile), |
|
|
|
title: encodeURIComponent(this.content.name) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let selectExhibitionData = this.$refs.ref_selectExhibition.formData; |
|
|
|
let selectExhibitionServiceData = []; |
|
|
|
if(this.selectExhibitionServiceList.length>0){ |
|
|
|
for(let i=0;i<this.selectExhibitionServiceList.length;i++){ |
|
|
|
let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0]; |
|
|
|
if(ref !=undefined){ |
|
|
|
let target = ref.formData; |
|
|
|
selectExhibitionServiceData.push(target); |
|
|
|
else if (this.serviceID == true) { |
|
|
|
|
|
|
|
let validators = this.$refs.ref_selectExhibitionBooth.validators(); |
|
|
|
|
|
|
|
if(validators==false){ |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.selectExhibitionServiceList.length>0){ |
|
|
|
for(let i=0;i<this.selectExhibitionServiceList.length;i++){ |
|
|
|
let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0]; |
|
|
|
if(ref !=undefined){ |
|
|
|
validators = ref.validators(); |
|
|
|
if(validators==false){ |
|
|
|
ref.show = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let quantityData = this.$refs.ref_quantitySelectGroup.formData; |
|
|
|
if(quantityData.selectList.length>0){ |
|
|
|
if(this.showCardItem){ |
|
|
|
validators = this.$refs.ref_quantitySelectGroup.validators(); |
|
|
|
if(validators==false){ |
|
|
|
this.pickupServiceShow = true; |
|
|
|
return false; |
|
|
|
|
|
|
|
// let selectExhibitionData = this.$refs.ref_selectExhibition.formData; |
|
|
|
let selectExhibitionServiceData = []; |
|
|
|
if(this.selectExhibitionServiceList.length>0){ |
|
|
|
for(let i=0;i<this.selectExhibitionServiceList.length;i++){ |
|
|
|
let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0]; |
|
|
|
if(ref !=undefined){ |
|
|
|
let target = ref.formData; |
|
|
|
selectExhibitionServiceData.push(target); |
|
|
|
} |
|
|
|
} |
|
|
|
validators = this.$refs.ref_pickupService.validators(); |
|
|
|
if(validators==false){ |
|
|
|
this.pickupServiceShow = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
let quantityData = this.$refs.ref_quantitySelectGroup.formData; |
|
|
|
|
|
|
|
console.log(quantityData) |
|
|
|
|
|
|
|
if(quantityData.selectList.length>0){ |
|
|
|
if(this.showCardItem){ |
|
|
|
validators = this.$refs.ref_quantitySelectGroup.validators(); |
|
|
|
if(validators==false){ |
|
|
|
this.pickupServiceShow = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
validators = this.$refs.ref_pickupService.validators(); |
|
|
|
if(validators==false){ |
|
|
|
this.pickupServiceShow = true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// let pickupServiceData = this.$refs. ref_pickupService.formData; |
|
|
|
if(this.rulesShow){ |
|
|
|
this.ChangeCosts(null); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.$router.push( |
|
|
|
{ |
|
|
|
path: this.localePath("/service/checkout/" + this.$route.params.id), |
|
|
|
//携带需要传递的参数 |
|
|
|
query: { |
|
|
|
selectExhibitionData: encodeURIComponent(JSON.stringify(selectExhibitionData)), |
|
|
|
selectExhibitionServiceData: encodeURIComponent(JSON.stringify(selectExhibitionServiceData)), |
|
|
|
quantityData: encodeURIComponent(JSON.stringify(quantityData)), |
|
|
|
// pickupServiceData: encodeURIComponent(JSON.stringify(pickupServiceData)), |
|
|
|
totalPrice: this.totalPrice, |
|
|
|
currencyName: encodeURIComponent(this.currencyName), |
|
|
|
previewFile: encodeURIComponent(this.previewFile), |
|
|
|
title: encodeURIComponent(this.content.name) |
|
|
|
// let pickupServiceData = this.$refs. ref_pickupService.formData; |
|
|
|
if(this.rulesShow){ |
|
|
|
this.ChangeCosts(null); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
this.$router.push( |
|
|
|
{ |
|
|
|
path: this.localePath("/service/checkout/" + this.$route.params.id), |
|
|
|
//携带需要传递的参数 |
|
|
|
query: { |
|
|
|
// selectExhibitionData: encodeURIComponent(JSON.stringify(selectExhibitionData)), |
|
|
|
selectExhibitionServiceData: encodeURIComponent(JSON.stringify(selectExhibitionServiceData)), |
|
|
|
quantityData: encodeURIComponent(JSON.stringify(quantityData)), |
|
|
|
// pickupServiceData: encodeURIComponent(JSON.stringify(pickupServiceData)), |
|
|
|
totalPrice: this.totalPrice, |
|
|
|
currencyName: encodeURIComponent(this.currencyName), |
|
|
|
previewFile: encodeURIComponent(this.previewFile), |
|
|
|
title: encodeURIComponent(this.content.name) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// choicesIdx(data) { |
|
|
|
// let vm = this; |
|
|
@ -1119,10 +1190,6 @@ export default { |
|
|
|
// 堆高機 |
|
|
|
stackerCostRules(data1,data2){ |
|
|
|
|
|
|
|
console.log('堆高機func: ', data1); |
|
|
|
console.log('堆高機func: ', data2); |
|
|
|
console.log('expenseRules: ', this.expenseRules); |
|
|
|
|
|
|
|
let price = 0; |
|
|
|
let tmpWeight = 0;//Number(data1.weight)/1000; |
|
|
|
// 材積重 長x寬x高/6000 得到噸 |
|
|
@ -1161,8 +1228,6 @@ export default { |
|
|
|
for(let i=0;i<this.expenseRules.length;i++){ |
|
|
|
let subArr = this.expenseRules[i].StackerCostRules; |
|
|
|
|
|
|
|
console.log('subArr: ', subArr) |
|
|
|
|
|
|
|
if(this.expenseRules[i].Guid == data2.package_id && subArr.length>0){ |
|
|
|
for(let j=0;j<subArr.length;j++){ |
|
|
|
// 需要判斷按數量還是重量 |
|
|
@ -1189,10 +1254,6 @@ export default { |
|
|
|
// apply stacker discount |
|
|
|
let quantityLeft = this.stackerDiscount(num, data1, data2); |
|
|
|
|
|
|
|
console.log("stackerDiscountQuota: ", this.stackerDiscountQuota) |
|
|
|
console.log("stackerDiscountQuotaUsed: ", this.stackerDiscountQuotaUsed) |
|
|
|
console.log("quantityLeft: ", quantityLeft) |
|
|
|
|
|
|
|
price = price * quantityLeft; |
|
|
|
|
|
|
|
return price; |
|
|
|
xxxxxxxxxx