From 9ffa576f26402a87abfdd5a341e70057067742e4 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 17 八月 2026 16:36:41 +0800
Subject: [PATCH] 修改退货日期数据类型

---
 src/views/mes/pro/workorder/index.vue |   41 +++++++++++++++++++++++++----------------
 1 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/src/views/mes/pro/workorder/index.vue b/src/views/mes/pro/workorder/index.vue
index 4c9d167..9a388d0 100644
--- a/src/views/mes/pro/workorder/index.vue
+++ b/src/views/mes/pro/workorder/index.vue
@@ -6,7 +6,6 @@
 
   import { Page, useVbenModal } from "@vben/common-ui";
   import {
-    BarcodeBizTypeEnum,
     MesProWorkOrderStatusEnum,
     MesProWorkOrderTypeEnum,
   } from "@vben/constants";
@@ -22,7 +21,8 @@
     getWorkOrderPage,
   } from "#/api/mes/pro/workorder";
   import { $t } from "#/locales";
-  import { BarcodeDetail } from "#/views/wls/barcode/components";
+  import ArchiveDetail from '#/views/mes/pd/archive/modules/detail.vue';
+// import { BarcodeDetail } from '#/views/wls/barcode/components';
 
   import { useGridColumns, useGridFormSchema } from "./data";
   import Form from "./modules/form.vue";
@@ -32,7 +32,8 @@
     destroyOnClose: true,
   });
 
-  const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>(); // 鏉$爜璇︽儏寮圭獥
+  const archiveDetailRef = ref<InstanceType<typeof ArchiveDetail>>();
+// const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>(); // 鏉$爜璇︽儏寮圭獥
 
   /** 鍒锋柊琛ㄦ牸 */
   function handleRefresh() {
@@ -87,14 +88,14 @@
   }
 
   /** 鏌ョ湅璁㈠崟鏉$爜 */
-  function handleBarcode(row: MesProWorkOrderApi.WorkOrder) {
-    barcodeDetailRef.value?.openByBusiness(
-      row.id!,
-      BarcodeBizTypeEnum.WORKORDER,
-      row.code,
-      row.name
-    );
-  }
+  // function handleBarcode(row: MesProWorkOrderApi.WorkOrder) {
+  //   barcodeDetailRef.value?.openByBusiness(
+  //     row.id!,
+  //     BarcodeBizTypeEnum.WORKORDER,
+  //     row.code,
+  //     row.name
+  //   );
+  // }
 
   /** 瀵煎嚭琛ㄦ牸 */
   async function handleExport() {
@@ -203,7 +204,9 @@
               label: '瀹屾垚',
               type: 'link',
               auth: ['mes:pro-work-order:update'],
-              ifShow: row.status === MesProWorkOrderStatusEnum.CONFIRMED,
+              ifShow:
+                row.status === MesProWorkOrderStatusEnum.CONFIRMED &&
+                !!row.quantityProduced,
               onClick: handleFinish.bind(null, row),
             },
             {
@@ -217,15 +220,21 @@
                 confirm: handleCancel.bind(null, row),
               },
             },
+            // {
+            //   label: '鏉$爜',
+            //   type: 'link',
+            //   auth: ['mes:pro-work-order:query'],
+            //   onClick: handleBarcode.bind(null, row),
+            // },
             {
-              label: '鏉$爜',
+              label: '褰掓。',
               type: 'link',
-              auth: ['mes:pro-work-order:query'],
-              onClick: handleBarcode.bind(null, row),
+              onClick: () => archiveDetailRef.value?.open(row.productCode),
             },
           ]" />
       </template>
     </Grid>
-    <BarcodeDetail ref="barcodeDetailRef" />
+    <!-- <BarcodeDetail ref="barcodeDetailRef" /> -->
+    <ArchiveDetail ref="archiveDetailRef" />
   </Page>
 </template>

--
Gitblit v1.9.3