<view class="container">

  <view class="service-order">
    <view class="section-title1">服务工单</view>
    <view class="order-info">
      <view class="info-item">
        <text class="label">服务单号：</text>
        <text class="value">{{orderDetail.orderNo}}</text>
      </view>
     
      <view class="info-item">
        <text class="label">客户：</text>
        <text class="value">{{orderDetail.customerName}}</text>
      </view>
      <view class="info-item">
        <text class="label">服务人员：</text>
        <text class="value">{{orderDetail.serviceStaffNames}}</text>
      </view>
      <view class="info-item">
        <text class="label">预计服务完成时间：</text>
        <text class="value">{{orderDetail.estimatedCompleteTime}}</text>
      </view>
      <view class="info-item delay-info">
        <text class="label">距服务完成时间还剩：</text>
        <text class="value highlight">{{orderDetail.remainingTime}}天</text>
      </view>
      <view class="info-item">
        <text class="label">备注：</text>
        <text class="value">{{orderDetail.remark}}</text>
      </view>
    </view>
  </view>
 

 <view class="service-record">
    <view class="record-header"> 
      <text class="section-title">验收填写</text>
      <l-button class="history-btn" bindtap="viewHistory" size="mini">服务记录</l-button>
    </view>
  </view>
  <view class="record-content" >
    <view class="form-container">
      <form catchsubmit="formSubmit" >
      <view class="form-item">
        <text class="form-label required">服务人员：</text>
          <picker class="picker" mode="selector" range-key="name"  range="{{serviceList}}" bindchange="onSelectPerson">
          <view class="picker-text">{{formObj.checkUserName || "请选择服务人员"}}</view>
        </picker>
      </view>
     <view class="form-item">
        <text class="form-label required">验收日期：</text>
        <picker class="picker" mode="date" bindchange="onDateChange" value="{{formObj.checkDate}}">
          <view class="picker-text">{{formObj.checkDate || "请选择验收日期"}}</view>
        </picker>
      </view>
      <view class="form-item">
        <text class="form-label required">客户对接人：</text>
         <l-input class='input-custorm' id="receiverName" value="{{formObj.contactName}}" hide-label show-row="{{false}}" bind:lininput="change_receiver_input" bind:linconfirm="confirm_receiver_input" bind:linblur="confirm_receiver_input" clear="{{true}}" placeholder="请输入客户对接人"/>
     
      </view>
       <scroll-view class="receiver_bx" scroll-y="true" wx:if="{{receiverShow}}" style = "top:580rpx;">
        <view  class = "receiver_txt" wx:if="{{r_txt_Show}}">暂无内容</view>
        <block wx:for="{{custormList}}" wx:for-item="item"  wx:key="index">
            <view class = "receiver_txt" bindtap="on_rece_tap" data-id="{{item.id}}" data-name="{{item.name}}"> {{item.name}} </view>
        </block>
    </scroll-view>
     <view class="form-item">
        <text class="form-label required">对接人电话：</text>
         <l-input class='input-custorm'  bind:lininput="onPhoneChange"  id="receiverTel" value="{{formObj.telephone}}" hide-label show-row="{{false}}" placeholder="请输入对接人电话"/>
      </view>

      <view class="form-item">
        <text class="form-label required">验收单：</text>
        <view class="uploader">
          <view class="preview-list">
            <block wx:for="{{images}}" wx:key="index">
              <view class="preview-item">
                <image 
                  class="preview-image" 
                  src="{{item.tempFilePath}}" 
                  mode="aspectFill"
                  bindtap="previewImage"
                  data-index="{{index}}"
                />
                 <view class="delete-btn" bindtap="deleteImage" data-index="{{index}}">×</view>
              </view>
            </block>
            <view 
              class="preview-item upload-btn" 
              wx:if="{{images.length < 3}}"
              bindtap="chooseImage"
            >
              <view class="add-text">+</view>
          </view>
        </view>
        </view>
      </view>

      <view class="btn-area">
        <button class="medium-button"  style="margin: 30rpx 0"  bindtap="goBack" data-id="{{item.id}}">取消</button>
        <button class="medium-button"  style="margin: 30rpx 0; background-color: #3963bc; color: white;" formType="submit">提交</button>
      </view>
       </form>
    </view>
  </view>

  <!-- <view class="service-record">
     <view class="record-header"> 
      <text class="section-title">服务记录</text>
      <l-button  wx:if="{{records && records.length>0}}" class="history-btn" bindtap="viewHistory" size="mini">历史记录</l-button>
    </view>
     <view  wx:if="{{ records && records.length<1 }}" class="info-item nodata">暂无记录</view>
  </view>
   <view>
    <view class="order-info item-box" wx:for="{{records}}" wx:key="index" >
      <view class="info-item">
        <text class="label">日期：</text>
        <text class="value">{{item.installDate}}</text>
      </view>
      <view class="info-item">
        <text class="label">货品：</text>
        <text class="value">{{item.goodsName}}</text>
      </view>
      <view class="info-item">
        <text class="label">数量：</text>
        <text class="value">{{item.orderQuantity}}</text>
      </view>
      <view class="info-item">
        <text class="label">剩余量：</text>
        <text class="value">{{item.unshippedQuantity}}</text>
      </view>
      <view class="info-item">
        <text class="label">已完成量：</text>
        <text class="value">{{item.shippedQuantity}}</text>
      </view>
      <view class="info-item delay-info">
        <text class="label">今日完成量：</text>
        <text class="value highlight">{{item.installQuantity}}</text>
      </view>
      <view class="info-item">
        <text class="label">备注：</text>
        <text class="value">{{item.installRemark}}</text>
      </view>
    </view>
  </view> -->

 
   

   
</view>