From 20dbdee5a002544f6a4e12b5e39e338052418782 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 26 十二月 2025 10:36:27 +0800
Subject: [PATCH] fix: 完成成品单丝报工逻辑
---
src/pages/production/detail/wireDetail.vue | 31 +++++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/src/pages/production/detail/wireDetail.vue b/src/pages/production/detail/wireDetail.vue
index 4e77cd2..df36fcd 100644
--- a/src/pages/production/detail/wireDetail.vue
+++ b/src/pages/production/detail/wireDetail.vue
@@ -11,6 +11,8 @@
unAmount: 'unAmount',
poleModel: 'poleModel',
contractNo: 'contractNo',
+ isMonofil: 'isMonofil',
+ totalWeight: 'totalWeight',
}"
/>
<view class="mx-3">
@@ -57,13 +59,18 @@
oneLength: undefined,
poleModel: undefined,
contractNo: undefined,
+ isMonofil: undefined,
+ totalWeight: undefined,
+ meterWeight: undefined,
type: "鎷変笣",
});
+const detailData = ref<any>({});
const getDetailData = async (id: string) => {
const { data } = await WireApi.getWireDetailById({
id: id,
});
+ detailData.value = data;
cardData.deviceModel = data.deviceModel;
cardData.model = data.model;
cardData.systemNo = data.systemNo;
@@ -73,6 +80,9 @@
cardData.oneLength = data.oneLength;
cardData.poleModel = data.poleModel;
cardData.contractNo = data.contractNo;
+ cardData.isMonofil = data.isMonofil;
+ cardData.totalWeight = data.totalWeight;
+ cardData.meterWeight = data.meterWeight;
cardData.type = data.type || "鎷変笣";
};
@@ -94,7 +104,18 @@
};
// 澶勭悊鎶ュ伐鐐瑰嚮
-const handleReportClick = () => {
+const handleReportClick = async () => {
+ // 鍏堣姹傞獙璇佸彉鏇存帴鍙�
+ try {
+ const { code } = await WireApi.verifyChanges({ projectId: detailData.value.projectId });
+ if (code !== 200) {
+ return;
+ }
+ } catch (error) {
+ console.error("楠岃瘉鍙樻洿澶辫触:", error);
+ return;
+ }
+
const prepareId = getPrepareId();
console.log("鎷変笣琛ㄦ牸鎶ュ伐妫�鏌� - prepareId鍊�:", prepareId);
@@ -114,8 +135,14 @@
}
// 濡傛灉鏈� prepareId锛屾甯歌烦杞�
+ const isMonofil =
+ cardData.isMonofil !== undefined && cardData.isMonofil !== null ? cardData.isMonofil : "";
+ const meterWeight =
+ cardData.meterWeight !== undefined && cardData.meterWeight !== null ? cardData.meterWeight : "";
+ const totalWeight =
+ cardData.totalWeight !== undefined && cardData.totalWeight !== null ? cardData.totalWeight : "";
uni.navigateTo({
- url: `/pages/production/wire/report/wire?id=${paramsId.value}&model=${cardData.model}&oneLength=${cardData.oneLength}`,
+ url: `/pages/production/wire/report/wire?id=${paramsId.value}&model=${cardData.model}&oneLength=${cardData.oneLength}&isMonofil=${isMonofil}&meterWeight=${meterWeight}&totalWeight=${totalWeight}`,
});
};
--
Gitblit v1.9.3