chenhj
2025-07-29 ac599197755d425fe28b7597f2cedbd28b6bd44a
src/pages/production/twist/receive/monofil.vue
@@ -5,6 +5,7 @@
      v-model="cardList"
      :fixed="false"
      :auto-show-back-to-top="true"
      :loading-more-enabled="false"
      @query="getList"
    >
      <template #top>
@@ -23,7 +24,7 @@
        </view>
      </template>
    </z-paging>
    <Scan ref="scanRef" />
    <Scan ref="scanRef" emitName="scanMono" />
    <wd-toast />
  </view>
</template>
@@ -92,10 +93,14 @@
};
const save = async () => {
  const { code } = await TwistApi.addStrandedWireDish(cardList.value);
  const value = cardList.value.filter((item: { id?: number }) => item.id === undefined || item.id === null);
  const { code,msg } = await TwistApi.addStrandedWireDish(value);
  if (code == 200) {
    toast.success("保存成功");
    toast.success(msg);
    cardList.value = [];
    pagingRef.value.refresh();
    getList();
  } else {
    toast.error("保存失败");
  }
@@ -103,12 +108,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>