Browse Source

計價func 加註解

Dev
parent
commit
1ab166d131
  1. 33
      FrontEnd/pages/service/_id.vue

33
FrontEnd/pages/service/_id.vue

@ -797,6 +797,7 @@ export default {
})
.catch((error) => console.log(error));
},
//
async getInfoItem() {
await this.$axios
.get(`/trending/api/Onsite/InfoItem?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}`)
@ -843,7 +844,7 @@ export default {
bookNow() {
let validators = this.$refs.ref_selectExhibition.validators();
console.log(validators);
console.log(this.$refs.ref_selectExhibition);
if(validators==false){
return false;
@ -862,7 +863,6 @@ export default {
}
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];
@ -989,33 +989,50 @@ export default {
},
//
stackerCostRules(data1,data2){
console.log(this.expenseRules)
let price = 0;
let tmpWeight = 0;//Number(data1.weight)/1000;
// xx/6000
if((data1.length =="" && data1.width=="" && data1.height=="") && data1.weight!=""){
tmpWeight = Number(data1.weight)/1000;
}else if((data1.length !="" && data1.width!="" && data1.height!="") && data1.weight==""){
tmpWeight = Number(data1.weight)/1000; // Number() => !!
} //()()() () => = ()/1000!!
else if((data1.length !="" && data1.width!="" && data1.height!="") && data1.weight==""){
tmpWeight = Number(data1.length)*Number(data1.width)*Number(data1.height)/6000/1000;
}else if(data1.length !="" && data1.width!="" && data1.height!="" && data1.weight!=""){
} //()()() () => = **/6000/1000!!
//()()() () => = **/6000/1000!!
else if(data1.length !="" && data1.width!="" && data1.height!="" && data1.weight!=""){
let volumeWeight = Number(data1.length)*Number(data1.width)*Number(data1.height)/6000/1000;
//
// ()!!
if(volumeWeight>Number(data1.weight)/1000){
tmpWeight = volumeWeight;
tmpWeight = volumeWeight; // > => = !!
}else{
tmpWeight = Number(data1.weight)/1000;
tmpWeight = Number(data1.weight)/1000; // < => = !!
}
}
// => > 1000 > 1000 > 330dialog!!
if(Number(data1.length) > 1000 || Number(data1.width) > 1000 || Number(data1.height)>330){
this.dialog = true;
this.openTimer();
return -1;
}
// => 00 !!
if(tmpWeight==0){
return price;
}
if(this.expenseRules.length>0){
for(let i=0;i<this.expenseRules.length;i++){
let subArr = this.expenseRules[i].StackerCostRules;
console.log(subArr)
if(this.expenseRules[i].Guid == data2.package_id && subArr.length>0){
for(let j=0;j<subArr.length;j++){
//

Loading…
Cancel
Save