| | |
| | | filterable |
| | | check-strictly |
| | | @change="getModels" |
| | | :data="productOptions" |
| | | :data="productFormOptions" |
| | | :render-after-expand="false" |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | |
| | | onMounted, |
| | | reactive, |
| | | toRefs, |
| | | computed, |
| | | getCurrentInstance, |
| | | nextTick, |
| | | } from "vue"; |
| | |
| | | import dayjs from "dayjs"; |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | import { roundHalfUp, trimZeros } from "@/utils/formatNumber.js"; |
| | | import { filterRawMaterialTree } from "@/utils/productTree.js"; |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | |
| | | // 产品表单弹框数据 |
| | | const productFormVisible = ref(false); |
| | | const productOperationType = ref(""); |
| | | // 新增产品时产品大类只展示「原材料」,编辑时保持完整产品树 |
| | | const productFormOptions = computed(() => |
| | | productOperationType.value === "add" |
| | | ? filterRawMaterialTree(productOptions.value) |
| | | : productOptions.value |
| | | ); |
| | | const productOperationIndex = ref(""); |
| | | const currentId = ref(""); |
| | | const productFormData = reactive({ |