diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ + + + + + + diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ + + + + + + diff --git a/src/views/business/schedule/task/task-interface.ts b/src/views/business/schedule/task/task-interface.ts index 25c5cf9..d58d87c 100644 --- a/src/views/business/schedule/task/task-interface.ts +++ b/src/views/business/schedule/task/task-interface.ts @@ -87,6 +87,7 @@ } // 检测流程节点 export interface IScheduleSet { + id?: string measurePersonId: string // 执行人 measurePerson: string // 执行人名称 measureSegmentId: string // 执行部门 diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ + + + + + + diff --git a/src/views/business/schedule/task/task-interface.ts b/src/views/business/schedule/task/task-interface.ts index 25c5cf9..d58d87c 100644 --- a/src/views/business/schedule/task/task-interface.ts +++ b/src/views/business/schedule/task/task-interface.ts @@ -87,6 +87,7 @@ } // 检测流程节点 export interface IScheduleSet { + id?: string measurePersonId: string // 执行人 measurePerson: string // 执行人名称 measureSegmentId: string // 执行部门 diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue index 7159350..3db238a 100644 --- a/src/views/business/schedule/task/taskEdit.vue +++ b/src/views/business/schedule/task/taskEdit.vue @@ -219,9 +219,6 @@ taskForm.value.measureContent = res.data.measureContent // 检定项目 taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程 taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程 - console.log('pppppp') - console.log(taskForm.value.measureProcessList) - // 改用一个接口获取 sampleForm.value = res.data }) diff --git a/src/api/business/schedule/task.ts b/src/api/business/schedule/task.ts index ebf033a..a1eb4e6 100644 --- a/src/api/business/schedule/task.ts +++ b/src/api/business/schedule/task.ts @@ -88,7 +88,7 @@ } // 分配 -export function allocate(data: { id: string; measurePersonId: string; requireCertifications: string }) { +export function allocate(data: any) { return request({ url: '/business/labExecutive/deptExecutive/allocate', method: 'post', @@ -141,27 +141,27 @@ } // 证书监控 -export function certificateMonitorsById(data: object) { +export function certificateMonitorsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateMonitorsById', + url: `/business/certificateReport/certificateMonitorsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定记录 -export function measureRecordsById(data: object) { +export function measureRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/customer/sample/measureRecordsById', + url: `/customer/sample/measureRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) } // 检定证书 -export function certificateRecordsById(data: object) { +export function certificateRecordsById(data: { offset: number; limit: number }) { return request({ - url: '/business/certificateReport/certificateRecordsById', + url: `/business/certificateReport/certificateRecordsById?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/components.d.ts b/src/components.d.ts index 9cf2b29..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -28,7 +28,6 @@ CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] - DeptSelectByName: typeof import('./components/DeptSelectByName/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] diff --git a/src/components/Sample/certificationMonitor.vue b/src/components/Sample/certificationMonitor.vue index 53e8373..8f4e411 100644 --- a/src/components/Sample/certificationMonitor.vue +++ b/src/components/Sample/certificationMonitor.vue @@ -19,15 +19,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationReportCode', align: 'center' }, + { text: '证书编号', value: 'certificationReportCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationReportName', align: 'center' }, { text: '证书类型', value: 'certificationReportCategoryName', align: 'center' }, { text: '证书状态', value: 'certificationState', align: 'center' }, - { text: '初次提交审核时间', value: 'text', align: 'center' }, - { text: '完成时间', value: 'text', align: 'center' }, + { text: '初次提交审核时间', value: 'text', align: 'center', width: '180' }, + { text: '完成时间', value: 'text', align: 'center', width: '180' }, { text: '退回次数', value: 'text', align: 'center' }, { text: '制作人', value: 'text', align: 'center' }, ]) @@ -42,23 +44,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] certificateMonitorsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index 0923ff5..332a97c 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -28,15 +28,17 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 表格表头 const columns = ref([ - { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书编号', value: 'certificationCode', align: 'center', width: '160' }, { text: '证书名称', value: 'certificationName', align: 'center' }, { text: '证书类型', value: 'certificationType', align: 'center' }, - { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, - { text: '证书有效期', value: 'expirationDate', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center', width: '120' }, + { text: '证书有效期', value: 'expirationDate', align: 'center', width: '120' }, ]) // 证书列表 @@ -45,22 +47,51 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true certificateRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/Sample/measureRecords.vue b/src/components/Sample/measureRecords.vue index b7b2dbc..34cd405 100644 --- a/src/components/Sample/measureRecords.vue +++ b/src/components/Sample/measureRecords.vue @@ -20,6 +20,8 @@ const searchQuery = ref({ sampleId: props.sampleId, customerId: props.customerId, + limit: 10, + offset: 1, }) // 检定记录 @@ -34,12 +36,12 @@ // 表格表头 const columns = ref([ - { text: '委托单编号', value: 'orderCode', align: 'center' }, - { text: '委托单日期', value: 'orderTime', align: 'center' }, - { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托单编号', value: 'orderCode', align: 'center', width: '160' }, + { text: '委托单日期', value: 'orderTime', align: 'center', width: '120' }, + { text: '委托方代码', value: 'customerCode', align: 'center', width: '160' }, { text: '委托方名称', value: 'customerName', align: 'center' }, { text: '送检人', value: 'deliverer', align: 'center' }, - { text: '送检日期', value: 'deliverTime', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center', width: '120' }, ]) // 证书列表 @@ -48,19 +50,52 @@ // 加载状态 const loading = ref(false) // 查找证书状态及列表 -function fetchData() { +function fetchData(isNowPage = false) { + if (!isNowPage) { + // 是否显示当前页,否则跳转第一页 + searchQuery.value.offset = 1 + } loading.value = true list.value = [] measureRecordsById({ ...searchQuery.value }).then((res) => { list.value = res.data.rows + total.value = parseInt(res.data.total) }) loading.value = false } fetchData() + +// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 +const changePage = (val: { size?: number; page?: number }) => { + if (val && val.size) { + searchQuery.value.limit = val.size + } + if (val && val.page) { + searchQuery.value.offset = val.page + } + fetchData(true) +} diff --git a/src/components/dialog/selectStaffDialog.vue b/src/components/dialog/selectStaffDialog.vue index 7fa8782..7f578d7 100644 --- a/src/components/dialog/selectStaffDialog.vue +++ b/src/components/dialog/selectStaffDialog.vue @@ -72,14 +72,6 @@ const closeDialog = () => { emits('update:visible', false) } -const visibleDialog = computed({ - get() { - return props.visible - }, - set() { - closeDialog() - }, -}) watch(() => props.visible, (val) => { // 清除上次选中 @@ -122,6 +114,8 @@ loading.value = true // list.value = [] getStaffList(listQuery).then((res) => { + console.log('000000', res.data.records) + list.value = res.data.records.filter((item: any) => { if (props.deptName) { return item.deptId === props.deptName @@ -130,14 +124,20 @@ return item } }) - console.log(props.deptName) - console.log(props.deptId) - console.log(list.value) total.value = parseInt(res.data.total) loading.value = false + console.log('11111', list.value) }) } - +const visibleDialog = computed({ + get() { + fetchData(true) + return props.visible + }, + set() { + closeDialog() + }, +}) // 多选 const multiSelect = (val: any) => { multipleTable.value = val @@ -204,28 +204,28 @@ > diff --git a/src/views/business/lab/deptMeasure/deptMeasureList.vue b/src/views/business/lab/deptMeasure/deptMeasureList.vue index 37ac73f..6b87bfd 100644 --- a/src/views/business/lab/deptMeasure/deptMeasureList.vue +++ b/src/views/business/lab/deptMeasure/deptMeasureList.vue @@ -61,17 +61,17 @@ // 表头 const columns = ref([ - { text: '样品编号', value: 'sampleNo', width: '180', align: 'center' }, + { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, { text: '样品名称', value: 'sampleName', width: '120', align: 'center' }, - { text: '型号', value: 'sampleModel', align: 'center', width: '100' }, - { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '100' }, - { text: '委托书编号', value: 'orderNo', align: 'center', width: '180' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '委托书编号', value: 'orderNo', align: 'center', width: '160' }, { text: '委托方代码', value: 'customerNo', align: 'center', width: '180' }, - { text: '委托方名称', value: 'customerName', align: 'center', width: '100' }, - { text: '是否加急', value: 'isUrgentName', align: 'center', width: '100', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '是否加急', value: 'isUrgentName', align: 'center', width: '90', styleFilter: (row: ITaskList) => { return row.isUrgentName == '是' ? 'color: red' : '' } }, { text: '应检完时间', value: 'requireOverTime', align: 'center', width: '180' }, { text: '样品属性', value: 'sampleBelongName', align: 'center', width: '100' }, - { text: '当前检定环节', value: 'currentSegment', align: 'center', width: '120' }, + { text: '当前检定环节', value: 'currentSegment', align: 'center' }, // { text: '证书出具', value: 'certificationState', align: 'center', filter: (row: ITaskList) => { return `${row.currentCertifications}/${row.requireCertifications}` } }, ]) // 表格数据 @@ -137,7 +137,7 @@ // 点击分发, 弹窗 const distributeDialogRef = ref() const handleDistribute = (row: ITaskList) => { - distributeDialogRef.value.initDialog(row.orderId, row.sampleId, row.sampleStatus) + distributeDialogRef.value.initDialog(row.orderId, row.sampleId, 'dispatch', true) } // 点击标签绑定 const barCodeBind = ref() diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue index c9b7843..1baeaa3 100644 --- a/src/views/business/lab/primitiveLog/primitveLogAdd.vue +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -186,8 +186,8 @@ 'businessOrder.orderCode': [{ required: true, message: '委托书编号不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerNo': [{ required: true, message: '委托方代码不能为空', trigger: ['blur', 'change'] }], 'businessOrder.customerName': [{ required: true, message: '委托方名称不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], - 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerPhone': [{ required: true, message: '委托方电话不能为空', trigger: ['blur', 'change'] }], + // 'businessOrder.customerAddress': [{ required: true, message: '委托方地址不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleNo': [{ required: true, message: '样品编号不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.sampleName': [{ required: true, message: '样品名称不能为空', trigger: ['blur', 'change'] }], 'customerSampleInfo.manufacturingNo': [{ required: true, message: '出厂编号不能为空', trigger: ['blur', 'change'] }], diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index c3c876d..059e30b 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,7 +1,7 @@ + + + + + + diff --git a/src/views/business/schedule/task/task-interface.ts b/src/views/business/schedule/task/task-interface.ts index 25c5cf9..d58d87c 100644 --- a/src/views/business/schedule/task/task-interface.ts +++ b/src/views/business/schedule/task/task-interface.ts @@ -87,6 +87,7 @@ } // 检测流程节点 export interface IScheduleSet { + id?: string measurePersonId: string // 执行人 measurePerson: string // 执行人名称 measureSegmentId: string // 执行部门 diff --git a/src/views/business/schedule/task/taskEdit.vue b/src/views/business/schedule/task/taskEdit.vue index 7159350..3db238a 100644 --- a/src/views/business/schedule/task/taskEdit.vue +++ b/src/views/business/schedule/task/taskEdit.vue @@ -219,9 +219,6 @@ taskForm.value.measureContent = res.data.measureContent // 检定项目 taskForm.value.measureProcessList = res.data.measureProcessList // 检定流程 taskForm.value.measureSendBackList = res.data.measureSendBackList // 退回流程 - console.log('pppppp') - console.log(taskForm.value.measureProcessList) - // 改用一个接口获取 sampleForm.value = res.data }) diff --git a/src/views/measure/train/planAdd.vue b/src/views/measure/train/planAdd.vue index 20b2c4f..e8b4a37 100644 --- a/src/views/measure/train/planAdd.vue +++ b/src/views/measure/train/planAdd.vue @@ -463,10 +463,10 @@