<view class="pre-settlement">
    <!-- 明细 --> 
    <view class="pre-settlement-detailed">
        <view class="pre-settlement-line">
            <view class="line-left">已缴押金总金额</view>
            <view class="line-right">
                {{ preSettlementDetail.depositTotalAmount ? '¥' + preSettlementDetail.depositTotalAmount : '--' }}
            </view>
        </view>
        <view class="pre-settlement-line">
            <view class="line-left">费用抵扣</view>
            <view class="line-right">
                {{ preSettlementDetail.spendTotalAmount ? '-¥' + preSettlementDetail.spendTotalAmount : '--' }}
            </view>
        </view>
        <view class="medical-insurance">
            <view class="medical-insurance-line">
                <view class="medical-insurance-line-left">医保支付总额</view>
                <view class="medical-insurance-line-right">
                    {{ preSettlementDetail.reimbursableAmount ? '¥' + preSettlementDetail.reimbursableAmount : '--' }}
                </view>
            </view>
            <view class="medical-insurance-line">
                <view class="medical-insurance-line-left gray">医保个人账户支付总额</view>
                <view class="medical-insurance-line-right gray">
                    {{ preSettlementDetail.medicalSelfPayAmount ? '¥' + preSettlementDetail.medicalSelfPayAmount : '--' }}
                </view>
            </view>
            <view class="medical-insurance-line">
                <view class="medical-insurance-line-left gray">医保统筹基金支付总额</view>
                <view class="medical-insurance-line-right gray">
                    {{ preSettlementDetail.medicalFundPayAmount ? '¥' + preSettlementDetail.medicalFundPayAmount : '--' }}
                </view>
            </view>
            <view class="medical-insurance-line">
                <view class="medical-insurance-line-left">自费支付总额</view>
                <view class="medical-insurance-line-right">
                    {{ preSettlementDetail.selfPayAmount ? '¥' + preSettlementDetail.selfPayAmount : '--' }}
                </view>
            </view>
        </view>
        <view class="line"></view>
        <view class="pre-settlement-line">
            <view class="line-left">押金余额</view>
            <view class="line-right pre-settlement-amount">
                {{ preSettlementDetail.depositBalance ? '¥' + preSettlementDetail.depositBalance : '--' }}
            </view>
        </view>
    </view>
    <!-- 应退金额 -->
    <view class="refundable-amount">
        <view class="refundable-amount-title">{{repay==='true'? '应补缴金额': '应退金额'}}</view>
        <view class="refundable-amount-desc" a:if="{{!repay==='true'}}">应退金额=押金余额+医保支付金额</view>
        <view class="amount">
            {{ preSettlementDetail.refundAmount ? '¥' + preSettlementDetail.refundAmount : '--' }}
        </view>
        <button 
            size="default" 
            type="primary" 
            class="immediate-settlement-btn" 
            onTap="onImmediateSettlement">
                立即结算
        </button>
    </view> 
</view>