文件模板配置
This commit is contained in:
parent
c98fb350c8
commit
9fccc00ac0
@ -16,7 +16,7 @@ export const projectClassificationList = (query?: DemoQuery): AxiosPromise<DemoV
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询测试单详细
|
* 获取费用项目分类-费用项详细信息
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
export const getProjectClassificationDetail = (query?: DemoQuery): AxiosPromise<DemoVO> => {
|
export const getProjectClassificationDetail = (query?: DemoQuery): AxiosPromise<DemoVO> => {
|
||||||
|
109
src/api/fileTemplate/index.ts
Normal file
109
src/api/fileTemplate/index.ts
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { DemoVO, DemoForm, DemoQuery } from '@/api/fileTemplate/type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件模板配置列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const fileTemplateConfigList = (query?: DemoQuery): AxiosPromise<DemoVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/system/fileTemplateConfig/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 文件模板配置下拉列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const fileTemplateConfigDropList= (query?: DemoQuery): AxiosPromise<DemoVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/system/fileTemplateConfig/dropList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取费用项目分类-费用项详细信息
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const getFileTemplateConfigDetail = (query?: DemoQuery): AxiosPromise<DemoVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/fy/fileTemplateConfig/queryList' ,
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件模板配置
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addFileTemplateConfig = (data: DemoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/system/fileTemplateConfig',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件模板配置
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addFileTemplateConfigDetail = (data: DemoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/system/fileTemplateConfig',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const fileTemplateConfig = (data: DemoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/system/fileTemplateConfig/config',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 修改测试单
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const updateDemo = (data: DemoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/demo/demo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除测试单
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const delDemo = (id: string | number | Array<string | number>) => {
|
||||||
|
return request({
|
||||||
|
url: '/demo/demo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 启用/停用
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const fileTemplateConfigSwitch = (data: DemoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/system/fileTemplateConfig/switch' ,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
104
src/api/fileTemplate/type.ts
Normal file
104
src/api/fileTemplate/type.ts
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
export interface DemoVO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
/**
|
||||||
|
* 费用分类ID
|
||||||
|
*/
|
||||||
|
projectClassificationId?: string | number;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
deptId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
userId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
orderNum: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* key键
|
||||||
|
*/
|
||||||
|
testKey: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DemoForm extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用分类中文名称
|
||||||
|
|
||||||
|
*/
|
||||||
|
classificationCnName?: string ;
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用分类ID
|
||||||
|
*/
|
||||||
|
projectClassificationId?: string | number;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
deptId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
userId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
orderNum?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* key键
|
||||||
|
*/
|
||||||
|
testKey?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
value?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DemoQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
deptId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
userId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
orderNum?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* key键
|
||||||
|
*/
|
||||||
|
testKey?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
value?: string;
|
||||||
|
}
|
||||||
|
|
39
src/api/system/log/index.ts
Normal file
39
src/api/system/log/index.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { DemoVO, DemoForm, DemoQuery } from '@/api/fileTemplate/type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询业务操作日志列表
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const operationLogList = (query?: DemoQuery): AxiosPromise<DemoVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/system/operationLog/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 获取业务操作日志详细信息
|
||||||
|
* @param query
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const operationLogItem= (id?: String): AxiosPromise<DemoVO[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/system/operationLog/'+id,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 新增业务操作日志
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
export const addOperationLog = (data: DemoForm) => {
|
||||||
|
return request({
|
||||||
|
url: '/system/operationLog',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
104
src/api/system/log/type.ts
Normal file
104
src/api/system/log/type.ts
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
export interface DemoVO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
/**
|
||||||
|
* 费用分类ID
|
||||||
|
*/
|
||||||
|
projectClassificationId?: string | number;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
deptId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
userId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
orderNum: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* key键
|
||||||
|
*/
|
||||||
|
testKey: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DemoForm extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用分类中文名称
|
||||||
|
|
||||||
|
*/
|
||||||
|
classificationCnName?: string ;
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用分类ID
|
||||||
|
*/
|
||||||
|
projectClassificationId?: string | number;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
deptId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
userId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
orderNum?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* key键
|
||||||
|
*/
|
||||||
|
testKey?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
value?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DemoQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
deptId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
userId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序号
|
||||||
|
*/
|
||||||
|
orderNum?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* key键
|
||||||
|
*/
|
||||||
|
testKey?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
value?: string;
|
||||||
|
}
|
||||||
|
|
594
src/views/fileTemplate/index.vue
Normal file
594
src/views/fileTemplate/index.vue
Normal file
@ -0,0 +1,594 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="模板名称" prop="templateName">
|
||||||
|
<el-input v-model="queryParams.templateName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="templateStatus">
|
||||||
|
<el-select v-model="queryParams.templateStatus" placeholder="用户状态" clearable>
|
||||||
|
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button v-hasPermi="['demo:demo:add']" type="primary" plain icon="Plus" @click="handleAdd">新增模板</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button v-hasPermi="['demo:demo:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button v-hasPermi="['demo:demo:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button v-hasPermi="['demo:demo:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="demoList" @selection-change="handleSelectionChange">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
|
<el-table-column v-if="true" label="模板ID" align="center" prop="id" />
|
||||||
|
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||||
|
<el-table-column label="模板类型" align="center" prop="templateType" />
|
||||||
|
<el-table-column label="状态" align="center" prop="templateStatus" >
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-radio-group v-model="scope.row.templateStatus">
|
||||||
|
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group> -->
|
||||||
|
{{ scope.row.templateStatus===0?"停用":'启用' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人" align="center" prop="opratertimer" />
|
||||||
|
<el-table-column label="操作时间" align="center" prop="operattime" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-tooltip content="配置" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
</el-tooltip> -->
|
||||||
|
<el-tooltip content="配置" placement="top">
|
||||||
|
<el-button v-hasPermi="['fy:project:edit']" link type="primary" @click="handleUpdate(scope.row)">配置</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="日志" placement="top">
|
||||||
|
<el-button v-hasPermi="['fy:project:edit']" link type="primary" @click="handLogItem(scope.row)">日志</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip :content="scope.row.templateStatus===1?'停用':'启用'" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:remove']" link type="primary" @click="handleDelete(scope.row)"> {{ scope.row.templateStatus===1?"停用":'启用' }}</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加或修改测试单对话框 -->
|
||||||
|
<el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" append-to-body>
|
||||||
|
<el-form ref="demoFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="模板名称" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入费用分类" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="dialog.type=='add'" label="模板类型" prop="templateType">
|
||||||
|
<!-- <el-input v-model="form.classificationEnName" maxlength="60" placeholder="请输入英文名称" /> -->
|
||||||
|
<el-select v-model="form.templateType" placeholder="模板类型" clearable>
|
||||||
|
<el-option v-for="dict in templateTypeArr" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="dialog.type=='edit'" label="费用项" required>
|
||||||
|
<el-button type="primary" @click="addItem">添加</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" v-if="dialog.type=='edit'" @cell-click="getCell" border :data="detailList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||||
|
<el-table-column v-if="true" label="ID" align="center" prop="id" />
|
||||||
|
<el-table-column label="费用项目名称" align="center" prop="classificationDetailCnName" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.classificationDetailCnName" @change="handleBlur(scope.row)"
|
||||||
|
@blur="handleBlur(scope.row)" label="手动输入" v-if="scope.row.id == tabRowIndex && scope.column.label == tabColumnIndex"></el-input>
|
||||||
|
<div v-else>
|
||||||
|
{{scope.row.classificationDetailCnName}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="英文名称" align="center" prop="classificationDetailEnName" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.classificationDetailEnName" @change="handleBlur(scope.row)"
|
||||||
|
@blur="handleBlur(scope.row)" label="手动输入" v-if="scope.row.id == tabRowIndex && scope.column.label == tabColumnIndex"></el-input>
|
||||||
|
<div v-else>
|
||||||
|
{{scope.row.classificationDetailEnName}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-tooltip content="配置" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
</el-tooltip> -->
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 日志 -->
|
||||||
|
<el-dialog v-model="logdialog.visible" title="操作日志" width="500px" append-to-body>
|
||||||
|
|
||||||
|
<el-table v-loading="logdialog.loading" border :data="logList" >
|
||||||
|
<el-table-column type="index" label="操作类型" width="55" align="center" >
|
||||||
|
<template #default="scope">
|
||||||
|
{{logOperateType[scope.row.operationType]}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人" align="center" prop="opratertimer" />
|
||||||
|
<el-table-column label="操作时间" align="center" prop="operattime" />
|
||||||
|
<el-table-column label="操作内容" align="center" prop="operationType" >
|
||||||
|
<template #default="scope">
|
||||||
|
{{logOperateType[scope.row.operationType]}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 修改 对话框 -->
|
||||||
|
<el-dialog v-model="dialogSet.visible" :title="dialog.title" width="500px" append-to-body>
|
||||||
|
<el-form ref="demoFormRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="职务" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入职务" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="邮箱" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系人" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入联系人" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item v-if="dialog.type=='add'" label="模板类型" prop="templateType">
|
||||||
|
<!-- <el-input v-model="form.classificationEnName" maxlength="60" placeholder="请输入英文名称" /> -->
|
||||||
|
<el-select v-model="form.templateType" placeholder="模板类型" clearable>
|
||||||
|
<el-option v-for="dict in templateTypeArr" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系电话:" required>
|
||||||
|
<el-button type="primary" @click="addItem">添加</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" @cell-click="getCell" border :data="detailList" @selection-change="handleSelectionChange">
|
||||||
|
<!-- <el-table-column type="index" label="序号" width="55" align="center"/> -->
|
||||||
|
<!-- <el-table-column v-if="true" label="电话" align="center" prop="id" /> -->
|
||||||
|
<el-table-column label="电话" align="center" prop="classificationDetailCnName" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.classificationDetailCnName" @change="handleBlur(scope.row)"
|
||||||
|
@blur="handleBlur(scope.row)" label="手动输入" v-if="scope.row.id == tabRowIndex && scope.column.label == tabColumnIndex"></el-input>
|
||||||
|
<div v-else>
|
||||||
|
{{scope.row.classificationDetailCnName}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="姓名" align="center" prop="classificationDetailEnName" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.classificationDetailEnName" @change="handleBlur(scope.row)"
|
||||||
|
@blur="handleBlur(scope.row)" label="手动输入" v-if="scope.row.id == tabRowIndex && scope.column.label == tabColumnIndex"></el-input>
|
||||||
|
<div v-else>
|
||||||
|
{{scope.row.classificationDetailEnName}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-tooltip content="配置" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
</el-tooltip> -->
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-form-item label="备注:" required>
|
||||||
|
<el-button type="primary" @click="addItem">添加</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" @cell-click="getCell" border :data="detailList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||||
|
|
||||||
|
<el-table-column label="备注内容" align="center" prop="classificationDetailCnName" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.classificationDetailCnName" @change="handleBlur(scope.row)"
|
||||||
|
@blur="handleBlur(scope.row)" label="手动输入" v-if="scope.row.id == tabRowIndex && scope.column.label == tabColumnIndex"></el-input>
|
||||||
|
<div v-else>
|
||||||
|
{{scope.row.classificationDetailCnName}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-tooltip content="配置" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
</el-tooltip> -->
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-form-item label="备注加粗首行:" required>
|
||||||
|
<el-button type="primary" @click="addItem">添加</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" @cell-click="getCell" border :data="detailList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center"/>
|
||||||
|
|
||||||
|
<el-table-column label="备注内容" align="center" prop="classificationDetailCnName" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.classificationDetailCnName" @change="handleBlur(scope.row)"
|
||||||
|
@blur="handleBlur(scope.row)" label="手动输入" v-if="scope.row.id == tabRowIndex && scope.column.label == tabColumnIndex"></el-input>
|
||||||
|
<div v-else>
|
||||||
|
{{scope.row.classificationDetailCnName}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-tooltip content="配置" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
</el-tooltip> -->
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button v-hasPermi="['demo:demo:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
中文账户信息
|
||||||
|
<el-form-item label="户名" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入户名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开户行" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入开户行" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="账号" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入账号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纳税人识别号" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入纳税人识别号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地址" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系电话" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入联系电话" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="邮箱" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="美元银行行号" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入美元银行行号" />
|
||||||
|
</el-form-item>
|
||||||
|
英文账户信息
|
||||||
|
<el-form-item label="Account Holder Name" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入户名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Bank Account Number" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入开户行" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Bank Name" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入账号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="SWIFT Code" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入纳税人识别号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Bank Address" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Phone" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入联系电话" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Email" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="USD Account Number" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入美元银行行号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="USD bank number" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" maxlength="50" placeholder="请输入美元银行行号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="dialogSet.visible=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Demo" lang="ts">
|
||||||
|
// import { listDemo, getDemo, delDemo, addDemo, updateDemo } from '@/api/demo/demo';
|
||||||
|
import { fileTemplateConfigList, fileTemplateConfigDropList, addFileTemplateConfigDetail, fileTemplateConfig, fileTemplateConfigSwitch } from '@/api/fileTemplate';
|
||||||
|
import { operationLogItem } from '@/api/system/log';
|
||||||
|
|
||||||
|
import { DemoVO, DemoQuery, DemoForm } from '@/api/expense/types';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const sys_normal_disable =ref([]);//, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
|
||||||
|
sys_normal_disable.value=[{
|
||||||
|
label: "全部",
|
||||||
|
value: -1
|
||||||
|
}, {
|
||||||
|
dictCode: 6,
|
||||||
|
dictSort: 1,
|
||||||
|
label: "启用",
|
||||||
|
value: 1,
|
||||||
|
dictType: "sys_normal_disable",
|
||||||
|
cssClass: "",
|
||||||
|
listClass: "primary",
|
||||||
|
isDefault: "Y",
|
||||||
|
remark: "正常状态",
|
||||||
|
createTime: "2025-06-11 10:46:06"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dictCode: 7,
|
||||||
|
dictSort: 2,
|
||||||
|
label: "停用",
|
||||||
|
value: 0,
|
||||||
|
dictType: "sys_normal_disable",
|
||||||
|
cssClass: "",
|
||||||
|
listClass: "danger",
|
||||||
|
isDefault: "N",
|
||||||
|
remark: "停用状态",
|
||||||
|
createTime: "2025-06-11 10:46:07"
|
||||||
|
}]
|
||||||
|
const templateTypeArr =[
|
||||||
|
{ label: "账户信息",value: 0},
|
||||||
|
{ label: "报价单",value: 1},
|
||||||
|
{ label: "费用确认",value: 2},
|
||||||
|
]
|
||||||
|
const logOperateType=ref([ '新增','修改' ,'删除' ,'配置','启用','停用'])
|
||||||
|
const demoList = ref<DemoVO[]>([]);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const demoFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
type:null
|
||||||
|
});
|
||||||
|
const dialogSet = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
type:null
|
||||||
|
});
|
||||||
|
const logList = ref([])
|
||||||
|
const logdialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
type:null,
|
||||||
|
loading :false,
|
||||||
|
});
|
||||||
|
const initFormData: DemoForm = {
|
||||||
|
classificationCnName: undefined,
|
||||||
|
};
|
||||||
|
const data = reactive<PageData<DemoForm, DemoQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
classificationCnName: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
|
||||||
|
// classificationEnName: [{ required: true, message: '部门id不能为空', trigger: 'blur' }],
|
||||||
|
templateName: [{ required: true, message: '模板名称不能为空', trigger: 'blur' }],
|
||||||
|
templateType: [{ required: true, message: '模板类型不能为空', trigger: 'blur' }],
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const detailList = ref([])
|
||||||
|
const detailListArray = ref([])
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询测试单列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
let params = {...queryParams.value}
|
||||||
|
if(params?.templateStatus<0){
|
||||||
|
params.templateStatus = null
|
||||||
|
}
|
||||||
|
const res = await fileTemplateConfigList(params);
|
||||||
|
console.info('res', res)
|
||||||
|
demoList.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
dialog.type = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
demoFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: DemoVO[]) => {
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
/** 点击选中编辑数据 */
|
||||||
|
|
||||||
|
const tabRowIndex = ref(0);
|
||||||
|
const tabColumnIndex = ref(0);
|
||||||
|
const getCell = (row, column, event) => {
|
||||||
|
console.info('getCell','row',row, 'column label',column)
|
||||||
|
tabRowIndex.value = row.id;
|
||||||
|
// row.classificationEnName
|
||||||
|
tabColumnIndex.value = column.label;
|
||||||
|
console.log(row, column, event);
|
||||||
|
};
|
||||||
|
const handleBlur = (row) => {
|
||||||
|
const params = {
|
||||||
|
shopId: storeInfo.value.id, // 店铺ID
|
||||||
|
paymentMethod: row.classificationEnName, // 支付方式
|
||||||
|
receivedAmount: row.receivedAmount // 实收金额
|
||||||
|
};
|
||||||
|
tabRowIndex.value = null;
|
||||||
|
tabColumnIndex.value = null;
|
||||||
|
};
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.type = 'add';
|
||||||
|
dialog.title = '新增模板';
|
||||||
|
};
|
||||||
|
/** 日志查看 */
|
||||||
|
const handLogItem = async (row?: DemoVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
form.value.classificationCnName = row.classificationCnName
|
||||||
|
form.value.projectClassificationId = row.id
|
||||||
|
logList.value = []
|
||||||
|
const res = await operationLogItem( _id);
|
||||||
|
console.info(res)
|
||||||
|
logList.value = res.data||[]
|
||||||
|
// detailListArray.value= arr
|
||||||
|
logdialog.visible = true;
|
||||||
|
logdialog.type = 'item';
|
||||||
|
logdialog.title = '日志查看';
|
||||||
|
logdialog.loading = false;
|
||||||
|
};
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: DemoVO) => {
|
||||||
|
reset();
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
|
form.value.classificationCnName = row.classificationCnName
|
||||||
|
form.value.projectClassificationId = row.id
|
||||||
|
detailList.value = []
|
||||||
|
// const res = await fileTemplateConfig({'projectClassificationId':_id});
|
||||||
|
// Object.assign(form.value, res);
|
||||||
|
// detailList.value = res
|
||||||
|
// let arr =[]
|
||||||
|
// if(res.length>0){
|
||||||
|
// res.forEach((item,index)=>{
|
||||||
|
// arr[index]={...item,index:index}
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// detailList.value = arr
|
||||||
|
|
||||||
|
// detailListArray.value= arr
|
||||||
|
|
||||||
|
dialogSet.visible = true;
|
||||||
|
dialogSet.type = 'edit';
|
||||||
|
dialogSet.title = '费用项配置';
|
||||||
|
};
|
||||||
|
const addItem = ()=>{
|
||||||
|
detailList.value.push({index:detailList.value.length})
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
demoFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (dialog.type == 'add') {
|
||||||
|
form.value.projectClassificationId = null
|
||||||
|
await addFileTemplateConfigDetail(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
let params={
|
||||||
|
projectClassificationId:form.value.projectClassificationId,
|
||||||
|
list:detailList.value
|
||||||
|
}
|
||||||
|
params.list.forEach((item)=>{
|
||||||
|
delete item.index
|
||||||
|
})
|
||||||
|
console.info(params)
|
||||||
|
await addProjectClassificationDetail({...params}).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
dialog.type = null
|
||||||
|
form.value.projectClassificationId = null
|
||||||
|
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: DemoVO) => {
|
||||||
|
console.info(row,row.index)
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认'+ (row.templateStatus===1?"停用":'启用')+'费用项编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||||
|
await fileTemplateConfigSwitch({id:_ids});
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = () => {
|
||||||
|
proxy?.download(
|
||||||
|
'demo/demo/export',
|
||||||
|
{
|
||||||
|
...queryParams.value
|
||||||
|
},
|
||||||
|
`demo_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
@ -73,7 +73,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright © 2018-2025 疯狂的狮子Li All Rights Reserved.</span>
|
<span>Copyright © 2025 光线国际 All Rights Reserved.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user