diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + + + diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + + + diff --git a/src/views/device/receive/receive.ts b/src/views/device/receive/receive.ts index d4ac6a6..dc2d9f9 100644 --- a/src/views/device/receive/receive.ts +++ b/src/views/device/receive/receive.ts @@ -26,6 +26,7 @@ time: string // 领用时间 applyDesc: string // 申请说明 approvalStatus: string // 审批状态 + approvalStatusName: string // 审批状态名称 processResult: string // 处置结果 applyType: string // 申请类型 领用0 createUser: string // 创建人 diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + + + diff --git a/src/views/device/receive/receive.ts b/src/views/device/receive/receive.ts index d4ac6a6..dc2d9f9 100644 --- a/src/views/device/receive/receive.ts +++ b/src/views/device/receive/receive.ts @@ -26,6 +26,7 @@ time: string // 领用时间 applyDesc: string // 申请说明 approvalStatus: string // 审批状态 + approvalStatusName: string // 审批状态名称 processResult: string // 处置结果 applyType: string // 申请类型 领用0 createUser: string // 创建人 diff --git a/src/views/device/stateManage/components/selectDeviceDialog.vue b/src/views/device/stateManage/components/selectDeviceDialog.vue new file mode 100644 index 0000000..4e503c5 --- /dev/null +++ b/src/views/device/stateManage/components/selectDeviceDialog.vue @@ -0,0 +1,172 @@ + + + + + + diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + + + diff --git a/src/views/device/receive/receive.ts b/src/views/device/receive/receive.ts index d4ac6a6..dc2d9f9 100644 --- a/src/views/device/receive/receive.ts +++ b/src/views/device/receive/receive.ts @@ -26,6 +26,7 @@ time: string // 领用时间 applyDesc: string // 申请说明 approvalStatus: string // 审批状态 + approvalStatusName: string // 审批状态名称 processResult: string // 处置结果 applyType: string // 申请类型 领用0 createUser: string // 创建人 diff --git a/src/views/device/stateManage/components/selectDeviceDialog.vue b/src/views/device/stateManage/components/selectDeviceDialog.vue new file mode 100644 index 0000000..4e503c5 --- /dev/null +++ b/src/views/device/stateManage/components/selectDeviceDialog.vue @@ -0,0 +1,172 @@ + + + + + + diff --git a/src/views/device/stateManage/components/status-interface.ts b/src/views/device/stateManage/components/status-interface.ts index 0ef0e90..6f258bc 100644 --- a/src/views/device/stateManage/components/status-interface.ts +++ b/src/views/device/stateManage/components/status-interface.ts @@ -1,27 +1,78 @@ +// 设备状态管理搜索 + +export interface ISearchQuery { + applyNo: string // 申请编号 + applyStatus: string // 申请状态 + applyUnit: string // 申请单位 + approvalStatus: number // 审批状态 + createUser: string // 创建人 + equipmentName: string // 设备名称 + equipmentNo: string // 设备编号 + ids: [] // 选中设备数据 + limit: number + offset: number + applyType: string // 申请类型 + formId: string // 表单id +} + // 设备闲置申请表格行 -export interface TableRow { - applyNo: string - applyPerson: string - applyType: string - applyTypeName: string - applyUnit: string - approvalStatus: string - approvalStatusName: string - createTime: string - createUser: string - equipmentName: string - equipmentNo: string - fileList: string - id: number - isDel: number - managerState: string - managerStateName: string - modelNo: string - processId: string - processResult: string - remark: string +export interface ITableRow { + applyNo: string // 申请编号 + applyPerson: string // 申请名称 + applyType: string // 申请类型 + applyTypeName: string // 申请类型名称 + applyUnit: string // 申请部门 + approvalStatus: string // 申请状态码 + approvalStatusName: string // 申请状态名称 + createTime: string // 创建时间 + createUser: string // 创建人 + equipmentName: string // 设备名称 + equipmentNo: string // 设备编号 + fileList: string // 文件列表 + id: number // 主键id + isDel: number // 删除标记 + managerState: string // 管理状态 + managerStateName: string // 管理状态名称 + modelNo: string // 型号 + processId: string // 流程id + processResult: string // 流程结果 + remark: string // 备注 + taskId: string // 任务id + time: string // 时间 + updateTime: string // 修改时间 + version: string // 版本 +} + +// 删除/提交/取消 +export interface Iapprove { + id: string taskId: string - time: string - updateTime: string - version: string + formId?: string + processInstanceId?: string +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number } diff --git a/src/api/business/cert.ts b/src/api/business/cert.ts new file mode 100644 index 0000000..7fa6610 --- /dev/null +++ b/src/api/business/cert.ts @@ -0,0 +1,50 @@ +/** + * 证书打印 +*/ +import request from '../index' +import type { ICertApprove, ICertExport, ICertInitiate, ICertPrintSearch } from '@/views/business/schedule/certPrint/cert-interface.ts' + +// 证书打印列表 +export function getCertList(data: ICertPrintSearch) { + return request({ + url: `/business/certificatePrint/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 发起申请 +export function submitApproval(data: ICertInitiate) { + return request({ + url: '/business/certificatePrint/submitApproval', + method: 'post', + data, + }) +} + +// 同意 +export function agreeCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/agree', + method: 'post', + data, + }) +} + +// 拒绝 +export function refuseCert(data: ICertApprove) { + return request({ + url: '/business/certificatePrint/refuse', + method: 'post', + data, + }) +} + +// 证书导出 +export function exportCert(data: ICertExport) { + return request({ + url: '/business/certificatePrint/export', + method: 'post', + data, + }) +} diff --git a/src/api/device/borrow.ts b/src/api/device/borrow.ts index c30f801..c5e1f79 100644 --- a/src/api/device/borrow.ts +++ b/src/api/device/borrow.ts @@ -1,8 +1,9 @@ // 设备借用相关接口api import request from '../index' -import type{ searchType } from '@/views/device/borrow/borrow-interface' +import type{ IlistQuery } from '@/views/device/borrow/borrow' + // 设备借用申请列表 -export function getApplyList(data: searchType) { +export function getApplyList(data: IlistQuery) { return request({ url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -69,7 +70,7 @@ }) } // 设备借用申请导出 -export function exportApply(data: object) { +export function exportApply(data: IlistQuery) { return request({ url: '/equipmentApply/exportList', method: 'post', diff --git a/src/api/device/stateManage.ts b/src/api/device/stateManage.ts index 85334a4..5bbaa24 100644 --- a/src/api/device/stateManage.ts +++ b/src/api/device/stateManage.ts @@ -1,7 +1,9 @@ // 状态管理相关接口api import request from '../index' +import type { ISearchQuery, ITableRow, Iapprove } from '@/views/device/stateManage/components/status-interface.ts' + // 设备申请列表 -export function getStatusList(data: any) { +export function getStatusList(data: ISearchQuery) { return request({ url: `/meter/stateManage/stateManageList?limit=${data.limit}&offset=${data.offset}`, method: 'post', @@ -9,7 +11,7 @@ }) } // 状态管理新建 -export function addStatus(data: object) { +export function addStatus(data: ITableRow) { return request({ url: '/meter/stateManage/addStateManageInfo', method: 'post', @@ -18,7 +20,7 @@ } // 状态管理编辑 -export function updateStatus(data: object) { +export function updateStatus(data: ITableRow) { return request({ url: '/meter/stateManage/updateStateManageInfo', method: 'post', @@ -27,7 +29,7 @@ } // 状态管理删除 -export function deleteStatus(data: object) { +export function deleteStatus(data: Iapprove) { return request({ url: '/meter/stateManage/deleteStateManageList', method: 'post', @@ -35,7 +37,7 @@ }) } // 状态管理取消 -export function cancelStatus(data: object) { +export function cancelStatus(data: Iapprove) { return request({ url: '/approval/operate/revoke', method: 'post', @@ -43,7 +45,7 @@ }) } // 状态管理提交 -export function submitStatus(data: object) { +export function submitStatus(data: Iapprove) { return request({ url: '/meter/stateManage/submitStandardEquipmentApply', method: 'post', @@ -51,7 +53,7 @@ }) } // 状态管理详情 -export function detailStatus(data: object) { +export function detailStatus(data: ITableRow) { return request({ url: '/meter/stateManage/selectStateManageInfo', method: 'post', diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index fb6758e..2fe1125 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -530,7 +530,7 @@ redirect: '/device/borrow/borrowapply', name: 'Borrow', meta: { - title: '设备领用', + title: '设备借用', icon: 'ep:key', auth: '/device/borrow', }, @@ -555,6 +555,18 @@ auth: '/device/borrow/borrowhandle', }, }, + { + path: 'borrowDetail', + name: 'borrowListDetail', + component: () => import('@/views/device/borrow/editHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/borrow/borrowhandle', + }, + }, ], }, diff --git a/src/views/business/schedule/certPrint/cert-interface.ts b/src/views/business/schedule/certPrint/cert-interface.ts index df0ba5c..4f274f3 100644 --- a/src/views/business/schedule/certPrint/cert-interface.ts +++ b/src/views/business/schedule/certPrint/cert-interface.ts @@ -37,6 +37,8 @@ createTime: string // 生成时间 approvalStatus?: string // 审批状态 approvalStatusName?: string // 审批状态 + taskId?: string // 任务id + id: string // 主键 } // 证书详情 @@ -84,3 +86,24 @@ mesureContent: string // 检定项目 remark: string // 备注 } + +// 证书导出 +export interface ICertExport { + orderId: number + reason: string + sampleId: number + status: string +} + +// 证书同意/拒绝 +export interface ICertApprove { + comments: number + id?: string + taskId: string +} + +// 证书发起 +export interface ICertInitiate { + formId: number + id: string +} diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue index c6e9db4..21b7a5f 100644 --- a/src/views/business/schedule/certPrint/certList.vue +++ b/src/views/business/schedule/certPrint/certList.vue @@ -5,13 +5,17 @@ import { ElLoading, ElMessage } from 'element-plus' import type { ICerPrintList, ICertPrintSearch } from './cert-interface' import DistributeDialog from './components/distributeDialog.vue' +import ApprovalDialogPart from './components/ApprovalDialogPart.vue' import BarCodeBind from '@/components/BarCodeBind/index.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { getDictByCode } from '@/api/system/dict' import { exportTaskList, getTaskList } from '@/api/business/task' +import { exportCert, getCertList, submitApproval } from '@/api/business/cert' +import { SCHEDULE } from '@/utils/scheduleDict' import type { dictType } from '@/global' + const { proxy } = getCurrentInstance() as any const $router = useRouter() // 右上角按钮 @@ -37,6 +41,7 @@ offset: 1, limit: 20, }) +const approvalDialogPart = ref() // 审批组件 // --------------获取所需字典值---------------- const certificationClassList = ref([]) // 样品属性列表 function getDict() { @@ -49,16 +54,16 @@ // 表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, - { text: '证书名称', value: 'certificationReportName', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', width: '110', align: 'center' }, + { text: '证书名称', value: 'certificationReportName', width: '120', align: 'center' }, { text: '样品编号', value: 'sampleNo', width: '110', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, - { text: '委托书编号', value: 'orderNo', align: 'center' }, - { text: '检校类别', value: 'customerNo', align: 'center' }, - { text: '检定人员', value: 'customerName', align: 'center' }, - { text: '证书类型', value: 'certificateReportTypeName', align: 'center' }, + { text: '型号', value: 'sampleModel', width: '120', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', width: '120', align: 'center' }, + { text: '委托书编号', value: 'orderNo', width: '120', align: 'center' }, + { text: '检校类别', value: 'customerNo', width: '120', align: 'center' }, + { text: '检定人员', value: 'customerName', width: '120', align: 'center' }, + { text: '证书类型', value: 'certificateReportTypeName', width: '120', align: 'center' }, { text: '打印状态', value: '', align: 'center', width: '85px', filter: (row: ICerPrintList) => { return row.printNum == 0 ? '未打印' : `${row.printNum}次打印` } }, { text: '生成时间', value: 'createTime', align: 'center', width: '165px' }, ]) @@ -110,13 +115,12 @@ listQuery.value.offset = 1 } // 模拟数据 + loadingTable.value = false list.value = [ - { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, + { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123456', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '0', printStatusName: '未打印', certificateReportTypeName: '自检', approvalStatusName: '待审批', taskId: 100, id: 10 }, { certificationId: '1', certificationReportCode: '12345614', certificationReportName: '力学检定证书', orderId: '1', sampleNo: '1yp123457', sampleName: '压力表', sampleModel: 'xx', manufacturingNo: 'xx', orderNo: 'wtd123456', customerNo: 'kh123456', customerName: '北京无线电测量研究所', createTime: '2023-02-01 08:00:00', printNum: 0, printStatus: '1', printStatusName: '已打印', certificateReportTypeName: '自检', approvalStatusName: '待审批' }, ] - loadingTable.value = false - console.log(listQuery.value) - // getTaskList(listQuery.value).then((response) => { + // getCertList(listQuery.value).then((response) => { // list.value = response.data.rows // total.value = parseInt(response.data.total) // loadingTable.value = false @@ -146,6 +150,7 @@ offset: 1, limit: 20, } + fetchData(true) } // 点击详情 const handleDetail = (row: ICerPrintList) => { @@ -154,10 +159,21 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() -const handleDistribute = (row: ICerPrintList) => { +const handleDistribute = (row: ICerPrintList, status: string) => { + if (status === 'agree') { + approvalDialogPart.value.initDialog('agree', row.taskId) + } + else { + approvalDialogPart.value.initDialog('refuse', row.taskId, row.id) + } // distributeDialogRef.value.initDialog(row.orderId, row.sampleId) } +// 审批结束回调 +const approvalSuccess = () => { + fetchData(true) +} + // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 const changePage = (val: { size?: number; page?: number }) => { if (val && val.size) { @@ -195,6 +211,13 @@ loading.close() } +// 打印 +const bindLabel = () => { + // exportCert({orderId:row.orderId,reason:row.reason,sampleId:row.sampleId,status:row.status}).then(res=>{ + // console.log(res) + // }) +} + // 打印列表 function printList() { // 打印列 @@ -226,6 +249,7 @@ diff --git a/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue new file mode 100644 index 0000000..3d133c7 --- /dev/null +++ b/src/views/business/schedule/certPrint/components/ApprovalDialogPart.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/device/borrow/borrow-interface.ts b/src/views/device/borrow/borrow-interface.ts deleted file mode 100644 index 9fd6678..0000000 --- a/src/views/device/borrow/borrow-interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -// 设备借用申请查询参数类型 -export interface searchType { - applyName: string // 申请名称 - applyNo: string // 申请编号 - applyPerson: string // 申请人 - applyUnit: string // 申请单位 - approvalStatus?: string // 审批状态 - createUser?: string // 创建人 - processResult?: string // 处置结果 - applyType: string // 申请类型 - time?: string // 申请日期 - limit?: number - offset?: number - ids?: string[] - id: string - formId?: string -} -// 借用设备类型 -export interface borrowDeviceType { - createUser?: string // 当前用户id - equipmentId: string // 设备id - equipmentNo: string // 设备编号 - modelNo: string // 型号 - measureRange: string // 测量范围 - useDept: string // 使用部门 - usePerson: string // 使用人 - validDate: string // 有效日期 - approvalStatusName: string - applyName: string - edit?: boolean - equipmentName?: string - id?: string -} diff --git a/src/views/device/borrow/borrow.ts b/src/views/device/borrow/borrow.ts new file mode 100644 index 0000000..82880fc --- /dev/null +++ b/src/views/device/borrow/borrow.ts @@ -0,0 +1,126 @@ +// 设备借用申请筛选 +export interface IlistQuery { + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + startTime: string // 申请开始日期 + endTime: string // 申请结束日期 + approvalStatus: string // 审批状态 + equipmentApplyProcessResult?: string // 设备申请处理结果 4待借用 5已借用 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + formId: string + offset: number + limit: number +} + +// 设备借用申请表格 +export interface IlistType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +// 设备借用处理列表 +export interface IsolveListType { + id: string + applyNo: string // 申请编号 + applyName: string // 申请名称 + applyUnit: string // 申请部门 + applyPerson: string // 申请人 + time: string // 借用时间 + applyDesc: string // 申请说明 + approvalStatus: string // 审批状态 + processResult: string // 处置结果 + applyType: string // 申请类型 借用0 + createUser: string // 创建人 + taskId: string // 任务id + processId: string // 流程ID-查询审批记录时使用 +} + +export interface Iform { + company: string // 申请单位 + person: string // 申请人 + time: string // 申请时间 + state: string // 申请说明 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} + +// 设备借用申请查询参数类型 +export interface searchType { + applyName: string // 申请名称 + applyNo: string // 申请编号 + applyPerson: string // 申请人 + applyUnit: string // 申请单位 + approvalStatus?: string // 审批状态 + createUser?: string // 创建人 + processResult?: string // 处置结果 + applyType: string // 申请类型 + time?: string // 申请日期 + limit?: number + offset?: number + ids?: string[] + id: string + formId?: string +} +// 借用设备类型 +export interface borrowDeviceType { + createUser?: string // 当前用户id + equipmentId: string // 设备id + equipmentNo: string // 设备编号 + modelNo: string // 型号 + measureRange: string // 测量范围 + useDept: string // 使用部门 + usePerson: string // 使用人 + validDate: string // 有效日期 + approvalStatusName: string + applyName: string + edit?: boolean + equipmentName?: string + id?: string +} diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue index 2f7a26f..c0c2553 100644 --- a/src/views/device/borrow/borrowHandle.vue +++ b/src/views/device/borrow/borrowHandle.vue @@ -1,53 +1,472 @@ diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 1c13501..89e09ef 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -1,74 +1,612 @@ diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 0785ce9..cb69092 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -1,12 +1,12 @@ + + + + + + diff --git a/src/views/device/receive/receive.ts b/src/views/device/receive/receive.ts index d4ac6a6..dc2d9f9 100644 --- a/src/views/device/receive/receive.ts +++ b/src/views/device/receive/receive.ts @@ -26,6 +26,7 @@ time: string // 领用时间 applyDesc: string // 申请说明 approvalStatus: string // 审批状态 + approvalStatusName: string // 审批状态名称 processResult: string // 处置结果 applyType: string // 申请类型 领用0 createUser: string // 创建人 diff --git a/src/views/device/stateManage/components/selectDeviceDialog.vue b/src/views/device/stateManage/components/selectDeviceDialog.vue new file mode 100644 index 0000000..4e503c5 --- /dev/null +++ b/src/views/device/stateManage/components/selectDeviceDialog.vue @@ -0,0 +1,172 @@ + + + + + + diff --git a/src/views/device/stateManage/components/status-interface.ts b/src/views/device/stateManage/components/status-interface.ts index 0ef0e90..6f258bc 100644 --- a/src/views/device/stateManage/components/status-interface.ts +++ b/src/views/device/stateManage/components/status-interface.ts @@ -1,27 +1,78 @@ +// 设备状态管理搜索 + +export interface ISearchQuery { + applyNo: string // 申请编号 + applyStatus: string // 申请状态 + applyUnit: string // 申请单位 + approvalStatus: number // 审批状态 + createUser: string // 创建人 + equipmentName: string // 设备名称 + equipmentNo: string // 设备编号 + ids: [] // 选中设备数据 + limit: number + offset: number + applyType: string // 申请类型 + formId: string // 表单id +} + // 设备闲置申请表格行 -export interface TableRow { - applyNo: string - applyPerson: string - applyType: string - applyTypeName: string - applyUnit: string - approvalStatus: string - approvalStatusName: string - createTime: string - createUser: string - equipmentName: string - equipmentNo: string - fileList: string - id: number - isDel: number - managerState: string - managerStateName: string - modelNo: string - processId: string - processResult: string - remark: string +export interface ITableRow { + applyNo: string // 申请编号 + applyPerson: string // 申请名称 + applyType: string // 申请类型 + applyTypeName: string // 申请类型名称 + applyUnit: string // 申请部门 + approvalStatus: string // 申请状态码 + approvalStatusName: string // 申请状态名称 + createTime: string // 创建时间 + createUser: string // 创建人 + equipmentName: string // 设备名称 + equipmentNo: string // 设备编号 + fileList: string // 文件列表 + id: number // 主键id + isDel: number // 删除标记 + managerState: string // 管理状态 + managerStateName: string // 管理状态名称 + modelNo: string // 型号 + processId: string // 流程id + processResult: string // 流程结果 + remark: string // 备注 + taskId: string // 任务id + time: string // 时间 + updateTime: string // 修改时间 + version: string // 版本 +} + +// 删除/提交/取消 +export interface Iapprove { + id: string taskId: string - time: string - updateTime: string - version: string + formId?: string + processInstanceId?: string +} + +export interface IdeviceList { + id?: string + equipmentName: string // 仪器名称 + equipmentId: string // 设备ID + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 +} + +export interface IdeviceListQuery { + equipmentName: string // 仪器名称 + equipmentNo: string // 设备编号 + modelNo: string // 型号 + mesureRange: string // 测量范围 + useDeptName: string // 使用部门 + usePersonName: string // 使用人 + managerStateName: string // 管理状态 + validDate: string // 有效日期 + offset: number + limit: number } diff --git a/src/views/device/stateManage/components/templateAdd.vue b/src/views/device/stateManage/components/templateAdd.vue index 6c6ed79..2253668 100644 --- a/src/views/device/stateManage/components/templateAdd.vue +++ b/src/views/device/stateManage/components/templateAdd.vue @@ -2,7 +2,9 @@