<!--pages/Bookkeeping/Bookkeeping.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'}};">记账申请</text>
</view>
<view class="work_plan" style="margin-top:{{isIPX?'88px':'65px'}};">
    <view class="menu_item {{showGroup?'active':''}} " bindtap="switchTab" data-gid='{{true}}'>收入事项<text class="remind">{{flowListSRNum}}</text></view>
    <view class="menu_item {{!showGroup?'active':''}} " bindtap="switchTab" data-gid='{{false}}'>支出事项<text class="remind">{{flowListZCNum}}</text></view>

    <view class="downView" bindtap="openPopup">
      <text>{{checkedStatusText}}</text>
      <image src="/image/icon/triangle.png"></image>
    </view>
    <van-popup show="{{showProjectFundType}}" round position="bottom"  bind:close="closeBox" data-name="showProjectFundType">
      <van-picker
        columns="{{capitalExpenditureTypeOptions}}"
        show-toolbar
        value-key="dictLabel"
        bind:cancel="closeBox"
        bind:confirm="onConfirmPick"
        data-name="showProjectFundType"
        data-value="checkedStatusText"
      />
    </van-popup>
</view>
<van-checkbox-group wx:if="{{showGroup}}" value="{{ result }}" bind:change="onChange">
  <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{flowListSR}}" wx:key="index" disabled="{{item.checkedStatusText == '待审核' || item.checkedStatusText == '已审核'}}">
    <view class="li" data-id="{{item.id}}" bindtap="{{item.checkedStatusText == '待审核' || item.checkedStatusText == '已审核'?'goSee':''}}">
        <van-checkbox name="{{item.id}}" disabled="{{item.checkedStatusText == '待审核' || item.checkedStatusText == '已审核'}}"  shape="square" checked-color="#2C8E68" style="width: 100%;">
          <view style="display: flex;justify-content: space-between;">
            <text class="tit">{{item.accountSummary}}</text>
            <text class="fj_name">附件{{item.enclosureCount}}</text>
            <text class="time">{{item.accountDate}}</text>
          </view>

          <view style="display: flex;margin-top: 15px;justify-content: space-between;">
            <view class="fksr">
              <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image>
              {{item.incomeTypeText}}
            </view>
            <!-- <view class="wtj {{item.checkedStatusText == '未提交' ? 'no':item.checkedStatusText == '待审核' ? 'white':item.checkedStatusText == '已审核' ? 'yes':item.checkedStatusText == '已挂起' ? 'other':''}}">
              <image src="{{item.checkedStatusText == '未提交' ? '/image/icon/icon_no.png':item.checkedStatusText == '待审核' ? '/image/icon/icon_white.png':item.checkedStatusText == '已审核' ? '/image/icon/icon_yes.png':item.checkedStatusText == '已挂起' ? '/image/icon/icon_other.png':''}}" style="width: 12px;height: 12px;margin-right: 5px;"></image>
              {{item.checkedStatusText}}
            </view> -->
            <text class="money">￥{{item.jieAmount}}</text>
          </view>
        </van-checkbox>
    </view>
    <view slot="right" class="deleteBox">
      <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(255,0,0,0.2);">
        <view>
          <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image>
          <text style="color: #e90000;">删除</text>
        </view>
      </view>
      <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(252, 154, 85,0.2);">
        <view>
          <image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdate"></image>
          <text style="color: #F5A327;">修改</text>
        </view>
      </view>
    </view>
  </van-swipe-cell>
</van-checkbox-group>

<van-checkbox-group wx:if="{{!showGroup}}" value="{{ result2 }}" bind:change="onChange2">
  <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{flowListZC}}" wx:key="index" disabled="{{item.checkedStatusText == '待审核' || item.checkedStatusText == '已审核'}}">
    <view class="li" data-id="{{item.id}}" bindtap="{{item.checkedStatusText == '待审核' || item.checkedStatusText == '已审核'?'goSeeZC':''}}">
        <van-checkbox name="{{item.id}}"  shape="square" disabled="{{item.checkedStatusText == '待审核' || item.checkedStatusText == '已审核'}}" checked-color="#2C8E68" style="width: 100%;">
          <view style="display: flex;justify-content: space-between;">
            <text class="tit">{{item.accountSummary}}</text>
            <text class="fj_name">附件{{item.enclosureCount}}</text>
            <text class="time">{{item.accountDate}}</text>
          </view>
          <view style="display: flex;margin-top: 15px;justify-content: space-between;">
            <view class="fksr">
              <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image>
              {{item.expenditureTypeText}}
            </view>
            <!-- <view class="wtj {{item.checkedStatusText == '未提交' ? 'no':item.checkedStatusText == '待审核' ? 'white':item.checkedStatusText == '已审核' ? 'yes':item.checkedStatusText == '已挂起' ? 'other':''}}">
              <image src="{{item.checkedStatusText == '未提交' ? '/image/icon/icon_no.png':item.checkedStatusText == '待审核' ? '/image/icon/icon_white.png':item.checkedStatusText == '已审核' ? '/image/icon/icon_yes.png':item.checkedStatusText == '已挂起' ? '/image/icon/icon_other.png':''}}" style="width: 12px;height: 12px;margin-right: 5px;"></image>
              {{item.checkedStatusText}}
            </view> -->
            <text class="money">￥{{item.daiAmount}}</text>
          </view>
        </van-checkbox>
    </view>
    <view slot="right" class="deleteBox">
      <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(255,0,0,0.2);">
        <view>
          <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete2"></image>
          <text style="color: #e90000;">删除</text>
        </view>
      </view>
      <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;background-color: rgb(252, 154, 85,0.2);">
        <view>
          <image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdateZC"></image>
          <text style="color: #F5A327;">修改</text>
        </view>
      </view>
    </view>
  </van-swipe-cell>
</van-checkbox-group>



<van-empty wx:if="{{flowListSRNum == 0 && showGroup}}" description="暂无收入事项数据" />

<van-empty wx:if="{{flowListZCNum == 0 && !showGroup}}" description="暂无支出事项数据" />
<view class="ipXbtn"></view>
<view class="ipXbtn"></view>
<view class="bottom" wx:if="{{flowListSR[0].checkedStatusText == '未提交' || flowListSR[0].checkedStatusText == '已挂起' || flowListZC[0].checkedStatusText == '未提交' || flowListZC[0].checkedStatusText == '已挂起'}}">
  <view class="btn2" bindtap="goSubmit">提交记账</view>
</view>