<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
<wxs module="fil" src="fil.wxs"></wxs>
<view class="order-mes">
    <view class="order-name">
        <view>订单编号：{{return_goods.order_sn}}</view>
        <view>申请时间：{{return_goods.addTimeFormat}}</view>
    </view>
</view>
<view class="goods-mes" wx:for="{{return_goods.goodslist}}">

    <view class="goods-pic">
        <image class="wh100" src="{{resourceUrl+item.original_img}}" 
          binderror="bind_bnerr2" 
          data-url="{{resourceUrl+item.original_img}}" 
          data-errorimg="return_goods.goodslist[{{index}}].original_img"
          lazy-load="true"></image>
    </view>

    <view class="goods-des">
        <view class="goods-name ellipsis-1">{{item.goods_name}}</view>
        <view class="now-price co-red" wx:if="{{return_goods.goods_id}}">退款金额 : ￥{{return_goods.back_money}}</view>
    </view>
</view>

<view wx:if="{{return_goods.goods_id_list}}" class="now-price co-red" style="margin-left:30rpx; font-size:26rpx">
  退款金额 : ￥{{return_goods.back_money}}
</view>

<view wx:if="{{return_goods.back_integral}}" class="now-price co-red" style="margin-left:30rpx; font-size:26rpx">
    退款积分 : {{return_goods.back_integral}}积分
</view>

<view class="apply-mes pd-bg-fff">
    <view class="apply-item">
        <view class="apply-til">售后信息</view>
        <view>
            <block wx:if="{{return_goods.status==0}}">已申请成功，待售后审核中</block>
            <block wx:elif="{{return_goods.status==1}}">处理中</block>
            <block wx:elif="{{return_goods.status==2}}">退款完成</block>
            <block wx:elif="{{return_goods.status==3}}">卖家已经拒绝退款</block>
        </view>
    </view>
    <view class="apply-item">
        <view class="apply-til">处理方式</view>
        <view>期望处理方式“{{return_goods.type==0?'退货':return_goods.type==1?'换货':'退款'}}”</view>
    </view>
    <view class="apply-item">
        <view class="apply-til">问题描述</view>
        <view>{{return_goods.reason}}</view>
    </view>
    <view class="apply-item">
        <view class="apply-til">售后备注</view>
        <view>{{return_goods.remark}}</view>
    </view>
    <view class="img-title" wx:if="{{return_goods.imgs.length>0}}">
        <view>问题图片</view>
    </view>
    <view class="img-box">
        <image bindtap="previewImgs" data-idx="{{index}}" src="{{url+item}}" wx:for="{{return_goods.imgs}}"></image>
    </view>
</view>
<view class="apply-state">
    <view class="state-item">
        <view  wx:if="{{return_goods.status==0}}" class="item-wrap">
            <view class="state-title">您的服务单已申请成功，等待售后审核中</view>
            <view class="state-time">{{return_goods.addTimeFormat}}</view>
            <view class="state-user">操作人：客户</view>
        </view>
        <view class="item-wrap" wx:if="{{return_goods.status==1}}">
            <view class="state-title">亲爱的客户，您的服务正在处理中</view>
            <view class="state-time">{{filters.format_time(return_goods.handle_time,1)}}</view>
            <view class="state-user">操作人：卖家</view>
        </view>
        <view class="item-wrap" wx:if="{{return_goods.status==2}}">
            <view class="state-title">亲爱的客户，您的服务单已完成</view>
             <view class="state-time">{{filters.format_time(return_goods.ok_time,1)}}</view>
            <view class="state-user">操作人：卖家</view>
        </view>
        <view class="item-wrap" wx:if="{{return_goods.status==3}}">
			<block wx:if="{{fil.is_cancle(return_goods.remark)}}">
				<view class="state-title">亲爱的客户，你已取消退款</view>
				<view class="state-user" >操作人：客户</view>					
			</block>
			<block wx:else>
				<view class="state-title">亲爱的客户，商家已经拒绝退款</view>
				<view class="state-user" >操作人：卖家</view>				
			</block>          
        </view>
    </view>
	
	<view  bindtap='cancelReturn' wx:if="{{return_goods.status==0 || return_goods.status==1}}" class="btn-wrap">
	    <view class="submit-btn">取消退款</view>
	</view>
		
</view>
