<template>
  <div>
    <el-card>
      <template slot="header">
        <div
          class="card-title"
          v-if="currentTicket">
          <span>当前票种：<b>{{ currentTicket.name || '无' }}</b></span>

          <div>{{ form.payDateBegin | formatDate }} 票价：<span class="price"><b>{{ discountPrice }}</b> 元</span></div>
        </div>
        <span
          v-else
          style="color:red">请选择门票</span>
      </template>
      <el-form
        v-loading="loading"
        class="sale-form-wrap"
        ref="form"
        :model="form"
        :inline="true"
        label-width="120px">
        <el-form-item
          verify
          class="is-required"
          label="旅行社"
          prop="travelAgencyId">
          <el-select
            v-model="form.travelAgencyId"
            filterable
            :filter-method="filterAgency"
            @change="changeGuideList">
            <el-option
              v-for="item in filterAgencyList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          :label="scenicName==='仙门山'?'业务':'导游'"
          prop="guideId">
          <el-select
            v-model="form.guideId"
            filterable
            allow-create
            default-first-option>
            <el-option
              v-for="item in guideList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          v-if="currentTicket&&currentTicket.isNeedPlaytime"
          verify
          prop="payDateBegin"
          label="游玩日期">
          <el-date-picker
            :clearable="false"
            :editable="false"
            :picker-options="dateOption"
            v-model="form.payDateBegin"
            type="date">
          </el-date-picker>
        </el-form-item>
        <el-form-item
          v-if="currentTicket && currentTicket.isNeedPlaytime"
          label="结束日期">
          <el-input
            disabled
            v-model="playEndDate"
          ></el-input>
        </el-form-item>
        <el-form-item
          verify
          number
          label="购买数量"
          prop="count">
          <el-input-number
            ref="ticketCount"
            name="ticket-count"
            v-model.number="form.count"
            :min="1"
            :max="10000"
            :precision="0"
          ></el-input-number>
        </el-form-item>
        <el-form-item
          v-if="currentTicket && currentTicket.discount"
          label="折扣">
          <el-input-number
            controls-position="right"
            v-model="currentTicket.discount">
          </el-input-number>折
        </el-form-item>
        <el-form-item
          v-if="allowDiscount"
          verify
          number
          label="优惠价">
          <el-input-number
            @change="handlePriceChange"
            controls-position="right"
            v-model.number="discountPrice"
            :min="0"
            :precision="2"
            :step="1"
          ></el-input-number>
        </el-form-item>
        <el-form-item
          v-if="currentTicket && currentTicket.discountRule"
          label="优惠策略">
          <el-input
            disabled
            :value="'满 '+man+' 减 '+jian"></el-input>
          <!-- <el-input
            v-model="currentTicket.discountRule"
            :disabled="true"></el-input> -->
          <!-- <span> &nbsp;满{{ man }}减{{ jian }}</span> -->
        </el-form-item>
        <el-form-item
          label="检票方式"
          prop="checkWay">
          <el-select
            v-model="form.checkWay"
            :disabled="group_lockCheckStyle">
            <el-option
              v-for="item in checkWayList"
              :key="item.val"
              :value="item.val"
              :label="item.name"
            ></el-option>
          </el-select>
          <el-checkbox
            style="margin-left:10px"
            v-model="group_lockCheckStyle">
            锁定
          </el-checkbox>
        </el-form-item>
        <el-form-item
          label="价格方案">
          <el-select
            v-model="currentPlan"
            v-if="pricePlan.length">
            <el-option
              v-for="item in pricePlan"
              :key="item.id"
              :label="item.name"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <!-- v-if="form.checkWay === 3 || form.checkWay === 4" -->
        <el-form-item label="订单标签">
          <el-select
            v-model="form.order_tag"
            clearable>
            <el-option
              v-for="item in order_tag_list"
              :key="item"
              :label="item"
              :value="item">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          label="游客信息">
          <div
            v-if="currentTicket"
            class="input-space">
            <el-button
              type="primary"
              size="small"
              icon="el-icon-edit"
              @click="showTouristList">
              编辑查看
            </el-button>
          </div>
        </el-form-item>
      </el-form>

      <div class="btn-wrap">
        <el-button
          @click="resetForm"
          style="margin-right:20px">
          重置表单
        </el-button>
        <el-button
          type="primary"
          @click="addToOrder">
          加入订单
        </el-button>
      </div>
    </el-card>

    <!-- 游客列表 -->
    <TouristList
      :check-ticket-no="form.checkWay === 5"
      :check-face="form.checkWay === 4"
      :check-id="form.checkWay === 3"
      :tourist-list="touristList"
      :update-tourist="updateTourist"
      ref="touristList"></TouristList>
  </div>
