diff --git a/src/api/business/manager/interchangeReceipt.ts b/src/api/business/manager/interchangeReceipt.ts index 20e6441..588d0c9 100644 --- a/src/api/business/manager/interchangeReceipt.ts +++ b/src/api/business/manager/interchangeReceipt.ts @@ -1,6 +1,6 @@ /** * 设备交接单 -*/ + */ import request from '../../index' import type { IListQuery } from '@/views/business/manager/interchangeReceipt/interchangeReceipt-interface' const prefix = '/business/interchange' @@ -61,7 +61,14 @@ } // 查询样品列表 -export function getSampleList(data: { customerId: string; customerName: string; sampleName: string; sampleNo: string; offset: number; limit: number }) { +export function getSampleList(data: { + customerId: string + customerName: string + sampleName: string + sampleNo: string + offset: number + limit: number +}) { return request({ url: `${prefix}/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -78,3 +85,22 @@ }) } +// 导出word/pdf/打印 +export function getStream(data: any) { + return request({ + url: '/business/interchange/exportFile', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 批量打印 +export function batchPrint(data: any) { + return request({ + url: '/business/interchange/batchPrint', + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/api/business/manager/interchangeReceipt.ts b/src/api/business/manager/interchangeReceipt.ts index 20e6441..588d0c9 100644 --- a/src/api/business/manager/interchangeReceipt.ts +++ b/src/api/business/manager/interchangeReceipt.ts @@ -1,6 +1,6 @@ /** * 设备交接单 -*/ + */ import request from '../../index' import type { IListQuery } from '@/views/business/manager/interchangeReceipt/interchangeReceipt-interface' const prefix = '/business/interchange' @@ -61,7 +61,14 @@ } // 查询样品列表 -export function getSampleList(data: { customerId: string; customerName: string; sampleName: string; sampleNo: string; offset: number; limit: number }) { +export function getSampleList(data: { + customerId: string + customerName: string + sampleName: string + sampleNo: string + offset: number + limit: number +}) { return request({ url: `${prefix}/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -78,3 +85,22 @@ }) } +// 导出word/pdf/打印 +export function getStream(data: any) { + return request({ + url: '/business/interchange/exportFile', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 批量打印 +export function batchPrint(data: any) { + return request({ + url: '/business/interchange/batchPrint', + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index eaf221c..de9e792 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -90,6 +90,7 @@ }) } +// 组织部门 export function getDept(params?: { deptId?: string }) { return request({ url: '/system/dept/listPage', @@ -97,3 +98,4 @@ params, }) } + diff --git a/src/api/business/manager/interchangeReceipt.ts b/src/api/business/manager/interchangeReceipt.ts index 20e6441..588d0c9 100644 --- a/src/api/business/manager/interchangeReceipt.ts +++ b/src/api/business/manager/interchangeReceipt.ts @@ -1,6 +1,6 @@ /** * 设备交接单 -*/ + */ import request from '../../index' import type { IListQuery } from '@/views/business/manager/interchangeReceipt/interchangeReceipt-interface' const prefix = '/business/interchange' @@ -61,7 +61,14 @@ } // 查询样品列表 -export function getSampleList(data: { customerId: string; customerName: string; sampleName: string; sampleNo: string; offset: number; limit: number }) { +export function getSampleList(data: { + customerId: string + customerName: string + sampleName: string + sampleNo: string + offset: number + limit: number +}) { return request({ url: `${prefix}/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -78,3 +85,22 @@ }) } +// 导出word/pdf/打印 +export function getStream(data: any) { + return request({ + url: '/business/interchange/exportFile', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 批量打印 +export function batchPrint(data: any) { + return request({ + url: '/business/interchange/batchPrint', + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index eaf221c..de9e792 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -90,6 +90,7 @@ }) } +// 组织部门 export function getDept(params?: { deptId?: string }) { return request({ url: '/system/dept/listPage', @@ -97,3 +98,4 @@ params, }) } + diff --git a/src/components.d.ts b/src/components.d.ts index 37a7e06..2461bf8 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -30,7 +30,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/NormalTable copy/index.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/api/business/manager/interchangeReceipt.ts b/src/api/business/manager/interchangeReceipt.ts index 20e6441..588d0c9 100644 --- a/src/api/business/manager/interchangeReceipt.ts +++ b/src/api/business/manager/interchangeReceipt.ts @@ -1,6 +1,6 @@ /** * 设备交接单 -*/ + */ import request from '../../index' import type { IListQuery } from '@/views/business/manager/interchangeReceipt/interchangeReceipt-interface' const prefix = '/business/interchange' @@ -61,7 +61,14 @@ } // 查询样品列表 -export function getSampleList(data: { customerId: string; customerName: string; sampleName: string; sampleNo: string; offset: number; limit: number }) { +export function getSampleList(data: { + customerId: string + customerName: string + sampleName: string + sampleNo: string + offset: number + limit: number +}) { return request({ url: `${prefix}/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -78,3 +85,22 @@ }) } +// 导出word/pdf/打印 +export function getStream(data: any) { + return request({ + url: '/business/interchange/exportFile', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 批量打印 +export function batchPrint(data: any) { + return request({ + url: '/business/interchange/batchPrint', + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index eaf221c..de9e792 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -90,6 +90,7 @@ }) } +// 组织部门 export function getDept(params?: { deptId?: string }) { return request({ url: '/system/dept/listPage', @@ -97,3 +98,4 @@ params, }) } + diff --git a/src/components.d.ts b/src/components.d.ts index 37a7e06..2461bf8 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -30,7 +30,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/NormalTable copy/index.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index a884b89..bd7042d 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -51,6 +51,10 @@ type: Boolean, default: false, }, + deptNotControlledByPermissions: { // 查询部门不熟当前用户的权限控制 + type: Boolean, + default: false, + }, }) const emit = defineEmits(['update:modelValue', 'change']) // ------------------------------定义props参数--------------------------------------------- @@ -106,11 +110,20 @@ }) } else { - getDeptTreeList().then((res) => { - const list = res.data - dictStore.setAllDeptList(list) - refreshList(list) - }) + if (props.deptNotControlledByPermissions) { // 无权限控制 + getDept().then((res) => { + const list = res.data + dictStore.setAllDeptList(list) + refreshList(list) + }) + } + else { + getDeptTreeList().then((res) => { + const list = res.data + dictStore.setAllDeptList(list) + refreshList(list) + }) + } } } else { // 如果指定了需要展示的部门类型 @@ -139,11 +152,20 @@ }) } else { - getDeptTreeList({ deptType: props.deptType }).then((res) => { - const list = res.data - dictStore.setAllCompanyList(list) - refreshList(list) - }) + if (props.deptNotControlledByPermissions) { // 无权限控制 + getDept().then((res) => { + const list = res.data + dictStore.setAllDeptList(list) + refreshList(list) + }) + } + else { + getDeptTreeList({ deptType: props.deptType }).then((res) => { + const list = res.data + dictStore.setAllCompanyList(list) + refreshList(list) + }) + } } } } diff --git a/src/api/business/manager/interchangeReceipt.ts b/src/api/business/manager/interchangeReceipt.ts index 20e6441..588d0c9 100644 --- a/src/api/business/manager/interchangeReceipt.ts +++ b/src/api/business/manager/interchangeReceipt.ts @@ -1,6 +1,6 @@ /** * 设备交接单 -*/ + */ import request from '../../index' import type { IListQuery } from '@/views/business/manager/interchangeReceipt/interchangeReceipt-interface' const prefix = '/business/interchange' @@ -61,7 +61,14 @@ } // 查询样品列表 -export function getSampleList(data: { customerId: string; customerName: string; sampleName: string; sampleNo: string; offset: number; limit: number }) { +export function getSampleList(data: { + customerId: string + customerName: string + sampleName: string + sampleNo: string + offset: number + limit: number +}) { return request({ url: `${prefix}/listPageByInterchange?offset=${data.offset}&limit=${data.limit}`, method: 'post', @@ -78,3 +85,22 @@ }) } +// 导出word/pdf/打印 +export function getStream(data: any) { + return request({ + url: '/business/interchange/exportFile', + method: 'post', + responseType: 'blob', + data, + }) +} + +// 批量打印 +export function batchPrint(data: any) { + return request({ + url: '/business/interchange/batchPrint', + method: 'post', + responseType: 'blob', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index eaf221c..de9e792 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -90,6 +90,7 @@ }) } +// 组织部门 export function getDept(params?: { deptId?: string }) { return request({ url: '/system/dept/listPage', @@ -97,3 +98,4 @@ params, }) } + diff --git a/src/components.d.ts b/src/components.d.ts index 37a7e06..2461bf8 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -30,7 +30,6 @@ CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - copy: typeof import('./components/NormalTable copy/index.vue')['default'] CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue index a884b89..bd7042d 100644 --- a/src/components/DeptSelect/index.vue +++ b/src/components/DeptSelect/index.vue @@ -51,6 +51,10 @@ type: Boolean, default: false, }, + deptNotControlledByPermissions: { // 查询部门不熟当前用户的权限控制 + type: Boolean, + default: false, + }, }) const emit = defineEmits(['update:modelValue', 'change']) // ------------------------------定义props参数--------------------------------------------- @@ -106,11 +110,20 @@ }) } else { - getDeptTreeList().then((res) => { - const list = res.data - dictStore.setAllDeptList(list) - refreshList(list) - }) + if (props.deptNotControlledByPermissions) { // 无权限控制 + getDept().then((res) => { + const list = res.data + dictStore.setAllDeptList(list) + refreshList(list) + }) + } + else { + getDeptTreeList().then((res) => { + const list = res.data + dictStore.setAllDeptList(list) + refreshList(list) + }) + } } } else { // 如果指定了需要展示的部门类型 @@ -139,11 +152,20 @@ }) } else { - getDeptTreeList({ deptType: props.deptType }).then((res) => { - const list = res.data - dictStore.setAllCompanyList(list) - refreshList(list) - }) + if (props.deptNotControlledByPermissions) { // 无权限控制 + getDept().then((res) => { + const list = res.data + dictStore.setAllDeptList(list) + refreshList(list) + }) + } + else { + getDeptTreeList({ deptType: props.deptType }).then((res) => { + const list = res.data + dictStore.setAllCompanyList(list) + refreshList(list) + }) + } } } } diff --git a/src/components/dialog/selectDeptTree.vue b/src/components/dialog/selectDeptTree.vue index 64cf1f3..24f6843 100644 --- a/src/components/dialog/selectDeptTree.vue +++ b/src/components/dialog/selectDeptTree.vue @@ -1,13 +1,23 @@