barge.vue 2.03 KB
Newer Older
huhaiqing's avatar
huhaiqing committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
<template>
  <div>
    <el-form ref="bargeForm" :model="bargeObj" label-width="80px">
      <el-form-item label="驳船">
        <el-radio-group v-model="bargeObj.status">
          <el-radio v-for="item in bargeStatus" :key="item.value" :label="item.value">{{item.label}}</el-radio>
        </el-radio-group>
      </el-form-item>

      <div v-show="bargeObj.status === '2'">
        <el-row>
          <el-col :span="12">
            <el-form-item label="驳船预计开船时间" label-width="130px">
              <el-date-picker type="date" placeholder="请选择日期" v-model="bargeObj.expectedTime"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="通知人" label-width="80px">
              <el-select v-model="bargeObj.feedTimePerson" placeholder="请选择通知人">
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="驳船实际开船时间" label-width="130px">
          <el-date-picker type="date" placeholder="请选择日期" v-model="bargeObj.actualTime"></el-date-picker>
        </el-form-item>
      </div>
    </el-form>

    <el-row class="operate-button">
      <el-button type="primary">保存</el-button>
      <el-button type="success" @click="onSubmit">提交</el-button>
      <el-button @click="cancel">关闭</el-button>
    </el-row>
  </div>
</template>

<script>
/**
 * 驳船
 */
export default {
  name: "barge",
  data() {
    return {
      // 驳船对象
      bargeObj: {},
      // 驳船
      bargeStatus: [
        {
          value: "1",
          label: "无驳船",
        },
        {
          value: "2",
          label: "有驳船",
        },
      ],
    };
  },
  methods: {
    /** 提交 */
    onSubmit() {
      this.$refs["bargeForm"].validate((valid) => {
        if (valid) {
          alert("submit!");
        }
      });
    },
    /** 取消 */
    cancel() {
      this.$emit("closeDialog");
    },
  },
};
</script>

<style lang="scss" scoped>
</style>