<wxs module="m1">
	module.exports.toFixedTwo = function(number){
    if (number) return number.toFixed(2)
    return "0"
	};
</wxs>

<view class="balance_recharge">
	<view style="height: 50px;"></view>
	<!-- 优化 -->
	<view class="content">
		<view class="transfer_info ul">
			<view class="info_a li">
				<text class="span">可{{Withdrawaltext}}：</text>
				<text class="span">{{ Data.usable?Data.usable:0 }}</text>
			</view>
		</view>
		<view class="transfer_sum">
			<text class="span">{{Withdrawaltext}}金额</text>
			<view class="sum">
				{{language['money']}}
				<van-field class="input" value="{{ sure_usable }}" placeholder="0.00" border="{{ false }}" bind:change="onChange" />
			</view>
			<view style="color: #999;" wx:if="{{final_proportion_rate>0}}">
				预计需扣除{{m1.toFixedTwo(sure_usable * (final_proportion_rate / 100))}}{{point}}
			</view>
		</view>
		<van-radio-group value="{{ radio }}" bind:change="onChangeRadio">
			<view class="transfer-to">
				<view class="title">{{Withdrawaltext}}到</view>
				<view class="income">
					<view class="top" wx:if="{{withdraw_status}}">
						<view class="p top-icon">
							<icon class="iconfont icon-balance_e"></icon>
							<view class="span">{{Withdrawaltext}}到收入</view>
						</view>
						<van-radio name="1" checked-color="#f15353" ></van-radio>
						<view class="p text">
							<view class="span">{{Withdrawaltext}}{{Data.love_name ? Data.love_name: '爱心值'}}{{Data.withdraw_multiple?('需要是'+Data.withdraw_multiple+'的整数倍'):'倍数无限制'}}。</view>
							<view class="span">{{Withdrawaltext}}到收入比例为{{Data.withdraw_scale*100||0}}%</view>
						</view>
					</view>
					<view class="bottom" wx:if="{{integralShow}}">
						<view class="p bottom-icon">
							<icon class="iconfont icon-balance_g"></icon>
							<view class="span">{{Withdrawaltext}}到{{Data.integral_name}}</view>
						</view>
						<van-radio name="2" checked-color="#f15353"></van-radio>
						<view class="p text">
							<view class="span">{{Withdrawaltext}}到{{Data.integral_name}}比例为{{m1.toFixedTwo(Data.withdraw_integral_scale*100)}}%</view>
							<view class="span" wx:if="{{Data.proportion_switch=='1'}}">需扣取{{coin}}积分</view>
						</view>
					</view>
					<view class="bottom" wx:if="{{balance_withdraw_status}}">
						<view class="p bottom-icon">
							<icon class="iconfont icon-balance_g" style="color:#00508e;"></icon>
							<view class="span">{{Withdrawaltext}}到余额</view>
						</view>
						<van-radio name="4" checked-color="#f15353"></van-radio>
						<view class="p text">
							<view class="span">{{Withdrawaltext}}到余额比例为{{ Data.scale_show=='0'? (Data.balance_withdraw_scale*100||0)+'%':'1:'+Data.balance_withdraw_scale }}</view>
							<view class="span" wx:if="{{Data.proportion_switch=='1'}}">需扣取{{coin}}积分</view>
						</view>
					</view>
					<view class="bottom" wx:if="{{Data.we_chat_withdraw_status == '1'}}">
						<view class="p bottom-icon">
							<icon class="iconfont icon-balance_i" style="color:#64b42e;"></icon>
							<view class="span">{{Withdrawaltext}}到微信</view>
						</view>
						<van-radio name="5" checked-color="#f15353"></van-radio>
					</view>
				</view>
			</view>
		</van-radio-group>
		<button type="button" wx:if="{{isConfirmBtn}}" class="btn custom_color" catchtap="confirm">确认{{ Withdrawaltext }}</button>
	</view>
</view>
