From 5519cbf2e00c7ba4c650a542d98da99978124a30 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期四, 24 四月 2025 16:43:01 +0800
Subject: [PATCH] test: 测试生产管理
---
src/pages/production/twist/report/form.vue | 92 +++++++++++++++++++++++++---------------------
1 files changed, 50 insertions(+), 42 deletions(-)
diff --git a/src/pages/production/twist/report/form.vue b/src/pages/production/twist/report/form.vue
index 00bf68e..b03ee0b 100644
--- a/src/pages/production/twist/report/form.vue
+++ b/src/pages/production/twist/report/form.vue
@@ -3,75 +3,59 @@
<wd-cell-group :border="true">
<wd-input
v-model="model.contractNo"
- label="鍚堝悓鍙�"
+ label="棰嗙敤鏉嗗彿"
label-width="100px"
prop="contractNo"
clearable
- placeholder="璇疯緭鍏ュ悎鍚屽彿"
+ placeholder="璇疯緭鍏ラ鐢ㄦ潌鍙�"
/>
<wd-input
v-model="model.status"
- label="鐘舵��"
+ label="鏉嗛噸(kg)"
label-width="100px"
prop="status"
clearable
- placeholder="璇疯緭鍏ョ姸鎬�"
+ placeholder="璇疯緭鍏ユ潌閲�"
/>
<wd-input
v-model="model.clientName"
- label="瀹㈡埛鍚嶇О"
+ label="鍗曚笣鐩樺彿"
label-width="100px"
prop="clientName"
clearable
- placeholder="璇疯緭鍏ュ鎴峰悕绉�"
+ placeholder="璇疯緭鍏ュ崟涓濈洏鍙�"
/>
<wd-input
v-model="model.workbench"
- label="鏈哄彴"
+ label="瀹為檯閲嶉噺(kg)"
label-width="100px"
prop="workbench"
clearable
- placeholder="璇疯緭鍏ユ満鍙�"
+ placeholder="璇疯緭鍏ュ疄闄呴噸閲�"
/>
<wd-input
v-model="model.quality"
- label="璐ㄩ噺杩芥函鍙�"
- label-width="100px"
- prop="quality"
- clearable
- placeholder="璇疯緭鍏ヨ川閲忚拷婧彿"
- />
- <wd-input
- v-model="model.specification"
- label="瑙勬牸鍨嬪彿"
- label-width="100px"
- prop="specification"
- clearable
- placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
- />
- <wd-input
- v-model="model.disc"
label="鐩橀暱(m)"
label-width="100px"
- prop="disc"
+ prop="quality"
clearable
placeholder="璇疯緭鍏ョ洏闀�"
/>
<wd-input
- v-model="model.produced"
- label="宸茬敓浜�(m)"
+ v-model="model.specification"
+ label="鐞嗚閲嶉噺(kg)"
label-width="100px"
- prop="produced"
+ prop="specification"
clearable
- placeholder="璇疯緭鍏ュ凡鐢熶骇"
+ placeholder="璇疯緭鍏ョ悊璁洪噸閲�"
/>
<wd-input
- v-model="model.beProduced"
- label="寰呯敓浜�(m)"
+ v-model="model.disc"
+ label="瑙勬牸鍨嬪彿"
label-width="100px"
- prop="beProduced"
+ prop="disc"
clearable
- placeholder="璇疯緭鍏ュ崟涓濈洏闀�"
+ placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
/>
</wd-cell-group>
</wd-form>
@@ -79,17 +63,41 @@
<script lang="ts" setup>
import useFormData from "@/hooks/useFormData";
+import { useToast } from "wot-design-uni";
+import TwistApi from "@/api/product/twist";
+const paramsId = ref();
+const toast = useToast();
const { form: model } = useFormData({
- contractNo: undefined, // 鍚堝悓鍙�
- status: undefined, // 鐘舵��
- clientName: undefined, // 瀹㈡埛鍚嶇О
- workbench: undefined, // 鏈哄彴
- quality: undefined, // 璐ㄩ噺杩芥函鍙�
- specification: undefined, // 瑙勬牸鍨嬪彿
- disc: undefined, // 鐩橀暱
- produced: undefined, // 宸茬敓浜�
- beProduced: undefined, // 寰呯敓浜�
+ poleNumber: undefined, // 棰嗙敤鏉嗗彿
+ poleWeight: undefined, // 鏉嗛噸(kg)
+ monofilamentNumber: undefined, // 鍗曚笣鐩樺彿
+ actuallyWeight: undefined, // 瀹為檯閲嶉噺(kg)
+ ontLength: undefined, // 鐩橀暱(m)
+ theoryWeight: undefined, // 鐞嗚閲嶉噺(kg)
+ model: undefined, // 瑙勬牸鍨嬪彿
+});
+
+const submit = async () => {
+ const { code } = await TwistApi.addTwistOutput({
+ wireId: paramsId.value,
+ ...model,
+ });
+ if (code == 200) {
+ toast.success("鎻愪氦鎴愬姛");
+ return true;
+ } else {
+ toast.error("鎻愪氦澶辫触");
+ return false;
+ }
+};
+
+onLoad((options: any) => {
+ paramsId.value = options.id;
+});
+
+defineExpose({
+ submit,
});
</script>
--
Gitblit v1.9.3