From 02312d40f76a77036237e35eea6a24c357204fbc Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期六, 12 七月 2025 10:23:26 +0800 Subject: [PATCH] 1.销售出库-煤种反显 --- src/views/salesOutbound/index.vue | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/views/salesOutbound/index.vue b/src/views/salesOutbound/index.vue index 05ac623..80f4a69 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,15 +38,18 @@ @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" - :page-num="pageNum" - :page-size="pageSize" + :page="pageNum" + :limit="pageSize" :total="total" - @pagination="handleQuery" + @pagination="handlePagination" :layout="'total, prev, pager, next, jumper'" /> </el-card> @@ -70,6 +73,7 @@ { name: "out", label: "閿�鍞嚭搴�" }, ]); // 琛ㄦ牸鏁版嵁 +const operationsArr = ref(['edit', 'viewRow']); const tableLoading = ref(false); const tableData = ref([]); const columns = ref([ @@ -124,10 +128,15 @@ }); handleQuery(); }; +// 鍒嗛〉澶勭悊 +const handlePagination = (val) => { + pageNum.value = val.page; + pageSize.value = val.limit; + getList(); +}; // 鏂板鍑哄簱 -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