<template>
  <div>
    <el-form ref="settlementForm" :model="settlementObj" label-width="80px">
      <el-form-item label="可结算">
        <el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.billable"></el-date-picker>
      </el-form-item>
      <el-form-item label="已结算">
        <el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.settled"></el-date-picker>
      </el-form-item>
    </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: "settlement",
  data() {
    return {
      // 结算对象
      settlementObj: {},
    };
  },
  methods: {
    /** 提交 */
    onSubmit() {
      this.$refs["settlementForm"].validate((valid) => {
        if (valid) {
          alert("submit!");
        }
      });
    },
    /** 取消 */
    cancel() {
      this.$emit("closeDialog");
    },
  },
};
</script>

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