<view class="box">
    <view class="title multi-line">{{detailsData.title}}</view>
    <view class="time">有效期：{{date.getDate(detailsData.begdate)}} ~ {{date.getDate(detailsData.enddate)}}</view>
    <view class="time multi-line" style="margin-top: 10rpx;">提报要求：{{detailsData.notes}}</view>
    <view class="title" wx:if="{{detailsData.attinfos.length}}" style="margin-top: 30rpx;">附件列表</view>
    <My_accessory list='{{detailsData.attinfos}}' />
</view>
<!-- 提报记录 -->
<view class="box" style="background: none;">
    <view class="title multi-line">提报记录</view>
    <navigator class="history" url="#" wx:for="{{detailsData.submitedit}}" data-item="{{item}}" bindtap="seeHistory">
        <view class="line-1">
            {{item.content?item.content:'未填写内容'}}
        </view>
        <view class="data">
            <text>提交时间:{{item.createdate}}</text>
            <text>附件数量:{{item.attinfos.length}}</text>
        </view>
        <view wx:if="{{item.status=='退回'}}" class="back">退回</view>
    </navigator>
</view>
<My_empty wx:if="{{!detailsData.submitedit.length}}" />
<!-- 开始提报 -->
<van-popup show="{{ startRecord }}" custom-style="height:75vh;" closeable position="bottom" round bind:close="closeRecord">
    <view class="box">
        <view class="title multi-line">提报内容</view>
        <textarea class="textarea" value="{{content}}" placeholder-style="font-size: 24rpx;color: #BBBBBB;" placeholder="请输入提报内容" bindinput="textareaInput" />
        <view class="title multi-line">提报附件<text>已上传{{submiteditData.attinfos.length}}个</text></view>
        <My_accessory list="{{submiteditData.attinfos}}" butType="删除" binddeleteFile="deleteFile" />
        <My_upload bind:uploadCallback='getFile'>
            <navigator class="uploadStyle" url="#">
                <text class="iconfont icon-a-tuiguangsucaishangchuan1" />
                上传附件
            </navigator>
        </My_upload>
    </view>
    <view style="height: 130rpx;" />
    <view class="footer">
        <van-button round custom-class='button' loading="{{loading}}" loading-text="提交中..." bindtap="submit">提交</van-button>
    </view>
</van-popup>

<!-- 提报详情 -->
<van-popup show="{{ CheckTheRecord }}" custom-style="height:75vh;" closeable position="bottom" round bind:close="recordClose">
    <view class="box">
        <view class="title multi-line">提报内容</view>
        <view class="history" style="margin-bottom: 30rpx;">
            {{recordL.content}}
        </view>
        <view class="title multi-line" wx:if="{{recordL.attinfos.length}}">提报附件<text>已上传{{recordL.attinfos.length}}个</text></view>
        <My_accessory list='{{recordL.attinfos}}' />
        <block wx:if="{{recordL.status=='退回'}}">
            <view class="footer" style="margin-left: -30rpx;">
                <van-button round custom-class='button' bindtap="reedit">重新编辑</van-button>
            </view>
            <view style="height: 160rpx;" />
        </block>
    </view>
</van-popup>

<!-- 底部按钮 -->
<view class="footer" wx:if="{{!done}}">
    <van-button round custom-class='button' bindtap="establish">开始提报</van-button>
</view>

<view style="height: 130rpx;" />
<wxs module="date">
    module.exports.getDate = function (time) {
        return time.split(" ")[0]
    }
</wxs>