lilei 8 月之前
父节点
当前提交
ce944a0cc0
共有 2 个文件被更改,包括 26 次插入34 次删除
  1. 22 28
      pagesB/procureOrder.vue
  2. 4 6
      pagesB/shopiing/productDetail.vue

+ 22 - 28
pagesB/procureOrder.vue

@@ -47,7 +47,7 @@
 										买{{item.conditionValue}}赠{{item.resultValue}}
 									</view>
 									<view class="flex align_center tejia-tag" v-if="item.promoType=='PROMO_PROD'">
-										特价<text>¥{{item.orginPrice}}</text>
+										特价<text>¥{{item.priceOrig}}</text>
 									</view>
 								</view>
 								<view>
@@ -89,17 +89,17 @@
 				</view>
 			</view>
 			<view class="info" v-if="info">
-				<view class="infoList" v-if="info.totalTicketGiveAmount">
+				<view class="infoList gray-text" v-if="info.totalTicketGiveAmount">
 					<text>代金券</text>
-					<text class="cText">¥{{info.totalTicketGiveAmount}}</text>
+					<text class="cText">¥{{Number(info.totalTicketGiveAmount).toFixed(2)}}</text>
 				</view>
-				<view class="infoList" v-if="info.totalSpecialGiveAmount">
+				<view class="infoList gray-text" v-if="info.totalSpecialGiveAmount">
 					<text>总优惠</text>
-					<text class="cText">¥{{info.totalSpecialGiveAmount}}</text>
+					<text class="cText">¥{{Number(info.totalSpecialGiveAmount).toFixed(2)}}</text>
 				</view>
 				<view class="infoList">
 					<text>总金额</text>
-					<text class="redText">¥{{info.totalAmount}}</text>
+					<view class="price-txt">¥<text>{{Number(info.totalAmount).toFixed(2)}}</text></view>
 				</view>
 			</view>
 			<view class="info" v-if="info">
@@ -217,18 +217,6 @@
 						  item.discountType = a.discountType
 						  item.promoProductSn = a.promoProductSn
 						  item.promoSn = a.promoSn
-						  // 特价
-						  if(item.promoType=='PROMO_PROD'){
-							  item.orginPrice = item.price
-							  // 直降
-							  if(item.discountType == 'STRAIGHT_DOWN'){
-								  item.price = item.price - item.resultValue
-							  }
-							  // 折扣
-							  if(item.discountType == 'DISCOUNT'){
-								 item.price = Number(item.price * item.resultValue).toFixed(2)
-							  }
-						  }
 						  // 满赠数量
 						  item.giftQty = item.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(item.qty / item.conditionValue)*item.resultValue : 0
 					  }
@@ -311,9 +299,15 @@
 		}
 		.cText{
 			color: #666;
-			margin: 0 10rpx;
+			margin: 0 6rpx;
 			font-size: 14px;
 		}
+		.gray-text{
+			text{
+				font-size: 14px;
+				color: #999;
+			}
+		}
 		.order-body{
 			flex-grow: 1;
 			overflow: auto;
@@ -343,6 +337,15 @@
 				}
 			}
 		}
+		.price-txt{
+			color: red;
+			display: flex;
+			align-items: baseline;
+			font-size: 12px;
+			text{
+				font-size: 32rpx;
+			}
+		}
 		.info{
 			background-color: #FFFFFF;
 			padding: 10rpx 30upx;
@@ -419,15 +422,6 @@
 						}
 					}
 				}
-				.price-txt{
-					color: red;
-					display: flex;
-					align-items: baseline;
-					font-size: 12px;
-					text{
-						font-size: 32rpx;
-					}
-				}
 				.rebate-tag{
 					background: #ffe7df;
 					color: #E91E63;

+ 4 - 6
pagesB/shopiing/productDetail.vue

@@ -195,9 +195,6 @@
 			// 获取产品详情
 			this.getDetail()
 		},
-		onShow(){
-			this.closePopu()
-		},
 		// 分享
 		onShareAppMessage(e){
 			return {
@@ -262,6 +259,7 @@
 								this.imgList.push(item.imageUrl||'/static/def_imgs.png')
 							})
 							const a = res.data.shopPromoProduct
+							let bprice = res.data.price
 							if(a){
 							  res.data.promoType = a.promoType
 							  res.data.resultValue = a.resultValue
@@ -274,15 +272,15 @@
 								  res.data.orginPrice = res.data.price
 								  // 直降
 								  if(res.data.discountType == 'STRAIGHT_DOWN'){
-									  res.data.price = res.data.price - res.data.resultValue
+									  bprice = res.data.price - res.data.resultValue
 								  }
 								  // 折扣
 								  if(res.data.discountType == 'DISCOUNT'){
-									 res.data.price = Number(res.data.price * res.data.resultValue).toFixed(2)
+									 bprice = Number(res.data.price * res.data.resultValue).toFixed(2)
 								  }
 							  }
 							}
-							res.data.priceStr = Number(res.data.price).toFixed(2).toString().split('.')
+							res.data.priceStr = Number(bprice).toFixed(2).toString().split('.')
 						}else{
 							this.imgList.push(res.data.productMsg||'/static/def_imgs.png')
 						}