<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<van-dialog id="van-dialog" />
<loading wx:if="{{loading}}"></loading>
<!--标签-->
<view>
  <view class="tags-class">

    <view style="width: 33%;text-align: right;">
      <dk-tag fontSize="14px" border="1rpx solid #95A8CB" height="45rpx" color="transparent" textColor="#002340" radius="10rpx" roundFlag="{{true}}" size="medium" value="{{(item.amtFactReceipt < item.sumAmount &&  item.amtFactReceipt > 0)? (item.amtFactReceipt == item.sumAmount ? '已收款':'部分收款')  : '未收款'}}"></dk-tag>
    </view>
    <view style="width: 33%;text-align: center;">
      <dk-tag fontSize="14px" border="1rpx solid #95A8CB" height="45rpx" color="transparent" textColor="#002340" radius="10rpx" roundFlag="{{true}}" size="medium" value="{{item.returnQty > 0? '有退货' : '无退货'}}"></dk-tag>
    </view>
    <view style="width: 34%;text-align: left;">
      <dk-tag fontSize="14px" border="1rpx solid #95A8CB" height="45rpx" color="transparent" textColor="#002340" radius="10rpx" roundFlag="{{true}}" size="medium" value="{{item.outStatusName ? item.outStatusName : item.outStatus}}"></dk-tag>
    </view>




  </view>
  <view class="detail-top" data-item="{{item}}" bind:tap="toDetail">
    <image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>

    <!-- <image catchtap="open" data-name="editOrder" data-item="{{item}}" class="edit-image" fit="fill" src="{{imageUrl+'/order_billing_detail_02.png'}}"></image> -->
    <view class="detail-top-sup" style="display: flex;">
      <view style="width: 10%;">
        <image class="scan-image-icon" fit="fill" src="{{imageUrl+'/order_billing_detail_01.png'}}"></image>
      </view>

      <view>
        <view style="display: flex;">
          <view>
            {{item.cusName}}
          </view>
          <view style="padding-left: 20rpx;">
            {{item.cusPhone}}
          </view>
        </view>



        <view style="z-index: 2;padding-top: 20rpx;">
          {{ wxmlUtil.addressToIndexOf(item.addressFull)}}
        </view>

        <view style="z-index: 2;padding-top: 40rpx;font-size: 24rpx;font-weight: 400;">
          预计送货：{{ item.deliveryDate}}
        </view>
      </view>

    </view>


  </view>



</view>


<view class="dk-card-outer-class-1">
  <!--对象-->
  <view class="dk-card-class">
    <view style="display: flex;padding:10rpx;">
      <view style="background-color:#F4F9FF;width:50%;padding:10rpx;border-radius: 16rpx;">
        <view style="font-size:13px;text-align: center;margin-top: 10rpx;">订单金额</view>
        <dk-cell left="0rpx" center="center" fontSize="13" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" content="{{item.sumAmount}}"></dk-cell>
      </view>
      <view style="background-color:#F4F9FF;width: 50%;padding:10rpx;border-radius: 16rpx;margin-left: 20rpx;">
        <view style="font-size:13px;text-align: center;margin-top: 10rpx;">实收金额</view>
        <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" content="{{item.amtFactReceipt}}"></dk-cell>
      </view>
    </view>


    <view style="display: flex;padding:10rpx;">
      <view style="background-color:#F4F9FF;width:50%;padding:10rpx;border-radius: 16rpx;">
        <view style="font-size:13px;text-align: center;margin-top: 10rpx;">退货金额</view>
        <dk-cell left="0rpx" center="center" fontSize="13" contentFontSize="18" contentColor="#EA4444" spaceWidth="0" contentFontWeight="700" content="{{item.returnAmt}}"></dk-cell>
      </view>
      <view style="background-color:#F4F9FF;width: 50%;padding:10rpx;border-radius: 16rpx;margin-left: 20rpx;">
        <view style="font-size:13px;text-align: center;margin-top: 10rpx;">出库金额</view>
        <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" content="{{item.outAmt}}"></dk-cell>
      </view>
    </view>
  </view>
</view>

<view>

</view>



<dk-form-bill type="sale" id="dk-form-bill" routeObjName="{{routeObjName}}" cardList="{{cardList}}"  titleCol="skuModel" descCol="skuName" subCol="calculationFormula"priceCol="priceSale" quantityCol="itemQty" sumAmountCol="sumAmount"  iconCol="imagesUrl"  discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}"  popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods" readonly="{{true}}"  bind:editItems="editItems" saleStaffAndOrgFlag="{{false}}" bind:customersChoose="customersChoose" popType="sale" priceTitle="售价：">
</dk-form-bill>
<view style="height: 200rpx;"></view>
<!-- <view style="position: fixed;bottom: 230rpx;right: 30rpx;" wx:if="{{formMode =='other'}}">
  <view bind:tap="toEdit" class="btn-add-class">
    <van-icon name="edit" color="#FFFFFF" size="60rpx" />
  </view>
</view> -->
<!-- 编辑  -->
<view wx:if="{{formMode =='other'}}" style="position: fixed;bottom: 230rpx;right: 30rpx;z-index: 99;" bindtap="toEdit">
  <image src="{{imageUrl + 'edit.png'}} " class="edit-class"  />
</view>
<!--  保存 -->
<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="saveButton"></dk-save-button>