<!--pages/myWork/workDetail.wxml-->
<myPay id="myPay" bindsuccess="successPay"></myPay>
<van-popup
  show="{{ show }}"
  closeable="{{true}}"
  position="bottom"
  round
  custom-style="height: auto;"
  bind:close="onClose"
>
  <view class="popup">
    <view class="popup_title">工单跟踪</view>
    <view class="popup_content">
      <wux-timeline wx:if="{{ticketFlows.length>0}}">
        <wux-timeline-item dotStyle="border-color: #969799; color: #969799;" wx:for="{{ticketFlows}}">
          <view class="popup_content_item">
            <view>{{item.remark}}</view>
            <view>{{item.createTime}}</view>
          </view>
        </wux-timeline-item>
      </wux-timeline>
      <van-empty wx:else description="暂无数据" /> 
    </view>
    
  </view>
</van-popup>

<view class="workDetail">

<view class="state" bind:tap="showProgress">
  工单{{ticketProgress[work.ticketProgress]}}<van-icon name="arrow" />
</view>
<!--工单基本信息 -->
<view class="workData_foot">
          <view class="btns">
            <view class="btn_item" wx:if="{{work.ticketProgress == 2}}"> 
              <van-button round size="mini" data-method="payMoney" bind:click="clickBtn">支付</van-button>
            </view>
            <view class="btn_item" wx:if="{{work.ticketProgress != 5 && work.ticketProgress != 4}}">
              <van-button round size="mini" data-method="confirm" bind:click="clickBtn">确认</van-button>
            </view>
            <view class="btn_item" wx:if="{{work.ticketProgress != 5 && work.ticketProgress != 4}}">
              <van-button round size="mini" plain type="danger" data-method="cancel" bind:click="clickBtn">取消</van-button>
            </view>
          </view>
    </view>
<view class="basic">
  <view class="text">工单类型：{{ticketTypes[work.ticketType]}}</view>
  <view class="text">工单号：{{work.num}}</view>
  <view class="text">下单时间：{{work.createTime}}</view>
  <view class="text" wx:if="{{work.contactPerson}}">联系人：{{work.contactPerson}}</view>
  <view class="text" wx:if="{{work.contactPhone}}">联系电话：{{work.contactPhone}}</view>
  <view wx:if="{{work.price || work.price==0}}" class="text price">价格：￥{{work.price}}</view>
</view>

