diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts
index 151081d..8b638f7 100644
--- a/src/api/business/schedule/order.ts
+++ b/src/api/business/schedule/order.ts
@@ -102,3 +102,13 @@
data,
})
}
+
+// 证书清单导出
+export function certExport(data: { id: string }) {
+ return request({
+ url: `${prefix}/order/cert/export`,
+ method: 'post',
+ responseType: 'blob',
+ data,
+ })
+}
diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts
index 151081d..8b638f7 100644
--- a/src/api/business/schedule/order.ts
+++ b/src/api/business/schedule/order.ts
@@ -102,3 +102,13 @@
data,
})
}
+
+// 证书清单导出
+export function certExport(data: { id: string }) {
+ return request({
+ url: `${prefix}/order/cert/export`,
+ method: 'post',
+ responseType: 'blob',
+ data,
+ })
+}
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index 94de1f2..7a5a771 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -496,29 +496,28 @@
}
// 获取详细信息
-const getInfo = () => {
+const getInfo = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- getDetail({ id: infoId.value }).then((res) => {
- form.value = res.data
- form.value.meterStaffList = res.data.meterStaffList.map((item: any) => {
- return {
- ...item,
- certificateDate: item.certificateDate ? dayjs(item.certificateDate).format('YYYY-MM-DD') : '',
- }
- }) // 现场测试、校准或检定人员
- form.value.equipmentInfoList = res.data.equipmentInfoList.map((item: any) => {
- return {
- ...item,
- validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
- }
- }) // 携带仪器设备
- form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
- form.value.applyPerson = user.id// 申请人
- form.value.applyPersonName = user.name // 申请人名字
- })
+ const res = await getDetail({ id: infoId.value })
+ form.value = res.data
+ form.value.meterStaffList = res.data.meterStaffList.map((item: any) => {
+ return {
+ ...item,
+ certificateDate: item.certificateDate ? dayjs(item.certificateDate).format('YYYY-MM-DD') : '',
+ }
+ }) // 现场测试、校准或检定人员
+ form.value.equipmentInfoList = res.data.equipmentInfoList.map((item: any) => {
+ return {
+ ...item,
+ validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
+ }
+ }) // 携带仪器设备
+ form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
+ form.value.applyPerson = user.id// 申请人
+ form.value.applyPersonName = user.name // 申请人名字
loading.close()
}
// 打印
@@ -537,7 +536,7 @@
decisionItem.value = $route.query.decisionItem as string // 同意、驳回、拒绝按钮权限
taskId.value = $route.query.taskId as string // 流程实例id
if (pageType.value !== 'add') {
- getInfo() // 获取详情
+ await getInfo() // 获取详情
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId)
}
@@ -898,9 +897,9 @@
-
+
增加行
diff --git a/src/api/business/schedule/order.ts b/src/api/business/schedule/order.ts
index 151081d..8b638f7 100644
--- a/src/api/business/schedule/order.ts
+++ b/src/api/business/schedule/order.ts
@@ -102,3 +102,13 @@
data,
})
}
+
+// 证书清单导出
+export function certExport(data: { id: string }) {
+ return request({
+ url: `${prefix}/order/cert/export`,
+ method: 'post',
+ responseType: 'blob',
+ data,
+ })
+}
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index 94de1f2..7a5a771 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -496,29 +496,28 @@
}
// 获取详细信息
-const getInfo = () => {
+const getInfo = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- getDetail({ id: infoId.value }).then((res) => {
- form.value = res.data
- form.value.meterStaffList = res.data.meterStaffList.map((item: any) => {
- return {
- ...item,
- certificateDate: item.certificateDate ? dayjs(item.certificateDate).format('YYYY-MM-DD') : '',
- }
- }) // 现场测试、校准或检定人员
- form.value.equipmentInfoList = res.data.equipmentInfoList.map((item: any) => {
- return {
- ...item,
- validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
- }
- }) // 携带仪器设备
- form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
- form.value.applyPerson = user.id// 申请人
- form.value.applyPersonName = user.name // 申请人名字
- })
+ const res = await getDetail({ id: infoId.value })
+ form.value = res.data
+ form.value.meterStaffList = res.data.meterStaffList.map((item: any) => {
+ return {
+ ...item,
+ certificateDate: item.certificateDate ? dayjs(item.certificateDate).format('YYYY-MM-DD') : '',
+ }
+ }) // 现场测试、校准或检定人员
+ form.value.equipmentInfoList = res.data.equipmentInfoList.map((item: any) => {
+ return {
+ ...item,
+ validDate: item.validDate ? dayjs(item.validDate).format('YYYY-MM-DD') : '',
+ }
+ }) // 携带仪器设备
+ form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
+ form.value.applyPerson = user.id// 申请人
+ form.value.applyPersonName = user.name // 申请人名字
loading.close()
}
// 打印
@@ -537,7 +536,7 @@
decisionItem.value = $route.query.decisionItem as string // 同意、驳回、拒绝按钮权限
taskId.value = $route.query.taskId as string // 流程实例id
if (pageType.value !== 'add') {
- getInfo() // 获取详情
+ await getInfo() // 获取详情
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId)
}
@@ -898,9 +897,9 @@
-
+
增加行
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index f61ee46..4fb0869 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -13,7 +13,7 @@
import { getDictByCode } from '@/api/system/dict'
import { getUid } from '@/utils/getUid'
import scanSampleDialog from '@/components/ScanSampleDialog/index.vue'
-import { addOrder, getOrderDetail, getStream, updateOrder } from '@/api/business/schedule/order'
+import { addOrder, certExport, getOrderDetail, getStream, updateOrder } from '@/api/business/schedule/order'
import selectStaffList from '@/views/business/fieldTest/components/selectStaffList.vue'
import { printPdf } from '@/utils/printUtils'
import { getUserList } from '@/api/system/user'
@@ -510,6 +510,19 @@
})
}
+// 点击证书清单导出
+const exportCert = () => {
+ const loading = ElLoading.service({
+ lock: true,
+ text: '加载中...',
+ background: 'rgba(255, 255, 255, 0.6)',
+ })
+ const exportTitle = orderType.value === 'measure' ? `检测委托单${dataForm.value.orderCode}样品证书清单` : `校准委托单${dataForm.value.orderCode}样品证书清单`
+ certExport({ id: infoId.value }).then((res) => {
+ exportFile(res.data, `${exportTitle}.xlsx`)
+ loading.close()
+ })
+}
// 点击打印
const printPDF = () => {
const loading = ElLoading.service({
@@ -620,6 +633,9 @@
-->
+
+ 证书清单导出
+
导出