From 1e71cfb6ec97cff6531dec65a3fb5cb24b2c18ac Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 03 十一月 2025 09:57:48 +0800
Subject: [PATCH] fix: 附件完善
---
src/pages/production/wire/report/wireForm.vue | 43 +++++++++++++++++++++++++++----------------
1 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/src/pages/production/wire/report/wireForm.vue b/src/pages/production/wire/report/wireForm.vue
index b2c4b74..b115229 100644
--- a/src/pages/production/wire/report/wireForm.vue
+++ b/src/pages/production/wire/report/wireForm.vue
@@ -51,9 +51,9 @@
clearable
placeholder="璇疯緭鍏ユ潌鍖呭彿"
>
- <template #label>
- <span style="color: #F56C6C">鏉嗗寘鍙�</span>
- </template>
+ <template #label>
+ <span style="color: #f56c6c">鏉嗗寘鍙�</span>
+ </template>
</wd-input>
<wd-input
v-model="model.dishModel"
@@ -62,9 +62,9 @@
clearable
placeholder="璇疯緭鍏ョ洏鍨嬪彿"
>
- <template #label>
- <span style="color: #F56C6C">鐩樺瀷鍙�</span>
- </template>
+ <template #label>
+ <span style="color: #f56c6c">鐩樺瀷鍙�</span>
+ </template>
</wd-input>
<wd-input
v-model="model.actuallyLength"
@@ -73,9 +73,9 @@
clearable
placeholder="璇疯緭鍏ュ疄闄呴暱搴�"
>
- <template #label>
- <span style="color: #F56C6C">瀹為檯闀垮害(m)</span>
- </template>
+ <template #label>
+ <span style="color: #f56c6c">瀹為檯闀垮害(m)</span>
+ </template>
</wd-input>
<wd-input
v-model="model.actuallyWeight"
@@ -84,9 +84,9 @@
clearable
placeholder="璇疯緭鍏ュ疄闄呴噸閲�"
>
- <template #label>
- <span style="color: #F56C6C">瀹為檯閲嶉噺(kg)</span>
- </template>
+ <template #label>
+ <span style="color: #f56c6c">瀹為檯閲嶉噺(kg)</span>
+ </template>
</wd-input>
</wd-cell-group>
<wd-toast />
@@ -116,18 +116,29 @@
});
const submit = async () => {
+ // 鍦ㄨ皟鐢ˋPI鍓嶅厛淇濆瓨poleNumber鐨勫�硷紝纭繚鎴戜滑鏈夋纭殑鍊�
+ const poleNumberValue = model.poleNumber;
+
const { code } = await WireApi.addWireOutput({
wireId: paramsId.value,
type: "鎷変笣",
...model,
});
+
if (code == 200) {
toast.success("鎻愪氦鎴愬姛");
- resetForm()
- return true;
+ // 鍒涘缓杩斿洖缁撴灉瀵硅薄锛屼娇鐢ㄦ彁鍓嶄繚瀛樼殑poleNumber鍊�
+ const result = {
+ success: true,
+ poleNumber: poleNumberValue,
+ };
+ // 鍦ㄨ繑鍥炰箣鍓嶆墽琛宺esetForm()
+ resetForm();
+ // 杩斿洖缁撴灉
+ return result;
} else {
toast.error("鎻愪氦澶辫触");
- return false;
+ return { success: false };
}
};
@@ -142,7 +153,7 @@
const arr = code.code.split(",");
model.poleNumber = arr[3]; // 棰嗙敤鏉嗗彿
model.poleWeight = arr[4]; // 鏉嗛噸
- model.poleModel = '桅' + arr[1].slice(2); // 鏉嗗瀷鍙�
+ model.poleModel = arr[2]; // 鏉嗗瀷鍙�
};
onLoad((options: any) => {
--
Gitblit v1.9.3