<!--pages/msg/push/index.wxml-->
<title-bar title="任务内容{{readonly?'详情':'上报'}}"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
  <view class="item">
    <!-- 标题 -->
    <view class="h-div v-center header">
      <text class="single"></text>
      <text class="title">任务标题</text>
    </view>
    <input disabled value="{{detail.title}}" class="put v-div h-center" placeholder="-"></input>
    <!-- 类型 -->
    <view class="h-div v-center header">
      <text class="single"></text>
      <text class="title">任务类型</text>
    </view>
    <input disabled class="put v-div h-center" placeholder="-" value="{{detail.typeName}}"></input>
    <!-- 任务周期 -->
    <view class="h-div v-center header">
      <text class="single"></text>
      <text class="title">任务周期</text>
    </view>
    <view class="filter">
      <picker mode="date" disabled>
        <view class="picker">
          开始时间: {{detail.startTime||'-'}}
        </view>
      </picker>
      <picker mode="date" disabled>
        <view class="picker">
          结束时间: {{detail.endTime||'-'}}
        </view>
      </picker>
    </view>
  </view>
  <view class="item">
    <!-- 内容 -->
    <view class="h-div v-center header">
      <text class="single"></text>
      <text class="title">完成情况</text>
    </view>
    <textarea disabled="{{readonly}}" bindinput="inputContent" data-name="workContent" value="{{postData.workContent}}" style="color: #333333;" class="put v-div" placeholder="请输入内容"></textarea>
    <!-- 时间 -->
    <view class="h-div v-center header">
      <text class="single"></text>
      <text class="title">完成时间</text>
    </view>
    <view class="filter">
      <picker disabled="{{readonly}}" mode="date" value="{{postData.completionTime}}" data-name="completionTime" bindchange="bindDateChange">
        <view class="picker" style="width: 90vw;">
          选择时间: {{postData.completionTime||'-'}}
        </view>
      </picker>
    </view>
    <!-- 附件 -->
    <view class="h-div v-center header">
      <text class="single"></text>
      <text class="title flex">附件</text>
      <text wx:if="{{!readonly}}" catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text>
    </view>
    <view class="grid">
      <view class="img" wx:for="{{files}}" style="position: relative;">
        <text wx:if="{{!readonly}}" catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
        <image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
      </view>
    </view>
  </view>
  <view class="space"></view>
</scroll-view>
<view class="option" wx:if="{{!readonly}}">
  <view catchtap="push" class="btn">上报</view>
</view>