diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - + 关闭 diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - + 关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index 20f5e31..c3c876d 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -505,8 +505,8 @@ } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { - formInline.value.signId = val.id // 电子签章id - formInline.value.signName = val.signName || '' // 电子签章名称 + formInline.value.signId = val[0].id // 电子签章id + formInline.value.signName = val[0].signName || '' // 电子签章名称 } // --------------------------------------选择认可标志专用章----------------------------------- @@ -518,8 +518,20 @@ } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { - formInline.value.approvalSignId = val.id // 认可标志专用章id - formInline.value.approvalSignName = val.signName || '' // 认可标志专用章名称 + let ids = '' // id + let names = '' // 名字 + val.forEach((item: any, index: number) => { + if (index === 0) { + ids = ids + item.id + names = names + item.signName + } + else { + ids = `${ids},${item.id}` + names = `${names},${item.signName}` + } + }) + formInline.value.approvalSignId = ids // 认可标志专用章id + formInline.value.approvalSignName = names // 认可标志专用章名称 } // -------------------------------------------底部------------------------------------------- @@ -637,7 +649,7 @@ v-model.trim="formInline.templateName" :placeholder="pageType === 'detail' ? '' : '请选择证书报告模板'" class="full-width-input" - :disabled="pageType === 'detail'" + disabled > diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index 20f5e31..c3c876d 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -505,8 +505,8 @@ } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { - formInline.value.signId = val.id // 电子签章id - formInline.value.signName = val.signName || '' // 电子签章名称 + formInline.value.signId = val[0].id // 电子签章id + formInline.value.signName = val[0].signName || '' // 电子签章名称 } // --------------------------------------选择认可标志专用章----------------------------------- @@ -518,8 +518,20 @@ } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { - formInline.value.approvalSignId = val.id // 认可标志专用章id - formInline.value.approvalSignName = val.signName || '' // 认可标志专用章名称 + let ids = '' // id + let names = '' // 名字 + val.forEach((item: any, index: number) => { + if (index === 0) { + ids = ids + item.id + names = names + item.signName + } + else { + ids = `${ids},${item.id}` + names = `${names},${item.signName}` + } + }) + formInline.value.approvalSignId = ids // 认可标志专用章id + formInline.value.approvalSignName = names // 认可标志专用章名称 } // -------------------------------------------底部------------------------------------------- @@ -637,7 +649,7 @@ v-model.trim="formInline.templateName" :placeholder="pageType === 'detail' ? '' : '请选择证书报告模板'" class="full-width-input" - :disabled="pageType === 'detail'" + disabled > diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index 20f5e31..c3c876d 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -505,8 +505,8 @@ } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { - formInline.value.signId = val.id // 电子签章id - formInline.value.signName = val.signName || '' // 电子签章名称 + formInline.value.signId = val[0].id // 电子签章id + formInline.value.signName = val[0].signName || '' // 电子签章名称 } // --------------------------------------选择认可标志专用章----------------------------------- @@ -518,8 +518,20 @@ } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { - formInline.value.approvalSignId = val.id // 认可标志专用章id - formInline.value.approvalSignName = val.signName || '' // 认可标志专用章名称 + let ids = '' // id + let names = '' // 名字 + val.forEach((item: any, index: number) => { + if (index === 0) { + ids = ids + item.id + names = names + item.signName + } + else { + ids = `${ids},${item.id}` + names = `${names},${item.signName}` + } + }) + formInline.value.approvalSignId = ids // 认可标志专用章id + formInline.value.approvalSignName = names // 认可标志专用章名称 } // -------------------------------------------底部------------------------------------------- @@ -637,7 +649,7 @@ v-model.trim="formInline.templateName" :placeholder="pageType === 'detail' ? '' : '请选择证书报告模板'" class="full-width-input" - :disabled="pageType === 'detail'" + disabled > diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index 20f5e31..c3c876d 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -505,8 +505,8 @@ } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { - formInline.value.signId = val.id // 电子签章id - formInline.value.signName = val.signName || '' // 电子签章名称 + formInline.value.signId = val[0].id // 电子签章id + formInline.value.signName = val[0].signName || '' // 电子签章名称 } // --------------------------------------选择认可标志专用章----------------------------------- @@ -518,8 +518,20 @@ } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { - formInline.value.approvalSignId = val.id // 认可标志专用章id - formInline.value.approvalSignName = val.signName || '' // 认可标志专用章名称 + let ids = '' // id + let names = '' // 名字 + val.forEach((item: any, index: number) => { + if (index === 0) { + ids = ids + item.id + names = names + item.signName + } + else { + ids = `${ids},${item.id}` + names = `${names},${item.signName}` + } + }) + formInline.value.approvalSignId = ids // 认可标志专用章id + formInline.value.approvalSignName = names // 认可标志专用章名称 } // -------------------------------------------底部------------------------------------------- @@ -637,7 +649,7 @@ v-model.trim="formInline.templateName" :placeholder="pageType === 'detail' ? '' : '请选择证书报告模板'" class="full-width-input" - :disabled="pageType === 'detail'" + disabled > diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index 20f5e31..c3c876d 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -505,8 +505,8 @@ } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { - formInline.value.signId = val.id // 电子签章id - formInline.value.signName = val.signName || '' // 电子签章名称 + formInline.value.signId = val[0].id // 电子签章id + formInline.value.signName = val[0].signName || '' // 电子签章名称 } // --------------------------------------选择认可标志专用章----------------------------------- @@ -518,8 +518,20 @@ } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { - formInline.value.approvalSignId = val.id // 认可标志专用章id - formInline.value.approvalSignName = val.signName || '' // 认可标志专用章名称 + let ids = '' // id + let names = '' // 名字 + val.forEach((item: any, index: number) => { + if (index === 0) { + ids = ids + item.id + names = names + item.signName + } + else { + ids = `${ids},${item.id}` + names = `${names},${item.signName}` + } + }) + formInline.value.approvalSignId = ids // 认可标志专用章id + formInline.value.approvalSignName = names // 认可标志专用章名称 } // -------------------------------------------底部------------------------------------------- @@ -637,7 +649,7 @@ v-model.trim="formInline.templateName" :placeholder="pageType === 'detail' ? '' : '请选择证书报告模板'" class="full-width-input" - :disabled="pageType === 'detail'" + disabled > diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts index 2060cbe..d2b2d53 100644 --- a/src/api/business/schedule/order.ts +++ b/src/api/business/schedule/order.ts @@ -70,7 +70,7 @@ } // 选择样品列表 -export function getOrderSampleList(data: { customerId: string; customerNo: string; orderId: string }) { +export function getOrderSampleList(data: { customerId?: string; customerNo: string; orderId?: string }) { return request({ url: '/customer/sample/listPageByOrder', method: 'post', diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts index b53e1c0..cf8d998 100644 --- a/src/api/business/subpackage/apply.ts +++ b/src/api/business/subpackage/apply.ts @@ -86,9 +86,9 @@ } // 分包页面 申请审批通过列表 -export function listPageOutsourceProject(data: object) { +export function OutsourceProjectPassList(data: { offset: number; limit: number }) { return request({ - url: '/business/outsourceProject/apply/listPage', + url: `/business/outsourceProject/apply/listPage?offset=${data.offset}&limit=${data.limit}`, method: 'post', data, }) diff --git a/src/api/business/subpackage/record.ts b/src/api/business/subpackage/record.ts index 10cba6f..6042716 100644 --- a/src/api/business/subpackage/record.ts +++ b/src/api/business/subpackage/record.ts @@ -76,3 +76,13 @@ data, }) } + +// 审批通过列表 +export function getListApprovePass(data: Object) { + return request({ + url: `/business/outsourceProject/check/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts index 588b99b..ba9fa40 100644 --- a/src/api/system/tool.ts +++ b/src/api/system/tool.ts @@ -133,6 +133,15 @@ }) } +// 更改状态为不可打印 +export function changePrintStatus(data: { id: string }) { + return request({ + url: '/business/certificatePrint/noPrintable', + method: 'post', + data, + }) +} + export function getPdfStream(fileName: string) { return request({ url: `/minio/file/download/stream?fileName=${fileName}`, diff --git a/src/utils/buttonPerm.ts b/src/utils/buttonPerm.ts index a71d150..e7a19c0 100644 --- a/src/utils/buttonPerm.ts +++ b/src/utils/buttonPerm.ts @@ -42,15 +42,21 @@ }, }, submit: { + // if: (row: any, permPath: string) => { + // permPath ? console.log(permPath) : '' + // return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + // }, + // 已取消的提交先不要 if: (row: any, permPath: string) => { permPath ? console.log(permPath) : '' - return row.approvalStatusName === '草稿箱' || row.approvalStatusName === '已取消' + return row.approvalStatusName === '草稿箱' }, }, cancel: { if: (row: any, permPath: string) => { error(permPath) - return hasPermission(permPath) && row.approvalStatusName === '审批中' + // return hasPermission(permPath) && row.approvalStatusName === '审批中' + return false }, disabled: (row: any) => { return row.approvalStatusName !== '审批中' diff --git a/src/utils/printUtils.ts b/src/utils/printUtils.ts index 8c71409..7e3059c 100644 --- a/src/utils/printUtils.ts +++ b/src/utils/printUtils.ts @@ -51,3 +51,19 @@ style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 }) } + +/** + * 打印pdf + * @param pdfUrl + * @param header + * @param style + */ +export function printPdf(pdfUrl: string, header?: string, style?: string) { + printJS({ + printable: pdfUrl, // 标签元素id + type: 'pdf', // 打印类型 + header: `

${header}

`, // '标题', + targetStyles: ['*'], // 默认情况下,库仅在打印 HTML 元素时处理某些样式。此选项允许您传递要处理的样式数组。例如:[‘padding-top’, ‘border-bottom’] + style: style || '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾 + }) +} diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index e0570fa..59f4248 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -3,6 +3,7 @@ import { getCurrentInstance, ref } from 'vue' import type { Ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' +import dayjs from 'dayjs' import type { IList, IListQuery, dictType } from './equipmentReminder-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import { getDictByCode } from '@/api/system/dict' @@ -41,7 +42,7 @@ { text: '管理状态', value: 'managerStateName', align: 'center', width: '100' }, { text: '使用部门', value: 'useDeptName', align: 'center' }, { text: '使用人', value: 'usePersonName', align: 'center' }, - { text: '有效日期', value: 'validDate', align: 'center', width: '165' }, + { text: '有效日期', value: 'validDate', align: 'center', width: '120' }, { text: '备注', value: 'remark', align: 'center' }, ]) // 表格数据 @@ -81,7 +82,12 @@ listQuery.value.offset = 1 } getEquipmentReminderList(listQuery.value).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: { validDate: string }) => { + return { + ...item, + validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : item.validDate, + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }) diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue index 87b7dd7..4fff614 100644 --- a/src/views/business/fieldTest/approve/edit.vue +++ b/src/views/business/fieldTest/approve/edit.vue @@ -78,12 +78,12 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }], taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }], preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], executiveAddress: [{ required: true, message: '要求现场测试、校准或检定地点不能为空', trigger: ['blur', 'change'] }], hazardSourceAndPreventionMethod: [{ required: true, message: '要求主要危害源及预防措施不能为空', trigger: ['blur', 'change'] }], @@ -495,9 +495,9 @@ 保存 - +
关闭 diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue index 0352604..6fb186f 100644 --- a/src/views/business/fieldTest/record/edit.vue +++ b/src/views/business/fieldTest/record/edit.vue @@ -243,7 +243,7 @@ 保存 - diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index 1d18ab6..a541f22 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -6,7 +6,12 @@ import { getDictByCode } from '@/api/system/dict' import type { typeofSign } from '@/views/system/tool/tool_interface' import { listPageApi } from '@/api/system/tool' - +const props = defineProps({ + isMulti: { + type: Boolean, + default: false, + }, +}) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 // 查询参数 @@ -82,7 +87,7 @@ ElMessage.warning('请选中') } else { - emits('add', checkoutList.value[0]) + emits('add', checkoutList.value) dialogFormVisible.value = false } } @@ -131,7 +136,7 @@ :query="searchQuery" is-showmulti-select :list-loading="loadingTable" - :is-multi="false" + :is-multi="props.isMulti" :page-sizes="[5]" @change="changePage" @multi-select="handleSelectionChange" diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index 20f5e31..c3c876d 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -505,8 +505,8 @@ } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { - formInline.value.signId = val.id // 电子签章id - formInline.value.signName = val.signName || '' // 电子签章名称 + formInline.value.signId = val[0].id // 电子签章id + formInline.value.signName = val[0].signName || '' // 电子签章名称 } // --------------------------------------选择认可标志专用章----------------------------------- @@ -518,8 +518,20 @@ } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { - formInline.value.approvalSignId = val.id // 认可标志专用章id - formInline.value.approvalSignName = val.signName || '' // 认可标志专用章名称 + let ids = '' // id + let names = '' // 名字 + val.forEach((item: any, index: number) => { + if (index === 0) { + ids = ids + item.id + names = names + item.signName + } + else { + ids = `${ids},${item.id}` + names = `${names},${item.signName}` + } + }) + formInline.value.approvalSignId = ids // 认可标志专用章id + formInline.value.approvalSignName = names // 认可标志专用章名称 } // -------------------------------------------底部------------------------------------------- @@ -637,7 +649,7 @@ v-model.trim="formInline.templateName" :placeholder="pageType === 'detail' ? '' : '请选择证书报告模板'" class="full-width-input" - :disabled="pageType === 'detail'" + disabled > diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@ + + + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index 34f15a0..923aac4 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -82,7 +82,7 @@ customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + requireOverTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 diff --git a/src/views/business/schedule/order/orderList.vue b/src/views/business/schedule/order/orderList.vue index e674b32..cf0b532 100644 --- a/src/views/business/schedule/order/orderList.vue +++ b/src/views/business/schedule/order/orderList.vue @@ -4,6 +4,7 @@ import { getCurrentInstance, ref } from 'vue' import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import type { IListQuery, IOrderList, dictType } from './orderList_interface' +import backReasonDialog from './components/backReasonDialog.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -32,6 +33,7 @@ }) const isUrgentMap = ref([]) // 是否加急 const statusMap = ref([]) // 接收状态 +const backReasonDialogRef = ref() // 退回弹出框ref const columns = ref([ { text: '委托书编号', value: 'orderCode', align: 'center', width: '180px' }, @@ -147,6 +149,11 @@ fetchData(true) } +// 退回成功 +const backSuccess = () => { + fetchData(true) +} + // 操作 const handleEdit = (row: IOrderList, type: string, title: string) => { ElMessageBox.confirm( @@ -166,10 +173,11 @@ }) } else if (type === 'back') { // 退回 - backOrder({ id: row.id }).then(() => { - ElMessage.success(`已${title}`) - fetchData(true) - }) + // backOrder({ id: row.id }).then(() => { + // ElMessage.success(`已${title}`) + // fetchData(true) + // }) + backReasonDialogRef.value.initDialog(row) } }) } @@ -393,6 +401,7 @@ + diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue index 6adab6f..cbf29a6 100644 --- a/src/views/business/subpackage/apply/edit.vue +++ b/src/views/business/subpackage/apply/edit.vue @@ -62,7 +62,7 @@ callback() } // 校验规则 -const formRules = ref({ +const formRules = ref({ projectName: [{ required: true, message: '要求分包项目名称不能为空', trigger: ['blur', 'change'] }], outsourcerNo: [{ required: true, message: '要求分包方编号不能为空', trigger: ['blur', 'change'] }], // outsourcerName: [{ required: true, message: '要求公司名称不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +71,7 @@ { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '预计费用只能为数字', trigger: ['blur', 'change'] }], preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }], // preEndTime: [{ required: true, message: '要求预计结束时间不能为空', trigger: ['blur', 'change'] }], - preEndTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], + preEndTime: [{ required: true, type: 'date', validator: requireOverTimeValid, trigger: 'change' }], }) const list = ref([])// 表格数据 diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts index 2ebbadd..aff651a 100644 --- a/src/views/business/subpackage/certificate/certificate-interface.ts +++ b/src/views/business/subpackage/certificate/certificate-interface.ts @@ -22,6 +22,7 @@ sampleModel: string // 型号 manufacturingNo: string // 出厂编号 createTime: string // 创建时间 + printFileName: string // pdf路径名 } // 详情表单 diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue index 64473b0..839bc53 100644 --- a/src/views/business/subpackage/certificate/components/selectSample.vue +++ b/src/views/business/subpackage/certificate/components/selectSample.vue @@ -5,7 +5,7 @@ import { ElMessage } from 'element-plus' import type { ISampleList } from '../../subpackage-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply' +import { OutsourceProjectPassList, detail, listPageBySubpackage } from '@/api/business/subpackage/apply' import { SCHEDULE } from '@/utils/scheduleDict' import type { IList } from '@/views/business/subpackage/apply/apply-interface' import { getSampleListByCertificate } from '@/api/business/subpackage/certificate' @@ -101,20 +101,15 @@ // 获取项目列表 async function fetchProjectList() { const params = { - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4已通过 - outsourcerId: props.outsourcerId || '', // 分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_APPLY, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: props.outsourcerId || '', // 分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, limit: 99999999, } // 模拟数据 - const response = await getListPage(params) + const response = await OutsourceProjectPassList(params) projectList.value = response.data.rows projectListOptions.value = response.data.rows } @@ -296,7 +291,7 @@ /> - + { - + getPhotoUrl(row.printFileName as string).then((res) => { + const url = res.data + printPdf(url) + }) } onMounted(async () => { @@ -256,9 +261,9 @@ 详情 - + diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue index 92d8bc6..4051d2e 100644 --- a/src/views/business/subpackage/record/edit.vue +++ b/src/views/business/subpackage/record/edit.vue @@ -17,7 +17,7 @@ import { detail } from '@/api/business/subpackage/approval' import { getListPage } from '@/api/business/subpackage/check' import { getcertificateList } from '@/api/business/subpackage/certificate' -import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record' +import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getListApprovePass, getPersonList } from '@/api/business/subpackage/record' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const pageType = ref('detail') // 页面类型: add, edit, detail @@ -139,13 +139,8 @@ const checkTotal = ref(0) // 项目记录 const certificateTotal = ref(0) // 证书记录total const checkListQuery = ref({ - applicantEndTime: '', // 开始时间 - applicantName: '', // 申请人名称 - applicantStartTime: '', // 结束时间 - approvalStatus: '4', // 申请状态 4 已通过 - outsourcerId: infoId.value || '', // 检测单位,分包方id formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id - outsourcerName: '', // 分包方名称 + outsourcerId: infoId.value || '', // 检测单位,分包方id projectName: '', // 分包项目名称 projectNo: '', // 分包项目编号 offset: 1, @@ -161,7 +156,7 @@ offset: 1, limit: 20, }) -// 获取项目记录 +// 获取项目记录(分包验收通过列表) const fetchProjectRecords = function (isNowPage = false) { loadingTable.value = true if (!isNowPage) { @@ -169,7 +164,7 @@ checkListQuery.value.offset = 1 } // 模拟数据 - getListPage(checkListQuery.value).then((response) => { + getListApprovePass(checkListQuery.value).then((response) => { dataList.value.projectRecords = response.data.rows checkTotal.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/views/customer/advice/adviceEdit.vue b/src/views/customer/advice/adviceEdit.vue index 199dc55..2b252ae 100644 --- a/src/views/customer/advice/adviceEdit.vue +++ b/src/views/customer/advice/adviceEdit.vue @@ -300,18 +300,34 @@ - + 选择 - + --> + + + diff --git a/src/views/customer/customerInfo/customerEdit.vue b/src/views/customer/customerInfo/customerEdit.vue index ab8c08b..fcf9853 100644 --- a/src/views/customer/customerInfo/customerEdit.vue +++ b/src/views/customer/customerInfo/customerEdit.vue @@ -84,10 +84,10 @@ const invoiceFullAddress = ref([]) // 开票地址 const customerPersonList: Ref = ref([]) // 人员列表 const columns = ref([ - { text: '姓名', value: 'name', required: true }, - { text: '工作部门', value: 'department', required: false }, - { text: '职务', value: 'job', required: false }, - { text: '联系方式', value: 'phone', required: true, reg: validatePhone }, + { text: '姓名', value: 'name', required: true, align: 'center' }, + { text: '工作部门', value: 'department', required: false, align: 'center' }, + { text: '职务', value: 'job', required: false, align: 'center' }, + { text: '联系方式', value: 'phone', required: true, reg: validatePhone, align: 'center' }, ]) // 其他关联数据列表 @@ -143,10 +143,10 @@ { name: '客户人员', columns: [ - { text: '姓名', value: 'name' }, - { text: '工作部门', value: 'department' }, - { text: '职务', value: 'job' }, - { text: '联系方式', value: 'phone' }, + { text: '姓名', value: 'name', align: 'center' }, + { text: '工作部门', value: 'department', align: 'center' }, + { text: '职务', value: 'job', align: 'center' }, + { text: '联系方式', value: 'phone', align: 'center' }, ], pagination: false, list: 'personList', @@ -160,12 +160,12 @@ offset: 1, }, columns: [ - { text: '样品编号', value: 'sampleCode' }, - { text: '样品名称', value: 'sampleName' }, - { text: '型号', value: 'sampleModel' }, - { text: '出厂编号', value: 'manufacturingNo' }, - { text: '上次检定时间', value: 'mesureTime' }, - { text: '检定周期', value: 'mesurePeriod' }, + { text: '样品编号', value: 'sampleCode', align: 'center' }, + { text: '样品名称', value: 'sampleName', align: 'center' }, + { text: '型号', value: 'sampleModel', align: 'center' }, + { text: '出厂编号', value: 'manufacturingNo', align: 'center' }, + { text: '上次检定时间', value: 'mesureTime', align: 'center' }, + { text: '检定周期', value: 'mesurePeriod', align: 'center' }, ], pagination: true, list: 'sampleRecords', @@ -174,12 +174,12 @@ { name: '合同记录', columns: [ - { text: '合同编号', value: 'contractCode' }, - { text: '合同名称', value: 'contractName' }, - { text: '合同金额', value: 'contractPrice' }, - { text: '合同状态', value: 'contractStatus' }, - { text: '合同时间', value: 'contractTime' }, - { text: '负责人', value: 'aCompanyDutyman' }, + { text: '合同编号', value: 'contractCode', align: 'center' }, + { text: '合同名称', value: 'contractName', align: 'center' }, + { text: '合同金额', value: 'contractPrice', align: 'center' }, + { text: '合同状态', value: 'contractStatus', align: 'center' }, + { text: '合同时间', value: 'contractTime', align: 'center' }, + { text: '负责人', value: 'aCompanyDutyman', align: 'center' }, ], query: { id: '', @@ -193,12 +193,12 @@ { name: '检定记录', columns: [ - { text: '委托单编号', value: 'orderCode' }, - { text: '委托单日期', value: 'orderTime' }, - { text: '委托方代码', value: 'customerCode' }, - { text: '委托方名称', value: 'customerName' }, - { text: '送检人', value: 'deliverer' }, - { text: '送检日期', value: 'deliverTime' }, + { text: '委托单编号', value: 'orderCode', align: 'center' }, + { text: '委托单日期', value: 'orderTime', align: 'center' }, + { text: '委托方代码', value: 'customerCode', align: 'center' }, + { text: '委托方名称', value: 'customerName', align: 'center' }, + { text: '送检人', value: 'deliverer', align: 'center' }, + { text: '送检日期', value: 'deliverTime', align: 'center' }, ], query: { id: '', @@ -217,11 +217,11 @@ offset: 1, }, columns: [ - { text: '证书编号', value: 'certificationCode' }, - { text: '证书名称', value: 'certificationName' }, - { text: '证书类型', value: 'certificationType' }, - { text: '证书出具日期', value: 'effectiveDate' }, - { text: '证书有效期', value: 'expirationDate' }, + { text: '证书编号', value: 'certificationCode', align: 'center' }, + { text: '证书名称', value: 'certificationName', align: 'center' }, + { text: '证书类型', value: 'certificationType', align: 'center' }, + { text: '证书出具日期', value: 'effectiveDate', align: 'center' }, + { text: '证书有效期', value: 'expirationDate', align: 'center' }, ], list: 'certificationRecords', pagination: true, diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue index 83938f5..60d1454 100644 --- a/src/views/device/borrow/borrwoApply.vue +++ b/src/views/device/borrow/borrwoApply.vue @@ -62,7 +62,7 @@ edit: '/device/borrow/borrowapply/update', // 编辑 agree: '/device/borrow/borrowapply/agree', // 同意 reject: '/device/borrow/borrowapply/reject', // 驳回 - refuse: '/device/borrow/borrowapply/refuse', // 驳回 + refuse: '/device/borrow/borrowapply/refuse', // 拒绝 cancel: '/device/borrow/borrowapply/cancel', // 取消 delete: '/device/borrow/borrowapply/delete', // 删除 } diff --git a/src/views/device/borrow/editHandle.vue b/src/views/device/borrow/editHandle.vue index 4e0bc5c..1393463 100644 --- a/src/views/device/borrow/editHandle.vue +++ b/src/views/device/borrow/editHandle.vue @@ -204,9 +204,6 @@ /> - - - diff --git a/src/views/device/standingBook/components/templatePage.vue b/src/views/device/standingBook/components/templatePage.vue index e46753d..3c9e3e6 100644 --- a/src/views/device/standingBook/components/templatePage.vue +++ b/src/views/device/standingBook/components/templatePage.vue @@ -1,6 +1,7 @@