<template>
  <div>
    <CommonInfo :debitData="debitData"/>
    <div style="margin: 11px 30px;color: #1890ff;">出借部门长审核</div>
    <el-form label-width="100px">
      <el-form-item label="审核人">{{ debitData.lendManageName }}</el-form-item>
    </el-form>
    <el-divider></el-divider>

    <div style="margin: 11px 30px;color: #1890ff;">核算部审批</div>
    <el-row style="margin-left:97px">
      <el-col :span="10">
        <el-row>
          <el-col :span="6">
            <el-radio v-model="radio" label="1">通过</el-radio>
          </el-col>
          <el-col :span="6">
            <el-radio v-model="radio" label="2">不通过</el-radio>
          </el-col>
        </el-row>
      </el-col>
      <el-col :span="10">
        <el-row>
          <el-col :span="5">审核人</el-col>
          <el-col :span="16"><el-input :value="$store.state.user.nickName" style="width: 90px" disabled/></el-col>
        </el-row>
      </el-col>
    </el-row>
  </div>

</template>

<script>
  import CommonInfo from "./CommonInfo";
  export default {
    name: "calculate",
    props:{
      debitData:{
        type: Object
      }
    },
    data(){
        return{
          radio: "1",
          debitStatus: "2"
        }
    },
    watch:{
      radio(newVal,oldVal){
        if(newVal== "1"){
          this.debitStatus = "2";

        }
        if(newVal== "2"){
          this.debitStatus = "4";
        }
      }
    },
    components:{
      CommonInfo
    },
    methods:{
      resetSuggestion(){
        this.radio = "1";
      },
      checkParam(){
        return false;
      },
      submitSuggestion(){
        let param = {...this.debitData};
        param.debitStatus = this.debitStatus;
        param.approvalId = this.$store.state.user.userId;
        return param;
      }
    }
  }
</script>

<style scoped>

</style>
