<template>
  <el-steps
    :active="active"
    align-center
    process-status="finish"
    style="padding: 12px 0 18px 0"
  >
    <el-step
      :title="tab.label"
      v-for="(tab, index) in dstatusOptions"
      :key="tab.name + index"
    ></el-step>
  </el-steps>
</template>

<script>
export default {
  props: ["status"],
  data() {
    return {
      active: 0,
      // 状态
      dstatusOptions: [
        { id: 0, label: "待发起审核" },
        { id: 1, label: "待财务审核" },
        { id: 3, label: "待财务开票" },
        { id: 4, label: "待填写物流" },
        { id: 5, label: "开票已完成" },
      ],
    };
  },
  mounted() {
    this.initForm();
  },
  methods: {
    async initForm() {
      this.active = this.dstatusOptions.findIndex(
        (v) => v.id === parseInt(this.status)
      );
    },
  },
};
</script>

<style>
</style>