spring
5 天以前 e268cb55fa740e5775bdeccc7c60e71c9cfdf30b
重复扫码验证
已修改1个文件
11 ■■■■■ 文件已修改
src/pages/production/twist/receive/monofil.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/monofil.vue
@@ -124,8 +124,17 @@
      return;
    }
    console.log("tab.value:===========3", currentLayer);
    // 在发起请求前,先校验该单丝是否已在当前或其他层级被领用
    const scannedOutputId = JSON.parse(code.code).id;
    const alreadyUsed = nodeList.value.some((node) =>
      (node.strandedWireDish || []).some((item: any) => item.outputId === scannedOutputId)
    );
    if (alreadyUsed) {
      toast.error("该单丝已领用,请勿重复扫码");
      return;
    }
    const { data } = await TwistApi.getScarn({
      outPutId: JSON.parse(code.code).id,
      outPutId: scannedOutputId,
      twistId: currentLayer.twistId,
    });