<!-- 工单详细信息 -->
  <view class="card_body">
          <!-- 申请 -->
          <view class="content" wx:if="{{work.ticketType == 4}}">
            <view class="content_item">
              申请类型：{{work[ticketTypeFiled[work.ticketType]].appType}}
            </view>
            <view class="content_item">
              申请国家：{{work[ticketTypeFiled[work.ticketType]].appCountry}}
            </view>
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].industry}}">
              所属行业：{{work[ticketTypeFiled[work.ticketType]].industry}}
            </view>
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].techType}}">
              技术类型：{{work[ticketTypeFiled[work.ticketType]].techType}}
            </view>
            <view class="content_item">
              是否海外申请：{{work[ticketTypeFiled[work.ticketType]].appAbroad?'是':'否'}}
            </view>
            <view class="content_item">
              附件：
              <view>
                <view wx:for="{{work.systemFiles}}" wx:key="{{item.guid}}">
                  <view class="file_item">
                    <view>{{item.originalName}}</view>
                  </view>
                </view>
              </view>
            </view>
            <view class="content_item">
              备注：{{work[ticketTypeFiled[work.ticketType]].description}}
            </view>
          </view>
          <!-- 申诉 -->
          <view class="content" wx:if="{{work.ticketType == 3}}">
            <view class="content_item">
              投诉方：{{work[ticketTypeFiled[work.ticketType]].complainAdinSite}}-{{work[ticketTypeFiled[work.ticketType]].complainAdin}}
            </view>
            <view class="content_item">
              被投诉方：{{work[ticketTypeFiled[work.ticketType]].complainedAdinSite}}-{{work[ticketTypeFiled[work.ticketType]].complainedAdin}}
            </view>
            <view class="content_item">
              商品是否原创：{{work[ticketTypeFiled[work.ticketType]].ifOriginal?'是':'否'}}
            </view>
            <view class="content_item">
              被投诉类型：{{work[ticketTypeFiled[work.ticketType]].complainedType}}
            </view>
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].patentNo}}">
              专利号：{{work[ticketTypeFiled[work.ticketType]].patentNo}}
            </view>
            <view class="content_item">
              截图：
              <view>
                <image wx:for="{{work.systemFiles}}" wx:for-item="img" class="img_item" data-type="1" src="{{imgHttp + img.guid}}" show-menu-by-longpress data-current="{{img.guid}}" data-imgList="{{work.systemFiles}}" bindtap="previewImage" mode="aspectFit"/>
              </view>
            </view>
            <view class="content_item">
              是否协商过：{{work[ticketTypeFiled[work.ticketType]].ifTalked?'是':'否'}}
            </view>
            <view class="content_item">
              详细说明：{{work[ticketTypeFiled[work.ticketType]].description}}
            </view>
          </view>
          <!-- 维权 -->
          <view class="content" wx:if="{{work.ticketType == 2}}">
            <view class="content_item">
              侵权店铺：{{work[ticketTypeFiled[work.ticketType]].tortStoreAdinSite}}-{{work[ticketTypeFiled[work.ticketType]].tortStoreAdin}}
            </view>
            <view class="content_item">
              侵权类型：{{work[ticketTypeFiled[work.ticketType]].tortType}}
            </view>
            <view class="content_item">
              侵权分类：{{work[ticketTypeFiled[work.ticketType]].tortClassify}}
            </view>
            <view class="content_item">
              是否拥有权利：{{work[ticketTypeFiled[work.ticketType]].ifHaveRightProof?'是':'否'}}
            </view>
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].patentNo}}">
              权利证明（号码）：{{work[ticketTypeFiled[work.ticketType]].patentNo}}
            </view>
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].proofGuids && work[ticketTypeFiled[work.ticketType]].proofGuids.length>0}}">
              权利证明（图）：
              <view>
                <image wx:for="{{work[ticketTypeFiled[work.ticketType]].proofGuids}}" wx:for-item="img" class="img_item" src="{{imgHttp + img}}" show-menu-by-longpress data-current="{{img}}" data-imgList="{{work[ticketTypeFiled[work.ticketType]].proofGuids}}" bindtap="previewImage" mode="aspectFit"/>
              </view>
            </view>
            <view class="content_item">
              描述：{{work[ticketTypeFiled[work.ticketType]].problemDescription}}
            </view>
            <view class="content_item">
              店铺链接：{{work[ticketTypeFiled[work.ticketType]].tortStoreLink}}
            </view>
            <view class="content_item" >
              其他信息：{{work[ticketTypeFiled[work.ticketType]].description}}
            </view>
          </view>
          <!-- 专利解读 -->
          <view class="content" wx:if="{{work.ticketType == 1}}">
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].companyName}}">
              公司名称：{{work[ticketTypeFiled[work.ticketType]].companyName}}
            </view>
            <view class="content_item" wx:if="{{work[ticketTypeFiled[work.ticketType]].patentNos}}">
              
              <wux-ellipsis defaultExpanded="{{false}}" expandText="展开" collapseText="收起" wux-class="ellipsis" class="head_left_title" direction="end" content="选择的专利：{{ work[ticketTypeFiled[work.ticketType]].patentNos }}"/>
            </view>
            <view class="content_item">
              专利无法导出？：{{work[ticketTypeFiled[work.ticketType]].patentExport?'是':'否'}}
            </view>
            <view class="content_item">
              具体问题：{{work[ticketTypeFiled[work.ticketType]].description}}
            </view>
          </view>
  </view>
</view>