<wxs src='../../../../utils/numberFormat.wxs' module="numberFormat"></wxs>
<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<van-sticky scroll-top="0">
  <van-search model:value="{{ searchText }}" bind:search="doSearch" placeholder="请输入商品名称/商品型号">
  </van-search>
  <!-- <dk-customer-detail customerName="{{item.customerName}}" textColor="black" backgroundColor="white,white,white" customerPhone="{{item.customerPhone}}" addressFull="{{item.addressFull}}"></dk-customer-detail> -->

 
</van-sticky>



<view style="margin: 24rpx 34rpx 26rpx 34rpx;">
  <view wx:for="{{dataList}}" wx:if="{{item.orderItemVOList}}" style="width: 100%;">

    <view wx:for="{{item.orderItemVOList}}" wx:for-item="item_" wx:for-index="index_">
      <view class="table-content-row" style=" background: linear-gradient(180deg, #E2ECFF 0%, #FAFCFF 100%), #fff; border-radius: 15rpx 15rpx  0px  0px;">
        <view class="customer-and-status" >
          <view style="position: relative;width: 20vw;">
            <!-- <van-checkbox value="{{item.checked}}" data-index="{{index}}" data-item="{{item}}" catchtap="catchtapCheck" bind:change="onChangeFlag" checked-color="#1989FA" /> -->
            <van-radio-group value="{{ item_.radio }}" data-index="{{index}}" data-indexzhangdl="{{index_}}" bind:change="onChangeRadio1">
              <van-radio name="1" checked-color="#1B365D" icon-size="20px"><text class="fontSizeStyle">全退</text></van-radio>
            </van-radio-group>
          </view>
          <view catchtap="toCustomer" data-item="{{item}}" style="width:70%;display:flex;font-size: 15px;margin-left:15rpx;display: block;width: 60vw;">
            <!-- <text user-select>{{item.customerName}}</text> -->
            <dk-text style="font-size:30rpx;" fontWeight="nomal" value="FQ171723671611"></dk-text> 
            <dk-text style="font-size:22rpx;" fontWeight="nomal" value="2022 06-16"></dk-text>
          </view>

          <view style="font-size: 30rpx;width: 20vw;" data-item="{{item}}" catchtap="onclik">
            出库单
          </view>
        </view>
      </view>
      <view class="choose-item {{item_.radio == '1' ? 'choose-item-select' : 'choose-item-unchecked'}}" style="border-radius: 0;" data-index="{{index}}" data-indexzhangdl="{{index_}}" catchtap="onChangeRadio">
        <view style="width:44rpx;place-self: center;padding-left: 15rpx;padding-right: 15rpx;">

          <view style="position: relative;">
            <!-- <van-checkbox value="{{item.checked}}" data-index="{{index}}" data-item="{{item}}" catchtap="catchtapCheck" bind:change="onChangeFlag" checked-color="#1989FA" /> -->
            <van-radio-group value="{{ item_.radio }}" data-index="{{index}}" data-indexzhangdl="{{index_}}" bind:change="onChangeRadio1">
              <van-radio name="1" checked-color="#1B365D" icon-size="20px"><text class="fontSizeStyle">退</text></van-radio>
            </van-radio-group>
          </view>
        </view>

        <view style="align-items: center;height: 255rpx;padding-top: 30rpx;">
          <view style=" border-radius: 15rpx; padding: 5rpx 5rpx 5rpx 5rpx; ">


            <van-card data-item="{{item}}" data-index="{{index}}">

              <view slot="thumb">
                <van-image radius="5px" width="80" height="80" src="{{item_.iconThumPath}}" />
              </view>
              <view slot="title" style="display: flex;">
                <view style="display: flex;">
                  <dk-title titleTag="{{'恒洁卫浴'}}" title="{{item_.skuCode}}"></dk-title>
                </view>
              </view>

              <view slot="desc">
                <view style="width: 105%; font-size: 13px;">{{item_.skuName}}</view>
              </view>
              <view slot="price">
                <!-- <view style="display: flex;width: 100%;flex-direction: row;">
                  <view style="color: #CAA977;font-size: 32rpx;line-height: 45rpx;width: 100%;">
                    ￥{{numberFormat.toThousandCents(item_.orderPriceSale ? item_.orderPriceSale : 0)}}
                  </view>
                  <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.outOutQuantity }}</view>
                </view> -->

                <view style="display: flex;width: 100%;flex-direction: row; ">
                  <view style="width: 100%;">
                    <dk-cell contentFontSize="16" height="25rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="" content="{{ item_.orderPriceSale ? item_.orderPriceSale : 0}}"></dk-cell>
                  </view>
                  <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.outOutQuantity + item_.outRejectQuantity }}{{item_.nonStandardArea ? (' * ' + item_.nonStandardArea + 'm²'): ''}}</view>
                </view>
              </view>

              <!-- <view slot="footer" >
                <view style="display: flex;width: 100%;flex-direction: row;">
                  <view style="color: #CAA977;font-size: 32rpx;line-height: 45rpx;width: 50%;">
                    ￥{{numberFormat.toThousandCents(item_.orderPriceSale ? item_.orderPriceSale : 0)}}
                  </view>
                  <view style="width: 50%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.orderQuantity+item_.outRejectQuantity }}</view>
                </view>
              </view> -->
            </van-card>


          </view>
        </view>
      </view>
      <view class="choose-item {{item_.radio == '1' ? 'choose-item-select' : 'choose-item-unchecked'}}"style=" border-radius: 0px  0px  15rpx 15rpx ;" data-index="{{index}}" data-indexzhangdl="{{index_}}" catchtap="onChangeRadio">
        <view style="width:44rpx;place-self: center;padding-left: 15rpx;padding-right: 15rpx;">

          <view style="position: relative;">
            <!-- <van-checkbox value="{{item.checked}}" data-index="{{index}}" data-item="{{item}}" catchtap="catchtapCheck" bind:change="onChangeFlag" checked-color="#1989FA" /> -->
            <van-radio-group value="{{ item_.radio }}" data-index="{{index}}" data-indexzhangdl="{{index_}}" bind:change="onChangeRadio1">
              <van-radio name="1" checked-color="#1B365D" icon-size="20px"><text class="fontSizeStyle">退</text></van-radio>
            </van-radio-group>
          </view>
        </view>

        <view style="align-items: center;height: 255rpx;padding-top: 30rpx;">
          <view style=" border-radius: 15rpx; padding: 5rpx 5rpx 5rpx 5rpx; ">


            <van-card data-item="{{item}}" data-index="{{index}}">

              <view slot="thumb">
                <van-image radius="5px" width="80" height="80" src="{{item_.iconThumPath}}" />
              </view>
              <view slot="title" style="display: flex;">
                <view style="display: flex;">
                  <dk-title titleTag="{{'恒洁卫浴'}}" title="{{item_.skuCode}}"></dk-title>
                </view>
              </view>

              <view slot="desc">
                <view style="width: 105%; font-size: 13px;">{{item_.skuName}}</view>
              </view>
              <view slot="price">
                <!-- <view style="display: flex;width: 100%;flex-direction: row;">
                  <view style="color: #CAA977;font-size: 32rpx;line-height: 45rpx;width: 100%;">
                    ￥{{numberFormat.toThousandCents(item_.orderPriceSale ? item_.orderPriceSale : 0)}}
                  </view>
                  <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.outOutQuantity }}</view>
                </view> -->

                <view style="display: flex;width: 100%;flex-direction: row; ">
                  <view style="width: 100%;">
                    <dk-cell contentFontSize="16" height="25rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="" content="{{ item_.orderPriceSale ? item_.orderPriceSale : 0}}"></dk-cell>
                  </view>
                  <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.outOutQuantity + item_.outRejectQuantity }}{{item_.nonStandardArea ? (' * ' + item_.nonStandardArea + 'm²'): ''}}</view>
                </view>
              </view>

              <!-- <view slot="footer" >
                <view style="display: flex;width: 100%;flex-direction: row;">
                  <view style="color: #CAA977;font-size: 32rpx;line-height: 45rpx;width: 50%;">
                    ￥{{numberFormat.toThousandCents(item_.orderPriceSale ? item_.orderPriceSale : 0)}}
                  </view>
                  <view style="width: 50%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item_.orderQuantity+item_.outRejectQuantity }}</view>
                </view>
              </view> -->
            </van-card>


          </view>
        </view>
      </view></view>
  

  </view>
