<template>
  <div>
    <el-dialog
      :title="dialogObj.title"
      :visible.sync="show"
    >
      <el-form ref="saveuser" :model="nowObj" label-width="70px">
        <el-form-item label="订单状态" v-if="!showDesc">
          <template>
            <el-radio-group v-model="nowObj.status">
              <el-radio :label="1">提现成功</el-radio>
              <el-radio :label="2">提现失败</el-radio>
            </el-radio-group>
          </template>
        </el-form-item>
        <el-form-item label="失败理由" v-if="nowObj.status === 2 &&  !showDesc">
          <el-input type="textarea" rows="3" v-model="nowObj.reason" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="备注信息" v-if="showDesc">
          <el-input type="textarea" rows="3" v-model="nowObj.desc" auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="onSave(showDesc)">保 存</el-button>
        <el-button @click="dialogObj.show = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    props:[
      'dialogObj'
    ],
    data(){
      return{
        show: false,
        nowObj: {},
        showDesc: false
      }
    },
    methods:{
      initPage(){
        this.show = this.dialogObj.show;
      },
      onConfirm(){
        this.$emit("reflash",this.currentRow);
      },
      onSave(){

      }
    },
    mounted(){
      this.initPage()
    },
    watch:{
      'dialogObj'(value){
          console.log('dialogObj value', value)
        this.initPage()
      }
    }
  }
</script>

<style scoped>

</style>
