| | |
| | | <el-tree-select v-model="form.productId" |
| | | placeholder="请选择" |
| | | clearable |
| | | :data="productOptions" |
| | | :data="productTreeOptions" |
| | | :render-after-expand="false" |
| | | filterable |
| | | @change="handleProductChange" |
| | |
| | | exportProductionPlan, |
| | | } from "@/api/productionPlan/productionPlan.js"; |
| | | import { productTreeList, modelListPage } from "@/api/basicData/product.js"; |
| | | import { filterFinishedProductTree } from "@/utils/productTree.js"; |
| | | import PIMTable from "./components/PIMTable.vue"; |
| | | import ImportDialog from "@/components/Dialog/ImportDialog.vue"; |
| | | |
| | |
| | | const dialogVisible = ref(false); |
| | | const operationType = ref("add"); // add | edit |
| | | const productOptions = ref([]); |
| | | // 新增生产计划时产品名称只展示「成品」,编辑时保持完整产品树 |
| | | const productTreeOptions = computed(() => |
| | | operationType.value === "add" |
| | | ? filterFinishedProductTree(productOptions.value) |
| | | : productOptions.value |
| | | ); |
| | | const specificationOptions = ref([]); |
| | | const queryRef = ref(null); |
| | | const formRef = ref(null); |