lilei 4 months ago
parent
commit
f2682441bb

+ 24 - 17
pagesB/accountBalance/accountBalance.vue

@@ -13,20 +13,22 @@
     
     <view class="recharge-options">
       <view 
-        class="recharge-option flex justify_between" 
+        class="recharge-option flex justify_between flex_column" 
         v-for="(opt,idx) in rechargeOptions" 
         :key="idx"
       >
-        <view class="recharge-val flex align_center justify_center">
-			<text>¥{{ opt.rechargeAmount }}</text>
-		</view>
-        <view class="recharge-option-content flex_1">
-			<view><text class="gift-text">充值{{ opt.rechargeAmount }}元送{{ opt.giveAmount }}元抵扣</text></view>
-			<view class="gift-remark">{{opt.remarks||''}}</view>
-		</view>
-		<view class="recharge-btn flex align_center justify_center" @tap="handleRecharge(opt)">
-			<text>去充值</text>
+        <view class="flex justify_between align_center">
+			<view class="recharge-val flex align_center justify_center">
+				<text>¥{{ opt.rechargeAmount }}</text>
+			</view>
+			<view class="recharge-option-content flex_1">
+				<view><text class="gift-text">充值{{ opt.rechargeAmount }}元送{{ opt.giveAmount }}元抵扣</text></view>
+			</view>
+			<view class="recharge-btn flex align_center justify_center" @tap="handleRecharge(opt)">
+				<text>去充值</text>
+			</view>
 		</view>
+		<view class="gift-remark" v-if="opt.remarks">{{opt.remarks||''}}</view>
       </view>
     </view>
 	
@@ -95,8 +97,8 @@ export default {
 	  getStoreAccount(){
 		storeAccount({storeSn:this.shelfInfo.storeSn}).then(res => {
 			this.$store.state.vuex_storeAccount = res.data
-			this.balanceList[0].value = res.data.rechargeBalance
-			this.balanceList[1].value = res.data.giveBalance
+			this.balanceList[0].value = Number(res.data.rechargeBalance||0).toFixed(2)
+			this.balanceList[1].value = Number(res.data.giveBalance||0).toFixed(2)
 			this.balanceList.splice()
 		})
 	  },
@@ -221,29 +223,31 @@ export default {
     flex-grow: 1;
 	overflow-y: auto;
     .recharge-option {
-	  min-height: 60px;
       background: #fff;
       border-radius: 12rpx;
       overflow: hidden;
       margin-bottom: 24rpx;
       box-shadow: 0 4rpx 12rpx rgba(30,144,255,0.1);
+	  > view{
+		  &:first-child{
+			  min-height: 60px;
+		  }
+	  }
       .recharge-option-content{
 		  padding: 20rpx;
-		  line-height: 1.8;
 		  display: flex;
 		  flex-direction: column;
 		  justify-content: center;
 	  }
       .gift-text {
         color: #333;
-        font-size: 28rpx;
+        font-size: 26rpx;
       }
 	  .recharge-val{
 		  font-size: 16px;
 		  color: red;
-		  background: #fff2de;
 		  padding: 20rpx;
-		  width: 150rpx;
+		  width: 180rpx;
 		  border-right: 1px dashed #fbdbd1;
 	  }
 	  .recharge-btn{
@@ -260,6 +264,9 @@ export default {
 	  .gift-remark{
 		  color: #999;
 		  font-size: 24rpx;
+		  padding: 10rpx 20rpx;
+		  border-top: 1px dashed #fbdbd1;
+		  line-height: 1.8;
 	  }
     }
     

+ 5 - 5
pagesB/procureOrder/creatOrder.vue

@@ -57,7 +57,7 @@
 								<text>代金券</text>
 								<text class="price">¥{{Number(totalCoupon).toFixed(2)}}</text>
 							</view>
-							<view class="product-price-item" v-if="totalAmount">
+							<view class="product-price-item">
 								<text>合计:</text>
 								<text class="price">¥{{settleAmount.join('.')}}</text>
 							</view>
@@ -161,7 +161,7 @@
 			},
 			// 结算金额
 			settleAmount(){
-				return Number(this.totalAmount).toFixed(2).toString().split('.')
+				return Number(this.hasKdk?this.totalAmount-this.subsidyAmount:this.totalAmount).toFixed(2).toString().split('.')
 			},
 			// 货架经销商信息
 			shelfInfo(){
@@ -271,8 +271,7 @@
 								productCode: item.productCode,
 								qty: item.qty,
 								price: item.price,
-								promoSn: item.promoSn,
-								payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'WXPAY_ONLINE' : ''
+								promoSn: item.promoSn
 							}
 						})
 						const delSn = cartSn.filter(item => successList.find(k => k.productSn == item.productSn)).map(item => item.cartSn)
@@ -313,7 +312,8 @@
 				})
 				this.loading = true
 				purchaseSave({
-					detailList: detailList
+					detailList: detailList,
+					payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'PAY_WECHAT_ONLINE' : ''
 				}).then(res => {
 					this.loading = false
 					uni.hideLoading()

+ 2 - 2
pagesB/shopiing/productDetail.vue

@@ -612,7 +612,6 @@
 										qty: item.qty,
 										price:item.price,
 										promoSn: item.promoSn,
-										payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'WXPAY_ONLINE' : ''
 									}
 								}) : []
 								const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
@@ -665,7 +664,8 @@
 					mask: true
 				})
 				purchaseSave({
-					detailList: detailList
+					detailList: detailList,
+					payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'PAY_WECHAT_ONLINE' : ''
 				}).then(res => {
 					if(res.status == 200){
 						res.data.detailList = []

+ 9 - 0
pagesB/transactionRecord/transactionRecord.vue

@@ -25,6 +25,7 @@
 			        class="record-item"
 			        v-for="(sitem, index) in item.list"
 			        :key="sitem.id"
+					@click="toDetail(sitem)"
 			      >
 			        <view class="item-left">
 			          <text class="amount-label">{{tabType==0?'充值':'消费'}}</text>
@@ -99,6 +100,14 @@ export default {
 	}
   },
   methods: {
+	  // 跳转到订单详情页面
+	  toDetail(item){
+		  if(item.bizSn){
+			  uni.navigateTo({
+			  	url: "/pagesB/procureOrder/orderDetail?purchaseSn="+item.bizSn
+			  })
+		  }
+	  },
 	  changeTab(type){
 		  this.tabType = type
 		  uni.setNavigationBarTitle({