maven
10 小时以前 7ffa19f1fe3b37519e83ed1f86715154b13c00f3
src/views/production/components/ProductionDetailsTable.vue
@@ -1,5 +1,24 @@
<template>
  <el-table :data="tableData" :border="border" style="width: 100%">
    <el-table-column label="煤料类型" min-width="120">
      <template #default="{ row, $index }">
        <el-select
            clearable
            v-model="row.type"
            placeholder="请选择煤料类型"
            filterable
            :key="`coalId-select-${$index}-${typeList.length}`"
            :disabled="isViewMode"
        >
          <el-option
              v-for="(item, index) of typeList"
              :key="`option-${index}-${item.value}`"
              :label="item.label"
              :value="item.value"
          />
        </el-select>
      </template>
    </el-table-column>
    <el-table-column label="煤种" min-width="120">
      <template #default="{ row, $index }">
        <el-select
@@ -164,6 +183,16 @@
import {getCoalInfoList} from "@/api/production";
import {userListAll} from "@/api/publicApi";
const typeList = [
  {
    label: "成品",
    value: 1,
  },
  {
    label: "原料",
    value: 2,
  }
  ]
const props = defineProps({
  modelValue: {
    type: Array,
@@ -387,6 +416,7 @@
      purchasePrice: "",
      totalCost: "",
      producerId: "",
      type: 1,
      ...rowData,
    };
    tableData.value = [...tableData.value, defaultRow];