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 @@
-->
+
+ 证书清单导出
+
导出
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
+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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
+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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
增加行
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
-
+
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
-
+
diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue
index 71ebaa6..2a6a60d 100644
--- a/src/views/measure/source/listAdd.vue
+++ b/src/views/measure/source/listAdd.vue
@@ -9,6 +9,7 @@
import type { ISupplier, traceSupplierPerson } from './list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { UploadFile } from '@/api/measure/file'
+import { cancelApproval, fetchApproval } from '@/api/approval'
import { failUpdateSourceApproval, getSoucreListDetail, getSoucreListlevelType, sourceDraftUpdate, sourceSave, sourceSubmit } from '@/api/measure/source'
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
@@ -66,6 +67,7 @@
taxNumber: '',
website: '',
traceSupplierPersonList: [],
+ rejectRemark: '', // 历次驳回记录
})
const isChanged = ref(false)
const companyAddress = ref([]) // 公司地址
@@ -341,6 +343,42 @@
if (pageType.value !== 'add') {
getInfo()
}
+
+const approvalRecordData = ref([]) // 审批流程数据
+// 查询审批记录
+function getApprovalRecord(processId: string) {
+ if (processId) {
+ fetchApproval(processId).then((res) => {
+ approvalRecordData.value = res.data
+ })
+ }
+ else {
+ ElMessage.warning('流程实例id为空')
+ }
+}
+
+const approvalStatusName = ref('')
+onMounted(() => {
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称
+ formInline.value.processId = $route.query.processId as string// 流程实例id
+ processId.value = $route.query.processId as string// 流程实例id
+ if (approvalStatusName.value !== '草稿箱') {
+ getApprovalRecord(formInline.value.processId) // 查询审批记录
+ }
+})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -576,6 +614,21 @@
+
+
+
+
+
+
+
@@ -614,6 +667,10 @@
+
+
+
+
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
-
+
diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue
index 71ebaa6..2a6a60d 100644
--- a/src/views/measure/source/listAdd.vue
+++ b/src/views/measure/source/listAdd.vue
@@ -9,6 +9,7 @@
import type { ISupplier, traceSupplierPerson } from './list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { UploadFile } from '@/api/measure/file'
+import { cancelApproval, fetchApproval } from '@/api/approval'
import { failUpdateSourceApproval, getSoucreListDetail, getSoucreListlevelType, sourceDraftUpdate, sourceSave, sourceSubmit } from '@/api/measure/source'
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
@@ -66,6 +67,7 @@
taxNumber: '',
website: '',
traceSupplierPersonList: [],
+ rejectRemark: '', // 历次驳回记录
})
const isChanged = ref(false)
const companyAddress = ref([]) // 公司地址
@@ -341,6 +343,42 @@
if (pageType.value !== 'add') {
getInfo()
}
+
+const approvalRecordData = ref([]) // 审批流程数据
+// 查询审批记录
+function getApprovalRecord(processId: string) {
+ if (processId) {
+ fetchApproval(processId).then((res) => {
+ approvalRecordData.value = res.data
+ })
+ }
+ else {
+ ElMessage.warning('流程实例id为空')
+ }
+}
+
+const approvalStatusName = ref('')
+onMounted(() => {
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称
+ formInline.value.processId = $route.query.processId as string// 流程实例id
+ processId.value = $route.query.processId as string// 流程实例id
+ if (approvalStatusName.value !== '草稿箱') {
+ getApprovalRecord(formInline.value.processId) // 查询审批记录
+ }
+})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -576,6 +614,21 @@
+
+
+
+
+
+
+
@@ -614,6 +667,10 @@
+
+
+
+
diff --git a/src/views/measure/source/list_interface.ts b/src/views/measure/source/list_interface.ts
index 42114f0..25b7527 100644
--- a/src/views/measure/source/list_interface.ts
+++ b/src/views/measure/source/list_interface.ts
@@ -98,6 +98,7 @@
approvalStatus?: string // 审批状态
approvalStatusName?: string // 审批状态名称
decisionItem?: number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示)
+ rejectRemark?: string // 历次驳回原因
}
export interface IlistTypes {
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
-
+
diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue
index 71ebaa6..2a6a60d 100644
--- a/src/views/measure/source/listAdd.vue
+++ b/src/views/measure/source/listAdd.vue
@@ -9,6 +9,7 @@
import type { ISupplier, traceSupplierPerson } from './list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { UploadFile } from '@/api/measure/file'
+import { cancelApproval, fetchApproval } from '@/api/approval'
import { failUpdateSourceApproval, getSoucreListDetail, getSoucreListlevelType, sourceDraftUpdate, sourceSave, sourceSubmit } from '@/api/measure/source'
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
@@ -66,6 +67,7 @@
taxNumber: '',
website: '',
traceSupplierPersonList: [],
+ rejectRemark: '', // 历次驳回记录
})
const isChanged = ref(false)
const companyAddress = ref([]) // 公司地址
@@ -341,6 +343,42 @@
if (pageType.value !== 'add') {
getInfo()
}
+
+const approvalRecordData = ref([]) // 审批流程数据
+// 查询审批记录
+function getApprovalRecord(processId: string) {
+ if (processId) {
+ fetchApproval(processId).then((res) => {
+ approvalRecordData.value = res.data
+ })
+ }
+ else {
+ ElMessage.warning('流程实例id为空')
+ }
+}
+
+const approvalStatusName = ref('')
+onMounted(() => {
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称
+ formInline.value.processId = $route.query.processId as string// 流程实例id
+ processId.value = $route.query.processId as string// 流程实例id
+ if (approvalStatusName.value !== '草稿箱') {
+ getApprovalRecord(formInline.value.processId) // 查询审批记录
+ }
+})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -576,6 +614,21 @@
+
+
+
+
+
+
+
@@ -614,6 +667,10 @@
+
+
+
+
diff --git a/src/views/measure/source/list_interface.ts b/src/views/measure/source/list_interface.ts
index 42114f0..25b7527 100644
--- a/src/views/measure/source/list_interface.ts
+++ b/src/views/measure/source/list_interface.ts
@@ -98,6 +98,7 @@
approvalStatus?: string // 审批状态
approvalStatusName?: string // 审批状态名称
decisionItem?: number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示)
+ rejectRemark?: string // 历次驳回原因
}
export interface IlistTypes {
diff --git a/src/views/measure/train/planAdd.vue b/src/views/measure/train/planAdd.vue
index a83a8a3..402cd5e 100644
--- a/src/views/measure/train/planAdd.vue
+++ b/src/views/measure/train/planAdd.vue
@@ -6,6 +6,7 @@
import type { IaddPersonListType, IformInlineType } from './plan_interface'
import selectEmployeesDialog from '@/components/dialog/selectEmployeesDialog.vue'
import DeptSelect from '@/components/DeptSelect/index.vue'
+import { cancelApproval, fetchApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import {
getListDetail,
@@ -45,6 +46,7 @@
trainStaffList: [], // 人员信息
trainTime: '', // 培训时间
processId: '', // 流程实例id, 未通过-驳回编辑使用
+ rejectRemark: '', // 历次驳回记录
})
const processId = ref('') // 未通过-驳回编辑使用
const addId = ref('') // 保存后的id-用于提交
@@ -267,10 +269,40 @@
standard: '',
extarCss: '',
})
+const approvalRecordData = ref([]) // 审批流程数据
+// 查询审批记录
+function getApprovalRecord(processId: string) {
+ if (processId) {
+ fetchApproval(processId).then((res) => {
+ approvalRecordData.value = res.data
+ })
+ }
+ else {
+ ElMessage.warning('流程实例id为空')
+ }
+}
+
onMounted(() => {
approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称
- processId.value = $route.query.processId as string
+ formInline.value.processId = $route.query.processId as string// 流程实例id
+ processId.value = $route.query.processId as string// 流程实例id
+ if (approvalStatusName.value !== '草稿箱') {
+ getApprovalRecord(formInline.value.processId) // 查询审批记录
+ }
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -299,7 +331,7 @@
:model="formInline"
class="demo-form-inline"
:rules="rules"
- label-width="auto"
+ label-width="100px"
label-position="right"
>
@@ -439,6 +471,21 @@
+
+
+
+
+
+
+
@@ -484,6 +531,10 @@
+
+
+
+
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 @@
-->
+
+ 证书清单导出
+
导出
diff --git a/src/views/business/subpackage/apply/edit.vue b/src/views/business/subpackage/apply/edit.vue
index 2eacf81..2ebb041 100644
--- a/src/views/business/subpackage/apply/edit.vue
+++ b/src/views/business/subpackage/apply/edit.vue
@@ -108,20 +108,17 @@
}
// 获取详情信息
-const getDetail = () => {
+const getDetail = async () => {
const loading = ElLoading.service({
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
- detail({ id: $route.params.id as string }).then((res) => {
- loading.close()
- detailForm.value = res.data
- detailForm.value.createUserName = res.data.applicantName || user.name
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
- }).catch(() => {
- loading.close()
+ const res = await detail({ id: $route.params.id as string })
+ loading.close()
+ detailForm.value = res.data
+ detailForm.value.createUserName = res.data.applicantName || user.name
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -396,7 +393,7 @@
await getDict()
detailForm.value.applyProcessId = query.applyProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.applyProcessId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/approve/edit.vue b/src/views/business/subpackage/approve/edit.vue
index 0360a69..d01f9d1 100644
--- a/src/views/business/subpackage/approve/edit.vue
+++ b/src/views/business/subpackage/approve/edit.vue
@@ -123,20 +123,19 @@
// -----------------------------------------------------------------------------------
// 获取详情
-const getInfo = () => {
+const getInfo = async () => {
loading.value = true
- detail({ id: infoId.value }).then((res) => {
- loading.value = false
- dataForm.value = res.data
- if (pageType.value == 'detail') {
- fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
- }
- else {
- fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
- invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
- }
- })
+ const res = await detail({ id: infoId.value })
+ loading.value = false
+ dataForm.value = res.data
+ if (pageType.value == 'detail') {
+ fullAddress.value = [dataForm.value.addressCountryName, dataForm.value.addressProvinceName, dataForm.value.addressCityName, dataForm.value.addressAreaName, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountryName, dataForm.value.invoiceProvinceName, dataForm.value.invoiceCityName, dataForm.value.invoiceAreaName, dataForm.value.invoiceFullAddress]
+ }
+ else {
+ fullAddress.value = [dataForm.value.addressCountry, dataForm.value.addressProvince, dataForm.value.addressCity, dataForm.value.addressArea, dataForm.value.fullAddress]
+ invoiceFullAddress.value = [dataForm.value.invoiceCountry, dataForm.value.invoiceProvince, dataForm.value.invoiceCity, dataForm.value.invoiceArea, dataForm.value.invoiceFullAddress]
+ }
}
// 公司地址变化后给对象赋值
@@ -330,12 +329,12 @@
}
}
// ---------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
approvalStatusName.value = query.approvalStatusName as string // 审批状态名字
dataForm.value.processId = query.processId as string // 流程实例id
// 非添加页面获取详情
if (pageType.value !== 'add') {
- getInfo()
+ await getInfo()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(dataForm.value.processId) // 获取审批流程
}
diff --git a/src/views/business/subpackage/check/edit.vue b/src/views/business/subpackage/check/edit.vue
index c848463..a4462c1 100644
--- a/src/views/business/subpackage/check/edit.vue
+++ b/src/views/business/subpackage/check/edit.vue
@@ -81,12 +81,11 @@
}
// 获取详情
-const getDetail = () => {
- detail({ id: $route.params.id }).then((res) => {
- detailForm.value = res.data
- list.value = res.data.sampleList.filter((item: ISampleList) => {
- return item !== null
- })
+const getDetail = async () => {
+ const res = await detail({ id: $route.params.id })
+ detailForm.value = res.data
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
})
}
@@ -273,12 +272,10 @@
detailForm.value.outsourceReasonName = val[0].outsourceReasonName // 分包原因名称
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
- console.log('00000', query.approvalStatusName)
-
+onMounted(async () => {
detailForm.value.checkProcessId = query.checkProcessId as string // 流程实例
if (pageType.value !== 'add') { // 编辑、详情
- getDetail()
+ await getDetail()
if (query.approvalStatusName !== '草稿箱') {
getApprovalRecord(detailForm.value.checkProcessId) // 获取审批流程
}
diff --git a/src/views/device/borrow/editApply.vue b/src/views/device/borrow/editApply.vue
index 1d156bc..7ebbeee 100644
--- a/src/views/device/borrow/editApply.vue
+++ b/src/views/device/borrow/editApply.vue
@@ -62,6 +62,7 @@
applyPersonName: '', // 申请人名称
time: '', // 借用时间
applyDesc: '', // 申请说明
+ rejectRemark: '', // 历次驳回日志
})
const ruleFormRef = ref() as any
const list = ref([])// 表格数据
@@ -318,22 +319,21 @@
}
// 编辑、详情--获取详细信息
-const fetchReceiveApplyListDetail = () => {
- getReceiveApplyListDetail({ id: form.value.id }).then((res) => {
- form.value.applyUnit = res.data.applyUnit // 部门
- form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
- form.value.applyName = res.data.applyName // 申请名称
- form.value.applyPerson = res.data.applyPerson// 申请人
- form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
- form.value.applyNo = res.data.applyNo// 申请编号
- form.value.time = res.data.time // 借用时间
- form.value.applyDesc = res.data.applyDesc // 申请说明
- list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
- return {
- ...item,
- validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
- }
- })
+const fetchReceiveApplyListDetail = async () => {
+ const res = await getReceiveApplyListDetail({ id: form.value.id })
+ form.value.applyUnit = res.data.applyUnit // 部门
+ form.value.applyUnitName = res.data.applyUnitName || user.deptName // 部门名称
+ form.value.applyName = res.data.applyName // 申请名称
+ form.value.applyPerson = res.data.applyPerson// 申请人
+ form.value.applyPersonName = res.data.applyPersonName || user.name// 申请人名称
+ form.value.applyNo = res.data.applyNo// 申请编号
+ form.value.time = res.data.time // 借用时间
+ form.value.applyDesc = res.data.applyDesc // 申请说明
+ list.value = res.data.equipmentInfoList.map((item: IdeviceList) => {
+ return {
+ ...item,
+ validDate: dayjs(item.validDate).format('YYYY-MM-DD'),
+ }
})
}
@@ -409,7 +409,7 @@
}
}
// --------------------------------------------------------------------------------------
-onMounted(() => {
+onMounted(async () => {
typeValue.value = $route.query.typeValue // 类型add、edit、detail
form.value.id = $route.query.id as string // id
form.value.taskId = $route.query.taskId as string // 任务id
@@ -427,7 +427,7 @@
form.value.time = dayjs().format('YYYY-MM-DD HH:mm:ss') // 申请时间
// 编辑、详情获取详情页信息
if (typeValue.value === 'edit' || typeValue.value === 'detail') {
- fetchReceiveApplyListDetail() // 获取详细信息
+ await fetchReceiveApplyListDetail() // 获取详细信息
}
if (approvalStatusName.value !== '草稿箱') {
getApprovalRecord(form.value.processId) // 查询审批记录
@@ -437,6 +437,19 @@
// 获取人员列表--申请人使用
fetchUserList()
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (form.value.rejectRemark) {
+ const lastIndex = form.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ form.value.rejectRemark = `${form.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ form.value.rejectRemark = reason
+ }
+}
@@ -551,6 +564,21 @@
+
+
+
+
+
+
+
@@ -600,7 +628,7 @@
-
+
{
- acceptanceCheckInfo({ id: infoId.value }).then((res) => {
- // Object.keys(res.data).map((item) => {
- // if (typeof (res.data[item]) === 'number') {
- // res.data[item] = res.data[item].toString()
- // }
- // })
- checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
- checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
- formInline.value = res.data
- formInline.value.equipmentList = res.data.checkList
- formInline.value.applyType = '9'
- formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
- formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
- })
+const getInfo = async () => {
+ const res = await acceptanceCheckInfo({ id: infoId.value })
+ // Object.keys(res.data).map((item) => {
+ // if (typeof (res.data[item]) === 'number') {
+ // res.data[item] = res.data[item].toString()
+ // }
+ // })
+ checkIdObject.value.applyNo = res.data.checkApplyNo // 申请编号
+ checkIdObject.value.applyName = res.data.checkApplyName // 申请名称
+ formInline.value = res.data
+ formInline.value.equipmentList = res.data.checkList
+ formInline.value.applyType = '9'
+ formInline.value.applyUnit = res.data.deptId || user.deptId // 申请单位
+ formInline.value.applyUnitName = res.data.deptName || user.deptName // 申请单位名称
}
const fileRef = ref() // 文件上传input
@@ -365,10 +365,22 @@
formInline.value.checkDate = dayjs().format('YYYY-MM-DD')
// 编辑和详情页面获取详情信息
if (pageType.value !== 'add') {
- getInfo() // 获取详情信息
+ await getInfo() // 获取详情信息
getApprovalRecord(formInline.value.processId) // 获取审批流程
}
})
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -508,6 +520,21 @@
+
+
+
+
+
+
+
@@ -544,7 +571,7 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
index 3400bca..9507828 100644
--- a/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
+++ b/src/views/device/deviceMaintenance/components/maintenanceDetail.vue
@@ -74,6 +74,7 @@
time: '',
updateTime: '', // 更新时间
version: '', // 版本号
+ rejectRemark: '', // 历次驳回记录
})
// 审批弹窗开关
@@ -173,25 +174,22 @@
const SelectionList = ref
-
+
-
+
diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue
index 71ebaa6..2a6a60d 100644
--- a/src/views/measure/source/listAdd.vue
+++ b/src/views/measure/source/listAdd.vue
@@ -9,6 +9,7 @@
import type { ISupplier, traceSupplierPerson } from './list_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { UploadFile } from '@/api/measure/file'
+import { cancelApproval, fetchApproval } from '@/api/approval'
import { failUpdateSourceApproval, getSoucreListDetail, getSoucreListlevelType, sourceDraftUpdate, sourceSave, sourceSubmit } from '@/api/measure/source'
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
@@ -66,6 +67,7 @@
taxNumber: '',
website: '',
traceSupplierPersonList: [],
+ rejectRemark: '', // 历次驳回记录
})
const isChanged = ref(false)
const companyAddress = ref([]) // 公司地址
@@ -341,6 +343,42 @@
if (pageType.value !== 'add') {
getInfo()
}
+
+const approvalRecordData = ref([]) // 审批流程数据
+// 查询审批记录
+function getApprovalRecord(processId: string) {
+ if (processId) {
+ fetchApproval(processId).then((res) => {
+ approvalRecordData.value = res.data
+ })
+ }
+ else {
+ ElMessage.warning('流程实例id为空')
+ }
+}
+
+const approvalStatusName = ref('')
+onMounted(() => {
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称
+ formInline.value.processId = $route.query.processId as string// 流程实例id
+ processId.value = $route.query.processId as string// 流程实例id
+ if (approvalStatusName.value !== '草稿箱') {
+ getApprovalRecord(formInline.value.processId) // 查询审批记录
+ }
+})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -576,6 +614,21 @@
+
+
+
+
+
+
+
@@ -614,6 +667,10 @@
+
+
+
+
diff --git a/src/views/measure/source/list_interface.ts b/src/views/measure/source/list_interface.ts
index 42114f0..25b7527 100644
--- a/src/views/measure/source/list_interface.ts
+++ b/src/views/measure/source/list_interface.ts
@@ -98,6 +98,7 @@
approvalStatus?: string // 审批状态
approvalStatusName?: string // 审批状态名称
decisionItem?: number // 可选决策项(1同意驳回拒绝 2同意驳回 3同意拒绝,用于待审批列表同意/驳回/拒绝按钮展示)
+ rejectRemark?: string // 历次驳回原因
}
export interface IlistTypes {
diff --git a/src/views/measure/train/planAdd.vue b/src/views/measure/train/planAdd.vue
index a83a8a3..402cd5e 100644
--- a/src/views/measure/train/planAdd.vue
+++ b/src/views/measure/train/planAdd.vue
@@ -6,6 +6,7 @@
import type { IaddPersonListType, IformInlineType } from './plan_interface'
import selectEmployeesDialog from '@/components/dialog/selectEmployeesDialog.vue'
import DeptSelect from '@/components/DeptSelect/index.vue'
+import { cancelApproval, fetchApproval } from '@/api/approval'
import { SCHEDULE } from '@/utils/scheduleDict'
import {
getListDetail,
@@ -45,6 +46,7 @@
trainStaffList: [], // 人员信息
trainTime: '', // 培训时间
processId: '', // 流程实例id, 未通过-驳回编辑使用
+ rejectRemark: '', // 历次驳回记录
})
const processId = ref('') // 未通过-驳回编辑使用
const addId = ref('') // 保存后的id-用于提交
@@ -267,10 +269,40 @@
standard: '',
extarCss: '',
})
+const approvalRecordData = ref([]) // 审批流程数据
+// 查询审批记录
+function getApprovalRecord(processId: string) {
+ if (processId) {
+ fetchApproval(processId).then((res) => {
+ approvalRecordData.value = res.data
+ })
+ }
+ else {
+ ElMessage.warning('流程实例id为空')
+ }
+}
+
onMounted(() => {
approvalStatusName.value = $route.query.approvalStatusName as string // 审批状态名称
- processId.value = $route.query.processId as string
+ formInline.value.processId = $route.query.processId as string// 流程实例id
+ processId.value = $route.query.processId as string// 流程实例id
+ if (approvalStatusName.value !== '草稿箱') {
+ getApprovalRecord(formInline.value.processId) // 查询审批记录
+ }
})
+
+// 监听到驳回原因
+const giveRejectRemark = (reason: string) => {
+ if (formInline.value.rejectRemark) {
+ const lastIndex = formInline.value.rejectRemark.lastIndexOf(reason)
+ if (lastIndex === -1) { // 本次原因和上次最后一次原因不同才去拼接
+ formInline.value.rejectRemark = `${formInline.value.rejectRemark};${reason}`
+ }
+ }
+ else {
+ formInline.value.rejectRemark = reason
+ }
+}
@@ -299,7 +331,7 @@
:model="formInline"
class="demo-form-inline"
:rules="rules"
- label-width="auto"
+ label-width="100px"
label-position="right"
>
@@ -439,6 +471,21 @@
+
+
+
+
+
+
+
@@ -484,6 +531,10 @@
+
+
+
+
diff --git a/src/views/measure/train/plan_interface.ts b/src/views/measure/train/plan_interface.ts
index bb329e1..e0c741c 100644
--- a/src/views/measure/train/plan_interface.ts
+++ b/src/views/measure/train/plan_interface.ts
@@ -146,6 +146,7 @@
trainStaffList: IaddPersonListType[] // 人员信息
trainTime: string // 培训时间
processId?: string // 流程实例id
+ rejectRemark: string // 历次驳回记录
}
// 培训计划审批