creat:生成code
This commit is contained in:
1 parent
18fa9d18a4
commit
08b193fe7b
10 files changed
+316
-132
No files matched your search
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<el-dialog title="使用情况" width="60%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="是否使用" prop="status">
|
||||
<dict-select v-model="state.queryForm.status" dict-code="yes_no_type" placeholder="是否使用"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @sort-change="sortChangeHandle">
|
||||
<el-table-column type="index" label="#" width="100" />
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="status" label="是否使用">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="yes_no_type" :value="row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="useTime" label="使用时间" />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="code-use-table">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { codeList } from "/@/api/wallet/wallet-stride";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
// 定义变量内容
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
const queryRef = ref()
|
||||
// 定义查询字典
|
||||
const { check_status, yes_no_type } = useDict('check_status', 'yes_no_type');
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: codeList
|
||||
})
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
state.queryForm.id = ''
|
||||
// 获取walletStride信息
|
||||
if (id) {
|
||||
state.queryForm.id = id
|
||||
getDataList()
|
||||
}
|
||||
};
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
}
|
||||
// 暴露变量
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
@@ -1,16 +1,28 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-dialog title="申请" v-model="visible" width="30%" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="100px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
||||
<el-form-item label="申请人" prop="userId">
|
||||
<select-user v-model="form.userId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="部门id" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门id" />
|
||||
<el-form-item label="申请数量" prop="count">
|
||||
<el-input-number v-model="form.count" :min="1" :max="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-form-item label="申请有效期" prop="rangeDate">
|
||||
<el-date-picker v-model="form.rangeDate" placeholder="请选择申请有效期" type="daterange" range-separator="至"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD" format="YYYY-MM-DD" />
|
||||
</el-form-item>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" :autosize="{ minRows: 6 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -28,7 +40,7 @@
|
||||
<script setup lang="ts" name="WalletForeignDialog">
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import { getObj, addObj, putObj } from '../../../api/wallet/wallet-foreign'
|
||||
import { getObj, addObj, putObj } from '/@/api/wallet/wallet-foreign'
|
||||
import { rule } from '/@/utils/validate';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
@@ -42,11 +54,18 @@ const loading = ref(false)
|
||||
const form = reactive({
|
||||
id: '',
|
||||
userId: '',
|
||||
deptId: '',
|
||||
count: '',
|
||||
remark: '',
|
||||
applyEndTime: '',
|
||||
applyStartTime: '',
|
||||
rangeDate: []
|
||||
});
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
count: [{ required: true, message: '申请数量不能为空', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '申请人id不能为空', trigger: 'blur' }],
|
||||
rangeDate: [{ required: true, message: '申请人id不能为空', trigger: 'change' }],
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
@@ -73,8 +92,13 @@ const onSubmit = async () => {
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
form.id ? await putObj(form) : await addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
const pa: any = { ...form }
|
||||
if (form.rangeDate && form.rangeDate.length) {
|
||||
pa.applyStartTime = form.rangeDate[0]
|
||||
pa.applyEndTime = form.rangeDate[1]
|
||||
}
|
||||
await addObj(pa);
|
||||
useMessage().success('申请成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="用户" prop="userIds">
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'wallet_walletForeign_add'">
|
||||
新 增
|
||||
申 请
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'wallet_walletForeign_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
@@ -21,18 +35,36 @@
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="userId" label="用户id" show-overflow-tooltip />
|
||||
<el-table-column prop="deptId" label="部门id" show-overflow-tooltip />
|
||||
<el-table-column prop="applyStartTime" label="申请使用开始时间" show-overflow-tooltip />
|
||||
<el-table-column prop="applyEndTime" label="申请使用结束时间" show-overflow-tooltip />
|
||||
<el-table-column prop="count" label="申请数量" show-overflow-tooltip />
|
||||
<el-table-column prop="useCount" label="使用数量" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_walletForeign_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletForeign_del'"
|
||||
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="deptName" label="部门" />
|
||||
<el-table-column prop="applyStartTime" label="申请使用时间">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.applyStartTime }}</span>
|
||||
<span class="mx-1">-</span>
|
||||
<span>{{ row.applyEndTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="申请数量" />
|
||||
<el-table-column prop="useCount" label="使用数量" />
|
||||
<el-table-column prop="processStatus" label="审核状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.processStatus == 1" type="success">进行中</el-tag>
|
||||
<el-tag v-else>已结束</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<el-button icon="Promotion" text type="primary" v-auth="'admin_walletStride_del'" @click="doInfo(row)">
|
||||
查看审批
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletForeign_del'"
|
||||
@click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -41,22 +73,24 @@
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
<code-use-table ref="codeUseTableRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemWalletForeign">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObjs } from "../../../api/wallet/wallet-foreign";
|
||||
import { fetchList, pageJoin, delObjs } from "/@/api/wallet/wallet-foreign";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
const CodeUseTable = defineAsyncComponent(() => import('../components/code-use-table.vue'));
|
||||
// 定义查询字典
|
||||
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const codeUseTableRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@@ -64,9 +98,11 @@ const showSearch = ref(true)
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList
|
||||
pageList: pageJoin
|
||||
})
|
||||
|
||||
// table hook
|
||||
@@ -88,6 +124,11 @@ const resetQuery = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
const doInfo = (row: any) => {
|
||||
push({ path: '/flow/task/started', query: { id: row.id } })
|
||||
}
|
||||
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/wallet/walletForeign/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletForeign.xlsx')
|
||||
|
||||
@@ -88,10 +88,8 @@
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<transaction-list ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
<change-balance ref="changeBalanceRef" @refresh="getDataList(false)" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,35 +1,41 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
||||
:close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="部门id" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门id"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-dialog title="申请" width="30%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="申请人id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入申请人id"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="申请人" prop="userId">
|
||||
<select-user v-model="form.userId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="申请数量" prop="count">
|
||||
<el-input-number v-model="form.count" :min="1" :max="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" :autosize="{ minRows: 6 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="WalletStrideDialog">
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import { getObj, addObj, putObj } from '/@/api/admin/walletStride'
|
||||
import { putObj, addObj, getObj } from "/@/api/wallet/wallet-stride";
|
||||
import { rule } from '/@/utils/validate';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
@@ -41,13 +47,17 @@ const loading = ref(false)
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id:'',
|
||||
deptId: '',
|
||||
userId: '',
|
||||
id: '',
|
||||
userId: '',
|
||||
count: '',
|
||||
remark: '',
|
||||
});
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
count: [{ required: true, message: '申请数量不能为空', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '申请人id不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '审核状态不能为空', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
@@ -56,9 +66,9 @@ const openDialog = (id: string) => {
|
||||
form.id = ''
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields();
|
||||
});
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields();
|
||||
});
|
||||
|
||||
// 获取walletStride信息
|
||||
if (id) {
|
||||
@@ -69,18 +79,18 @@ const openDialog = (id: string) => {
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||
if (!valid) return false;
|
||||
const valid = await dataFormRef.value.validate().catch(() => { });
|
||||
if (!valid) return false;
|
||||
|
||||
try {
|
||||
try {
|
||||
loading.value = true;
|
||||
form.id ? await putObj(form) : await addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
} finally {
|
||||
form.id ? await putObj(form) : await addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,36 +1,62 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="用户" prop="userIds">
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'admin_walletStride_add'">
|
||||
新 增
|
||||
申 请
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary"
|
||||
v-auth="'admin_walletStride_del'" @click="handleDelete(selectObjs)">
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'admin_walletStride_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'admin_walletStride_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right;"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right;"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="deptId" label="部门id" show-overflow-tooltip/>
|
||||
<el-table-column prop="count" label="申请数量" show-overflow-tooltip/>
|
||||
<el-table-column prop="useCount" label="使用数量" show-overflow-tooltip/>
|
||||
<el-table-column prop="userId" label="申请人id" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'admin_walletStride_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'admin_walletStride_del'" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="deptName" label="部门" />
|
||||
<el-table-column prop="count" label="申请数量" />
|
||||
<el-table-column prop="useCount" label="使用数量" />
|
||||
<el-table-column prop="processStatus" label="审核状态">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="check_status" :value="row.processStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="false" icon="edit-pen" text type="primary" v-auth="'admin_walletStride_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)">编辑</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'admin_walletStride_del'"
|
||||
@click="handleDelete([row.id])">删除</el-button>
|
||||
<el-button icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<el-button icon="Promotion" text type="primary" v-auth="'admin_walletStride_del'" @click="doInfo(row)">
|
||||
查看审批
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -39,22 +65,26 @@
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
<code-use-table ref="codeUseTableRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemWalletStride">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObjs } from "/@/api/admin/walletStride";
|
||||
import { fetchList, delObjs, pageJoin } from "/@/api/wallet/wallet-stride";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
const CodeUseTable = defineAsyncComponent(() => import('../components/code-use-table.vue'));
|
||||
// 定义查询字典
|
||||
|
||||
const { check_status, yes_no_type } = useDict('check_status', 'yes_no_type');
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const codeUseTableRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@@ -64,7 +94,7 @@ const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList
|
||||
pageList: pageJoin
|
||||
})
|
||||
|
||||
// table hook
|
||||
@@ -74,7 +104,7 @@ const {
|
||||
sizeChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
tableStyle
|
||||
tableStyle
|
||||
} = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
@@ -86,6 +116,10 @@ const resetQuery = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
const doInfo = (row: any) => {
|
||||
push({ path: '/flow/task/started', query: { id: row.id } })
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/admin/walletStride/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletStride.xlsx')
|
||||
|
||||
Reference in new issue
Block a user