Newer
Older
smartKitchenFront / src / components / mycomponent / dialog / server / operationAddDialog.vue
<!--服务运营新增弹窗-->
<template>
  <el-dialog title="新增服务运营" width="520px" :visible.sync="isShowInfo" append-to-body @close="close">
    <div class="brandDialog ">
      <div class="inputContent">
        <div class="inputBox">
          <red-star />
          <input-vue
            title="服务运营编号"
            placeholder="请输入唯一编号"
            width="300px"
            class="inputWidth"
            style="justify-content: space-between;"
            v-model="form.date"
          />
        </div>
        <div class="inputBox">
          <red-star />
          <input-vue title="服务名称" placeholder="请输入品牌名称" v-model="form.name" class="inputWidth" style="justify-content: space-between;">
            <el-select
              v-model="form.date"
              style="width:300PX"
              filterable
              multiple
              allow-create
              default-first-option
              placeholder="请输入或选则 可多选"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </input-vue>
        </div>
        <div class="inputBox">
          <red-star />
          <input-vue
            title="服务收费(元)"
            placeholder=""
            width="300px"
            class="inputWidth"
            style="justify-content: space-between;"
            v-model="form.address"
          />
        </div>
        <div class="inputBox">
          <red-star />
          <input-vue title="服务优惠" v-model="form.address1" placeholder="" class="inputWidth" style="justify-content: space-between;">
            <el-select
              v-model="form.address"
              style="width:300px"
              filterable
              multiple
              allow-create
              default-first-option
              placeholder="请输入或选则 可多选"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </input-vue>
        </div>
        <div class="inputBox">
          <red-star />
          <input-vue title="时间" width="300px" class="inputWidth" style="justify-content: space-between;" v-model='form.address2'/>
        </div>

        <div class="inputBox">
        &nbsp;
          <input-vue title="备注" class="inputWidth" style="justify-content: space-between;">
            <el-input v-model="textarea" type="textarea" style="width:300px" :rows="2" placeholder="请输入内容" />
          </input-vue>
        </div>
      </div>
      <div class="btnBox">
        <el-button type="primary" class="save">
          保存
        </el-button>
        <el-button type="info" class="close" @click="close">
          取消
        </el-button>
      </div>
    </div>
  </el-dialog>
</template>

<script>
import InputVue from '../../input/inputVue.vue'
import DialogHeader from '../dialogHeader.vue'
import RedStar from '../../redStar.vue'

export default {
  components: {
    DialogHeader,
    RedStar,
    InputVue
  },
  data(){
    return{
      form:{
        date:'', // 服务运营编号
        name:'', // 服务名称
        address:'', // 收费
        address1:'', // 优惠
        address2:'', // 日期
        mark:'', // 备注
      }
    }
  },
  props: {
    isShowInfo: {
      type: Boolean,
      default: true
    },
  },
  methods: {
    close() {
      this.$emit('close')
    },
    init(detail){
      if(detail.name){
           this.form.address = detail.address
           this.form.address1 = detail.address1
           this.form.address2 = detail.address2
           this.form.date = detail.date
           this.form.name = detail.name
      }
    },
  }
}
</script>

<style lang="scss" scoped>
.brandDialog {
  width: 500px;

  .inputContent {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .inputBox {
      width: 100%;
      display: flex;
      align-items: center;
    }
  }

  .btnBox {
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-evenly;

    .save,
    .close {
      width: 100px;
    }
  }
}
</style>