<!--pages/handle/liist.wxml-->
<view class="ns" style="height:{{isIPX?'88px':'64px'}};">
  <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image>
  <text style="top:{{isIPX?'54px':'30px'}};">{{pageTitle}}</text>
</view>
<view class="work_plan" wx-if="{{active==1||active==2}}" style="margin-top:{{isIPX?'100px':'75px'}};">
    <view>
        <view class="menu_item {{active==1?'active':''}}" bindtap="switchTab" data-gid='{{1}}'>待办<text class="remind">{{todoNum}}</text></view>
        <view class="menu_item {{active==2?'active':''}}" bindtap="switchTab" data-gid='{{2}}'>已办<text class="remind">{{doneNum}}</text></view>
    </view>
    <!-- <view style="border:1px solid #ddd;background: #fff;border-radius: 30rpx;line-height: 60rpx;padding: 0 25rpx;">
      <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
          <view class="picker">
            {{array[index]}}
            <image src="../../image/icon/triangle.png" style="height:25rpx;width:25rpx;margin-right: 10rpx;"></image>
          </view>
        </picker>
    </view> -->
</view>
<view class="work_plan" wx-if="{{active==3||active==4}}" style="margin-top:{{isIPX?'100px':'75px'}};">
    <view>
        <view class="menu_item {{active==3?'active':''}}" bindtap="switchTab" data-gid='{{3}}'>发起<text class="remind">{{yfqNum}}</text></view>
        <view class="menu_item {{active==4?'active':''}}" bindtap="switchTab" data-gid='{{4}}'>制单<text class="remind">{{yzdNum}}</text></view>
    </view>
    <!-- <view style="border:1px solid #ddd;background: #fff;border-radius: 30rpx;line-height: 60rpx;padding: 0 25rpx;">
      <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
          <view class="picker">
            {{array[index]}}
            <image src="../../image/icon/triangle.png" style="height:25rpx;width:25rpx;margin-right: 10rpx;"></image>
          </view>
        </picker>
    </view> -->
</view>
<scroll-view scroll-y="true" wx-if="{{active==1}}" style="height: {{wrokScrollHeight}}px;"> 
    <view class="workflow" wx:if="{{active=='1'}}" wx:for-item="item" wx:for="{{todoList}}" wx:key="index" data-id="{{item.formData.id}}" data-taskId="{{item.taskId}}" data-type="up" bindtap="gosee">
            <!--1-->
            <view class="workflow_list">
                <view class="process_intro">
                    <view class="name">{{item.formData.approvalItems}}</view>
                    <!-- <view class="state">待审</view> -->
                    <view class="time">{{item.formData.applyTime}}</view>
                </view>
                <view class="process_pay">
                    <view class="describe">
                        <image  class="amount_icon"  src="../../image/index/process_icon.png" mode="aspectFit"></image>
                        <text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text>
                    </view>
                    <view class="amount"><text class="unit">￥</text>{{item.formData.totalAmount}}</view>
                </view>
            </view> 
        </view>
            <van-empty wx:if="{{todoNum == 0}}" description="暂无待办数据" />
</scroll-view>
<scroll-view scroll-y="true" wx-if="{{active==2}}" style="height: {{wrokScrollHeight}}px;"> 
    <view class="workflow" wx:if="{{active=='2'}}" wx:for-item="item" wx:for="{{doneList}}" wx:key="index" data-id="{{item.formData.id}}" data-taskId="{{item.taskId}}" data-type="see" bindtap="gosee">
            <!--1-->
            <view class="workflow_list">
                <view class="process_intro">
                    <view class="name">{{item.formData.approvalItems}}</view>
                    <!-- <view class="state">已审</view> -->
                    <view class="time">{{item.formData.applyTime}}</view>
                </view>
                <view class="process_pay">
                    <view class="describe">
                        <image  class="amount_icon"  src="../../image/index/process_icon.png" mode="aspectFit"></image>
                        <text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text>
                    </view>
                    <view class="amount"><text class="unit">￥</text>{{item.formData.totalAmount}}</view>
                </view>
            </view> 
        </view>
            <van-empty wx:if="{{doneNum == 0}}" description="暂无已办数据" />
</scroll-view>
<scroll-view scroll-y="true" wx-if="{{active==3}}" style="height: {{wrokScrollHeight}}px;"> 
    <view class="workflow"  wx:if="{{active=='3'}}" wx:for-item="item" wx:for="{{yfqList}}" wx:key="index" data-id="{{item.id}}" data-taskId="{{item.taskId}}" data-type="see" bindtap="{{item.status == '1'?'gosee':item.status == '2'?'goUpdate':item.status == '3'?'gosee':''}}">
            <!--1-->
            <view class="workflow_list">
                <view class="process_intro">
                  <view class="name">
                    <view class="name_tit">{{item.submitter}}</view>
                    <view class="{{item.status == '1'?'in':item.status == '2'?'disagree':item.status == '3'?'agree':''}}">{{item.status == '1'?'审核中':item.status == '2'?'已拒绝':item.status == '3'?'已通过':''}}</view>
                  </view>
                  <!-- <view class="state">已发起</view> -->
                  <view class="time">{{item.submitDate}}</view>
                </view>
                <view class="process_pay">
                    <view class="describe">
                        <image  class="amount_icon"  src="../../image/index/process_icon.png" mode="aspectFit"></image>
                        <text class="textLimit">{{item.approvalItems}}</text>
                    </view>
                    <view class="amount"><text class="unit">￥</text>{{item.totalAmount}}</view>
                </view>
            </view> 
        </view>
            <van-empty wx:if="{{yfqNum == 0}}" description="暂无已发起数据" />
</scroll-view>
<scroll-view scroll-y="true" wx-if="{{active==4}}" style="height: {{wrokScrollHeight}}px;"> 
    <view class="workflow"  wx:if="{{active=='4'}}" wx:for-item="item" wx:for="{{yzdList}}" wx:key="id" data-id="{{item.id}}" bindtap="godetail">
            <!--1-->
            <view class="workflow_list">
                <view class="process_intro">
                    <view class="name">{{item.submitter}}</view>
                    <!-- <view class="state">已制单</view> -->
                    <view class="time">{{item.submitDate}}</view>
                </view>
                <view class="process_pay">
                    <view class="describe">
                        <image  class="amount_icon"  src="../../image/index/process_icon.png" mode="aspectFit"></image>
                        <text class="textLimit">{{item.approvalItems}}</text>
                    </view>
                    <view class="amount"><text class="unit">￥</text>{{item.totalAmount}}</view>
                </view>
            </view>
        </view>
            <van-empty wx:if="{{yzdNum == 0}}" description="暂无已制单数据" />
</scroll-view>
