From e6d720a5ce9a278dc0855183eef292e11fb45651 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 10 六月 2025 15:26:58 +0800
Subject: [PATCH] 1.库存管理页面联调
---
src/views/salesOutbound/index.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/src/views/salesOutbound/index.vue b/src/views/salesOutbound/index.vue
index f104b4a..955cd78 100644
--- a/src/views/salesOutbound/index.vue
+++ b/src/views/salesOutbound/index.vue
@@ -50,24 +50,68 @@
</el-tabs>
<!-- 鎿嶄綔鎸夐挳鍖� -->
<el-space>
- <el-button type="primary" :icon="Plus" @click="handleAdd">鏂板缓</el-button>
+ <el-button type="primary" :icon="Plus" @click="openDia('add')">鏂板缓</el-button>
<el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
- <el-button type="info" :icon="Download" @click="handleExport">瀵煎嚭</el-button>
+ <el-button type="info" plain :icon="Download" @click="handleExport">瀵煎嚭</el-button>
</el-space>
+ <!-- 琛ㄦ牸缁勪欢 -->
+ <div>
+ <ETable :loading="tableLoading"
+ :table-data="tableData"
+ :columns="columns"
+ @selection-change="handleSelectionChange"
+ :show-selection="true"
+ :border="true"
+ :maxHeight="480"
+ @edit="openDia"></ETable>
+ </div>
+ <pagination
+ v-if="total>0"
+ :page-num="pageNum"
+ :page-size="pageSize"
+ :total="total"
+ @pagination="handleQuery"
+ :layout="'total, prev, pager, next, jumper'"
+ />
</el-card>
+ <form-dia ref="formDia" @closeDia="handleQuery"></form-dia>
</div>
</template>
<script setup>
import {ref, reactive} from "vue";
+const { proxy } = getCurrentInstance()
import {Delete, Download, Plus} from "@element-plus/icons-vue";
+import ETable from "@/components/Table/ETable.vue";
+import Pagination from "@/components/Pagination/index.vue";
+import FormDia from "@/views/salesOutbound/components/formDia.vue";
+const formDia = ref()
const activeTab = ref("out");
// 鏍囩椤垫暟鎹�
const tabs = reactive([
{ name: "out", label: "閿�鍞嚭搴�" },
]);
+// 琛ㄦ牸鏁版嵁
const tableLoading = ref(false);
+const tableData = ref([]);
+const columns = ref([
+ { prop: "supplierName", label: "閿�鍞棩鏈�", minWidth: 160 },
+ { prop: "identifyNumber", label: "瀹㈡埛", minWidth: 120 },
+ { prop: "address", label: "鐓ょ", minWidth: 150 },
+ { prop: "unit", label: "鍗曚綅", minWidth: 150 },
+ { prop: "bank", label: "搴撳瓨鏁伴噺", minWidth: 120 },
+ { prop: "bankAccount", label: "閿�鍞崟浠�(鍚◣)", minWidth: 150 },
+ { prop: "contacts", label: "閿�鍞�讳环(鍚◣)", minWidth: 120 },
+ { prop: "contacts", label: "鍒╂鼎", minWidth: 90 },
+ { prop: "contactAddress", label: "鐑��", minWidth: 150 },
+ { prop: "maintainer", label: "缁存姢浜�", minWidth: 100 },
+ { prop: "maintainDate", label: "缁存姢鏃ユ湡", minWidth: 100 },
+]);
+const selectedRows = ref([]);
+const total = ref(0);
+const pageNum = ref(1);
+const pageSize = ref(10);
// 鏌ヨ鍙傛暟
const queryParams = reactive({
searchText: "",
@@ -93,8 +137,10 @@
handleQuery();
};
// 鏂板鍑哄簱
-const handleAdd = () => {
-
+const openDia = (type, row) => {
+ nextTick(() => {
+ formDia.value?.openDialog(type, row)
+ })
};
// 鍒犻櫎鍑哄簱
const handleDelete = () => {
@@ -104,6 +150,10 @@
const handleExport = () => {
};
+// 閫夋嫨琛�
+const handleSelectionChange = (selection) => {
+ selectedRows.value = selection;
+};
</script>
<style scoped>
--
Gitblit v1.9.3