src/views/salesManagement/salesLedger/fileList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/salesManagement/salesLedger/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/salesManagement/salesLedger/fileList.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,36 @@ <template> <el-dialog v-model="dialogVisible" title="éä»¶" width="30%" :before-close="handleClose"> <el-table :data="tableData" border height="40vh"> <el-table-column label="éä»¶åç§°" prop="name" min-width="400" show-overflow-tooltip /> <el-table-column fixed="right" label="æä½" width="100" align="center"> <template #default="scope"> <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">ä¸è½½</el-button> </template> </el-table-column> </el-table> </el-dialog> </template> <script setup> import { ref } from 'vue' const dialogVisible = ref(false) const tableData = ref([]) const { proxy } = getCurrentInstance(); const handleClose = () => { dialogVisible.value = false } const open = (list) => { dialogVisible.value = true tableData.value = list } const downLoadFile = (row) => { proxy.$download.name(row.url); } defineExpose({ open }) </script> <style></style> src/views/salesManagement/salesLedger/index.vue
@@ -288,6 +288,7 @@ </div> </template> </el-dialog> <FileList ref="fileListRef" /> </div> </template> @@ -298,6 +299,7 @@ import { ElMessageBox } from "element-plus"; import useUserStore from "@/store/modules/user"; import { userListNoPage } from "@/api/system/user.js"; import FileList from "./fileList.vue"; import { ledgerListPage, productList, @@ -809,8 +811,12 @@ * * @param row ä¸è½½æä»¶çç¸å ³ä¿¡æ¯å¯¹è±¡ */ const fileListRef = ref(null) const downLoadFile = (row) => { console.log('row', row) getSalesLedgerWithProducts({ id: row.id, type: 1 }).then((res) => { fileListRef.value.open(res.salesLedgerFiles) }); } getList(); </script>