liyong
2025-04-25 14eef62db43d4d1b7a5bada04032faaecffecb9e
src/pages/production/twist/receive/monofil.vue
@@ -17,8 +17,8 @@
      <MonofilCard v-for="(item, index) in cardList" :key="index" :data="item" />
      <template #bottom>
        <view class="flex justify-center items-center">
          <wd-button block>
            <text class="text-[#fff]" @click="save">保存</text>
          <wd-button block @click="save">
            <text class="text-[#fff]">保存</text>
          </wd-button>
        </view>
      </template>
@@ -54,9 +54,23 @@
  const { data } = await TwistApi.getScarn({
    outPutId: codeArr[1],
  });
  const exists = cardList.value.some((item) => item.id === data.id);
  const exists = cardList.value.some((item) => item.monofilamentNumber === data.monofilamentNumber);
  if (!exists) {
    cardList.value.push(data);
    const { id, outPutId, wireId, oneLength, ...rest } = data;
    console.log("sb", {
      wireId: paramsId.value,
      outputId: id,
      amount: oneLength,
      ongLength: oneLength,
      ...rest,
    });
    cardList.value.push({
      wireId: paramsId.value,
      outputId: id,
      amount: oneLength,
      ongLength: oneLength,
      ...rest,
    });
    pagingRef.value.complete(cardList.value);
  } else {
    toast.error("该单丝已领用,请勿重复扫码");