<view class="sg-container sg-index-bg" style="padding-bottom:0">
  <view class="sg-white sg-bold"
    style="font-size:36rpx;height:160rpx; display: flex;flex-direction: column;justify-content: flex-end;margin-left:25rpx">
    账单详情
    <view style="font-size:26rpx;margin-top:15rpx">
      请查看账单详情，有疑问请联系管理员
    </view>
  </view>
  <view class="sg-chart-box" style="background:#fff">
    <view class="sg-flex sg-pad sg-align-center sg-space-between">
      <!-- <picker mode="date" value="{{date}}" start="{{min_date}}" end="{{max_date}}" bindchange="onChange"
        data-name="date" fields="month">
        <view class="picker">
          <view class="sg-font-small sg-pad-tb-sm sg-flex sg-align-center" style="color:#5693FC">
            <text style="margin-right:8rpx">{{date}}</text>
            <van-icon name="arrow-down" class="sg-icon"></van-icon>
          </view>
        </view>
      </picker> -->
    </view>
    <view class="sg-item sg-white-bg sg-pad">
      <view class="sg-top sg-flex sg-space-between sg-pad-bottom-sm sg-font-small sg-bold">
        <view class="sg-name sg-flex sg-align-center">
          账单单号：
        </view>
        <view class="sg-flex sg-align-center" style="">
          <view class="sg-status sg-flex sg-align-center">
            <view class="sg-status-name" style="color:#000;font-size:26rpx">{{datainfo.order_sn}}</view>
          </view>
        </view>
      </view>
      <view class="sg-body sg-font-xs sg-bottom-border  sg-pad-bottom-sm">
        <view class="sg-item sg-margin-tb-sm sg-flex">
          <view class="sg-left-item sg-width-50">年月：</view>
          <view class="sg-right-item sg-width-50" style="text-align: right;">{{datainfo.date}}</view>
        </view>
        <view class="sg-item sg-margin-tb-sm sg-flex">
          <view class="sg-left-item sg-width-50">金额：</view>
          <view class="sg-right-item sg-width-50" style="text-align: right;">{{datainfo.total_price}}元</view>
        </view>
        <!-- <view class="sg-item sg-margin-tb-sm sg-flex">
          <view class="sg-right-item sg-width-50">单位：</view>
          <view class="sg-right-item sg-width-50" style="text-align: right;">{{datainfo.order_sn}}</view>
        </view> -->
        <view class="sg-item sg-margin-tb-sm sg-flex">
          <view class="sg-right-item sg-width-50">对应项目：</view>
          <view class="sg-right-item sg-width-50" style="text-align: right;">{{datainfo.project_id}}</view>
        </view>
        <view class="sg-item sg-margin-tb-sm sg-flex">
          <view class="sg-right-item sg-width-50">对账时间：</view>
          <view class="sg-right-item sg-width-50" style="text-align: right;">{{datainfo.confirmation_time}}</view>
        </view>
        <view class="sg-item sg-margin-tb-sm sg-flex">
          <view class="sg-right-item sg-width-50">状态：</view>
          <view class="sg-right-item sg-width-50" wx:if="{{datainfo.status=='未确认'}}"
            style="text-align: right;color:#5693FC;">待确认</view>
          <view class="sg-right-item sg-width-50" wx:else style="text-align: right;color:#19be6b;">已确认</view>
        </view>
      </view>
    </view>
    <!-- 账单明细 -->
    <view>
      <view class="titlestyle">
        账单明细
      </view>
      <!-- 表格 -->
      <view class="su-table-box">
        <view class="su-table">
          <!-- 表格标题 -->
          <view class="su-tr">
            <view class="su-th" wx:for="{{th}}" wx:key="index">{{item}}</view>
          </view>
          <!-- 表格内容 -->
          <view class="su-tr" wx:for="{{td}}" wx:for-item="it" wx:for-index="in" wx:key="in">
            <view class="su-td" wx:for="{{it}}" wx:key="index">{{item}}</view>
          </view>
        </view>
      </view>
    </view>
    <!-- 确认 -->
    <view class="sg-margin-tb-sm" style="margin-left:20rpx;margin-right:20rpx"
      wx:if="{{datainfo.status=='未确认'&&is_manager}}">
      <van-button round block type="info" bind:click="confirmOrder">确认账单</van-button>
    </view>
  </view>
</view>