From 76bee36dc9da0e09276f93d03c424e07e9608ea3 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期三, 23 四月 2025 13:45:43 +0800
Subject: [PATCH] test: 绞线参数测试

---
 src/pages/production/twist/receive/plate/index.vue     |    2 +-
 src/pages/production/twist/receive/plate/form.vue      |    1 +
 src/pages/production/twist/receive/steelCore/index.vue |    8 ++++++--
 src/pages/production/twist/receive/steelCore/form.vue  |   18 ++++++++++++++++++
 4 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/pages/production/twist/receive/plate/form.vue b/src/pages/production/twist/receive/plate/form.vue
index 1d584b0..4a1cf6d 100644
--- a/src/pages/production/twist/receive/plate/form.vue
+++ b/src/pages/production/twist/receive/plate/form.vue
@@ -50,6 +50,7 @@
   model: undefined, // 灏哄
   amount: undefined, // 鏁伴噺
   supplier: undefined,
+  type: "鐩樺叿",
 });
 
 const submit = async () => {
diff --git a/src/pages/production/twist/receive/plate/index.vue b/src/pages/production/twist/receive/plate/index.vue
index a5c6432..a49fb1a 100644
--- a/src/pages/production/twist/receive/plate/index.vue
+++ b/src/pages/production/twist/receive/plate/index.vue
@@ -8,7 +8,7 @@
       @query="getList"
     >
       <template #top>
-        <CardTitle title="鐩樺叿棰嗙敤" :hideAction="true" @action="addReport" />
+        <CardTitle title="鐩樺叿棰嗙敤" :hideAction="true" :full="false" @action="addReport" />
       </template>
       <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round">
         <template #title>
diff --git a/src/pages/production/twist/receive/steelCore/form.vue b/src/pages/production/twist/receive/steelCore/form.vue
index 92dfb7e..88dab37 100644
--- a/src/pages/production/twist/receive/steelCore/form.vue
+++ b/src/pages/production/twist/receive/steelCore/form.vue
@@ -39,12 +39,30 @@
 
 <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 toast = useToast();
 const { form: model } = useFormData({
   model: undefined, // 瑙勬牸鍨嬪彿
   monofilamentNumber: undefined, // 鏍峰搧缂栧彿
   amount: undefined, // 鏁伴噺
   manufacturers: undefined, // 鍘傚
+  type: "閽㈣姱",
+});
+
+const submit = async () => {
+  const { code } = await TwistApi.addStrandedWireDish([model]);
+  if (code == 200) {
+    toast.success("鏂板鎴愬姛");
+    emits("refresh");
+    return true;
+  }
+};
+
+defineExpose({
+  submit,
 });
 </script>
 
diff --git a/src/pages/production/twist/receive/steelCore/index.vue b/src/pages/production/twist/receive/steelCore/index.vue
index 5b190c6..8ae3589 100644
--- a/src/pages/production/twist/receive/steelCore/index.vue
+++ b/src/pages/production/twist/receive/steelCore/index.vue
@@ -8,7 +8,7 @@
       @query="getList"
     >
       <template #top>
-        <CardTitle title="閽㈣姱棰嗙敤" :hideAction="true" @action="addReport" />
+        <CardTitle title="閽㈣姱棰嗙敤" :hideAction="true" :full="false" @action="addReport" />
       </template>
       <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round">
         <template #title>
@@ -29,7 +29,7 @@
       <wd-button type="text" @click="cancel">鍙栨秷</wd-button>
       <wd-button type="text" @click="submit">纭畾</wd-button>
     </view>
-    <SteelCore ref="steelCoreRef" />
+    <SteelCore ref="steelCoreRef" @refresh="reloadList" />
   </wd-popup>
   <wd-toast />
 </template>
@@ -99,6 +99,10 @@
   }
 };
 
+const reloadList = () => {
+  pagingRef.value.refresh();
+};
+
 onLoad((options: any) => {
   paramsId.value = options.id;
 });

--
Gitblit v1.9.3