</view>

<van-empty wx:if="{{!dataList[0].orderItemVOList || dataList[0].orderItemVOList.length ==0}}" description="暂无出库单" />

<view style="height: 250rpx;"></view>
<!--  底部工具栏-保存 -->
<view style="background:#fff;position:fixed;bottom:0;width:100%;border-top:1px solid #efefef;z-index: 7;">
  <view class="button">
    <view class="save-bottom">

      <view style="width:65%;height:55rpx;padding-top: 30rpx;padding-left: 15rpx; display: flex;">
        <van-radio-group value="{{ radioAll }}" bind:change="onChangeALL">
          <van-radio name="1" checked-color="#1B365D" icon-size="20px"><text class="fontSizeStyle" style="color: #95A8CB;font-size: 14px;">全退</text></van-radio>
        </van-radio-group>
        <view style="font-size: 13px;height:30rpx;line-height:30rpx;margin-left: 4vw;margin-top: -1vw;" class="red-text">退款总额： <dk-cell contentFontSize="16" height="35rpx" fontWeight="" left="0rpx" contentColor="#CAA977" title="" content="{{orderAmountSum}}"></dk-cell>
        </view>
      </view>
      <view class="save-bottom-button" style="width: 45%;">
        <view style="place-content: center;display:flex;">
          <van-button custom-style="height:78rpx; width:200rpx" round color="#1B365D" loading="{{loading}}" bind:click="toSaleReturn" type="info">确认
          </van-button>
        </view>

      </view>
    </view>
  </view>
</view>