This commit is contained in:
dzc committed 2025-02-18 15:27:49 +08:00
commit e2fe5d7eb7
7 files changed
+249 -44

No files matched your search

+1 -1
View File
@@ -211,7 +211,7 @@ defineExpose({
}) })
</script> </script>
<style lang="scss"> <style>
.splitpanes--vertical > .splitpanes__splitter { .splitpanes--vertical > .splitpanes__splitter {
background: var(--el-color-primary); background: var(--el-color-primary);
/* min-width: 2px; */ /* min-width: 2px; */
+1 -1
View File
@@ -229,7 +229,7 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, downBlobFile, tableS
// 部门树使用的数据 // 部门树使用的数据
const deptData = reactive({ const deptData = reactive({
queryList: (name: String) => { queryList: (name: string) => {
return deptTree({ return deptTree({
deptName: name, deptName: name,
}) })
+49 -9
View File
@@ -1,6 +1,19 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<DraggableDepTree
ref="draggableDepTreeRef"
placeholder="请输入部门名称"
:query="deptData.queryList"
:show-expand="true"
@node-click="handleNodeClick"
@treeNodeCheckChange="treeNodeCheckChange"
@treeDeepSearch="treeDeepSearch"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
>
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> <el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
@@ -84,18 +97,15 @@
<el-table-column prop="createTime" width="200" label="充值时间" /> <el-table-column prop="createTime" width="200" label="充值时间" />
<el-table-column v-if="false" label="操作" width="150"> <el-table-column v-if="false" label="操作" width="150">
<template #default="scope"> <template #default="scope">
<el-button <el-button icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'" @click="handleDelete([scope.row.id])"
icon="delete"
text
type="primary"
v-auth="'wallet_walletRecharge_del'"
@click="handleDelete([scope.row.id])"
>删除</el-button >删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</DraggableDepTree>
</div> </div>
<!-- 编辑、新增 --> <!-- 编辑、新增 -->
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" /> <form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
@@ -108,6 +118,7 @@ import { pageCz } from "/@/api/wallet/wallet-transaction"
import { useMessage, useMessageBox } from "/@/hooks/message" import { useMessage, useMessageBox } from "/@/hooks/message"
import { useDict } from "/@/hooks/dict" import { useDict } from "/@/hooks/dict"
import { displayPrice } from "/@/utils/formatMoney" import { displayPrice } from "/@/utils/formatMoney"
import { deptTree } from "/@/api/admin/dept"
// 引入组件 // 引入组件
const FormDialog = defineAsyncComponent(() => import("./form.vue")) const FormDialog = defineAsyncComponent(() => import("./form.vue"))
@@ -121,6 +132,7 @@ const showSearch = ref(true)
// 多选变量 // 多选变量
const selectObjs = ref([]) as any const selectObjs = ref([]) as any
const multiple = ref(true) const multiple = ref(true)
const draggableDepTreeRef = ref() // 树组件ref引用
const state: BasicTableProps = reactive<BasicTableProps>({ const state: BasicTableProps = reactive<BasicTableProps>({
queryForm: {}, queryForm: {},
@@ -128,8 +140,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -137,6 +148,8 @@ const resetQuery = () => {
queryRef.value?.resetFields() queryRef.value?.resetFields()
// 清空多选 // 清空多选
selectObjs.value = [] selectObjs.value = []
state.queryForm.deptId = ""
draggableDepTreeRef.value.resetData()
getDataList() getDataList()
} }
@@ -180,11 +193,38 @@ const handleDelete = async (ids: string[]) => {
} }
try { try {
await delObjs(ids)`` await delObjs(ids)
getDataList() getDataList()
useMessage().success("删除成功") useMessage().success("删除成功")
} catch (err: any) { } catch (err: any) {
useMessage().error(err.msg) useMessage().error(err.msg)
} }
} }
// 部门树使用的数据
const deptData = reactive({
queryList: (name: string) => {
return deptTree({
deptName: name,
})
},
})
// 点击树
const handleNodeClick = (clickedNode: any) => {
state.queryForm.deptId = clickedNode.id
getDataList()
}
// 树节点勾选改变
const treeNodeCheckChange = (checkedNodes: any) => {
state.queryForm.deptId = checkedNodes.map((item: any) => item.id)
getDataList()
}
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
</script> </script>
+49 -14
View File
@@ -1,6 +1,19 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<DraggableDepTree
ref="draggableDepTreeRef"
placeholder="请输入部门名称"
:query="deptData.queryList"
:show-expand="true"
@node-click="handleNodeClick"
@treeNodeCheckChange="treeNodeCheckChange"
@treeDeepSearch="treeDeepSearch"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
>
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> <el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
@@ -77,13 +90,7 @@
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template #default="{ row }"> <template #default="{ row }">
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button> <el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
<el-button <el-button v-if="row.processStatus == 2" icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
v-if="row.processStatus == 2"
icon="InfoFilled"
text
type="primary"
@click="codeUseTableRef.openDialog(row.id)"
>
使用情况 使用情况
</el-button> </el-button>
<el-button <el-button
@@ -100,6 +107,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</DraggableDepTree>
</div> </div>
<!-- 编辑、新增 --> <!-- 编辑、新增 -->
@@ -113,6 +122,7 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
import { fetchList, pageJoin, delObjs } from "/@/api/wallet/wallet-foreign" import { fetchList, pageJoin, delObjs } from "/@/api/wallet/wallet-foreign"
import { useMessage, useMessageBox } from "/@/hooks/message" import { useMessage, useMessageBox } from "/@/hooks/message"
import { useDict } from "/@/hooks/dict" import { useDict } from "/@/hooks/dict"
import { deptTree } from "/@/api/admin/dept"
// 引入组件 // 引入组件
const FormDialog = defineAsyncComponent(() => import("./form.vue")) const FormDialog = defineAsyncComponent(() => import("./form.vue"))
@@ -128,6 +138,7 @@ const showSearch = ref(true)
// 多选变量 // 多选变量
const selectObjs = ref([]) as any const selectObjs = ref([]) as any
const multiple = ref(true) const multiple = ref(true)
const draggableDepTreeRef = ref() // 树组件ref引用
const { push } = useRouter() const { push } = useRouter()
@@ -137,8 +148,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -146,6 +156,8 @@ const resetQuery = () => {
queryRef.value?.resetFields() queryRef.value?.resetFields()
// 清空多选 // 清空多选
selectObjs.value = [] selectObjs.value = []
state.queryForm.deptId = ""
draggableDepTreeRef.value.resetData()
getDataList() getDataList()
} }
@@ -155,11 +167,7 @@ const doInfo = (row: any) => {
// 导出excel // 导出excel
const exportExcel = () => { const exportExcel = () => {
downBlobFile( downBlobFile("/wallet/walletForeign/export", Object.assign(state.queryForm, { ids: selectObjs }), "walletForeign.xlsx")
"/wallet/walletForeign/export",
Object.assign(state.queryForm, { ids: selectObjs }),
"walletForeign.xlsx",
)
} }
// 多选事件 // 多选事件
@@ -184,4 +192,31 @@ const handleDelete = async (ids: string[]) => {
useMessage().error(err.msg) useMessage().error(err.msg)
} }
} }
// 部门树使用的数据
const deptData = reactive({
queryList: (name: string) => {
return deptTree({
deptName: name,
})
},
})
// 点击树
const handleNodeClick = (clickedNode: any) => {
state.queryForm.deptId = clickedNode.id
getDataList()
}
// 树节点勾选改变
const treeNodeCheckChange = (checkedNodes: any) => {
state.queryForm.deptId = checkedNodes.map((item: any) => item.id)
getDataList()
}
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
</script> </script>
+49 -16
View File
@@ -1,6 +1,19 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<DraggableDepTree
ref="draggableDepTreeRef"
placeholder="请输入部门名称"
:query="deptData.queryList"
:show-expand="true"
@node-click="handleNodeClick"
@treeNodeCheckChange="treeNodeCheckChange"
@treeDeepSearch="treeDeepSearch"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
>
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> <el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
@@ -78,29 +91,19 @@
@click="formDialogRef.openDialog(row.id)" @click="formDialogRef.openDialog(row.id)"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button v-if="false" icon="delete" text type="primary" v-auth="'admin_walletStride_del'" @click="handleDelete([row.id])"
v-if="false"
icon="delete"
text
type="primary"
v-auth="'admin_walletStride_del'"
@click="handleDelete([row.id])"
>删除</el-button >删除</el-button
> >
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button> <el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
<el-button <el-button v-if="row.processStatus == 2" icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
v-if="row.processStatus == 2"
icon="InfoFilled"
text
type="primary"
@click="codeUseTableRef.openDialog(row.id)"
>
使用情况 使用情况
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</DraggableDepTree>
</div> </div>
<!-- 编辑、新增 --> <!-- 编辑、新增 -->
@@ -114,6 +117,7 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
import { fetchList, delObjs, pageJoin } from "/@/api/wallet/wallet-stride" import { fetchList, delObjs, pageJoin } from "/@/api/wallet/wallet-stride"
import { useMessage, useMessageBox } from "/@/hooks/message" import { useMessage, useMessageBox } from "/@/hooks/message"
import { useDict } from "/@/hooks/dict" import { useDict } from "/@/hooks/dict"
import { deptTree } from "/@/api/admin/dept"
const { push } = useRouter() const { push } = useRouter()
@@ -131,6 +135,7 @@ const showSearch = ref(true)
// 多选变量 // 多选变量
const selectObjs = ref([]) as any const selectObjs = ref([]) as any
const multiple = ref(true) const multiple = ref(true)
const draggableDepTreeRef = ref() // 树组件ref引用
const state: BasicTableProps = reactive<BasicTableProps>({ const state: BasicTableProps = reactive<BasicTableProps>({
queryForm: {}, queryForm: {},
@@ -138,8 +143,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -147,6 +151,8 @@ const resetQuery = () => {
queryRef.value?.resetFields() queryRef.value?.resetFields()
// 清空多选 // 清空多选
selectObjs.value = [] selectObjs.value = []
state.queryForm.deptId = ""
draggableDepTreeRef.value.resetData()
getDataList() getDataList()
} }
@@ -181,4 +187,31 @@ const handleDelete = async (ids: string[]) => {
useMessage().error(err.msg) useMessage().error(err.msg)
} }
} }
// 部门树使用的数据
const deptData = reactive({
queryList: (name: string) => {
return deptTree({
deptName: name,
})
},
})
// 点击树
const handleNodeClick = (clickedNode: any) => {
state.queryForm.deptId = clickedNode.id
getDataList()
}
// 树节点勾选改变
const treeNodeCheckChange = (checkedNodes: any) => {
state.queryForm.deptId = checkedNodes.map((item: any) => item.id)
getDataList()
}
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
</script> </script>
+47 -2
View File
@@ -1,6 +1,19 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<DraggableDepTree
ref="draggableDepTreeRef"
placeholder="请输入部门名称"
:query="deptData.queryList"
:show-expand="true"
@node-click="handleNodeClick"
@treeNodeCheckChange="treeNodeCheckChange"
@treeDeepSearch="treeDeepSearch"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
>
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> <el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
@@ -102,6 +115,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</DraggableDepTree>
</div> </div>
<!-- 编辑、新增 --> <!-- 编辑、新增 -->
@@ -116,6 +131,7 @@ import { useMessage, useMessageBox } from "/@/hooks/message"
import { useDict } from "/@/hooks/dict" import { useDict } from "/@/hooks/dict"
import * as hardAfterSaleApi from "/@/api/hard/hard-after-sale" import * as hardAfterSaleApi from "/@/api/hard/hard-after-sale"
import { displayPrice } from "/@/utils/formatMoney" import { displayPrice } from "/@/utils/formatMoney"
import { deptTree } from "/@/api/admin/dept"
// 引入组件 // 引入组件
const FormDialog = defineAsyncComponent(() => import("./form.vue")) const FormDialog = defineAsyncComponent(() => import("./form.vue"))
@@ -129,6 +145,7 @@ const showSearch = ref(true)
// 多选变量 // 多选变量
const selectObjs = ref([]) as any const selectObjs = ref([]) as any
const multiple = ref(true) const multiple = ref(true)
const draggableDepTreeRef = ref() // 树组件ref引用
const { push } = useRouter() const { push } = useRouter()
@@ -138,8 +155,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -147,6 +163,8 @@ const resetQuery = () => {
queryRef.value?.resetFields() queryRef.value?.resetFields()
// 清空多选 // 清空多选
selectObjs.value = [] selectObjs.value = []
state.queryForm.deptId = ""
draggableDepTreeRef.value.resetData()
getDataList() getDataList()
} }
@@ -205,4 +223,31 @@ const handleDelete = async (ids: string[]) => {
useMessage().error(err.msg) useMessage().error(err.msg)
} }
} }
// 部门树使用的数据
const deptData = reactive({
queryList: (name: string) => {
return deptTree({
deptName: name,
})
},
})
// 点击树
const handleNodeClick = (clickedNode: any) => {
state.queryForm.deptId = clickedNode.id
getDataList()
}
// 树节点勾选改变
const treeNodeCheckChange = (checkedNodes: any) => {
state.queryForm.deptId = checkedNodes.map((item: any) => item.id)
getDataList()
}
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
</script> </script>
+53 -1
View File
@@ -1,6 +1,19 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<DraggableDepTree
ref="draggableDepTreeRef"
placeholder="请输入部门名称"
:query="deptData.queryList"
:show-expand="true"
@node-click="handleNodeClick"
@treeNodeCheckChange="treeNodeCheckChange"
@treeDeepSearch="treeDeepSearch"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
>
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> <el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
@@ -89,13 +102,21 @@
@click="formDialogRef.openDialog(row.id)" @click="formDialogRef.openDialog(row.id)"
>编辑</el-button >编辑</el-button
> >
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'" @click="handleDelete([row.id])" <el-button
v-if="false"
icon="delete"
text
type="primary"
v-auth="'wallet_walletRecharge_del'"
@click="handleDelete([row.id])"
>删除</el-button >删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</DraggableDepTree>
</div> </div>
<!-- 编辑、新增 --> <!-- 编辑、新增 -->
@@ -109,6 +130,7 @@ import { pageXf } from "/@/api/wallet/wallet-transaction"
import { useMessage, useMessageBox } from "/@/hooks/message" import { useMessage, useMessageBox } from "/@/hooks/message"
import { useDict } from "/@/hooks/dict" import { useDict } from "/@/hooks/dict"
import { displayPrice } from "/@/utils/formatMoney" import { displayPrice } from "/@/utils/formatMoney"
import { deptTree } from "/@/api/admin/dept"
const { push } = useRouter() const { push } = useRouter()
@@ -124,6 +146,7 @@ const showSearch = ref(true)
// 多选变量 // 多选变量
const selectObjs = ref([]) as any const selectObjs = ref([]) as any
const multiple = ref(true) const multiple = ref(true)
const draggableDepTreeRef = ref() // 树组件ref引用
const state: BasicTableProps = reactive<BasicTableProps>({ const state: BasicTableProps = reactive<BasicTableProps>({
queryForm: {}, queryForm: {},
@@ -139,6 +162,8 @@ const resetQuery = () => {
queryRef.value?.resetFields() queryRef.value?.resetFields()
// 清空多选 // 清空多选
selectObjs.value = [] selectObjs.value = []
state.queryForm.deptId = ""
draggableDepTreeRef.value.resetData()
getDataList() getDataList()
} }
@@ -193,4 +218,31 @@ const handleDelete = async (ids: string[]) => {
useMessage().error(err.msg) useMessage().error(err.msg)
} }
} }
// 部门树使用的数据
const deptData = reactive({
queryList: (name: string) => {
return deptTree({
deptName: name,
})
},
})
// 点击树
const handleNodeClick = (clickedNode: any) => {
state.queryForm.deptId = clickedNode.id
getDataList()
}
// 树节点勾选改变
const treeNodeCheckChange = (checkedNodes: any) => {
state.queryForm.deptId = checkedNodes.map((item: any) => item.id)
getDataList()
}
// 是否深度搜索
const treeDeepSearch = (isDeep: boolean) => {
state.queryForm.isDeepDept = isDeep
getDataList()
}
</script> </script>