<template>
    <div>
        <div class="newDoctorAdvice">
            <van-sticky>
                <div class="newDoctorAdviceTitle">
                    <span @click="back" style="color:#323233;font-size: .875rem;"><i class="iconfont icon-zuojiantou jiantou" style="color:#323233;"></i>返回</span>
                    <span style="font-weight:bold;">{{ formTitle }}</span>
                    <span style="color:#323233;font-size: .875rem;" @click="comfirmAction">保存</span>
                </div>
            </van-sticky>
            <div>
                <div class="adviceTitle">
                    <div>开始时间：<span class="timeSpan" @click="selectStartTimeAction">{{ start_time_str }}</span></div>
                    <div>开嘱医生: {{ $store.getters.user.user.user_name }}</div>
                </div>
                <div class="inputCell">
                    <p>医嘱内容：</p>
                    <el-autocomplete
                    style="width:100%;"
                    v-model="order.title"
                    :fetch-suggestions="querySearch"
                    placeholder="请输入内容"
                    @select="handleSelect"
                    @input="changeDrugName"
                    ></el-autocomplete>
                </div>
                <div class="inputCell">
                    <p>药品规格：</p>
                    <div style="display:flex;justify-content: space-between;">
                        <el-autocomplete
                        class="inline-input"
                        v-model="order.advice_desc"
                        :fetch-suggestions="querySearch1"
                        placeholder="请输入内容"
                        @select="handleSelect1"
                        @input="changeDrugDesc"
                        ></el-autocomplete>
                        <input
                            type="text"
                            placeholder="单位"
                            readonly
                            class="commonInput"
                            v-model="order.drug_spec_unit"
                            @focus="selectDrugSpecUnitAction"
                        />
                    </div>
                </div>
                <div class="inputCell">
                    <p>开药数量：</p>
                    <div style="display:flex;justify-content: space-between;">
                        <input
                            type="number"
                            class="inline-input1"
                            v-model="order.prescribing_number"
                        />
                        <input
                            type="text"
                            placeholder="单位"
                            readonly
                            class="commonInput"
                            v-model="order.prescribing_number_unit"
                            @focus="selectPrescribingNumUnitAction"
                        />
                    </div>
                </div>
                <div class="inputCell">
                    <p>单次用量：</p>
                    <div style="display:flex;justify-content: space-between;">
                        <input
                            type="number"
                            class="inline-input1"
                            v-model="order.single_dose"
                        />
                        <input
                            type="text"
                            placeholder="单位"
                            readonly
                            class="commonInput"
                            v-model="order.single_dose_unit"
                            @focus="selectSingleDoseAction"
                        />
                    </div>
                </div>
                <div class="inputCell" v-show="order.parent_id == 0">
                    <p>给药途径：</p>
                    <el-input
                        placeholder="选择给药途径"
                        readonly
                        :disabled="mode == 3"
                        v-model="order.delivery_way"
                        @focus="selectDeliveryWayAction"
                    ></el-input>
                </div>
                <div class="inputCell" v-show="order.parent_id == 0">
                    <p>执行频率：</p>
                    <el-input
                        placeholder="选择执行频率"
                        readonly
                        :disabled="mode == 3"
                        v-model="order.execution_frequency"
                        @focus="selectExecFrequencyAction"
                    ></el-input>
                </div>
                <div class="inputCell" v-show="order.parent_id == 0">
                    <p>医嘱嘱托：</p>
                    <el-input
                        style="width:100%"
                        v-model="order.remark"
                    ></el-input>
                </div>

            </div>
            <mt-datetime-picker
            ref="start_time_picker"
            type="datetime"
            @confirm="didSelectStartTime"
            v-model="start_time"
            class="startTimePicker datetimePicker"
            ></mt-datetime-picker>
            <van-popup v-model="drug_spec_unit_show" class="listBoxPopup newListBoxPopup">
                <div class="listBox" v-if="sub_dialog_key == 5">
                    <div @click="chooseDrugSpecUnit('')">请选择</div>
                    <div v-for="(item,index) in drug_spec_unit_options" :key="index" @click="chooseDrugSpecUnit(item.name)">{{ item.name }}</div>
                </div>
                <div class="listBox" v-if="sub_dialog_key == 2">
                    <div @click="choosePrescribingNumberUnit('')">请选择</div>
                    <div v-for="(item,index) in prescribing_number_unit_options" :key="index" @click="choosePrescribingNumberUnit(item.name)">{{ item.name }}</div>
                </div>
                <div class="listBox" v-if="sub_dialog_key == 1">
                    <div @click="chooseSingleDoseUnit('')">请选择</div>
                    <div v-for="(item,index) in single_dose_unit_options" :key="index" @click="chooseSingleDoseUnit(item.name)">{{ item.name }}</div>
                </div>
                <div class="listBox" v-if="sub_dialog_key == 4">
                    <div @click="chooseExecutionFrequency('')">请选择</div>
                    <div v-for="(item,index) in execution_frequency_options" :key="index" @click="chooseExecutionFrequency(item.name)">{{ item.name }}</div>
                </div>
                <div class="listBox" v-if="sub_dialog_key == 3">
                    <div @click="chooseDeliveryWay('')">请选择</div>
                    <div v-for="(item,index) in delivery_way_options" :key="index" @click="chooseDeliveryWay(item.name)">{{ item.name }}</div>
                </div>
            </van-popup>
        </div>


       <van-popup
        v-model="infor_visibility"
        class="advicePopup"
        get-container="#today_panel"
      >
        <infor-sub-menu
        :visibility="infor_visibility"
        v-on:menu-cancle-three="menuCancleFour"
        v-on:menu-comfirm-three="menuComfirmFour"
        >
      </infor-sub-menu>
      </van-popup>
    </div>
