diff --git a/.gitignore b/.gitignore index 0f033cc..aed17d0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ pnpm-debug auto-*.d.ts .idea .history +/eam/ +/eam +eam diff --git a/nginx.conf b/nginx.conf index 1e179e1..d5aa0a2 100644 --- a/nginx.conf +++ b/nginx.conf @@ -57,5 +57,4 @@ http { index index.html index.htm; } } -} - +} \ No newline at end of file diff --git a/src/api/eam/item/applicationRecordMain/index.ts b/src/api/eam/item/applicationRecordMain/index.ts index aba5ca4..af7ea56 100644 --- a/src/api/eam/item/applicationRecordMain/index.ts +++ b/src/api/eam/item/applicationRecordMain/index.ts @@ -46,6 +46,16 @@ export const deleteApplicationRecordMain = async (id: number) => { return await request.delete({ url: `/eam/item-apply-main/delete?id=` + id }) } +// 审批通过备件申领记录主 +export const agreeApplicationRecordMain = async (id: number) => { + return await request.delete({ url: `/eam/item-apply-main/agree?id=` + id }) +} + +// 审批驳回备件申领记录主 +export const disAgreeApplicationRecordMain = async (id: number) => { + return await request.delete({ url: `/eam/item-apply-main/disAgree?id=` + id }) +} + // 导出备件申领记录主 Excel export const exportApplicationRecordMain = async (params) => { return await request.download({ url: `/eam/item-apply-main/export-excel`, params }) diff --git a/src/api/system/sysconfig/index.ts b/src/api/system/sysconfig/index.ts index 148748e..54ac7ee 100644 --- a/src/api/system/sysconfig/index.ts +++ b/src/api/system/sysconfig/index.ts @@ -1,60 +1,50 @@ -import request from '@/utils/request' - -// 查询参数列表 -export function listConfig(query) { - return request({ - url: '/system/config/list', - method: 'get', - params: query - }) +import request from '@/config/axios' + +export interface ConfigVO { + configName: string + configKey: string + configValue: string + configType: string + createBy: string +} + +// 查询系统参数列表 +export const getConfigPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/sys/config/senior', data }) + } else { + return await request.get({ url: `/sys/config/page`, params }) + } } -// 查询参数详细 -export function getConfig(configId) { - return request({ - url: '/system/config/' + configId, - method: 'get' - }) +// 查询系统参数详情 +export const getConfig = async (id: number) => { + return await request.get({ url: `/sys/config/get?id=` + id }) } -// 根据参数键名查询参数值 -export function getConfigKey(configKey) { - return request({ - url: '/system/config/configKey/' + configKey, - method: 'get' - }) +// 新增系统参数 +export const createConfig = async (data: ConfigVO) => { + return await request.post({ url: `/sys/config/create`, data }) } -// 新增参数配置 -export function addConfig(data) { - return request({ - url: '/system/config', - method: 'post', - data: data - }) +// 修改系统参数 +export const updateConfig = async (data: ConfigVO) => { + return await request.put({ url: `/sys/config/update`, data }) } -// 修改参数配置 -export function updateConfig(data) { - return request({ - url: '/system/config', - method: 'put', - data: data - }) +// 删除系统参数 +export const deleteConfig = async (id: number) => { + return await request.delete({ url: `/sys/config/delete?id=` + id }) } -// 删除参数配置 -export function delConfig(configId) { - return request({ - url: '/system/config/' + configId, - method: 'delete' - }) +// 导出系统参数 Excel +export const exportConfig = async (params) => { + return await request.download({ url: `/sys/config/export-excel`, params }) } -// 刷新参数缓存 -export function refreshCache() { - return request({ - url: '/system/config/refreshCache', - method: 'delete' - }) +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/sys/config/get-import-template' }) } \ No newline at end of file diff --git a/src/components/Detail/src/approveDetail.vue b/src/components/Detail/src/approveDetail.vue new file mode 100644 index 0000000..607a6b6 --- /dev/null +++ b/src/components/Detail/src/approveDetail.vue @@ -0,0 +1,574 @@ + + + + + + {{ titleValueRef }} {{ titleNameRef }} + + + + + + + + + + + + + + + + + + + + + {{ item }} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index e8fc2d0..2dbf155 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -788,6 +788,32 @@ export function chooseDeviceBtn(option:any) { }) } +// 审批通过按钮 +export function agree(option:any) { + return __defaultBtnOption(option,{ + label: '通过', + name: 'agree', + hide: false, + type: 'primary', + // icon: 'ep:plus', + color: 'green', + hasPermi: '' + }) +} + +// 审批驳回按钮 +export function disAgree(option:any) { + return __defaultBtnOption(option,{ + label: '驳回', + name: 'disAgree', + hide: false, + type: 'primary', + // icon: 'ep:plus', + color: 'red', + hasPermi: '' + }) +} + // 主列表-撤销 export function backoutBtn(option:any) { return __defaultBtnOption(option,{ @@ -892,10 +918,6 @@ export function finishOrderBtn(option:any) { }) } - - - - // 默认按钮规则 function __defaultBtnOption(option:any,specific:any){ return { diff --git a/src/views/eam/item/applicationRecord/index.vue b/src/views/eam/item/applicationRecord/index.vue index c67f0d5..a58386a 100644 --- a/src/views/eam/item/applicationRecord/index.vue +++ b/src/views/eam/item/applicationRecord/index.vue @@ -44,7 +44,13 @@ :apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" :apiDelete="ApplicationRecordDetailApi.deleteApplicationRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail" /> - + + @@ -58,6 +64,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' + import approveDetail from '@/components/Detail/src/approveDetail.vue' // 采购订单 defineOptions({ name: 'ApplicationRecord' }) @@ -163,8 +170,8 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) }), // 撤回 - // defaultButtons.mainListEditBtn(null), // 编辑 + defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) }), // 审批 + defaultButtons.mainListEditBtn(null), // 编辑 // defaultButtons.mainListDeleteBtn(null), // 删除 ] } @@ -173,8 +180,8 @@ const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) - }else if (val == 'approve') { // 删除 - // handleDelete(row.id) + } else if (val == 'approve') { // 删除 + handleApprove(row, '单据号', row.number) } else if (val == 'delete') { // 删除 handleDelete(row.id) } @@ -192,6 +199,10 @@ const openDetail = (row : any, titleName : any, titleValue : any) => { detailRef.value.openDetail(row, titleName, titleValue, 'basicApplicationRecordMain') } + const detailRef1 = ref() + const handleApprove = (row : any, titleName : any, titleValue : any) => { + detailRef1.value.openDetail(row, titleName, titleValue, 'basicApplicationRecordMain') + } /** 删除按钮操作 */ const handleDelete = async (id : number) => { diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue index 4f99ce8..3018fb0 100644 --- a/src/views/infra/codegen/index.vue +++ b/src/views/infra/codegen/index.vue @@ -156,7 +156,7 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as CodegenApi from '@/api/infra/codegen' import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig' -import ImportTable from './ImportTable.vue' +import ImportTable from './importTable.vue' import PreviewCode from './PreviewCode.vue' defineOptions({ name: 'InfraCodegen' }) diff --git a/src/views/system/sysconfig/config.data.ts b/src/views/system/sysconfig/config.data.ts new file mode 100644 index 0000000..b6b6b37 --- /dev/null +++ b/src/views/system/sysconfig/config.data.ts @@ -0,0 +1,100 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ConfigRules = reactive({ +}) + +export const Config = useCrudSchemas(reactive([ + { + label: '参数主键', + field: 'configId', + sort: 'custom', + isTable: false, + isSearch: false, + isForm: false, + }, + { + label: '参数名称', + field: 'configName', + sort: 'custom', + isSearch: true, + }, + { + label: '参数键名', + field: 'configKey', + sort: 'custom', + isSearch: false, + }, + { + label: '参数键值', + field: 'configValue', + sort: 'custom', + isSearch: false, + }, + // { + // label: '系统内置(Y是 N否)', + // field: 'configType', + // sort: 'custom', + // isSearch: false, + // form: { + // component: 'Select' + // }, + // }, + { + label: '系统内置', + field: 'isConstant', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isTable: true, + sort: 'custom', + table: { + width:110, + }, + tableForm: { + type: 'Select', + inactiveValue: 'FALSE', + disabled: true + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + // { + // label: '创建者', + // field: 'creator', + // sort: 'custom', + // isSearch: false, + // }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/system/sysconfig/index.vue b/src/views/system/sysconfig/index.vue index 8229e58..fe3393d 100644 --- a/src/views/system/sysconfig/index.vue +++ b/src/views/system/sysconfig/index.vue @@ -1,307 +1,243 @@ - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - + + + + - - - 新增 - - - 修改 - - - 删除 - - - 导出 - - - 刷新缓存 - - - + + - - - - - - - - - {{scope.row.configType == 'Y' ? '是' : '否'}} - - - - - - - {{ parseTime(scope.row.createTime) }} - - - - - 修改 - 删除 - - - + + + + + + {{ row.code }} + + + + + + + - + + - - - - - - - - - - - - - - - {{ dict.label }} - - - - - - - - - - - - + + - +// 筛选提交 +const searchFormClick = (searchData) => { + tableObject.params = { + isSearch: true, + filters: searchData.filters + } + getList() // 刷新当前列表 +} - \ No newline at end of file +/** 初始化 **/ +onMounted(async () => { + getList() + importTemplateData.templateUrl = await ConfigApi.importTemplate() +}) + +