<!--module/user/components/user-data-edit/user-data-edit.wxml-->
<wxs src="../../../../core/wxs/dictionary.wxs" module="dictionary" />
<wxs src="../../../../core/wxs/field-status.wxs" module="field" />

<!-- dictionary.label($dictionaries, 'sys_user_sex', model['sex'])}}" -->


<block wx:if="{{showSpecialPeriodPicker}}">
  <t-cell t-class="cell-field" t-class-note="cell-field__wrapper {{field.className(dirty, model, 'womenSpecialPeriod')}}" title="女性特殊期" required bind:tap="onPicker">
    <field-picker class="cell-field__inner full" slot="note" title="女性特殊期" name="womenSpecialPeriod" value="{{model['womenSpecialPeriod']}}" options="{{dictionary.options($dictionaries, 'women_special_period')}}" multiple="{{false}}"></field-picker>
  </t-cell>
</block>

<t-cell t-class="cell-field" t-class-note="cell-field__wrapper {{field.className(dirty, model, 'womenSpecialPeriod')}}" title="身高" required>
  <input class="cell-field__inner suffix" slot="note"
    name="height" mark:name="height" id="height" bind:change="onChange" bind:blur="onChange" bind:keyboardheightchange="onKeyboardheightchange"
    value="{{model['height']}}" type="number" placeholder="请输入身高" confirm-type="next" />
  <view class="cell-field__suffix" slot="note">厘米</view>
</t-cell>
<t-cell t-class="cell-field" t-class-note="cell-field__wrapper" title="体重" required>
  <input class="cell-field__inner suffix" slot="note"
    name="weight" mark:name="weight" id="weight" bind:change="onChange" bind:blur="onChange" bind:keyboardheightchange="onKeyboardheightchange"
    value="{{model['weight']}}" type="number" placeholder="请输入体重" confirm-type="next" wx:key="weight" />
  <view class="cell-field__suffix" slot="note">公斤</view>
</t-cell>

<block wx:if="{{!retractable || expanded}}">
  <t-cell t-class="cell-field" t-class-note="cell-field__wrapper" title="食物过敏" bind:tap="onPicker">
    <field-picker class="cell-field__inner full" slot="note" title="食物过敏" name="foodAllergy" value="{{model['foodAllergy']}}" options="{{dictionary.options($dictionaries, 'food_allergy')}}"></field-picker>
  </t-cell>
  <t-cell t-class="cell-field" t-class-note="cell-field__wrapper" title="喜好口味" bind:tap="onPicker">
    <field-picker class="cell-field__inner full" slot="note" title="喜好口味" name="hobbyFlavor" value="{{model['hobbyFlavor']}}" options="{{dictionary.options($dictionaries, 'hobby_flavor')}}"></field-picker>
  </t-cell>

  <t-cell t-class="cell-field" title="饮酒情况">
    <field-radio slot="note" name="drinkState" default-value="N" value="{{model['drinkState'] || 'N'}}" options="{{dictionary.options($dictionaries, 'sys_yes_no')}}">
    </field-radio>
  </t-cell>
  <t-cell t-class="cell-field" title="吸烟情况">
    <field-radio slot="note" name="smokeState" default-value="N" value="{{model['smokeState'] || 'N'}}" options="{{dictionary.options($dictionaries, 'sys_yes_no')}}">
    </field-radio>
  </t-cell>


  <t-cell t-class="cell-field" t-class-note="cell-field__wrapper" title="现住址" bind:tap="onPicker">
    <field-cascader class="cell-field__inner full" slot="note" title="请选择" name="address" value="{{model['address']}}"></field-cascader>
  </t-cell>
  <t-cell t-class="cell-field" t-class-note="cell-field__wrapper" title="详细地址">
    <input class="cell-field__inner" slot="note"
      name="detailAddress" mark:name="detailAddress" id="detailAddress" bind:change="onChange" bind:blur="onChange" bind:keyboardheightchange="onKeyboardheightchange"
      value="{{model['detailAddress']}}" type="text" placeholder="请输入详细地址" confirm-type="next" />
  </t-cell>

  <t-cell t-class="cell-field" t-class-note="cell-field__wrapper" title="职业" bind:tap="onPicker">
    <field-picker class="cell-field__inner full" slot="note" title="请选择" name="job" value="{{model['job']}}" options="{{dictionary.options($dictionaries, 'job')}}" multiple="{{false}}"></field-picker>
  </t-cell>
</block>
<view class="more-button" wx:else bind:tap="onExpand">查看更多</view>