<!--客户loss信息-->
<template>
  <div class="app-container">
    <el-table
      v-loading="loading"
      :data="productionPlanList"
    >
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="生产方案编码" align="center" prop="productionSolutionCode" />
      <el-table-column label="生产方案名称" align="center" prop="productionSolutionName" />
      <el-table-column label="工艺路线编码" align="center" prop="routeCode" />
      <el-table-column label="工艺路线名称" align="center" prop="routeName" />
      <el-table-column label="用途编码" align="center" prop="usageCode" />
      <el-table-column label="用途名称" align="center" prop="usageName" />
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
import {
  listProductionSolution,
} from "@/api/mes/pro/productionSolution";
export default {
  name: "ProductionPlan",
  components: {
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 产品生产方案表格数据
      productionPlanList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        itemId: this.itemId,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  props: {
    optType: undefined,
    itemId: undefined,
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询产品loss配置列表 */
    getList() {
      this.loading = true;
      listProductionSolution(this.queryParams).then((response) => {
        this.productionPlanList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
  },
};
</script>
