<template>
  <el-dialog title="调整成本问题" :visible.sync="dialogVisible" width="500px" @close="cancelSubmit()">
    <div v-loading="loading">
      <el-input-number v-model="updateCostData.costPrice" precision="2" :min="0" :max="999999.99"  style="width:400px"></el-input-number>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancelSubmit()">取消</el-button>
      <el-button type="primary" @click="submitProNanme()">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
// import request from '../service/request.js';
export default {
  props: {
    updateCostData: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  data() {
    return {
      dialogVisible: false,
      loading: false
    };
  },
  mounted() {
    this.dialogVisible = true;
  },
  methods: {
    submitProNanme() {
      this.dialogVisible = false;
      setInterval(() => {
        this.$emit('closeUpdateCost');
      }, 10);
    },
    // 取消修改
    cancelSubmit() {
      this.dialogVisible = false;
      setInterval(() => {
        this.$emit('closeUpdateCost');
      }, 10);
    }
  }
};
</script>
<style scoped></style>
