From 70e08980b2fcf49dc0505984cc310ce9850c761b Mon Sep 17 00:00:00 2001 From: zhang_12370 <z2864490065@outlook.com> Date: 星期四, 10 七月 2025 18:16:16 +0800 Subject: [PATCH] 首页模块 销售数据 月度对比 --- 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