diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index abe6b8d..227585d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index abe6b8d..227585d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue new file mode 100644 index 0000000..14040a2 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index abe6b8d..227585d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue new file mode 100644 index 0000000..14040a2 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index abe6b8d..227585d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue new file mode 100644 index 0000000..14040a2 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/components/dialog/selectRoleDialog.vue b/src/components/dialog/selectRoleDialog.vue index 9a87d4b..cd478f1 100644 --- a/src/components/dialog/selectRoleDialog.vue +++ b/src/components/dialog/selectRoleDialog.vue @@ -24,7 +24,7 @@ const emits = defineEmits(['update:visible', 'change']) const table = ref()// 表格ref // 数据权限类型字典 -const dataScopeTypeDict = { +const dataScopeTypeDict: { [key: number ]: string } = { 1: '所有数据', 2: '所属及下属部门', 3: '本部门', diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index abe6b8d..227585d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue new file mode 100644 index 0000000..14040a2 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/components/dialog/selectRoleDialog.vue b/src/components/dialog/selectRoleDialog.vue index 9a87d4b..cd478f1 100644 --- a/src/components/dialog/selectRoleDialog.vue +++ b/src/components/dialog/selectRoleDialog.vue @@ -24,7 +24,7 @@ const emits = defineEmits(['update:visible', 'change']) const table = ref()// 表格ref // 数据权限类型字典 -const dataScopeTypeDict = { +const dataScopeTypeDict: { [key: number ]: string } = { 1: '所有数据', 2: '所属及下属部门', 3: '本部门', diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue index 97d7326..b64df84 100644 --- a/src/components/drawer/approverDrawer.vue +++ b/src/components/drawer/approverDrawer.vue @@ -4,7 +4,7 @@ import { ElMessage } from 'element-plus' import selectRoleDialog from '../dialog/selectRoleDialog.vue' import selectEmployeesDialog from '../dialog/selectEmployeesDialog.vue' -import $func from '@/plugins/preload.ts' +import $func from '@/plugins/preload' import type { IEmployees, IroleInfo } from '@/components/dialog/dialog' import useWorkFlowStore from '@/store/modules/workFlow' @@ -30,8 +30,8 @@ } const disabledVal = window.sessionStorage.getItem('maxLevel') // 上级主管层级 -const decisionItem = ref(1) // 可选决策项 -const noticeStarter = ref(1) // 审批结果通知发起人 +const decisionItem = ref() // 可选决策项 +const noticeStarter = ref() // 审批结果通知发起人 const visible = computed({ get() { @@ -41,7 +41,7 @@ closeDrawer() }, }) -watch(() => workFlowStore.approverConfig1, (val: any) => { +watch(() => workFlowStore.approverConfigValue, (val: any) => { approverConfig.value = val.value }) @@ -51,8 +51,8 @@ approverConfig.value.tempExamineMode = '' // 审批方式(会签、或签、逐级审批) approverConfig.value.examineMode = '' // 传参审批方式(会签、或签、逐级审批) approverConfig.value.noHanderAction = '' // 审批人为空时 - approverConfig.value.directorLevel = 1 // 主管 - approverConfig.value.examineEndDirectorLevel = 1 // 连续多级主管 + approverConfig.value.directorLevel = '' // 主管 + approverConfig.value.examineEndDirectorLevel = '' // 连续多级主管 } // 添加成员 const addApprover = () => { @@ -141,13 +141,31 @@ return } + console.log('pppppppp', decisionItem.value) + + if (!`${decisionItem.value}` || isNaN(decisionItem.value)) { + ElMessage({ + message: '请选择决策项', + type: 'warning', + }) + return + } + + if (!`${noticeStarter.value}` || isNaN(noticeStarter.value)) { + ElMessage({ + message: '请选择审批结果是否通知发起人', + type: 'warning', + }) + return + } + // 把审批设置反应在流程图里面 approverConfig.value.error = !$func.setApproverStr(approverConfig.value) // 保存设置 setApproverConfig({ value: approverConfig.value, flag: true, - id: workFlowStore.approverConfig1.id, + id: workFlowStore.approverConfigValue.id, }) emits('update:nodeConfig', approverConfig.value) closeDrawer() diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/order/order.ts b/src/api/business/order/order.ts deleted file mode 100644 index e69de29..0000000 --- a/src/api/business/order/order.ts +++ /dev/null diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/api/business/schedule/order.ts diff --git a/src/api/customer/bench.ts b/src/api/customer/bench.ts index 4809b3c..ca7d608 100644 --- a/src/api/customer/bench.ts +++ b/src/api/customer/bench.ts @@ -3,12 +3,12 @@ */ import request from '../index' // import type { ICustomerQuery } from '@/views/customer/customerInfo/customer_interface' -const prefix = '/meter' +const prefix = '/customer' // 样品新增趋势 export function getSampleAddData() { return request({ - url: `${prefix}/workbench/querySampleAddData`, + url: `${prefix}/workbench/sample/increaseTrend`, method: 'post', }) } @@ -16,15 +16,15 @@ // 样品到期趋势 export function getSampleExpireData() { return request({ - url: `${prefix}/workbench/querySampleExpireData`, + url: `${prefix}/workbench/sample/expireTrend`, method: 'post', }) } -// 样品到期趋势 +// 客户新增趋势 export function getCustomerExpireData() { return request({ - url: `${prefix}/workbench/queryCustomerAddData`, + url: `${prefix}/workbench/increaseTrend`, method: 'post', }) } @@ -32,7 +32,7 @@ // 优质客户名单 export function getHighQualityCustomerList() { return request({ - url: `${prefix}/workbench/gethighQualityCustomerList`, + url: `${prefix}/workbench/excellentList`, method: 'post', }) } diff --git a/src/api/customer/sampleList.ts b/src/api/customer/sampleList.ts index fb50c25..3ac7392 100644 --- a/src/api/customer/sampleList.ts +++ b/src/api/customer/sampleList.ts @@ -3,7 +3,7 @@ */ import request from '../index' import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface' -const prefix = '/meter' +const prefix = '/customer' // 列表查询 export function getSampleList(data: ISampleListQuery) { diff --git a/src/api/device/receive.ts b/src/api/device/receive.ts new file mode 100644 index 0000000..da7ac90 --- /dev/null +++ b/src/api/device/receive.ts @@ -0,0 +1,82 @@ +/** + * 设备领用接口 + */ +import request from '../index' +import type{ IlistQuery } from '@/views/device/receive/receive' +const prefix = '/equipmentApply' + +/** + * ----------------------------------设备领用申请---------------------------------- + */ + +// 列表 +export function getReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} + +// 列表导出 +export function exportReceiveApplyList(data: IlistQuery) { + return request({ + url: `${prefix}/exportList`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 列表删除 +export function delReceiveApplyList(data: { id: string; taskId: string }) { + return request({ + url: `${prefix}/deleteEquipmentApply`, + method: 'post', + data, + }) +} + +// 新建--点击保存 +export function saveAddReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/addEquipmentApply`, + method: 'post', + data, + }) +} +// 新建--提交 +export function submitReceiveApplyList(data: { formId: string; id: string }) { + return request({ + url: `${prefix}/submitEquipmentApply`, + method: 'post', + data, + }) +} + +// 编辑--保存 +export function saveEditReceiveApplyList(data: { applyUnit: string; applyPerson: string; time: string ;applyDesc: string; applyType: string; equipmentList: { equipmentId: string }[] }) { + return request({ + url: `${prefix}/updateEquipmentApply`, + method: 'post', + data, + }) +} + +// 详情 +export function getReceiveApplyListDetail(data: { id: string }) { + return request({ + url: `${prefix}/equipmentApplyInfo`, + method: 'post', + data, + }) +} + +// 领用-退领 +export function updateProcessResult(data: { id: string; processResult: string }) { + return request({ + url: `${prefix}/updateProcessResult`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index abe6b8d..227585d 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue new file mode 100644 index 0000000..14040a2 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -0,0 +1,115 @@ + + + + + + diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/components/dialog/selectRoleDialog.vue b/src/components/dialog/selectRoleDialog.vue index 9a87d4b..cd478f1 100644 --- a/src/components/dialog/selectRoleDialog.vue +++ b/src/components/dialog/selectRoleDialog.vue @@ -24,7 +24,7 @@ const emits = defineEmits(['update:visible', 'change']) const table = ref()// 表格ref // 数据权限类型字典 -const dataScopeTypeDict = { +const dataScopeTypeDict: { [key: number ]: string } = { 1: '所有数据', 2: '所属及下属部门', 3: '本部门', diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue index 97d7326..b64df84 100644 --- a/src/components/drawer/approverDrawer.vue +++ b/src/components/drawer/approverDrawer.vue @@ -4,7 +4,7 @@ import { ElMessage } from 'element-plus' import selectRoleDialog from '../dialog/selectRoleDialog.vue' import selectEmployeesDialog from '../dialog/selectEmployeesDialog.vue' -import $func from '@/plugins/preload.ts' +import $func from '@/plugins/preload' import type { IEmployees, IroleInfo } from '@/components/dialog/dialog' import useWorkFlowStore from '@/store/modules/workFlow' @@ -30,8 +30,8 @@ } const disabledVal = window.sessionStorage.getItem('maxLevel') // 上级主管层级 -const decisionItem = ref(1) // 可选决策项 -const noticeStarter = ref(1) // 审批结果通知发起人 +const decisionItem = ref() // 可选决策项 +const noticeStarter = ref() // 审批结果通知发起人 const visible = computed({ get() { @@ -41,7 +41,7 @@ closeDrawer() }, }) -watch(() => workFlowStore.approverConfig1, (val: any) => { +watch(() => workFlowStore.approverConfigValue, (val: any) => { approverConfig.value = val.value }) @@ -51,8 +51,8 @@ approverConfig.value.tempExamineMode = '' // 审批方式(会签、或签、逐级审批) approverConfig.value.examineMode = '' // 传参审批方式(会签、或签、逐级审批) approverConfig.value.noHanderAction = '' // 审批人为空时 - approverConfig.value.directorLevel = 1 // 主管 - approverConfig.value.examineEndDirectorLevel = 1 // 连续多级主管 + approverConfig.value.directorLevel = '' // 主管 + approverConfig.value.examineEndDirectorLevel = '' // 连续多级主管 } // 添加成员 const addApprover = () => { @@ -141,13 +141,31 @@ return } + console.log('pppppppp', decisionItem.value) + + if (!`${decisionItem.value}` || isNaN(decisionItem.value)) { + ElMessage({ + message: '请选择决策项', + type: 'warning', + }) + return + } + + if (!`${noticeStarter.value}` || isNaN(noticeStarter.value)) { + ElMessage({ + message: '请选择审批结果是否通知发起人', + type: 'warning', + }) + return + } + // 把审批设置反应在流程图里面 approverConfig.value.error = !$func.setApproverStr(approverConfig.value) // 保存设置 setApproverConfig({ value: approverConfig.value, flag: true, - id: workFlowStore.approverConfig1.id, + id: workFlowStore.approverConfigValue.id, }) emits('update:nodeConfig', approverConfig.value) closeDrawer() diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue index e93a591..3746fe7 100644 --- a/src/components/drawer/conditionDrawer.vue +++ b/src/components/drawer/conditionDrawer.vue @@ -1,27 +1,28 @@ - @@ -223,22 +160,12 @@
  • - {{ item.type === 1 ? '发起人' : item.showName }}:
    -

    {{ item.name }} - @@ -246,60 +173,6 @@ 清除

    - -
    -

    - - -

    -

    - - - {{ item.showName }} - - -

    -
    删除 删除
  • @@ -327,13 +200,14 @@ + -