From 8a09b751a8be8c4ed376f42e7f64e0794001e06a Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期三, 23 四月 2025 13:27:03 +0800
Subject: [PATCH] test: 绞线新城测试
---
src/pages/production/twist/receive/plate/form.vue | 50 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/src/pages/production/twist/receive/plate/form.vue b/src/pages/production/twist/receive/plate/form.vue
index 950e5e1..1d584b0 100644
--- a/src/pages/production/twist/receive/plate/form.vue
+++ b/src/pages/production/twist/receive/plate/form.vue
@@ -2,39 +2,67 @@
<wd-form ref="form" :model="model" class="relative form_box">
<wd-cell-group :border="true">
<wd-input
- v-model="model.plateType"
+ v-model="model.diskMaterial"
label="鐩樺叿绫诲瀷"
label-width="100px"
- prop="plateType"
+ prop="diskMaterial"
clearable
placeholder="璇疯緭鍏ョ洏鍏风被鍨�"
/>
<wd-input
- v-model="model.length"
+ v-model="model.model"
label="灏哄"
label-width="100px"
- prop="length"
+ prop="model"
clearable
placeholder="璇疯緭鍏ュ昂瀵�"
/>
<wd-input
- v-model="model.weigth"
- label="閲嶉噺"
+ v-model="model.amount"
+ label="鏁伴噺"
label-width="100px"
- prop="weigth"
+ prop="amount"
clearable
- placeholder="璇疯緭鍏ラ噸閲�"
+ placeholder="璇疯緭鍏ユ暟閲�"
+ />
+ <wd-input
+ v-model="model.supplier"
+ label="鍘傚"
+ label-width="100px"
+ prop="supplier"
+ clearable
+ placeholder="璇疯緭鍏ュ巶瀹�"
/>
</wd-cell-group>
+ <wd-toast />
</wd-form>
</template>
<script setup lang="ts">
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({
- plateType: undefined, // 鐩樺叿绫诲瀷
- length: undefined, // 灏哄
- weigth: undefined, // 閲嶉噺
+ diskMaterial: undefined, // 鐩樺叿绫诲瀷
+ model: undefined, // 灏哄
+ amount: undefined, // 鏁伴噺
+ supplier: undefined,
+});
+
+const submit = async () => {
+ const { code } = await TwistApi.addStrandedWireDish([model]);
+ if (code == 200) {
+ toast.success("鏂板鎴愬姛");
+ emits("refresh");
+ return true;
+ }
+};
+
+defineExpose({
+ submit,
});
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3