chenhj
2025-07-29 03ca03ae92213b01dd902e13a9febf608410e953
src/pages/production/twist/receive/monofil.vue
@@ -23,7 +23,7 @@
        </view>
      </template>
    </z-paging>
    <Scan ref="scanRef" />
    <Scan ref="scanRef" emitName="scanMono" />
    <wd-toast />
  </view>
</template>
@@ -92,10 +92,14 @@
};
const save = async () => {
  const { code } = await TwistApi.addStrandedWireDish(cardList.value);
  const value = cardList.value.filter((item: { id?: number }) => item.id === undefined);
  const { code } = await TwistApi.addStrandedWireDish(value);
  if (code == 200) {
    toast.success("保存成功");
    cardList.value = [];
    pagingRef.value.refresh();
    getList();
  } else {
    toast.error("保存失败");
  }
@@ -103,12 +107,12 @@
onLoad((options: any) => {
  // 开启广播监听事件
  uni.$on("scan", getScanCode);
  uni.$on("scanMono", getScanCode);
  paramsId.value = options.id;
});
onUnload(() => {
  // 开启广播监听事件
  uni.$off("scan", getScanCode);
  uni.$off("scanMono", getScanCode);
});
</script>