<view class='tab'>
  <view class='top'>
    <view wx:for="{{tab}}" class="{{tab_index==index &&'select'}}" catchtap='tab' data-index='{{index}}'>
      {{item}}
    </view>
  </view>
</view>
<form bindsubmit="formSubmit">
  <input hidden="hidden" name='type' value="{{tab_index?1:2}}"></input>
  <view style='background-color:#fff;margin-top:20rpx;'>
    <view class='content'>
      <view class='title'>{{tab[tab_index]}}对象</view>
      <view class='content_text'>
        <view class='form'>
          <view class='form_title'>{{tab[tab_index]}}部门</view>
          <block wx:if="{{flag}}">
            <input disabled value='{{deptName}}' />
            <input name="deptUnid" hidden value='{{deptUnid}}' />
          </block>
          <picker wx:else range="{{dep_list}}" range-key="name" value="{{dep_index}}" bindchange="pickerChange" data-_index='dep_index'>
            <view class='picker'>
              <text>{{dep_list[dep_index].name}}</text>
              <input name="deptUnid" hidden value='{{dep_list[dep_index].id}}' />
              <image class='picker_image' src='../../images/bottom.png'></image>
            </view>
          </picker>
        </view>
        <view class='form'>
          <view class='form_title'>{{tab[tab_index]}}事项</view>
          <block wx:if="{{flag}}">
            <view style="width:72%">{{serviceName}}</view>
            <input name="serviceUnid" hidden value='{{serviceUnid}}' />
          </block>
          <picker wx:else range="{{matter_list}}" range-key="name" value="{{matter_index}}" bindchange="pickerChange" data-_index='matter_index'>
            <view class='picker'>
              <text>{{matter_list[matter_index].name}}</text>
              <input name="serviceUnid" hidden value='{{matter_list[matter_index].id}}' />
              <image class='picker_image' src='/images/bottom.png'></image>
            </view>
          </picker>
        </view>
        <view class='form'>
          <view class='form_title'>{{tab[tab_index]}}主题</view>
          <view class='input'>
            <input name="title" maxlength="10" value="{{title}}" bindblur="titleCheckLength" placeholder='请输入{{tab[tab_index]}}主题' placeholder-class='place'></input>
          </view>
        </view>
        <view class='form'>
          <view class='form_title'>{{tab[tab_index]}}内容</view>
          <view class='input'>
            <input name="content" value="{{content}}" placeholder='请输入{{tab[tab_index]}}内容' placeholder-class='place'></input>
          </view>
        </view>
      </view>
    </view>
  </view>
  <view style='background-color:#fff;margin-top:20rpx;'>
    <view class='content'>
      <view class='title'>个人信息</view>
      <view class='content_text'>
        <view class='form'>
          <view class='form_title'>姓名</view>
          <view class='input'>
            <input name="consultantName" value='{{name}}' placeholder='请输入姓名 ' placeholder-class='place'></input>
          </view>
        </view>
        <view class='form'>
          <view class='form_title'>联系方式</view>
          <view class='input'>
            <input name="consultantPhone" maxlength="11" value="{{phone}}" placeholder='请输入联系方式' placeholder-class='place'></input>
          </view>
        </view>
      </view>
    </view>
  </view>
  <view class='btn'>
    <button form-type="submit">提交</button>
  </view>
</form>