</template>

<script>
import {parseTime} from '@/utils'
import InforSubMenu from "@/pages/main/dialog/subMenu/InforSubMenu"
import {batchCreateAdvices} from '@/api/advice'
import { saveMobileInformation } from '@/api/dialysis'
import {Toast} from 'vant'
export default {
  props: {
    drug_spec_unit_options: {
      type: Array,
      default: function () {
        return []
      }
    },
    delivery_way_options: {
      type: Array,
      default: function () {
        return []
      }
    },
    execution_frequency_options: {
      type: Array,
      default: function () {
        return []
      }
    },
    single_dose_unit_options: {
      type: Array,
      default: function () {
        return []
      }
    },
    prescribing_number_unit_options: {
      type: Array,
      default: function () {
        return []
      }
    },
    base_drug_list: {
      type: Array,
      default: function () {
        return []
      }
    },
    all_drug: {
      type: Array,
      default: function () {
        return []
      }
    },
    medicals: {
      type: Array,
      default: function () {
        return []
      }
    },
    base_drug_config: {
      type: Object,
      default: function () {
        return null
      }
    },
    private_drug_config: {
      type: Object,
      default: function () {
        return null
      }
    },
    predialysis: {
      type: Object
    },
    schedulePatient: {
      type: Object
    }
  },
  components:{
    InforSubMenu
  },
  data () {
    return {
      formTitle: '新增医嘱',

      record_date_str: '',
      start_time: new Date(),
      start_time_str: '',
      mode: 1,
      order: {
        title: '',
        advice_desc: '',
        drug_spec: '',
        drug_spec_unit: '',
        delivery_way: '',
        execution_frequency: '',
        single_dose: '',
        single_dose_unit: '',
        prescribing_number: '',
        prescribing_number_unit: '',
        remark: '',
        group_no: '',

        // 在新增子药才用到的字段
        parent_id: 0, // 父医嘱ID
        start_time: '',
        record_time: '',
        drug_id: '',
        drug_name_id: '',
        way: ''
      },
      drugSpec: [],
      advices: [],
      group_no: 0,
      patient_id: 0,

      drug_spec_unit_show: false,
      sub_dialog_key: 0,
      infor_visibility:false,
    }
  },
  mounted () {
    console.log('drug_spec_unit_options', this.execution_frequency_options)
    // console.log('中国实际233322332323232', this.schedulePatient)
    var patient_id = this.$route.query.patient_id
    this.patient_id = patient_id
    this.record_date_str = parseTime(new Date(), '{y}-{m}-{d}')
    if (this.$store.getters.user.org.id == 10101) {
      if (this.predialysis.created_time > 0) {
        this.start_time_str = parseTime(new Date(this.predialysis.created_time * 1000), '{y}-{m}-{d} {h}:{i}') + ':00'
        this.start_time = new Date(this.predialysis.created_time * 1000)
      } else {
        this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
      }
    } else if (this.$store.getters.user.org.id == 9671 || this.$store.getters.user.org.id == 9675 || this.$store.getters.user.org.id == 10340 || this.$store.getters.user.org.id == 10447) {
      var date = new Date()
      var year = date.getFullYear() // 获取完整的年份(4位)
      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 // 获取当前月份(0-11,0代表1月)
      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() // 获取当前日(1-31)

      if (this.schedulePatient.schedule_type == 1) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '07:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '07:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 2) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '9:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '9:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 3) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '18:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '18:00' + ':00'
      }
    } else if (this.$store.getters.user.org.id == 9829) {
      var date = new Date()
      var year = date.getFullYear() // 获取完整的年份(4位)
      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 // 获取当前月份(0-11,0代表1月)
      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() // 获取当前日(1-31)

      if (this.schedulePatient.schedule_type == 1) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '06:30' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '06:30' + ':00'
      } else if (this.schedulePatient.schedule_type == 2) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '11:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '11:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 3) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '15:30' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '15:30' + ':00'
      }
    }else if (this.$store.getters.user.org.id == 10383) {
      var date = new Date()
      var year = date.getFullYear() // 获取完整的年份(4位)
      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 // 获取当前月份(0-11,0代表1月)
      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() // 获取当前日(1-31)

      if (this.schedulePatient.schedule_type == 1) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '07:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '07:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 2) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '11:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '11:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 3) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '15:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '15:00' + ':00'
      }
    }else if (this.$store.getters.user.org.id == 10580) {
      var date = new Date()
      var year = date.getFullYear() // 获取完整的年份(4位)
      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 // 获取当前月份(0-11,0代表1月)
      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() // 获取当前日(1-31)

      if (this.schedulePatient.schedule_type == 1) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '07:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '07:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 2) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '10:30' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '10:30' + ':00'
      } else if (this.schedulePatient.schedule_type == 3) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '17:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '17:00' + ':00'
      }
    }else if (this.$store.getters.user.org.id == 10234) {
      var date = new Date()
      var year = date.getFullYear() // 获取完整的年份(4位)
      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 // 获取当前月份(0-11,0代表1月)
      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() // 获取当前日(1-31)

      if (this.schedulePatient.schedule_type == 1) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '07:30' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '07:30' + ':00'
      } else if (this.schedulePatient.schedule_type == 2) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '12:00' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '12:00' + ':00'
      } else if (this.schedulePatient.schedule_type == 3) {
        this.start_time_str = year + '-' + month + '-' + day + ' ' + '15:30' + ':00'
        this.start_time = year + '-' + month + '-' + day + ' ' + '15:30' + ':00'
      }
    }else if (this.$store.getters.user.org.id == 10587){
      this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
    } else {
      this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
    }
  },
  methods: {
    menuComfirmFour:function(start_time,remark){
       var params = {
         patient_id:this.$route.query.patient_id,
         record_date:parseInt(this.$route.query.date),
         start_time:start_time,
         module:4,
         remark:remark,
       }
      
      saveMobileInformation(params).then(response=>{
        if(response.data.state == 1){
           this.infor_visibility = false
           Toast.success('申请成功')
        }
      })
    },
    menuCancleFour:function(){
     this.infor_visibility = false
    
    },
    back () {
      this.$emit('close')
    },
    selectStartTimeAction: function () {
      this.$refs.start_time_picker.open()
    },
    didSelectStartTime: function (time) {
      this.start_time_str = parseTime(time, '{y}-{m}-{d} {h}:{i}') + ':00'
    },
    querySearch (queryString, cb) {
      console.log('hhhhhhhh232323', this.all_drug)
      console.log('queryString', queryString)
      var restaurants = this.all_drug
      restaurants.map(item => {
        item.value = item.drug_name
      })
      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
      // 调用 callback 返回建议列表的数据
      console.log('results', results)
      cb(results)
    },
    createFilter (queryString) {
     
      return (restaurant) => {
        console.log("restaurant23223232323",restaurant)
        return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) !=-1)
      }
    },
    getUnits(id){
     console.log("drug_spec_unit_options",this.drug_spec_unit_options)
     var name = ""
      for(let i=0;i<this.drug_spec_unit_options.length;i++){
        if(id == this.drug_spec_unit_options[i].id){
           name = this.drug_spec_unit_options[i].name
        }
      }
      return name
    },
    handleSelect (item) {
      this.drug_id = item.id
      this.way = 1
      console.log('itme33333333', item)
      this.current_drug_name = name
      var specai_name = item.drug_specs[0].dose + item.drug_specs[0].dose_unit +"*" +item.drug_specs[0].min_number + item.drug_specs[0].min_unit +"/" + item.drug_specs[0].max_unit
      this.order.advice_desc = specai_name
      this.order.drug_spec_unit = ""
      this.order.prescribing_number = item.drug_specs[0].prescribing_number
      this.order.prescribing_number_unit = item.drug_specs[0].prescribing_number_unit
      this.order.single_dose = item.drug_specs[0].single_dose
      this.order.single_dose_unit =this.getUnits(item.drug_specs[0].drug_dose_unit) 
      this.order.delivery_way  = item.drug_specs[0].delivery_way
      this.order.execution_frequency = item.drug_specs[0].execution_frequency
      this.drugSpec = []
      for (let i = 0; i < this.all_drug.length; i++) {
        if (this.all_drug[i].drug_name == item.drug_name) {
          this.drugSpec = this.all_drug[i].drug_specs
        }
      }
    },
    changeDrugName (name) {
      this.drug_id = 0
      this.way = 0
      this.drug_name_id = 0
      this.current_drug_name = name
      this.order.advice_desc = ''
      this.drugSpec = []
      this.current_drug_name = ''
    },
    querySearch1 (queryString, cb) {
      var restaurants = this.drugSpec
      console.log(restaurants)
      restaurants.map(item => {
        item.value = item.drug_spec
      })
      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
      // 调用 callback 返回建议列表的数据
      console.log('results', results)
      cb(results)
    },
    createFilter1 (queryString) {
      return (restaurant) => {
        return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
      }
    },
    handleSelect1 (item) {
      console.log("itemwowoowowoow",item)
      for (let i = 0; i < this.drugSpec.length; i++) {
        if (this.drugSpec[i].drug_spec == item.drug_spec) {
          this.order.advice_desc = this.drugSpec[i].drug_spec
          this.order.prescribing_number = this.drugSpec[i].prescribing_number
          this.order.single_dose = this.drugSpec[i].single_dose
          this.order.delivery_way = this.drugSpec[i].delivery_way
          this.order.execution_frequency = this.drugSpec[i].execution_frequency
          if (this.drugSpec[i].drug_name_id) {
            this.drug_name_id = this.drugSpec[i].drug_name_id
          } else {
            this.drug_name_id = 0
          }
        }
      }
    },
    changeDrugDesc (name) {
      // this.drug_id = 0
      //  this.way = 0
      // this.drug_name_id = 0
    },
    selectDrugSpecUnitAction: function () {
      this.sub_dialog_key = 5
      this.drug_spec_unit_show = true
    },
    selectPrescribingNumUnitAction: function () {
      this.sub_dialog_key = 2
      this.drug_spec_unit_show = true
    },
    selectSingleDoseAction: function () {
      this.sub_dialog_key = 1
      this.drug_spec_unit_show = true
    },
    selectDeliveryWayAction: function () {
      this.sub_dialog_key = 3
      this.drug_spec_unit_show = true
    },
    selectExecFrequencyAction: function () {
      this.sub_dialog_key = 4
      this.drug_spec_unit_show = true
    },
    comfirmAction: function () {
      console.log('2323232', this.drug_id)
      console.log('3544555', this.way)
      if (this.way == 1) {
        this.drug_name_id = this.drug_id
      }
      if (this.way == 2) { // 自备药
        // console.log('1111222222')
        var arr = this.order.title.split('(自备药)')
        this.order.title = arr[0]
      }
      if (this.all_drug.length > 0) {
        var arr = []
        for (let i = 0; i < this.all_drug.length; i++) {
          if (this.order.title == this.all_drug[i].drug_name) {
            arr = this.all_drug[i].drug_specs
          }
        }
        console.log('arr', arr)
        console.log('orrrrr', this.order.advice_desc)
        if (arr.length > 0) {
          for (let i = 0; i < arr.length; i++) {
            if (arr[i].drug_spec == this.order.advice_desc) {
              this.drug_id = arr[i].id
              this.way = 2
            }
          }
        }
      }
      this.advices.push({
        title: this.order.title,
        advice_desc: this.order.advice_desc.toString(),
        delivery_way: this.order.delivery_way,
        execution_frequency: this.order.execution_frequency,
        single_dose: this.order.single_dose,
        single_dose_unit: this.order.single_dose_unit,
        prescribing_number: this.order.prescribing_number,
        prescribing_number_unit: this.order.prescribing_number_unit,
        remark: this.order.remark,
        drug_spec: this.order.drug_spec,
        drug_spec_unit: this.order.drug_spec_unit,
        drug_id: this.drug_id,
        way: this.way,
        drug_name_id: this.drug_name_id,
        id: 0,
        subdrugs: []
      })
      console.log('advice:', this.advices)

      var data = {}
      data.advice_type = 2
      data.advice_date = this.record_date_str
      data.start_time = this.start_time_str
      data.record_date = parseInt(this.$route.query.date)
      var adviceJSONs = []

      for (let index = 0; index < this.advices.length; index++) {
        const advice = this.advices[index]
        var json = {
          advice_name: advice.title,
          advice_desc: advice.advice_desc,
          drug_spec: String(advice.drug_spec),
          drug_spec_unit: advice.drug_spec_unit,
          single_dose: String(advice.single_dose),
          single_dose_unit: advice.single_dose_unit,
          prescribing_number: String(advice.prescribing_number),
          prescribing_number_unit: advice.prescribing_number_unit,
          delivery_way: advice.delivery_way,
          execution_frequency: advice.execution_frequency,
          remark: advice.remark,
          drug_id: advice.drug_id,
          way: 1,
          drug_name_id: advice.drug_name_id,
          subdrugs: []
        }
        for (let s_i = 0; s_i < advice.subdrugs.length; s_i++) {
          const subdrug = advice.subdrugs[s_i]
          json.subdrugs.push({
            advice_name: subdrug.title,
            advice_desc: subdrug.advice_desc,
            drug_spec: String(subdrug.drug_spec),
            drug_spec_unit: subdrug.drug_spec_unit,
            single_dose: String(subdrug.single_dose),
            single_dose_unit: subdrug.single_dose_unit,
            prescribing_number: String(subdrug.prescribing_number),
            prescribing_number_unit: subdrug.prescribing_number_unit
          })
        }
        adviceJSONs.push(json)
      }

      data.adviceNames = adviceJSONs
      console.log('232323232woowowwo', adviceJSONs)

      this.loading = true
      let mode = '1'
      var is_child = 1
      console.log('data233223232332我', data)

      batchCreateAdvices(this.patient_id, this.group_no, data, mode, is_child)
        .then(rs => {
          this.loading = false
          var resp = rs.data
          if (resp.state == 1) {
            // 返回数组，清空数据，隐藏弹框
            this.$emit('did-create-advices', resp.data.advices)
            var t = this
            setTimeout(function () {
              t.advices.splice(0, t.advices.length)
              t.show_dialog_key = 0
              t.selecting_advice_index = -1
            }, 500)
            this.$emit('close')
          } else {
            Toast.fail(resp.msg)
             this.loading = false
            if(resp.code == 600000008){
              this.loading = false
              this.$emit('close')
              this.infor_visibility = true
            }
          }
        })
        .catch(err => {
         
          Toast.fail(err)
        })
      // batchCreateAdvices()
    },

    chooseDrugSpecUnit (name) {
      this.order.drug_spec_unit = name
      this.drug_spec_unit_show = false
    },
    choosePrescribingNumberUnit (name) {
      this.order.prescribing_number_unit = name
      this.drug_spec_unit_show = false
    },
    chooseSingleDoseUnit (name) {
      this.order.single_dose_unit = name
      this.drug_spec_unit_show = false
    },
    chooseExecutionFrequency (name) {
      this.order.execution_frequency = name
      this.drug_spec_unit_show = false
    },
    chooseDeliveryWay (name) {
      this.order.delivery_way = name
      this.drug_spec_unit_show = false
    }
  }
}
</script>

