<template>
  <div>
    <el-dialog
      :title="title"
      :visible="openDialog"
      width="800px"
      @close="cancel"
      :destroy-on-close="true"
    >
      <el-form ref="form" :model="form" label-width="150px" :disabled="true">
        <el-form-item label="案件编号：" prop="caseNum">
          <el-input v-model="form.caseNum" placeholder="" />
        </el-form-item>
        <el-form-item label="案件标的：" prop="caseSubjectAmount">
          <el-input-number
            v-model="form.caseSubjectAmount"
            controls-position="right"
            :min="0"
          />
        </el-form-item>
        <el-form-item label="缴费人：" prop="caseNum">
          <el-input v-model="form.caseNum" placeholder="" />
        </el-form-item>
        <el-form-item label="缴费金额：" prop="feePayable">
          <el-input-number
            v-model="form.feePayable"
            controls-position="right"
            :min="0"
          />
        </el-form-item>
        <!-- <el-form-item label="缴费截图：" prop="respondent">
          <el-input v-model="form.Respondent" placeholder="" />
        </el-form-item> -->
        <el-form-item label="案件状态：" prop="caseStatusName">
          <el-input v-model="form.caseStatusName" placeholder="" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" v-if="flag == 0"
          >提 交</el-button
        >
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: ["openDialog", "title", "flag", "detailform"],
  data() {
    return {
      // key: value
      form: {},
    };
  },
  watch: {
    openDialog: {
      handler(val) {
        if (val) {
          setTimeout(() => {
            this.form = this.detailform;
            console.log(this.form, "this.form");
          }, 1000);
        }
      },
    },
  },
  methods: {
    submitForm() {},
    cancel() {
      this.$emit("cancelpaymentdetails");
    },
  },
};
</script>

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