From d69633f143f7174fcb14b3d03b01bcf616182e78 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 31 七月 2026 17:55:58 +0800
Subject: [PATCH] fix: 感谢不自检

---
 src/pages/production/twist/selfInspect/form.vue   |   71 +++++++++--------
 src/pages/production/wire/report/wire.vue         |    4 
 src/pages/production/list/index.vue               |    9 +-
 src/pages/production/twist/report/index.vue       |    3 
 src/pages/production/detail/wireDetail.vue        |   12 ++
 src/pages/production/twist/report/form.vue        |    2 
 src/pages/routingInspection/detail/indexJX.vue    |   75 +++++++++---------
 src/pages/production/detail/twistDetail.vue       |   12 ++
 src/pages/production/wire/report/reportManage.vue |    3 
 9 files changed, 110 insertions(+), 81 deletions(-)

diff --git a/src/pages/production/detail/twistDetail.vue b/src/pages/production/detail/twistDetail.vue
index b5c9d27..5b33e8a 100644
--- a/src/pages/production/detail/twistDetail.vue
+++ b/src/pages/production/detail/twistDetail.vue
@@ -46,6 +46,7 @@
 import HomeApi from "@/api/home";
 
 const paramsId = ref();
+const projectIdFromRoute = ref<string | number>("");
 const cardData = reactive({
   type: "缁炵嚎",
   deviceModel: undefined,
@@ -89,11 +90,17 @@
   }
 };
 
