yuan
5 小时以前 bb91952d1f1f59c4719d77eaf56e47eafa10126a
src/views/procurementManagement/procurementLedger/index.vue
@@ -547,7 +547,7 @@
                              filterable
                              check-strictly
                              @change="getModels"
                              :data="productOptions"
                              :data="productFormOptions"
                              :render-after-expand="false"
                              style="width: 100%" />
            </el-form-item>
@@ -705,6 +705,7 @@
    onMounted,
    reactive,
    toRefs,
    computed,
    getCurrentInstance,
    nextTick,
  } from "vue";
@@ -762,6 +763,7 @@
  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();
@@ -959,6 +961,12 @@
  // 产品表单弹框数据
  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({