spring
3 天以前 63901611c7ec1562341bb74ee096c81bb2fb2ec6
fix: 采购不能采购半成品,因为半成品不入库
已修改1个文件
18 ■■■■■ 文件已修改
src/views/procurementManagement/procurementLedger/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue
@@ -1532,10 +1532,26 @@
  };
  const getProductOptions = () => {
    return productTreeList().then(res => {
      productOptions.value = convertIdToValue(res);
      const tree = convertIdToValue(res);
      productOptions.value = filterOutSemiFinished(tree);
      return res;
    });
  };
  const filterOutSemiFinished = (nodes = []) => {
    return (nodes || [])
      .filter(node => {
        const label = String(node?.label ?? "");
        return !label.includes("半成品");
      })
      .map(node => {
        const next = { ...node };
        if (next.children && next.children.length > 0) {
          next.children = filterOutSemiFinished(next.children);
        }
        return next;
      });
  };
  const getModels = value => {
    if (value) {
      productForm.value.productCategory =