+// 鑾峰彇褰撳墠鍙敤鐨� projectId锛堜紭鍏� API 杩斿洖锛屽叾娆¤矾鐢卞弬鏁帮級
+const getProjectId = () => {
+  return detailData.value.projectId || projectIdFromRoute.value || "";
+};
+
 // 澶勭悊鎶ュ伐鐐瑰嚮
 const handleReportClick = async () => {
+  const currentProjectId = getProjectId();
   // 鍏堣姹傞獙璇佸彉鏇存帴鍙�
   try {
-    const { code } = await TwistApi.verifyChanges({ projectId: detailData.value.projectId });
+    const { code } = await TwistApi.verifyChanges({ projectId: currentProjectId });
     if (code !== 200) {
       return;
     }
@@ -122,12 +129,13 @@
 
   // 濡傛灉鏈� prepareId锛屾甯歌烦杞�
   uni.navigateTo({
-    url: `/pages/production/twist/report/index?id=${paramsId.value}`,
+    url: `/pages/production/twist/report/index?id=${paramsId.value}&projectId=${currentProjectId}`,
   });
 };
 
 onLoad(async (options: any) => {
   paramsId.value = options.id;
+  projectIdFromRoute.value = options.projectId || "";
   await getDetailData(options.id);
   // 鑾峰彇骞剁紦瀛樼敓浜у噯澶嘔D
   await initPrepareId();
diff --git a/src/pages/production/detail/wireDetail.vue b/src/pages/production/detail/wireDetail.vue
index df36fcd..1f7fab6 100644
--- a/src/pages/production/detail/wireDetail.vue
+++ b/src/pages/production/detail/wireDetail.vue
@@ -49,6 +49,7 @@
 import HomeApi from "@/api/home";
 
 const paramsId = ref();
+const projectIdFromRoute = ref<string | number>("");
 const cardData = reactive({
   deviceModel: undefined,
   model: undefined,
@@ -103,11 +104,17 @@
   }
 };
 
+// 鑾峰彇褰撳墠鍙敤鐨� projectId锛堜紭鍏� API 杩斿洖锛屽叾娆¤矾鐢卞弬鏁帮級
+const getProjectId = () => {
+  return detailData.value.projectId || projectIdFromRoute.value || "";
+};
+
 // 澶勭悊鎶ュ伐鐐瑰嚮
 const handleReportClick = async () => {
+  const currentProjectId = getProjectId();
   // 鍏堣姹傞獙璇佸彉鏇存帴鍙�
   try {
-    const { code } = await WireApi.verifyChanges({ projectId: detailData.value.projectId });
+    const { code } = await WireApi.verifyChanges({ projectId: currentProjectId });
     if (code !== 200) {
       return;
     }
@@ -142,12 +149,13 @@
   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}&isMonofil=${isMonofil}&meterWeight=${meterWeight}&totalWeight=${totalWeight}`,
+    url: `/pages/production/wire/report/wire?id=${paramsId.value}&model=${cardData.model}&oneLength=${cardData.oneLength}&isMonofil=${isMonofil}&meterWeight=${meterWeight}&totalWeight=${totalWeight}&projectId=${currentProjectId}`,
   });
 };
 
 onLoad(async (options: any) => {
   paramsId.value = options.id;
+  projectIdFromRoute.value = options.projectId || "";
   await getDetailData(options.id);
   // 鑾峰彇骞剁紦瀛樼敓浜у噯澶嘔D
   await initPrepareId();
diff --git a/src/pages/production/list/index.vue b/src/pages/production/list/index.vue
index c24f894..cc3e99c 100644
--- a/src/pages/production/list/index.vue
+++ b/src/pages/production/list/index.vue
@@ -15,7 +15,7 @@
         :key="index"
         :data="item"
         :map="map"
-        @click="toDetail(item.id, item.type)"
+        @click="toDetail(item.id, item.type, item.projectId)"
       />
     </z-paging>
     <wd-toast />
@@ -64,15 +64,16 @@
 const emits = defineEmits(["ok"]);
 const list = ref<any[]>([]);
 
-const toDetail = (id: number, type: string) => {
+const toDetail = (id: number, type: string, projectId?: string | number) => {
+  const projectIdParam = projectId ? `&projectId=${projectId}` : "";
   // toast.show("鐐瑰嚮鍗$墖");
   if (type == "鎷変笣") {
     uni.navigateTo({
-      url: `/pages/production/detail/wireDetail?id=${id}`,
+      url: `/pages/production/detail/wireDetail?id=${id}${projectIdParam}`,
     });
   } else if (type == "缁炵嚎") {
     uni.navigateTo({
-      url: `/pages/production/detail/twistDetail?id=${id}`,
+      url: `/pages/production/detail/twistDetail?id=${id}${projectIdParam}`,
     });
   }
 };
diff --git a/src/pages/production/twist/report/form.vue b/src/pages/production/twist/report/form.vue
index cb804bb..f6fd872 100644
--- a/src/pages/production/twist/report/form.vue
+++ b/src/pages/production/twist/report/form.vue
@@ -42,6 +42,7 @@
 const props = defineProps<{
   firstTareValue?: number;
   teamId?: string | number | null;
+  projectId?: string | number;
   isFirstReport?: boolean; // 鏄惁鏄涓�鏉℃姤宸�
 }>();
 
@@ -108,6 +109,7 @@
     type: "缁炵嚎",
     actuallyLength: model.actuallyLength,
     tare: model.tare || firstTareValue,
+    projectId: props.projectId || undefined,
     // 浠庝富琛ㄨ幏鍙栫殑瀛楁
     model: mainTableData.value.model, // 瑙勬牸鍨嬪彿
     oneLength: mainTableData.value.totalLength,
diff --git a/src/pages/production/twist/report/index.vue b/src/pages/production/twist/report/index.vue
index 5a0fe0d..7a90a68 100644
--- a/src/pages/production/twist/report/index.vue
+++ b/src/pages/production/twist/report/index.vue
@@ -56,6 +56,7 @@
         ref="twistFormRef"
         :first-tare-value="twistReportList.length > 0 ? twistReportList[0].tare : undefined"
         :team-id="teamId"
+        :project-id="projectId"
         :is-first-report="twistReportList.length === 0"
       />
     </wd-popup>
@@ -95,6 +96,7 @@
 };
 const pagingRef = ref();
 const paramsId = ref();
+const projectId = ref<string | number>("");
 const twistFormRef = ref();
 const toast = useToast();
 const dialog = reactive({
@@ -373,6 +375,7 @@
 
 onLoad(async (options: any) => {
   paramsId.value = options.id;
+  projectId.value = options.projectId || "";
   // 鑾峰彇骞剁紦瀛樼彮缁処D
   await initTeamId();
   // 鑾峰彇涓昏〃鏁版嵁
diff --git a/src/pages/production/twist/selfInspect/form.vue b/src/pages/production/twist/selfInspect/form.vue
index 5ea599d..30571e0 100644
--- a/src/pages/production/twist/selfInspect/form.vue
+++ b/src/pages/production/twist/selfInspect/form.vue
@@ -53,42 +53,43 @@
         <view style="margin: 10rpx">
           <text class="title">缁撴瀯鏍囧噯鍊煎拰瀹炴祴</text>
         </view>
-        <wd-col
-          :span="24"
-          v-for="(item, index) in structureItems"
-          :key="index"
-          style="padding-bottom: 10px"
-        >
-          <wd-form-item
-            :label="item.structureName"
-            label-width="180px"
-            style="color: red"
-            required
-          />
-          <wd-form-item label="鏍囧噯鍊�" prop="structureValue">
-            <text>{{ item.structureValue || "-" }}</text>
-          </wd-form-item>
-          <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1" required>
-            <wd-input
-              v-model="item.actualValue1"
-              placeholder="璇疯緭鍏ユ牴鏁�"
-              clearable
-              type="number"
-              :disabled="isViewMode"
+        <template v-for="(item, index) in structureItems" :key="index">
+          <wd-col
+            :span="24"
+            v-if="!item.structureName?.includes('閽�')"
+            style="padding-bottom: 10px"
+          >
+            <wd-form-item
+              :label="item.structureName"
+              label-width="180px"
+              style="color: red"
+              required
             />
-          </wd-form-item>
-          <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2" required>
-            <wd-input
-              v-model="item.actualValue2"
-              placeholder="璇疯緭鍏ョ洿寰�"
-              clearable
-              type="number"
-              :disabled="isViewMode"
-            >
-              <template #append>mm</template>
-            </wd-input>
-          </wd-form-item>
-        </wd-col>
+            <wd-form-item label="鏍囧噯鍊�" prop="structureValue">
+              <text>{{ item.structureValue || "-" }}</text>
+            </wd-form-item>
+            <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1" required>
+              <wd-input
+                v-model="item.actualValue1"
+                placeholder="璇疯緭鍏ユ牴鏁�"
+                clearable
+                type="number"
+                :disabled="isViewMode"
+              />
+            </wd-form-item>
+            <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2" required>
+              <wd-input
+                v-model="item.actualValue2"
+                placeholder="璇疯緭鍏ョ洿寰�"
+                clearable
+                type="number"
+                :disabled="isViewMode"
+              >
+                <template #append>mm</template>
+              </wd-input>
+            </wd-form-item>
+          </wd-col>
+        </template>
       </wd-row>
 
       <!-- 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗 -->
diff --git a/src/pages/production/wire/report/reportManage.vue b/src/pages/production/wire/report/reportManage.vue
index 7df3b0f..7ca7a60 100644
--- a/src/pages/production/wire/report/reportManage.vue
+++ b/src/pages/production/wire/report/reportManage.vue
@@ -266,6 +266,7 @@
 const userStore = useUserStore();
 
 const paramsId = ref();
+const projectId = ref<string | number>("");
 const parentData = ref<any>(null);
 const childList = ref<any[]>([]);
 const model = ref();
@@ -398,6 +399,7 @@
     teamId: getTeamId(),
     type: "鎷変笣",
     wireId: paramsId.value,
+    projectId: projectId.value || undefined,
     poleNumber: parentData.value.poleNumber,
     poleModel: parentData.value.poleModel,
     supplier: parentData.value.supplier,
@@ -616,6 +618,7 @@
 
 onLoad(async (options: any) => {
   paramsId.value = options.wireId;
+  projectId.value = options.projectId || "";
 
   // 浠庨〉闈㈠弬鏁颁腑鑾峰彇鐖剁骇鏁版嵁
   parentData.value = {
diff --git a/src/pages/production/wire/report/wire.vue b/src/pages/production/wire/report/wire.vue
index 15d612a..b623ef4 100644
--- a/src/pages/production/wire/report/wire.vue
+++ b/src/pages/production/wire/report/wire.vue
@@ -219,6 +219,7 @@
 const toast = useToast();
 const userStore = useUserStore();
 const paramsId = ref();
+const projectId = ref<string | number>("");
 const model = ref();
 const oneLength = ref();
 const isMonofil = ref();
@@ -525,7 +526,7 @@
   const meterWeightParam = meterWeight.value !== undefined && meterWeight.value !== null ? meterWeight.value : "";
   const totalWeightParam = totalWeight.value !== undefined && totalWeight.value !== null ? totalWeight.value : "";
   uni.navigateTo({
-    url: `/pages/production/wire/report/reportManage?wireId=${paramsId.value}&parentId=${parentRow.id}&poleNumber=${parentRow.poleNumber}&poleModel=${parentRow.poleModel}&polePackageNumber=${parentRow.polePackageNumber}&poleWeight=${parentRow.poleWeight}&supplier=${parentRow.supplier || ""}&isMonofil=${isMonofilParam}&meterWeight=${meterWeightParam}&totalWeight=${totalWeightParam}`,
+    url: `/pages/production/wire/report/reportManage?wireId=${paramsId.value}&parentId=${parentRow.id}&poleNumber=${parentRow.poleNumber}&poleModel=${parentRow.poleModel}&polePackageNumber=${parentRow.polePackageNumber}&poleWeight=${parentRow.poleWeight}&supplier=${parentRow.supplier || ""}&isMonofil=${isMonofilParam}&meterWeight=${meterWeightParam}&totalWeight=${totalWeightParam}&projectId=${projectId.value}`,
   });
 };
 
@@ -618,6 +619,7 @@
 
 onLoad(async (options: any) => {
   paramsId.value = options.id;
+  projectId.value = options.projectId || "";
   model.value = options.model;
   oneLength.value = options.oneLength;
   isMonofil.value = options.isMonofil;
diff --git a/src/pages/routingInspection/detail/indexJX.vue b/src/pages/routingInspection/detail/indexJX.vue
index 3fada74..33ac62a 100644
--- a/src/pages/routingInspection/detail/indexJX.vue
+++ b/src/pages/routingInspection/detail/indexJX.vue
@@ -144,43 +144,44 @@
       <view style="margin: 10rpx">
         <text class="title">{{ "缁撴瀯鏍囧噯鍊煎拰瀹炴祴" }}</text>
       </view>
-      <wd-col
-        :span="24"
-        v-for="(item, index) in formData.structureItems"
-        :key="index"
-        style="padding-bottom: 10px"
-      >
-        <wd-form-item
-          prop="structureItemsGroup"
-          :label="formatValue(item.structureName)"
-          label-width="400rpx"
-          style="color: red"
-          required
-        ></wd-form-item>
-        <wd-form-item label="鏍囧噯鍊�" prop="structureValue" required>
-          {{ formatValue(item.structureValue) }}
-        </wd-form-item>
-        <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1" required>
-          <template v-if="isEdit">
-            <wd-input v-model="item.actualValue1" placeholder="璇疯緭鍏ュ疄娴嬫牴鏁�" type="number" />
-          </template>
-          <template v-else>
-            {{ formatValue(item.actualValue1, "鏍�") }}
-          </template>
-        </wd-form-item>
-        <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2" required>
-          <template v-if="isEdit">
-            <wd-input
-              v-model="item.actualValue2"
-              placeholder="璇疯緭鍏ュ疄娴嬬洿寰勶紙mm锛�"
-              type="number"
-            />
-          </template>
-          <template v-else>
-            {{ formatValue(item.actualValue2, "mm") }}
-          </template>
-        </wd-form-item>
-      </wd-col>
+      <template v-for="(item, index) in formData.structureItems" :key="index">
+        <wd-col
+          :span="24"
+          v-if="!item.structureName?.includes('閽�')"
+          style="padding-bottom: 10px"
+        >
+          <wd-form-item
+            prop="structureItemsGroup"
+            :label="formatValue(item.structureName)"
+            label-width="400rpx"
+            style="color: red"
+            required
+          ></wd-form-item>
+          <wd-form-item label="鏍囧噯鍊�" prop="structureValue" required>
+            {{ formatValue(item.structureValue) }}
+          </wd-form-item>
+          <wd-form-item label="瀹炴祴鏍规暟" prop="actualValue1" required>
+            <template v-if="isEdit">
+              <wd-input v-model="item.actualValue1" placeholder="璇疯緭鍏ュ疄娴嬫牴鏁�" type="number" />
+            </template>
+            <template v-else>
+              {{ formatValue(item.actualValue1, "鏍�") }}
+            </template>
+          </wd-form-item>
+          <wd-form-item label="瀹炴祴鐩村緞" prop="actualValue2" required>
+            <template v-if="isEdit">
+              <wd-input
+                v-model="item.actualValue2"
+                placeholder="璇疯緭鍏ュ疄娴嬬洿寰勶紙mm锛�"
+                type="number"
+              />
+            </template>
+            <template v-else>
+              {{ formatValue(item.actualValue2, "mm") }}
+            </template>
+          </wd-form-item>
+        </wd-col>
+      </template>
     </wd-row>
 
     <!-- 缁炵嚎宸ヨ壓璐ㄩ噺鎺у埗锛堝彲缂栬緫锛� -->

--
Gitblit v1.9.3