From 79210c2f29c65499e5ff8e4abc0c802b7b1c4065 Mon Sep 17 00:00:00 2001 From: 曹睿 <360930172@qq.com> Date: 星期四, 24 四月 2025 16:43:07 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/yuanwang-mes-uniapp --- src/pages/production/wire/report/wireForm.vue | 92 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 64 insertions(+), 28 deletions(-) diff --git a/src/pages/production/wire/report/wireForm.vue b/src/pages/production/wire/report/wireForm.vue index 52d7823..b248788 100644 --- a/src/pages/production/wire/report/wireForm.vue +++ b/src/pages/production/wire/report/wireForm.vue @@ -2,68 +2,104 @@ <wd-form ref="form" :model="model" class="relative form_box"> <wd-cell-group :border="true"> <wd-input - v-model="model.contractNo" - label="鍚堝悓鍙�" + v-model="model.poleNumber" + label="棰嗙敤鏉嗗彿" label-width="100px" - prop="contractNo" + prop="poleNumber" clearable - placeholder="璇疯緭鍏ュ悎鍚屽彿" + placeholder="璇疯緭鍏ラ鐢ㄦ潌鍙�" /> <wd-input - v-model="model.clientName" - label="瀹㈡埛鍚嶇О" + v-model="model.poleWeight" + label="鏉嗛噸" label-width="100px" - prop="clientName" + prop="poleWeight" clearable - placeholder="璇疯緭鍏ュ鎴峰悕绉�" + placeholder="璇疯緭鍏ユ潌閲�" /> <wd-input - v-model="model.workbench" - label="鏈哄彴" + v-model="model.monofilamentNumber" + label="鍗曚笣鐩樺彿" label-width="100px" - prop="workbench" + prop="monofilamentNumber" clearable placeholder="璇疯緭鍏ユ満鍙�" /> <wd-input - v-model="model.monofilNo" - label="鍗曚綋缂栧彿" + v-model="model.model" + label="瑙勬牸鍨嬪彿" label-width="100px" - prop="monofilNo" + prop="model" clearable - placeholder="璇疯緭鍏ュ崟浣撶紪鍙�" + placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" /> <wd-input - v-model="model.specification" - label="瑙勬牸" + v-model="model.ontLength" + label="鐩橀暱" label-width="100px" - prop="specification" + prop="ontLength" clearable - placeholder="璇疯緭鍏ヨ鏍�" + placeholder="璇疯緭鍏ョ洏闀�" /> <wd-input - v-model="model.singleDisc" - label="鍗曚笣鐩橀暱" + v-model="model.theoryWeight" + label="鐞嗚閲嶉噺" label-width="100px" - prop="singleDisc" + prop="theoryWeight" clearable - placeholder="璇疯緭鍏ュ崟涓濈洏闀�" + placeholder="璇疯緭鍏ョ悊璁洪噸閲�" + /> + <wd-input + v-model="model.actuallyWeight" + label="瀹為檯閲嶉噺" + label-width="100px" + prop="actuallyWeight" + clearable + placeholder="璇疯緭鍏ュ疄闄呴噸閲�" /> </wd-cell-group> + <wd-toast /> </wd-form> </template> <script lang="ts" setup> import useFormData from "@/hooks/useFormData"; +import { useToast } from "wot-design-uni"; +import WireApi from "@/api/product/wire"; +const paramsId = ref(); +const toast = useToast(); const { form: model } = useFormData({ - contractNo: undefined, // 鍚堝悓鍙� - clientName: undefined, // 瀹㈡埛鍚嶇О - workbench: undefined, // 鏈哄彴 - monofilNo: undefined, // 鍗曚綋缂栧彿 - specification: undefined, // 瑙勬牸 + poleNumber: undefined, // 棰嗙敤鏉嗗彿 + poleWeight: undefined, // 瀹㈡埛鍚嶇О + monofilamentNumber: undefined, // 鍗曚笣鐩樺彿 + model: undefined, // 瑙勬牸鍨嬪彿 + oneLength: undefined, // 鐩橀暱 singleDisc: undefined, // 鍗曚笣鐩橀暱 }); + +const submit = async () => { + const { code } = await WireApi.addWireOutput({ + wireId: paramsId.value, + type: "鎷変笣", + ...model, + }); + if (code == 200) { + toast.success("鎻愪氦鎴愬姛"); + return true; + } else { + toast.error("鎻愪氦澶辫触"); + return false; + } +}; + +onLoad((options: any) => { + paramsId.value = options.id; +}); + +defineExpose({ + submit, +}); </script> <style lang="scss" scoped> -- Gitblit v1.9.3