shizhongqi пре 8 месеци
родитељ
комит
a6b6a910e8
1 измењених фајлова са 9 додато и 10 уклоњено
  1. 9 10
      mallApp/src/pages/billing/affirmGhs.vue

+ 9 - 10
mallApp/src/pages/billing/affirmGhs.vue

@@ -270,7 +270,7 @@ export default {
 			const freeKmInMeters = (Number(this.shopInfo.hcFreeKm) || 0) * 1000
 			
 			// 如果距离小于免费公里数,则免运费
-			if(distanceInMeters < freeKmInMeters){
+			if(distanceInMeters <= freeKmInMeters){
 				return true
 			}
 			
@@ -313,12 +313,7 @@ export default {
 			
 			this.needAddPackCost = false
 			if (this.form.sendType == 4) {
-				// This block was not provided in the edit specification,
-				// so it's left as is, but it will cause a syntax error
-				// if it's not part of a valid if/else block.
-				// Assuming it's meant to be part of a larger if/else block
-				// or that it's a placeholder for a future change.
-				// For now, it's removed to avoid syntax errors.
+				
 			}
 			return price.toFixed(2)
 		},
@@ -392,8 +387,8 @@ export default {
 				//计算运费
 				//this.calcSendCost()
 				
-				if(Number(that.form.openIntraCity) == 1){
-					that.getDeliveryQuotes()
+				if(Number(this.form.openIntraCity) == 1){
+					this.getDeliveryQuotes()
 				}
 			} else {
 				// 切换到其他配送方式时清空报价数据
@@ -543,6 +538,10 @@ export default {
 				hdId:hdId,
 				isFreeDelivery:this.isFreeDelivery
 			}
+			// 如果是免运费,则将跑腿费设置为0
+			if(this.isFreeDelivery){
+				params.sendCost = 0
+			}
 			// 如果选择了跑腿配送并且有选中的平台数据,则添加配送平台信息
 			if (this.form.sendType == 2 && this.selectedDeliveryData) {
 				params.deliveryPlatform = this.selectedDeliveryData.en_name // 平台名称
@@ -557,7 +556,7 @@ export default {
 				}
 			}
 			if(this.form.sendType == 2) {
-				if(Number(this.form.sendCost) <= 0){
+				if(Number(this.form.sendCost) < 0){
 					this.$msg('没有获取到跑腿费')
 					return false
 				}