<!--pages/myWork/myWork.wxml 我的工单-->

<navBar></navBar>
<van-notify id="van-notify"/>
<myPay id="myPay" bindsuccess="successPay"></myPay>
<view class="myWork">
  <view class="head">
    <text>提交工单记录</text>
  </view>
</view>
<view style="margin-bottom: 10rpx;">
  <van-tabs type="line" bind:change="changeData" ellipsis="{{false}}">
    <van-tab wx:for="{{ticketTypesMenu}}" wx:key="index" name="{{item.key}}" title="{{item.value}}"></van-tab>
  </van-tabs>
</view>

  <my-scroll-view  triggered="{{triggered}}" load="{{load}}" hasMore="{{hasMore}}" bindonRefresh="onRefresh" bindloadMore="loadMore" customStyle="height: calc(100vh - 370rpx)">
   
    <view wx:if="{{tableData.length>0}}" class="main myWork">
      <view wx:for="{{tableData}}" wx:for-item="item" wx:key="index" class="workData">
        <view class="workData_head" data-item="{{item}}" bind:tap="checkDetail">
          <view class="workData_head_left"> 
            <wux-ellipsis  direction="end" content="{{index + 1}}. {{ticketTypes[item.ticketType]}}-工单 "/>
            <view><van-icon name="arrow" /></view>
           </view>
          <view class="workData_head_right">{{ticketProgress[item.ticketProgress]}}</view>
        </view>
        <view class="workData_content" data-item="{{item}}" bind:tap="checkDetail">
          <view>
            <view><wux-ellipsis  direction="end" content="工单号：{{item.num}}"/></view>
            <view><wux-ellipsis  direction="end" content="下单：{{item.createTime}}"/></view>
          </view>
          <view style="color: red;" wx:if="{{item.price || item.price==0}}">￥{{item.price}}</view>
        </view>
        <view class="workData_foot">
          <view class="btns">
            <view class="btn_item" wx:if="{{item.ticketProgress == 2}}"> 
              <van-button round size="mini" data-method="payMoney" data-item="{{item}}" data-index="{{index}}" bind:click="clickBtn">支付</van-button>
            </view>
            <view class="btn_item" wx:if="{{item.ticketProgress != 5 && item.ticketProgress != 4}}">
              <van-button round size="mini" data-method="confirm" data-item="{{item}}" data-index="{{index}}" bind:click="clickBtn">确认</van-button>
            </view>
            <view class="btn_item" wx:if="{{item.ticketProgress != 5 && item.ticketProgress != 4}}">
              <van-button round size="mini" plain type="danger" data-method="cancel" data-item="{{item}}" data-index="{{index}}" bind:click="clickBtn">取消</van-button>
            </view>
          </view>
        </view>
      </view>
    </view>
    
  <!-- <view wx:if="{{tableData.length>0 && false}} " class="main myWork">
    <block wx:for="{{tableData}}" wx:for-item="item" wx:key="index">
      <myCard menu="{{menu}}" data="{{item}}" index="{{index}}" edit="{{(item.ticketProgress == 4 || item.ticketProgress == 5)?false:true}}" bindvalue='clickMenu'>
        <view slot="head_left" class="head_left">
          {{index + 1}}. {{ticketTypes[item.ticketType]}}-工单
        </view>
        <view slot="head_right">
          {{ticketProgress[item.ticketProgress]}}
        </view>
        <view class="card_body">
          <view class="price" wx:if="{{item.price}}">￥{{item.price}}</view>
          <view class="content" wx:if="{{item.ticketType == 4}}">
            <view class="content_item">
              申请类型：{{item[ticketTypeFiled[item.ticketType]].appType}}
            </view>
            <view class="content_item">
              申请国家：{{item[ticketTypeFiled[item.ticketType]].appCountry}}
            </view>
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].industry}}">
              所属行业：{{item[ticketTypeFiled[item.ticketType]].industry}}
            </view>
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].techType}}">
              技术类型：{{item[ticketTypeFiled[item.ticketType]].techType}}
            </view>
            <view class="content_item">
              是否海外申请：{{item[ticketTypeFiled[item.ticketType]].appAbroad?'是':'否'}}
            </view>
            <view class="content_item">
              备注：{{item[ticketTypeFiled[item.ticketType]].description}}
            </view>
          </view>
          <view class="content" wx:if="{{item.ticketType == 3}}">
            <view class="content_item">
              投诉方：{{item[ticketTypeFiled[item.ticketType]].complainAdinSite}}-{{item[ticketTypeFiled[item.ticketType]].complainAdin}}
            </view>
            <view class="content_item">
              被投诉方：{{item[ticketTypeFiled[item.ticketType]].complainedAdinSite}}-{{item[ticketTypeFiled[item.ticketType]].complainedAdin}}
            </view>
            <view class="content_item">
              商品是否原创：{{item[ticketTypeFiled[item.ticketType]].ifOriginal?'是':'否'}}
            </view>
            <view class="content_item">
              被投诉类型：{{item[ticketTypeFiled[item.ticketType]].complainedType}}
            </view>
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].patentNo}}">
              专利号：{{item[ticketTypeFiled[item.ticketType]].patentNo}}
            </view>
 
            <view class="content_item">
              是否协商过：{{item[ticketTypeFiled[item.ticketType]].ifTalked?'是':'否'}}
            </view>
            <view class="content_item">
              详情：{{item[ticketTypeFiled[item.ticketType]].description}}
            </view>
          </view>
          <view class="content" wx:if="{{item.ticketType == 2}}">
            <view class="content_item">
              侵权店铺：{{item[ticketTypeFiled[item.ticketType]].tortStoreAdinSite}}-{{item[ticketTypeFiled[item.ticketType]].tortStoreAdin}}
            </view>
            <view class="content_item">
              侵权类型：{{item[ticketTypeFiled[item.ticketType]].tortType}}
            </view>
            <view class="content_item">
              侵权分类：{{item[ticketTypeFiled[item.ticketType]].tortClassify}}
            </view>
            <view class="content_item">
              是否拥有权利：{{item[ticketTypeFiled[item.ticketType]].ifHaveRightProof?'是':'否'}}
            </view>
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].patentNo}}">
              权利证明（号码）：{{item[ticketTypeFiled[item.ticketType]].patentNo}}
            </view>
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].proofGuids && item[ticketTypeFiled[item.ticketType]].proofGuids.length>0}}">
              权利证明（图）：
              <view>
                <image wx:for="{{item[ticketTypeFiled[item.ticketType]].proofGuids}}" wx:for-item="img" class="img_item" src="{{imgHttp + img}}" show-menu-by-longpress data-current="{{img}}" data-imgList="{{item[ticketTypeFiled[item.ticketType]].proofGuids}}" bindtap="previewImage" mode="aspectFit"/>
              </view>
            </view>
            <view class="content_item">
              描述：{{item[ticketTypeFiled[item.ticketType]].problemDescription}}
            </view>
            <view class="content_item">
              店铺链接：{{item[ticketTypeFiled[item.ticketType]].tortStoreLink}}
            </view>
            <view class="content_item" >
              其他信息：{{item[ticketTypeFiled[item.ticketType]].description}}
            </view>
          </view>
          <view class="content" wx:if="{{item.ticketType == 1}}">
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].companyName}}">
              公司名称：{{item[ticketTypeFiled[item.ticketType]].companyName}}
            </view>
            <view class="content_item" wx:if="{{item[ticketTypeFiled[item.ticketType]].patentNos}}">
              
              <wux-ellipsis defaultExpanded="{{false}}" expandText="展开" collapseText="收起" wux-class="ellipsis" class="head_left_title" direction="end" content="选择的专利：{{ item[ticketTypeFiled[item.ticketType]].patentNos }}"/>
            </view>
            <view class="content_item">
              专利无法导出？：{{item[ticketTypeFiled[item.ticketType]].patentExport?'是':'否'}}
            </view>
            <view class="content_item">
              具体问题：{{item[ticketTypeFiled[item.ticketType]].description}}
            </view>
          </view>
          <view class="content_item">
            创建时间：{{item.createTime}}
          </view>
        </view>
      </myCard>
    </block>
    </view>
     -->
    <van-empty wx:else description="暂无数据" />
  </my-scroll-view>
