<template>
  <div class="page_newBed">
    <div class="newBedTitle">
      <i class="iconfont icon-zuojiantou jiantou"></i>
      <span class="titleName">新增床位</span>
    </div>
    <div class="infoBox">
      <van-field v-model="name" required label="床位号" placeholder="请输入" />
      <van-field
        label="所属分区"
        v-model="sex"
        right-icon="arrow"
        placeholder="请选择"
        required
        readonly
        @click="show = true"
      />
      <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
        <van-picker :columns="columns" show-toolbar @change="onChange" />
      </van-popup>
      <van-field
        label="所属分组"
        v-model="sex"
        right-icon="arrow"
        placeholder="请选择"
        required
        readonly
        @click="show = true"
      />
      <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
        <van-picker :columns="columns" show-toolbar @change="onChange" />
      </van-popup>
    </div>
    <div class="save">保存</div>
  </div>
</template>


<script>
export default {
  data() {
    return {
      show: false,
      show1: false,
      columns: ["男", "女"]
    };
  }
};
</script>


<style lang="scss" scoped>
.page_newBed {
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  background: #fafafa;
  .newBedTitle {
    background: #fff;
    padding: 0 1.125rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
  }
  .jiantou {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 7rem;
  }
  .titleName {
    font-size: 1.125rem;
    font-weight: 600;
  }
  .infoBox {
    margin-top: 1rem;
  }
  .save {
    width: 19.25rem;
    height: 2.875rem;
    margin: 0 auto;
    background: rgba(51, 138, 251, 1);
    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
    border-radius: 1.4375rem;
    text-align: center;
    line-height: 2.875rem;
    color: #fff;
    margin-top: 2.875rem;
  }
}
</style>
<style lang="scss">
.infoBox {
  .van-field__body {
    width: 100%;
  }
  .van-cell__value {
    display: flex;
    align-items: center;
  }
}
</style>
