<template>
  <ele-modal
    :visible.sync="visible"
    title="选择生产版本"
    width="75vw"
    append-to-body
  >
	<el-table
	  :data="tableData"
	  border
	  ref="tableData"
	  @row-click="single"
	>
	  <el-table-column label="生产版本" align="center" prop="name">
	  </el-table-column>
	  <el-table-column label="未完成工单数量" align="center" prop="name">
	  </el-table-column>
	  <el-table-column label="未成型数量" align="center" prop="model">
	  </el-table-column>
	  <el-table-column label="预计完成时间" align="center" prop="model">
	  </el-table-column>
	  <el-table-column label="标准产能" align="center" prop="model">
	  </el-table-column>
	  <el-table-column label="原料库存" align="center" prop="model">
	  </el-table-column>
	  <el-table-column label="改型仓" align="center" prop="model">
	  </el-table-column>
	  <el-table-column label="选择" align="center">
		   <template slot-scope="scope">
			 <el-radio class="radio" v-model="radio" :label="scope.row.id"><i></i></el-radio>
		   </template>
	  </el-table-column>
	</el-table>
    <template v-slot:footer>
      <el-button @click="cancel">取消</el-button>
      <el-button type="primary" @click="save" :loading="loading">
        确定
      </el-button>
    </template>
  </ele-modal>
</template>

<script>
export default {
    data() {
      return {
        visible: false,
		tableData:[
			{id:1,name:'122',model:'型号1'},
			{id:2,name:'222',model:'型号2'}
		],
		loading:false,
	      radio: '',
      };
    },
    computed: {
    },
    created(){
    },
    methods: {
	  open () {
	    this.visible = true;
	  },
      cancel () {
        this.visible = false;
	     	this.radio = ''
      },
	  // 单击获取id
	  single (row) {
	       this.radio = row.id;
	  },
	  /* 保存编辑 */
	  save() {
	     console.log('this.radio',this.radio)
		 this.visible = false;
	  },
	  
    }
  };
</script>
<style lang="scss" scoped>
  .basic-details-title{
	  margin:10px 0
  }
  .add-product{
	  width:100%;
	  display:flex;
	  align-items:center;
	  justify-content:flex-end;
	  font-size:30px;
	  color:#1890ff;
	  margin:10px 0;
	  cursor: pointer;
  }
</style>