<van-tabs wx:if="{{admin}}" active="{{pageIndex}}" sticky custom-class='tabs' color='#3874F6' title-active-color='#3874F6' bind:change='onChange'>
    <van-tab name="我的预测单" title="{{language['我的预测单']||'我的预测单'}}" />
    <van-tab name="预测单汇总" title="{{language['预测单汇总']||'预测单汇总'}}" />
</van-tabs>

<view hidden="{{pageIndex!=0}}">
    <view class="header">
        <view class="title">{{detail.title}}</view>
        <Yl-tags wx:if="{{isdatatag}}" id="Tags" add="{{isLeader}}" ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
        <view class="row">{{language['单号']||'单号'}}：{{detail.billnum}}</view>
        <view class="row">{{language['预测人']||'预测人'}}：{{detail.name}}</view>
        <view class="row">{{language['部门']||'部门'}}：{{detail.depname || ' --'}}</view>
        <view class="row">{{language['预测时间']||'预测时间'}}：{{detail.periodstart}} {{language['至']||'至'}} {{detail.periodend}}</view>
        <view class="row">{{language['出货预测金额']||'出货预测金额'}}：<text style="color: #F60909;">{{detail.orderoutamount}}</text></view>
        <view class="row">{{language['开票预测金额']||'开票预测金额'}}：<text style="color: #F60909;">{{detail.orderinvoamount}}</text></view>
        <view class="row" style="margin-bottom: 10rpx;">{{language['状态']||'状态'}}：<text style="color:{{sColors[detail.status]}};">{{language[detail.status]||detail.status}}</text></view>
        <Yl-group wx:if="{{isdatateam}}" add id='Group' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
    </view>
    <view style="height: 20rpx;" />
    <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
        <Trace resource="{{admin?'出货开票预测管理':'出货开票预测'}}" slot='跟进动态' id='Trace' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
        <OrderForm slot='订单' id='OrderForm' disabled="{{(detail.status=='进行中' || detail.status=='未开始')&&isLeader}}" />
        <Project slot='项目' id='Project' disabled="{{(detail.status=='进行中' || detail.status=='未开始')&&isLeader}}" />
        <Client slot='客户' id='Client' disabled="{{(detail.status=='进行中' || detail.status=='未开始')&&isLeader}}" />
        <Record slot='操作记录' id="Record" ownertable='sa_salesforecastbill' disabled="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" ownerid='{{sa_salesforecastbillid}}' />
        <Files slot='附件' id="Files" ownertable='sa_salesforecastbill' disabled="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" ownerid='{{sa_salesforecastbillid}}' />
        <Work slot='任务' id='Work' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' disabled="{{(detail.status=='进行中'|| detail.status=='未开始') && isLeader}}" />
    </Yl_FunTabs>
</view>

<view hidden="{{pageIndex!=1}}">
    <Yl_Headline title='预测单列表' type='switch' switchLabel='只看部门' switch='{{isonlydep}}' bind:callBack='switchOnChange' />
    <view class="head1">
        <view class="price">
            {{language['预测人数']||'预测人数'}}：<text style="color: #FF3B30;">{{rests.allhr}}</text>
        </view>
        <navigator url="#" class="filtrate" url="#" bindtap="openFiltrate">
            <text wx:if="{{!active}}">{{language['查看范围']||'查看范围'}}</text>
            <text wx:else>{{active.name}}</text>
            <van-icon style="margin-left: 6rpx;" name="arrow-down" />
        </navigator>
    </view>

    <!-- isonlydep -->
    <view class="rep">
        <view>
            {{language['出货预测金额']||'出货预测金额'}}:<text>{{rests.allorderoutamount}}</text>
        </view>
        <view>
            {{language['开票预测金额']||'开票预测金额'}}:<text>{{rests.allorderinvoamount}}</text>
        </view>
    </view>
    <view style="height: 20rpx;" />
    <List list='{{rests.data}}' />
</view>
<Yl_Filtrate1 show='{{showFiltrate}}' list="{{[]}}" bindhandle="handleFilter">
    <organization slot='head' defaultMy='{{false}}' id='organization' />
</Yl_Filtrate1>