Ver Fonte

支付账户信息

xiaohaizhao há 1 ano atrás
pai
commit
a3e0bc9512
2 ficheiros alterados com 14 adições e 16 exclusões
  1. 6 11
      packageA/orderForm/detail.js
  2. 8 5
      packageA/orderForm/detail.wxml

+ 6 - 11
packageA/orderForm/detail.js

@@ -48,20 +48,15 @@ Page({
 				symbol: "¥",
 				precision: 2
 			}).format();
-			let account = {
-				name: "",
-				text: ""
-			};
-			let accountclass = res.data.accountclass;
-			if (accountclass.accountname) {
-				account.name = accountclass.accountname
-				account.text = `\n(余额:${CNY(accountclass.balance)},信用额度:${CNY(accountclass.creditquota)})`
-			}
+			res.data.sa_accountclassinfos = res.data.sa_accountclassinfos.map(v => {
+				v.amount = CNY(v.amount)
+				v.text = `\n(余额:${CNY(v.balance)},信用额度:${CNY(v.creditquota)})`
+				return v
+			})
 			this.setData({
 				detail: res.data,
 				loading: false,
-				amount: CNY(res.data.amount),
-				account
+				amount: CNY(res.data.amount)
 			});
 			if (init) {
 				this.partialRenewal(true)

+ 8 - 5
packageA/orderForm/detail.wxml

@@ -43,12 +43,15 @@
 		</view>
 	</navigator>
 
-	<view class="row">
-		<view class="label">支付账户</view>
-		<view style="font-size: 28rpx; text-align: right;">
-			{{account.name}}
-			<text style="font-size: 22rpx;">{{account.text}}</text>
+	<view class="row" style="align-items: flex-start;">
+		<view class="label" style="padding-top: 20rpx;">支付账户</view>
+		<view>
+			<view wx:for="{{detail.sa_accountclassinfos}}" wx:key="sa_accountclassid" style="font-size: 28rpx; text-align: right;">
+				<text style="font-weight: 600;">{{item.accountname}}:<text style="color: #DA0A23;">{{item.amount}}</text></text>
+				<text style="font-size: 22rpx;">{{item.text}}</text>
+			</view>
 		</view>
+
 	</view>
 </view>
 <view class="box" style="padding: 10rpx 30rpx;">