</template>

<script>
import { randomString } from '@/utils'
import { verifyId, verifyPhone } from '@/utils/validate'
import { papersType, checkWayList } from '@/assets/staticData'
import { apiGetGuideList } from '@/api/travelAgency'
import { getTicketTypeInfo } from '@/api/ticketType'
import { getTicketPricePlanList } from '@/api/ticketPricePlan'
import { getSystemConfigList } from '@/api/systemConfig'
import { setTourist } from '@/pages/common'

import TouristList from '../common/TouristList'
import moment from 'moment'

export default {
  props: {
    currentTicket: {
      type: Object,
      default: () => null
    },
    orderItems: {
      type: Array,
      default: () => []
    }
  },
  components: {
    TouristList
  },
  computed: {
    // 计算当前票种总共多少张票（totalCount包含各票种的总数）
    totalCountOfCurrentType () {
      return this.orderItems.filter(item => item.id === this.currentTicket.id).reduce((init, item) => {
        return init + item.count
      }, 0)
    },
    //  旅行社和导游是否独立
    allowAgency () {
      const value = this.$store.state.app.systemConfig.find(i => i.configKey === 'guide_bind_travel_agency').configValue
      return value !== '0'
    },
    // 是否允许优惠售票
    allowDiscount () {
      const value = this.$store.state.app.systemConfig.find(i => i.configKey === 'group_ticket_sale_has_discount_price').configValue
      return value !== '0'
    },
    /* 注意，这里原先的totalPrice函数是错误的，因为this.form.count并不代表买了几张票；原系统没有出问题的原因是只是定义了，但没有使用。 */
    agencyList () {
      return this.$store.state.app.agencyList
    },
    scenicName () {
      return this.$store.state.user.scenicName
    }
  },
  data () {
    return {
      man: 0, // 满x
      jian: 0, // 减y
      loading: false,
      papersType,
      checkWayList,
      playEndDate: '',
      agencyInfo: {}, // 传入确认框中的旅行社名称和导游名称
      guideList: [],
      discountPrice: 0, // 优惠价
      pricePlan: [],
      currentPlan: null,
      group_lockCheckStyle: this.$localStore.get('group_lockCheckStyle') || false,
      touristList: [{
        idKey: randomString(),
        guestName: '',
        guestPhone: '',
        guestIdentify: '',
        guestIdentifyType: 'ID_CARD',
        lock: false // 是否可编辑
      }],
      currentPrice: 0,
      form: {
        order_tag: '',
        groupIndividual: 2,
        travelAgencyId: '',
        guideId: '',
        managerId: 0,
        payChannel: '现金',
        price: 0, // 实际总价
        tickets: [],
        discount: 10, // 辅助信息
        payDateBegin: new Date(moment().startOf('day').valueOf()),
        playDateEnd: '',
        checkWay: this.$localStore.get('group_checkWay') || 2,
        count: this.$localStore.get('initNum') === '空' ? undefined : 1,
        checkNum: 1
      },
      filterAgencyList: [],
      order_tag_list: [],
      dateOption: {
        // 日历禁用日期
        disabledDate () {
          return false
        }
      }
    }
  },
  methods: {
    verifyId,
    verifyPhone,
    randomString,
    // 从满10减1这种字符串里提取出10和1
    parseDiscountRule (discountRule) {
      let pattern = /满(\d+)减(\d+)/ // 定义正则表达式
      let match = discountRule.match(pattern) // 使用 match() 方法匹配字符串
      if (match) {
        let man = parseInt(match[1]) // 第一个括号中的数字为满减条件
        let jian = parseInt(match[2]) // 第二个括号中的数字为满减金额
        return { man, jian }
      }
      return null // 如果匹配失败，则返回 null
    },
    filterAgency (input) {
      if (input) {
        this.filterAgencyList = this.agencyList.filter(i => i.shorthand.toLowerCase().indexOf(input.toLowerCase()) > -1 || i.name.indexOf(input) > -1)
      } else {
        this.filterAgencyList = this.agencyList
      }
    },
    // 获取价格方案表
    getTicketPricePlanList () {
      getTicketPricePlanList({ keyWords1: 1, pageNum: 0, pageSize: -1 }).then(res => {
        this.pricePlan = res.list

        this.pricePlan.unshift({
          id: null,
          name: '无'
        })
      })
    },

    // 选择旅行社
    changeGuideList (agencyId) {
      let agency = this.agencyList.find(a => a.id === agencyId)
      // 设置折扣
      this.$parent.$parent.$refs.orderInfo.discount = (agency ? agency.discount : 10)
      this.allowAgency && this.getGuideList(agencyId)
    },
    // 获取旅行社列表
    getGuideList (agencyId) {
      let agency = this.agencyList.find(a => a.id === agencyId)
      apiGetGuideList({
        keyWords3: agencyId && agency.name,
        keyWords6: 1,
        pageNum: 0,
        pageSize: -1
      }).then(res => {
        this.guideList = res.list
        // this.form.guideId = this.guideList[0] ? this.guideList[0].id : ''
      })
    },
    setFocus () {
      this.$refs.ticketCount.focus()
      this.$refs.ticketCount.select()
    },
    resetForm () {
      this.touristList = [{
        idKey: randomString(),
        guestName: '',
        guestPhone: '',
        guestIdentify: '',
        guestIdentifyType: 'ID_CARD',
        lock: false // 是否可编辑
      }]
      this.$refs.form.resetFields()

      this.form.checkWay = this.$localStore.get('group_checkWay') || 1
    },
    setEndDate () {
      let endDate = moment(this.form.payDateBegin).add(this.currentTicket.useDays - 1, 'days').endOf('day').valueOf()
      this.form.playDateEnd = new Date(endDate)
      this.playEndDate = moment(endDate).format('YYYY-MM-DD')
    },
    // 更新游客列表
    updateTourist (data) {
      this.form.count = data.length
      this.touristList = data
    },
    // 同步游客数据与游客数
    syncTouristList () {
      let num = this.form.count - this.touristList.length
      setTourist(this.touristList, num)
    },
    // 显示游客弹窗
    showTouristList () {
      this.syncTouristList()
      this.touristVisible = true
      this.$refs.touristList.show()
    },
    /* 之前的优惠价一改变，就调用handlePriceChange算总价；但现在改成按当前票的数量变化触发了。
     * 满减逻辑放在对'totalCountOfCurrentType'的监听里，优惠价在这里设置的话，会漏了满减优惠。
     */
    handlePriceChange (e) {
      this.discountPrice = e || (e === 0 ? 0 : this.currentTicket.price)
      /*
      按之前的优惠价变动函数，新增的满减逻辑会漏算
      this.$parent.$parent.orderItems.forEach(item => {
        if (item.id === this.currentTicket.id) {
          item.price = this.discountPrice
          item.total = this.$NP.times(item.tickets.length, e)
          item.tickets.forEach(t => {
            t.price = this.discountPrice
            t.discount = Math.round(e / t.originalPrice * 100)
          })
        }
      })
      */
      console.log('[优惠价手动变动] 当前票种目前共有', this.totalCountOfCurrentType, '张票')
      let ticketNum_currentType = this.totalCountOfCurrentType // 当前票种的票数，根据它去满减当前票种
      let updateTicketsWithManualDiscount = (tickets, discountPrice) => tickets.map(ticket => ({ ...ticket, price: ticket.price === 0 ? 0 : discountPrice }))
      let setItemFreeTicketsButMannualDiscount = (item, totalFreeTicketNum_currentType) => {
        const freeTicketNum_currentType = Math.min(totalFreeTicketNum_currentType, item.tickets.length)
        totalFreeTicketNum_currentType -= freeTicketNum_currentType
        for (let i = 0; i < freeTicketNum_currentType; i++) {
          const ticket = item.tickets[i]
          ticket.price = 0
        }
        item.tickets = updateTicketsWithManualDiscount(item.tickets, this.discountPrice) // 手动设了优惠价之后，把订单里的当前类型的票的票价都改了
        item.price = this.discountPrice // 注意要修改整个票种的单价price为手动优惠价，total按这个算
        item.total = this.$NP.times(item.tickets.length - freeTicketNum_currentType, item.price)
        return item
      }
      if (ticketNum_currentType >= this.man && this.man !== 0) {
        const totalFreeTicketNum_currentType = Math.floor(ticketNum_currentType / this.man) * this.jian
        const index = this.$parent.$parent.orderItems.findIndex(item => item.id === this.currentTicket.id)
        if (index !== -1) {
          let currentItemOforderItems = this.$parent.$parent.orderItems[index]
          this.$parent.$parent.orderItems[index] = setItemFreeTicketsButMannualDiscount(currentItemOforderItems, totalFreeTicketNum_currentType)
        }
      }
    },
    addToOrder (callback) {
      if (!this.currentTicket) {
        return this.$message.error('请选择门票')
      }

      if (this.loading) return

      // 校验当前票种与价格是否一致
      if (this.priceObj.id !== this.currentTicket.id) {
        this.setPrice()
        return
      }

      return this.$refs.form.validate((valid) => {
        if (valid) {
          this.$localStore.set('checkWay', this.form.checkWay)

          this.syncTouristList()

          let { payDateBegin, playDateEnd } = this.form

          let { id, name, check_count } = this.currentTicket
          let price = this.currentPrice

          if (this.form.checkWay === 3) {
            // 是否存在未填写的内容
            let blankData = this.touristList.find(item => {
              return !item.guestName || !item.guestIdentify
            })
            if (blankData) {
              this.$message.error('游客信息不完整，请编辑查看')
              return
            }
          }

          if (this.form.checkWay === 4) {
            // 是否存在未填写的内容
            let blankData = this.touristList.find(item => {
              return !item.face
            })
            if (blankData) {
              this.$message.error('游客人脸信息不完整，请编辑查看')
              return
            }
          }

          if (this.requiredField && this.requiredField.length && this.requiredField.includes('name')) {
            let blankData = this.touristList.find(item => {
              return !item.guestName
            })
            if (blankData) {
              this.$message.error('游客姓名不完整，请编辑查看')
              return
            }
          }

          if (this.requiredField && this.requiredField.length && this.requiredField.includes('papers_id')) {
            let blankData = this.touristList.find(item => {
              return !item.guestIdentify
            })
            if (blankData) {
              this.$message.error('游客证件号不完整，请编辑查看')
              return
            }
          }

          let tickets = this.touristList.map(item => {
            return {
              ticketTypeId: id,
              checkNum: check_count,
              price: this.allowDiscount ? this.discountPrice : this.currentPrice,
              guestName: item.guestName,
              guestPhone: item.guestPhone,
              guestIdentify: item.guestIdentify,
              guestIdentifyType: item.guestIdentifyType,
              ticketNo: item.ticketNo,
              face: item.face,
              price_plan_id: this.currentPlan || 0,
              payDateBegin: this.currentTicket.isNeedPlaytime ? payDateBegin : null,
              playDateEnd: this.currentTicket.isNeedPlaytime ? playDateEnd : null
            }
          })

          // 合并游玩日期相同的票种数据
          const existItem = this.orderItems.find(i => {
            let dateIsEque
            if (this.currentTicket.isNeedPlaytime) {
              dateIsEque = JSON.stringify(i.payDateBegin) === JSON.stringify(payDateBegin)
            } else {
              dateIsEque = true
            }
            // 日期对象不全等
            return i.id === this.currentTicket.id && dateIsEque && i.price === this.discountPrice
          })

          if (existItem) {
            console.log('游玩日期相同', existItem)
            existItem.tickets = existItem.tickets.concat(tickets)
            existItem.count = existItem.tickets.length
            /* 要补充处理游玩日期相同的票种的total，原系统并不依赖total来算，故此处不写也行；但目前加入满减手动优惠和打折后，按total算的。 */
            let calexistItemTotal = tickets => tickets.reduce((total, item) => total + item.price, 0)
            existItem.total = calexistItemTotal(existItem.tickets)
          } else {
            this.orderItems.push({
              keyId: randomString(), // 唯一标识
              id, // 票种Id
              ticketName: name,
              count: tickets.length,
              originalPrice: price, // 原价
              price: this.allowDiscount ? this.discountPrice : price, // 折后价
              total: tickets.reduce((acc, currentValue) => acc + currentValue.price, 0),
              /* 注意，原系统未设置total了，会导致用total算出的打折不对，也就是换另一个票种（吴江团体票）时，总价不再叠加（暂时只修复了昭苏定制的，原FormInfo.vue先不动）;还有团体票之前的折扣，似乎也不对，永远是10折
               * 并且原totalPrice函数也错误，因为this.form.count并不代表当前票的张数（大多数情况是1）; 但原系统正常运行的原因是并没有实际使用totalPrice函数。故这里不能使用this.totalPrice。
               */
              payDateBegin: this.currentTicket.isNeedPlaytime ? payDateBegin : null,
              currentTicket: { ...this.currentTicket, price_plan_id: this.currentPlan, price, payDateBegin, playDateEnd },
              tickets
            })
          }

          // 重置游客数量
          this.touristList = [{
            idKey: randomString(),
            guestName: '',
            guestPhone: '',
            guestIdentify: '',
            guestIdentifyType: 'ID_CARD',
            lock: false // 是否可编辑
          }]

          this.form.count = this.$localStore.get('initNum') === '空' ? undefined : 1

          if (callback && typeof callback === 'function') {
            callback()
          }

          this.$nextTick(() => {
            this.$refs.form.clearValidate()
          })
        }
      })
    },
    setPrice () {
      if (!this.currentTicket) {
        this.currentPrice = 0
        return
      }
      this.loading = true

      getTicketTypeInfo({
        planId: this.currentPlan,
        id: this.currentTicket.id,
        start: moment(this.form.payDateBegin).format('YYYY-MM-DD'),
        end: moment(this.form.payDateBegin).format('YYYY-MM-DD')
      }).then(res => {
        this.priceObj = res?.data

        this.currentPrice = res?.data.prices[0]
          ? (res?.data.prices[0].price === null ? this.currentTicket.price : res?.data.prices[0].price)
          : this.currentTicket.price
      }).finally(() => {
        this.loading = false
      })
    }
  },
  async mounted () {
    this.getTicketPricePlanList()
    !this.allowAgency && this.getGuideList()
    const res = await getSystemConfigList()
    /*
    const order_tag_list = res.list.find(v => v.configKey === 'order_tag_list')?.configValue || []
    this.order_tag_list = order_tag_list.replace(/\s+/g, '').split(',')
    */
    this.order_tag_list = res.list.find(v => v.configKey === 'order_tag_list')?.configValue?.replace(/\s+/g, '')?.split(',') || []
  },
  watch: {
    'currentTicket.discount' (val) {
      console.log('打了', val, '折')
      // 现在需要能手动修改折扣,也要在折扣手动变动时设置 (打x折)
      let original_currentPrice = this.currentTicket.price
      let isValidDiscount = this.currentTicket && this.currentTicket.discount && this.currentTicket.discount > 0 && this.currentTicket.discount <= 10
      this.discountPrice = isValidDiscount ? (original_currentPrice * (this.currentTicket.discount * 0.1)) : original_currentPrice
    },
    'man' (e) {
      console.log('满', e)
    },
    'jian' (e) {
      console.log('减', e)
    },
    'currentTicket.discountRule' (e) {
      let result = this.parseDiscountRule(e)
      this.man = result ? result.man : this.man
      this.jian = result ? result.jian : this.jian
    },
    'currentTicket.id' (e) {
      this.man = 0
      this.jian = 0
      if (this.currentTicket.discountRule) {
        let result = this.parseDiscountRule(this.currentTicket.discountRule)
        this.man = result ? result.man : this.man
        this.jian = result ? result.jian : this.jian
      }
    },
    // 当前票种的张数变化（不要watch所有票）
    'totalCountOfCurrentType' (e) {
      console.log('当前票种目前共有', e, '张票')
      let ticketNum_currentType = e // 当前票种的票数，根据它去满减当前票种
      // 限制为‘在当前票种’的票里，令 totalFreeTicketNum_currentType 张票的价为0
      let setItemFreeTickets = (item, totalFreeTicketNum_currentType) => {
        // 计算当前票种能免费的票数，这个item代表orderItems数组里当前票种的元素
        const freeTicketNum_currentType = Math.min(totalFreeTicketNum_currentType, item.tickets.length)
        // 更新总共能免费的票数
        totalFreeTicketNum_currentType -= freeTicketNum_currentType
        // 将前 freeTicketNum_currentType 张票的价格设为0
        for (let i = 0; i < freeTicketNum_currentType; i++) {
          const ticket = item.tickets[i]
          ticket.price = 0
        }
        item.total = this.$NP.times(item.tickets.length - freeTicketNum_currentType, item.price)
        return item
      }
      // 添加满减逻辑
      if (ticketNum_currentType >= this.man && this.man !== 0) {
        // 计算当前票种总共能免多少张票
        const totalFreeTicketNum_currentType = Math.floor(ticketNum_currentType / this.man) * this.jian
        console.log(`当前票种总共能免${totalFreeTicketNum_currentType}张票`)
        // 之前错误地将 orderItems 里totalFreeTicketNum_currentType 张票的价格设置为 0（并且此时的this.jian并非之前票种的jian）(所以错误地更新了其他票种的total)
        // 实际应该只更新 orderItems 里当前票种的，也就是不要动之前加入订单的票种。只更新和目前票种id一致的
        console.log('当前票种id', this.currentTicket.id)
        // 在orderItems找到当前票种，只更新orderItems里的当前票种的票们；不修改orderItems里之前的其他票种的票
        const index = this.$parent.$parent.orderItems.findIndex(item => item.id === this.currentTicket.id) // 找到元素索引
        if (index !== -1) { // 在orderItems找到了当前票种的元素
          let currentItemOforderItems = this.$parent.$parent.orderItems[index]
          this.$parent.$parent.orderItems[index] = setItemFreeTickets(currentItemOforderItems, totalFreeTicketNum_currentType) // 直接修改元素
        }
        console.log('减免后的this.$parent.$parent.orderItems:', this.$parent.$parent.orderItems)
      }
      // 先判断订单总价是否超过了满减门槛 this.man，如果超过了，就计算可减免的票数?
      // 然后将其中当前票种?张票的价格设为零，并重新计算订单项的总价。
    },
    isFocus (val) {
      val && this.setFocus()
    },
    group_lockCheckStyle (val) {
      if (val) {
        this.$localStore.set('group_checkWay', this.form.checkWay)
      }
      this.$localStore.set('group_lockCheckStyle', val)
    },
    agencyList: {
      handler (val) {
        this.filterAgencyList = val
      },
      immediate: true
    },
    currentTicket (val) {
      if (!val) return

      // this.resetForm()

      // 设置初始日期
      if (moment(val.useDateStart).isAfter(new Date())) {
        this.form.payDateBegin = val.useDateStart
      } else {
        this.form.payDateBegin = new Date(moment().startOf('day').valueOf())
      }
      // 设置不可选日期
      this.dateOption.disabledDate = (date) => {
        let beforeToday = moment().subtract(1, 'days').isAfter(date)
        let beforeStart = moment(val.useDateStart).isAfter(date)
        let afterEnd = moment(val.useDateEnd).isBefore(date)
        return beforeToday || beforeStart || afterEnd
      }
      /* this.discountPrice = val.price */
      /* 昭苏打折，注意discount默认是10即打十折，需要乘以0.1 */
      let isValidDiscount = this.currentTicket && this.currentTicket.discount && this.currentTicket.discount > 0 && this.currentTicket.discount <= 10
      this.discountPrice = isValidDiscount ? (val.price * (val.discount * 0.1)) : val.price
      this.timer && clearTimeout(this.timer)
      this.timer = setTimeout(() => {
        this.setPrice()
      }, 300)
    },
    'form.payDateBegin' (val) {
      if (val) {
        this.setEndDate()
        this.currentPlan = null
        this.timer && clearTimeout(this.timer)
        this.timer = setTimeout(() => {
          this.setPrice()
        }, 300)
      }
    },
    currentPlan () {
      this.setPrice()
    }
  }
}
</script>

<style lang="scss" scoped>
.el-input,.el-select,.el-date-editor,.el-date-editor.el-input,.el-input-number {
  width: 200px;
}

</style>
