From ec1bef3a37e8dcdf22f1bf52e7c272a18306f4b9 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期五, 25 四月 2025 15:50:00 +0800
Subject: [PATCH] test: 证书整理
---
src/pages/production/twist/receive/steelCore/form.vue | 63 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/src/pages/production/twist/receive/steelCore/form.vue b/src/pages/production/twist/receive/steelCore/form.vue
index 0c174b0..d0e4c2c 100644
--- a/src/pages/production/twist/receive/steelCore/form.vue
+++ b/src/pages/production/twist/receive/steelCore/form.vue
@@ -2,36 +2,28 @@
<wd-form ref="form" :model="model" class="relative form_box">
<wd-cell-group :border="true">
<wd-input
- v-model="model.steelCoreName"
- label="閽㈣姱鍚嶇О"
+ v-model="model.model"
+ label="瑙勬牸鍨嬪彿"
label-width="100px"
- prop="steelCoreName"
+ prop="model"
clearable
- placeholder="璇疯緭鍏ラ挗鑺悕绉�"
+ placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
/>
<wd-input
- v-model="model.plateNo"
- label="鐩樺彿"
+ v-model="model.monofilamentNumber"
+ label="鏍峰搧缂栧彿"
label-width="100px"
- prop="plateNo"
+ prop="monofilamentNumber"
clearable
placeholder="璇疯緭鍏ョ洏鍙�"
/>
<wd-input
- v-model="model.length"
- label="闀垮害"
+ v-model="model.amount"
+ label="鏁伴噺"
label-width="100px"
- prop="length"
+ prop="amount"
clearable
placeholder="璇疯緭鍏ラ暱搴�"
- />
- <wd-input
- v-model="model.weight"
- label="閲嶉噺"
- label-width="100px"
- prop="weight"
- clearable
- placeholder="璇疯緭鍏ラ噸閲�"
/>
<wd-input
v-model="model.manufacturers"
@@ -47,13 +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({
- steelCoreName: undefined, // 閽㈣姱鍚嶇О
- plateNo: undefined, // 鐩樺彿
- length: undefined, // 闀垮害
- weight: undefined, // 閲嶉噺
+ 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