<style lang="scss" scoped>
.newDoctorAdvice{
    height: 100%;
    display: flex;
    flex-direction: column;
    >:last-child{
        flex: 1;
        overflow-y: auto;
    }
    .inputCell{
        padding: 0 .875rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: .625rem;
        >p{
            width: 5.2rem;
            display: inline-table;
        }
        >div{
            flex: 1;
        }
        .inline-input{
            width: 70%;
            height: 2.5rem;
        }
        .inline-input1{
            width: 70%;
            border: 1px solid #DCDFE6;
            border-radius: .25rem;
            padding: 0 15px;
            height: 2.5rem;
        }
    }
    .commonInput{
        height: 2.5rem;
        border: 1px solid #DCDFE6;
        border-radius: .25rem;
        width: 25%;
        font-size: 1rem;
        padding: 0 .3125rem;
    }
}
.newDoctorAdviceTitle{
    height: 3.125rem;
    display: flex;
    justify-content: space-between;
    padding: 0 .875rem;
    align-items: center;
    font-size: 1rem;
    background: #fff;
}
.adviceTitle{
    display: flex;
    padding: .5rem .875rem;
    font-size: .875rem;
    justify-content: space-between;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: .625rem;
    >div:first-child{
        display: flex;
        align-items: center;
    }
    >div:last-child{
        display: flex;
        align-items: center;
    }
}
.timeSpan{
    padding: .3125rem;
    border: 1px solid #e5e5e5;
    border-radius: .25rem;
}
.newListBoxPopup{
    width: 60%;
    height: 60%;
    left: 50% !important;
    top: 50% !important;
    transform: translate3d(-50%,-50%,0) !important;
    overflow-y: auto;
    border-radius: .625rem;
}
.listBox{
    >div{
        padding: 1rem .625rem;
        border-bottom: 1px solid #e5e5e5;
        text-align: center;
    }
}
</style>

<style lang="scss">
.newDoctorAdvice{
    .startTimePicker{
        z-index: 4100 !important;
    }
    .v-modal{
        z-index: 4009 !important;
    }
    .el-input__inner{
        height: 2.5rem;
        line-height: 2.5rem;
    }
    .datetimePicker{
        .picker-item{
            font-size: .875rem !important;
            height: 44px;
            line-height: 44px;

        }
        .mint-datetime-action{
            font-size: .9375rem !important;
        }

    }
}
.el-autocomplete-suggestion{
    z-index: 4011 !important;
}
.inputCell{
    .el-input{
        font-size: 1rem !important;
    }
}
</style>
