<template>
  <div>
    <CommonInfo :tradeData="tradeData"/>
    <div style="margin: 11px 30px;color: #1890ff;">买方经办人审核</div>
    <el-row style="margin-left:97px">
      <el-col :span="5">
        <el-row>
          <el-col :span="6">评价</el-col>
          <el-col :span="18">{{tradeData.tradeScore?tradeData.tradeScore:"-"}}</el-col>
        </el-row>
      </el-col>
      <el-col :span="5">
        <el-row>
          <el-col :span="8">成交价</el-col>
          <el-col :span="16">{{tradeData.dealPrice}}</el-col>
        </el-row>
      </el-col>
      <el-col :span="5">
        <el-row>
          <el-col :span="8">审核人</el-col>
          <el-col :span="16">{{tradeData.tradeDeptManagerName}}</el-col>
        </el-row>
      </el-col>
    </el-row>
    <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: "approval",
    props:{
      tradeData: {
        type: Object
      }
    },
    components:{
      CommonInfo
    },
    watch:{
      radio(newVal,oldVal){
        if(newVal== "1"){
          this.tradeStatus = "3";

        }
        if(newVal== "2"){
          this.tradeStatus = "4";
        }
      }
    },
    data(){
        return{
          radio: "1",
          tradeStatus: "3"
        }
    },
    methods:{
      checkParam(){
        return false;
      },
      submitSuggestion(){
        return {tradeId:this.tradeData.tradeId,tradeStatus:this.tradeStatus,dealPrice:this.tradeData.dealPrice};
      }
    }
  }
</script>

<style scoped>

</style>
