<import src="detail.skeleton.wxml" />
<template is="skeleton" wx:if="{{loading}}" />

<view class="intr">
	<view class="num">
		{{detail.billno}}
	</view>
	<view class="exp">状态：{{detail.status}}</view>
	<view class="exp">经销商编号：{{detail.agentnum}}</view>
	<view class="exp">经销商简称：{{detail.enterprisename}}</view>
	<view class="exp">付款人：{{ detail.payer}}</view>
	<view class="exp">付款时间：{{ detail.paydate}}</view>
	<view class="exp">回款归属月份：{{ detail.period}}</view>
	<view class="exp">打款金额：{{ detail.amount}}</view>
</view>
<Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
	<Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
	<remitVoucher detail="{{detail}}" slot="打款明细" id="remitVoucher" bind:onSuccess="getDetail"></remitVoucher>
	<Yl_Attachment slot='附件' id='Yl_Attachment' ownertable="sa_paybill" ownerid="{{detail.sa_paybillid}}" disabled="{{detail.status!='新建'}}" />
	<view style="height: 160rpx;" />
</Yl_FunTabs>

<!-- 底部 -->
<block wx:if="{{detail.status=='新建' || detail.status=='提交' }}">
	<view style="height: 130rpx;" />
	<view class="footer">
		<view></view>
		<view wx:if="{{detail.status=='新建'}}" class="but-box">
			<van-button custom-class='but' color="#3874F6" data-name="编辑" bind:click="tabbarOnClick">编辑</van-button>
			<van-button custom-class='but' color="#E54D42" data-name="删除" bind:click="tabbarOnClick">删除</van-button>
			<van-button custom-class='but' color='#F37B1D' data-name="提交" bind:click="tabbarOnClick">提交</van-button>
		</view>
		<view wx:elif="{{detail.status=='提交'}}" class="but-box">
			<van-button custom-class='but bg-orange' color='#F37B1D' data-name="撤回" bind:click="tabbarOnClick">撤回</van-button>
		</view>
	</view>
</block>

<van-popup show="{{ show }}" position="bottom" custom-style="height: 50%;" bind:close="onClose" bind:click-overlay="onClose" z-index="9999">
	<van-datetime-picker type="date" value="{{ currentDate }}" formatter="{{ formatter }}" bind:confirm="checkSubmit" bind:cancel="onClose" />
</van-popup>