From 15d3b001720d3baa8a30f5f6a105a6809e9ec063 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期三, 21 五月 2025 09:19:25 +0800
Subject: [PATCH] feat: app扫码接口调整

---
 src/pages/production/twist/receive/steelCore/form.vue |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/pages/production/twist/receive/steelCore/form.vue b/src/pages/production/twist/receive/steelCore/form.vue
index 92dfb7e..d0e4c2c 100644
--- a/src/pages/production/twist/receive/steelCore/form.vue
+++ b/src/pages/production/twist/receive/steelCore/form.vue
@@ -39,12 +39,40 @@
 
 <script lang="ts" setup>
 import useFormData from "@/hooks/useFormData";
+import TwistApi from "@/api/product/twist";
+import { useToast } from "wot-design-uni";
 
+const emits = defineEmits(["refresh"]);
+const paramsId = ref();
+const toast = useToast();
 const { form: model } = useFormData({
   model: undefined, // 瑙勬牸鍨嬪彿
   monofilamentNumber: undefined, // 鏍峰搧缂栧彿
   amount: undefined, // 鏁伴噺
   manufacturers: undefined, // 鍘傚
+  type: "閽㈣姱",
+});
+
+const submit = async () => {
+  const { code } = await TwistApi.addStrandedWireDish([
+    {
+      wireId: paramsId.value,
+      ...model,
+    },
+  ]);
+  if (code == 200) {
+    toast.success("鏂板鎴愬姛");
+    emits("refresh");
+    return true;
+  }
+};
+
+onLoad((options: any) => {
+  paramsId.value = options.id;
+});
+
+defineExpose({
+  submit,
 });
 </script>
 

--
Gitblit v1.9.3