From 71fcb192074d72105b1668f6cf9b32a2e54838d8 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 02 七月 2025 15:28:37 +0800
Subject: [PATCH] 1.库存管理、销售出库-添加查看详情功能

---
 src/views/salesOutbound/index.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/views/salesOutbound/index.vue b/src/views/salesOutbound/index.vue
index 05ac623..7c26e44 100644
--- a/src/views/salesOutbound/index.vue
+++ b/src/views/salesOutbound/index.vue
@@ -26,7 +26,7 @@
       </el-tabs>
       <!-- 鎿嶄綔鎸夐挳鍖� -->
       <el-space>
-        <el-button type="primary" :icon="Plus" @click="openDia()">鏂板缓</el-button>
+        <el-button type="primary" :icon="Plus" @click="openDia(undefined, 'add')">鏂板缓</el-button>
         <el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
         <!-- <el-button type="info" plain :icon="Download" @click="handleExport">瀵煎嚭</el-button> -->
       </el-space>
@@ -38,8 +38,11 @@
                 @selection-change="handleSelectionChange"
                 :show-selection="true"
                 :border="true"
+                :operations="operationsArr"
                 style="width: 100%;height: calc(100vh - 30em)"
-                @edit="openDia"></ETable>
+                @edit="(row) => openDia(row, 'edit')"
+                @viewRow="(row) => openDia(row, 'view')"
+        ></ETable>
       </div>
       <pagination
           v-if="total>0"
@@ -70,6 +73,7 @@
   { name: "out", label: "閿�鍞嚭搴�" },
 ]);
 // 琛ㄦ牸鏁版嵁
+const operationsArr = ref(['edit', 'viewRow']);
 const tableLoading = ref(false);
 const tableData = ref([]);
 const columns = ref([
@@ -125,9 +129,8 @@
   handleQuery();
 };
 // 鏂板鍑哄簱
-const openDia = (row) => {
+const openDia = (row, type) => {
   console.log(row)
-  const type = row === undefined ? 'add' : 'edit'
   nextTick(() => {
     formDia.value?.openDialog(type, row)
   })

--
Gitblit v1.9.3