diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
@@ -207,9 +232,9 @@
@@ -222,7 +247,8 @@
:disabled="pageType === 'detail'"
/>
-
+
+
+
-
+
无
@@ -325,7 +351,7 @@
-
+
无
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
@@ -207,9 +232,9 @@
@@ -222,7 +247,8 @@
:disabled="pageType === 'detail'"
/>
-
+
+
+
-
+
无
@@ -325,7 +351,7 @@
-
+
无
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 868f00d..a2dacdb 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -49,7 +49,7 @@
{ text: '型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '检测单位', value: 'outsourcerName', align: 'center' },
- { text: '打印状态', value: 'printStatus', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
{ text: '创建时间', value: 'createTime', align: 'center', width: '180px' },
])
const list = ref([]) // 表格数据
@@ -66,7 +66,12 @@
// 模拟数据
loadingTable.value = false
getcertificateList(listQuery.value).then((response) => {
- list.value = response.data.rows
+ list.value = response.data.rows.map((item: IList) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
total.value = parseInt(response.data.total)
loadingTable.value = false
})
@@ -158,9 +163,22 @@
}
// 点击编辑或详情
-const handleDetail = (row: IList, type: 'edit' | 'detail') => {
+const handleDetail = (row: any, type: 'edit' | 'detail') => {
$router.push({
- path: `/subpackage/certificate/${type}/${row.id}`,
+ path: `/subpackage/${type}/${row.id}`,
+ query: {
+ certificateCode: row.certificateCode, // 证书号
+ certificateName: row.certificateName, // 证书名称
+ expirationDate: row.expirationDate, // 证书有效期
+ issuanceDate: row.issuanceDate, // 证书出具日期
+ certificateFile: row.certificateFile, // 证书文件
+ originalRecordFile: row.originalRecordFile, // 原始记录文件
+ outsourcerName: row.outsourcerName, // 检测单位名称-分包方名称
+ sampleName: row.sampleName, // 样品名称
+ sampleNo: row.sampleNo, // 样品编号
+ sampleModel: row.sampleModel, // 型号
+ manufacturingNo: row.manufacturingNo, // 出厂编号
+ },
})
}
@@ -213,8 +231,8 @@
-
-
+
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
@@ -207,9 +232,9 @@
@@ -222,7 +247,8 @@
:disabled="pageType === 'detail'"
/>
-
+
+
+
-
+
无
@@ -325,7 +351,7 @@
-
+
无
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 868f00d..a2dacdb 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -49,7 +49,7 @@
{ text: '型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '检测单位', value: 'outsourcerName', align: 'center' },
- { text: '打印状态', value: 'printStatus', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
{ text: '创建时间', value: 'createTime', align: 'center', width: '180px' },
])
const list = ref([]) // 表格数据
@@ -66,7 +66,12 @@
// 模拟数据
loadingTable.value = false
getcertificateList(listQuery.value).then((response) => {
- list.value = response.data.rows
+ list.value = response.data.rows.map((item: IList) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
total.value = parseInt(response.data.total)
loadingTable.value = false
})
@@ -158,9 +163,22 @@
}
// 点击编辑或详情
-const handleDetail = (row: IList, type: 'edit' | 'detail') => {
+const handleDetail = (row: any, type: 'edit' | 'detail') => {
$router.push({
- path: `/subpackage/certificate/${type}/${row.id}`,
+ path: `/subpackage/${type}/${row.id}`,
+ query: {
+ certificateCode: row.certificateCode, // 证书号
+ certificateName: row.certificateName, // 证书名称
+ expirationDate: row.expirationDate, // 证书有效期
+ issuanceDate: row.issuanceDate, // 证书出具日期
+ certificateFile: row.certificateFile, // 证书文件
+ originalRecordFile: row.originalRecordFile, // 原始记录文件
+ outsourcerName: row.outsourcerName, // 检测单位名称-分包方名称
+ sampleName: row.sampleName, // 样品名称
+ sampleNo: row.sampleNo, // 样品编号
+ sampleModel: row.sampleModel, // 型号
+ manufacturingNo: row.manufacturingNo, // 出厂编号
+ },
})
}
@@ -213,8 +231,8 @@
-
-
+
+
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 93f9f52..1f28f53 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -32,9 +32,9 @@
const active = ref('')
// 查询条件
const listQuery: Ref = ref({
- applicantEndTime: '', // 开始时间
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -94,9 +94,9 @@
// 重置
const reset = () => {
listQuery.value = {
- applicantEndTime: '', // 开始时间
+ checkEndTime: '', // 开始时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
+ checkStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -111,13 +111,15 @@
// 时间变更
watch(timeRange, (val) => {
+ console.log(val[0])
+
if (val) {
- listQuery.value.applicantStartTime = `${val[0]}`
- listQuery.value.applicantEndTime = `${val[1]}`
+ listQuery.value.checkStartTime = `${val[0]}`
+ listQuery.value.checkEndTime = `${val[1]}`
}
else {
- listQuery.value.applicantStartTime = ''
- listQuery.value.applicantEndTime = ''
+ listQuery.value.checkStartTime = ''
+ listQuery.value.checkEndTime = ''
}
})
// 打印
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
@@ -207,9 +232,9 @@
@@ -222,7 +247,8 @@
:disabled="pageType === 'detail'"
/>
-
+
+
+
-
+
无
@@ -325,7 +351,7 @@
-
+
无
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 868f00d..a2dacdb 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -49,7 +49,7 @@
{ text: '型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '检测单位', value: 'outsourcerName', align: 'center' },
- { text: '打印状态', value: 'printStatus', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
{ text: '创建时间', value: 'createTime', align: 'center', width: '180px' },
])
const list = ref([]) // 表格数据
@@ -66,7 +66,12 @@
// 模拟数据
loadingTable.value = false
getcertificateList(listQuery.value).then((response) => {
- list.value = response.data.rows
+ list.value = response.data.rows.map((item: IList) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
total.value = parseInt(response.data.total)
loadingTable.value = false
})
@@ -158,9 +163,22 @@
}
// 点击编辑或详情
-const handleDetail = (row: IList, type: 'edit' | 'detail') => {
+const handleDetail = (row: any, type: 'edit' | 'detail') => {
$router.push({
- path: `/subpackage/certificate/${type}/${row.id}`,
+ path: `/subpackage/${type}/${row.id}`,
+ query: {
+ certificateCode: row.certificateCode, // 证书号
+ certificateName: row.certificateName, // 证书名称
+ expirationDate: row.expirationDate, // 证书有效期
+ issuanceDate: row.issuanceDate, // 证书出具日期
+ certificateFile: row.certificateFile, // 证书文件
+ originalRecordFile: row.originalRecordFile, // 原始记录文件
+ outsourcerName: row.outsourcerName, // 检测单位名称-分包方名称
+ sampleName: row.sampleName, // 样品名称
+ sampleNo: row.sampleNo, // 样品编号
+ sampleModel: row.sampleModel, // 型号
+ manufacturingNo: row.manufacturingNo, // 出厂编号
+ },
})
}
@@ -213,8 +231,8 @@
-
-
+
+
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 93f9f52..1f28f53 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -32,9 +32,9 @@
const active = ref('')
// 查询条件
const listQuery: Ref = ref({
- applicantEndTime: '', // 开始时间
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -94,9 +94,9 @@
// 重置
const reset = () => {
listQuery.value = {
- applicantEndTime: '', // 开始时间
+ checkEndTime: '', // 开始时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
+ checkStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -111,13 +111,15 @@
// 时间变更
watch(timeRange, (val) => {
+ console.log(val[0])
+
if (val) {
- listQuery.value.applicantStartTime = `${val[0]}`
- listQuery.value.applicantEndTime = `${val[1]}`
+ listQuery.value.checkStartTime = `${val[0]}`
+ listQuery.value.checkEndTime = `${val[1]}`
}
else {
- listQuery.value.applicantStartTime = ''
- listQuery.value.applicantEndTime = ''
+ listQuery.value.checkStartTime = ''
+ listQuery.value.checkEndTime = ''
}
})
// 打印
diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue
index b5dae4f..b1f507f 100644
--- a/src/views/business/subpackage/record/edit.vue
+++ b/src/views/business/subpackage/record/edit.vue
@@ -16,6 +16,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { detail } from '@/api/business/subpackage/approval'
import { getListPage } from '@/api/business/subpackage/check'
+import { getcertificateList } from '@/api/business/subpackage/certificate'
import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
@@ -136,6 +137,7 @@
const loadingTable = ref(false) // 表格loading
const checkTotal = ref(0) // 项目记录
+const certificateTotal = ref(0) // 证书记录total
const checkListQuery = ref({
applicantEndTime: '', // 开始时间
applicantName: '', // 申请人名称
@@ -148,6 +150,16 @@
offset: 1,
limit: 20,
})
+const certificateListQuery = ref({
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+})
// 获取项目记录
const fetchProjectRecords = function (isNowPage = false) {
loadingTable.value = true
@@ -166,15 +178,23 @@
const fetchContractRecords = () => {
}
-// 获取检定证书 待测试
-const fetchCertifications = function () {
- const postData = {
- sampleId: '',
- customeId: dataForm.value.id,
+// 获取检定证书
+const fetchCertifications = function (isNowPage = false) {
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ certificateListQuery.value.offset = 1
}
- // getCertificationByCustomer(postData).then((res) => {
- // dataList.value.certificationRecords = res.data.rows
- // })
+ getcertificateList(certificateListQuery.value).then((response) => {
+ dataList.value.certificationRecords = response.data.rows.map((item: any) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
+ certificateTotal.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
}
// 获取人员列表
const fetchPersonList = () => {
@@ -222,12 +242,12 @@
{
name: '项目记录',
columns: [
- { text: '分包项目编号', value: 'projectNo' },
- { text: '分包项目名称', value: 'projectName' },
- { text: '申请人', value: 'applicantName' },
- { text: '申请时间', value: 'applicantTime' },
- { text: '验收状况', value: 'checkConclusion' },
- { text: '验收时间', value: 'checkTime' },
+ { text: '分包项目编号', value: 'projectNo', align: 'center' },
+ { text: '分包项目名称', value: 'projectName', align: 'center' },
+ { text: '申请人', value: 'applicantName', align: 'center' },
+ { text: '申请时间', value: 'applicantTime', align: 'center' },
+ { text: '验收状况', value: 'checkConclusion', align: 'center' },
+ { text: '验收时间', value: 'checkTime', align: 'center' },
],
pagination: true,
list: 'projectRecords',
@@ -236,12 +256,12 @@
{
name: '合同记录',
columns: [
- { text: '合同编号', value: 'contractCode' },
- { text: '合同名称', value: 'contractName' },
- { text: '合同金额', value: 'contractPrice' },
- { text: '合同状态', value: 'contractStatus' },
- { text: '合同时间', value: 'contractTime' },
- { text: '负责人', value: 'aCompanyDutyman' },
+ { text: '合同编号', value: 'contractCode', align: 'center' },
+ { text: '合同名称', value: 'contractName', align: 'center' },
+ { text: '合同金额', value: 'contractPrice', align: 'center' },
+ { text: '合同状态', value: 'contractStatus', align: 'center' },
+ { text: '合同时间', value: 'contractTime', align: 'center' },
+ { text: '负责人', value: 'aCompanyDutyman', align: 'center' },
],
query: {
id: '',
@@ -260,11 +280,14 @@
offset: 1,
},
columns: [
- { text: '证书编号', value: 'certificationCode' },
- { text: '证书名称', value: 'certificationName' },
- { text: '证书类型', value: 'certificationType' },
- { text: '证书出具日期', value: 'effectiveDate' },
- { text: '证书有效期', value: 'expirationDate' },
+ { text: '证书编号', value: 'certificateCode', align: 'center', width: '160px' },
+ { text: '证书名称', value: 'certificateName', align: 'center' },
+ { text: '样品编号', value: 'sampleNo', align: 'center', width: '160px' },
+ { text: '样品名称', value: 'sampleName', align: 'center' },
+ { text: '型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center' },
+ { text: '检测单位', value: 'outsourcerName', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
],
list: 'certificationRecords',
pagination: true,
@@ -366,6 +389,13 @@
currentMenuDetailObj.value!.searchFunc!()
}
}
+ else if (currentMenuDetail.value === '检定证书') {
+ if (val.value && currentMenuDetailObj) {
+ certificateListQuery.value.offset = val.value.offset
+ certificateListQuery.value.limit = val.value.limit
+ currentMenuDetailObj.value!.searchFunc!()
+ }
+ }
}
// 监听上面表格按钮切换
@@ -957,7 +987,7 @@
-
+
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
@@ -207,9 +232,9 @@
@@ -222,7 +247,8 @@
:disabled="pageType === 'detail'"
/>
-
+
+
+
-
+
无
@@ -325,7 +351,7 @@
-
+
无
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 868f00d..a2dacdb 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -49,7 +49,7 @@
{ text: '型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '检测单位', value: 'outsourcerName', align: 'center' },
- { text: '打印状态', value: 'printStatus', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
{ text: '创建时间', value: 'createTime', align: 'center', width: '180px' },
])
const list = ref([]) // 表格数据
@@ -66,7 +66,12 @@
// 模拟数据
loadingTable.value = false
getcertificateList(listQuery.value).then((response) => {
- list.value = response.data.rows
+ list.value = response.data.rows.map((item: IList) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
total.value = parseInt(response.data.total)
loadingTable.value = false
})
@@ -158,9 +163,22 @@
}
// 点击编辑或详情
-const handleDetail = (row: IList, type: 'edit' | 'detail') => {
+const handleDetail = (row: any, type: 'edit' | 'detail') => {
$router.push({
- path: `/subpackage/certificate/${type}/${row.id}`,
+ path: `/subpackage/${type}/${row.id}`,
+ query: {
+ certificateCode: row.certificateCode, // 证书号
+ certificateName: row.certificateName, // 证书名称
+ expirationDate: row.expirationDate, // 证书有效期
+ issuanceDate: row.issuanceDate, // 证书出具日期
+ certificateFile: row.certificateFile, // 证书文件
+ originalRecordFile: row.originalRecordFile, // 原始记录文件
+ outsourcerName: row.outsourcerName, // 检测单位名称-分包方名称
+ sampleName: row.sampleName, // 样品名称
+ sampleNo: row.sampleNo, // 样品编号
+ sampleModel: row.sampleModel, // 型号
+ manufacturingNo: row.manufacturingNo, // 出厂编号
+ },
})
}
@@ -213,8 +231,8 @@
-
-
+
+
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 93f9f52..1f28f53 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -32,9 +32,9 @@
const active = ref('')
// 查询条件
const listQuery: Ref = ref({
- applicantEndTime: '', // 开始时间
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -94,9 +94,9 @@
// 重置
const reset = () => {
listQuery.value = {
- applicantEndTime: '', // 开始时间
+ checkEndTime: '', // 开始时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
+ checkStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -111,13 +111,15 @@
// 时间变更
watch(timeRange, (val) => {
+ console.log(val[0])
+
if (val) {
- listQuery.value.applicantStartTime = `${val[0]}`
- listQuery.value.applicantEndTime = `${val[1]}`
+ listQuery.value.checkStartTime = `${val[0]}`
+ listQuery.value.checkEndTime = `${val[1]}`
}
else {
- listQuery.value.applicantStartTime = ''
- listQuery.value.applicantEndTime = ''
+ listQuery.value.checkStartTime = ''
+ listQuery.value.checkEndTime = ''
}
})
// 打印
diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue
index b5dae4f..b1f507f 100644
--- a/src/views/business/subpackage/record/edit.vue
+++ b/src/views/business/subpackage/record/edit.vue
@@ -16,6 +16,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { detail } from '@/api/business/subpackage/approval'
import { getListPage } from '@/api/business/subpackage/check'
+import { getcertificateList } from '@/api/business/subpackage/certificate'
import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
@@ -136,6 +137,7 @@
const loadingTable = ref(false) // 表格loading
const checkTotal = ref(0) // 项目记录
+const certificateTotal = ref(0) // 证书记录total
const checkListQuery = ref({
applicantEndTime: '', // 开始时间
applicantName: '', // 申请人名称
@@ -148,6 +150,16 @@
offset: 1,
limit: 20,
})
+const certificateListQuery = ref({
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+})
// 获取项目记录
const fetchProjectRecords = function (isNowPage = false) {
loadingTable.value = true
@@ -166,15 +178,23 @@
const fetchContractRecords = () => {
}
-// 获取检定证书 待测试
-const fetchCertifications = function () {
- const postData = {
- sampleId: '',
- customeId: dataForm.value.id,
+// 获取检定证书
+const fetchCertifications = function (isNowPage = false) {
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ certificateListQuery.value.offset = 1
}
- // getCertificationByCustomer(postData).then((res) => {
- // dataList.value.certificationRecords = res.data.rows
- // })
+ getcertificateList(certificateListQuery.value).then((response) => {
+ dataList.value.certificationRecords = response.data.rows.map((item: any) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
+ certificateTotal.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
}
// 获取人员列表
const fetchPersonList = () => {
@@ -222,12 +242,12 @@
{
name: '项目记录',
columns: [
- { text: '分包项目编号', value: 'projectNo' },
- { text: '分包项目名称', value: 'projectName' },
- { text: '申请人', value: 'applicantName' },
- { text: '申请时间', value: 'applicantTime' },
- { text: '验收状况', value: 'checkConclusion' },
- { text: '验收时间', value: 'checkTime' },
+ { text: '分包项目编号', value: 'projectNo', align: 'center' },
+ { text: '分包项目名称', value: 'projectName', align: 'center' },
+ { text: '申请人', value: 'applicantName', align: 'center' },
+ { text: '申请时间', value: 'applicantTime', align: 'center' },
+ { text: '验收状况', value: 'checkConclusion', align: 'center' },
+ { text: '验收时间', value: 'checkTime', align: 'center' },
],
pagination: true,
list: 'projectRecords',
@@ -236,12 +256,12 @@
{
name: '合同记录',
columns: [
- { text: '合同编号', value: 'contractCode' },
- { text: '合同名称', value: 'contractName' },
- { text: '合同金额', value: 'contractPrice' },
- { text: '合同状态', value: 'contractStatus' },
- { text: '合同时间', value: 'contractTime' },
- { text: '负责人', value: 'aCompanyDutyman' },
+ { text: '合同编号', value: 'contractCode', align: 'center' },
+ { text: '合同名称', value: 'contractName', align: 'center' },
+ { text: '合同金额', value: 'contractPrice', align: 'center' },
+ { text: '合同状态', value: 'contractStatus', align: 'center' },
+ { text: '合同时间', value: 'contractTime', align: 'center' },
+ { text: '负责人', value: 'aCompanyDutyman', align: 'center' },
],
query: {
id: '',
@@ -260,11 +280,14 @@
offset: 1,
},
columns: [
- { text: '证书编号', value: 'certificationCode' },
- { text: '证书名称', value: 'certificationName' },
- { text: '证书类型', value: 'certificationType' },
- { text: '证书出具日期', value: 'effectiveDate' },
- { text: '证书有效期', value: 'expirationDate' },
+ { text: '证书编号', value: 'certificateCode', align: 'center', width: '160px' },
+ { text: '证书名称', value: 'certificateName', align: 'center' },
+ { text: '样品编号', value: 'sampleNo', align: 'center', width: '160px' },
+ { text: '样品名称', value: 'sampleName', align: 'center' },
+ { text: '型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center' },
+ { text: '检测单位', value: 'outsourcerName', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
],
list: 'certificationRecords',
pagination: true,
@@ -366,6 +389,13 @@
currentMenuDetailObj.value!.searchFunc!()
}
}
+ else if (currentMenuDetail.value === '检定证书') {
+ if (val.value && currentMenuDetailObj) {
+ certificateListQuery.value.offset = val.value.offset
+ certificateListQuery.value.limit = val.value.limit
+ currentMenuDetailObj.value!.searchFunc!()
+ }
+ }
}
// 监听上面表格按钮切换
@@ -957,7 +987,7 @@
-
+
diff --git a/src/views/business/subpackage/subpackage-interface.ts b/src/views/business/subpackage/subpackage-interface.ts
index 4f35907..1e67b23 100644
--- a/src/views/business/subpackage/subpackage-interface.ts
+++ b/src/views/business/subpackage/subpackage-interface.ts
@@ -4,9 +4,11 @@
projectNo: string // 分包项目编号
outsourcerName: string // 分包方名称
applicantName: string // 申请人名称
- applicantStartTime: string // 申请开始日期
- applicantEndTime: string // 申请结束日期
- approvalStatus: string // 审批状态
+ applicantStartTime?: string // 申请开始日期
+ applicantEndTime?: string // 申请结束日期
+ approvalStatus?: string // 审批状态
+ checkStartTime?: string // 开始时间
+ checkEndTime: string // 结束时间
createUserId?: string // 验收人id
formId: string
offset: number
@@ -71,6 +73,7 @@
sampleNo: string // 样品编号
startTime: string // 开始时间
endTime: string // 结束时间
+ sampleId?: string // 样品id
}
// 项目选择查询参数
diff --git a/src/api/business/fieldTest/apply.ts b/src/api/business/fieldTest/apply.ts
index a4947d1..7beef06 100644
--- a/src/api/business/fieldTest/apply.ts
+++ b/src/api/business/fieldTest/apply.ts
@@ -58,3 +58,12 @@
})
}
+// 详情
+export function getDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/detail',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/business/fieldTest/record.ts b/src/api/business/fieldTest/record.ts
index 2c10aab..5d4bd56 100644
--- a/src/api/business/fieldTest/record.ts
+++ b/src/api/business/fieldTest/record.ts
@@ -14,27 +14,36 @@
}
// 删除
-export function delFieldTestApproveList(data: any) {
- return request({
- url: '/business/siteExecutive/batchDelete',
- method: 'post',
- data,
- })
-}
+// export function delFieldTestApproveList(data: any) {
+// return request({
+// url: '/business/siteExecutive/batchDelete',
+// method: 'post',
+// data,
+// })
+// }
// 新增
-export function addFieldTestApproveList(data: object) {
+export function addFieldTestRecordList(data: object) {
return request({
- url: '/business/siteExecutive/save',
+ url: '/business/siteExecutive/log/add',
method: 'post',
data,
})
}
// 编辑
-export function updateFieldTestApprove(data: object) {
+export function updateFieldTestRecord(data: object) {
return request({
- url: '/business/siteExecutive/draftUpdate',
+ url: '/business/siteExecutive/log/update',
+ method: 'post',
+ data,
+ })
+}
+
+// 详情
+export function getRecordDetail(data: { id: string }) {
+ return request({
+ url: '/business/siteExecutive/log/detail',
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index 8bae72b..b53e1c0 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -14,7 +14,7 @@
}
// 详情
-export function detail(data: object) {
+export function detail(data: { id: string; sampleNo?: string; sampleName?: string }) {
return request({
url: '/business/outsourceProject/apply/detail',
method: 'post',
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index dba2e12..1b994e2 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -28,7 +28,6 @@
return request({
url: '/business/outsourceCertificate/add',
method: 'post',
- responseType: 'blob',
data,
})
}
@@ -37,7 +36,15 @@
return request({
url: '/business/outsourceCertificate/update',
method: 'post',
- responseType: 'blob',
+ data,
+ })
+}
+
+// 样品列表
+export function getSampleListByCertificate(data: any) {
+ return request({
+ url: `/customer/sample/listPageBySubpackageCertificate?offset=${data.offset}&limit=${data.limit}`,
+ method: 'post',
data,
})
}
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index 5427add..9775e03 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -72,7 +72,7 @@
},
},
{
- path: 'equipmentReminderDetail/:id',
+ path: 'equipmentReminderDetail/:type/:id',
name: 'EquipmentReminderDetail',
component: () => import('@/views/business/board/equipmentReminder/detail.vue'),
meta: {
diff --git a/src/views/business/board/equipmentReminder/components/baseInfo.vue b/src/views/business/board/equipmentReminder/components/baseInfo.vue
new file mode 100644
index 0000000..b83f205
--- /dev/null
+++ b/src/views/business/board/equipmentReminder/components/baseInfo.vue
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }}
+
+ 暂无
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/detail.vue b/src/views/business/board/equipmentReminder/detail.vue
index 97064a2..05ef2b7 100644
--- a/src/views/business/board/equipmentReminder/detail.vue
+++ b/src/views/business/board/equipmentReminder/detail.vue
@@ -1,11 +1,184 @@
-
-
- 设备到期提醒详情
+
+
+
+ 保存
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue
index 301487b..e0570fa 100644
--- a/src/views/business/board/equipmentReminder/list.vue
+++ b/src/views/business/board/equipmentReminder/list.vue
@@ -94,7 +94,19 @@
// 点击详情
const handleEdit = (row: IList) => {
- $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ // $router.push(`/board/equipmentReminderDetail/${row.id}`)
+ $router.push({
+ // name: 'EquipmentReminderDetail',
+ path: `/board/equipmentReminderDetail/detail/${row.id}`,
+ // params: {
+ // type: 'detail',
+ // },
+ query: {
+ title: '详情',
+ name: '固定资产',
+ id: row.id,
+ },
+ })
}
// 点击搜索
diff --git a/src/views/business/fieldTest/approve/approve-interface.ts b/src/views/business/fieldTest/approve/approve-interface.ts
index aad0410..d7ec099 100644
--- a/src/views/business/fieldTest/approve/approve-interface.ts
+++ b/src/views/business/fieldTest/approve/approve-interface.ts
@@ -39,6 +39,7 @@
applyPerson: string // 申请人
applyPersonName: string // 申请人名称
applyTime: string // 申请时间
+ directorId: string // 负责人id
directorName: string // 负责人
taskSource: string // 任务来源-字典code
taskSourceName: string // 任务来源-字典value
diff --git a/src/views/business/fieldTest/approve/edit.vue b/src/views/business/fieldTest/approve/edit.vue
index c9be5b6..04dcffe 100644
--- a/src/views/business/fieldTest/approve/edit.vue
+++ b/src/views/business/fieldTest/approve/edit.vue
@@ -17,7 +17,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import type { userType } from '@/views/system/user/user-interface'
import SelectDeviceDialog from '@/views/device/receive/selectDeviceDialog.vue'
-import { addFieldTestApproveList, failUpdateFieldTestApprove, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
+import { addFieldTestApproveList, failUpdateFieldTestApprove, getDetail, submit, updateFieldTestApprove } from '@/api/business/fieldTest/apply'
const user = useUserStore() // 用户信息
const { proxy } = getCurrentInstance() as any
const $router = useRouter() // 关闭页面使用
@@ -33,6 +33,7 @@
const pageType = ref('add') // 页面类型: add, edit, detail
const infoId = ref('') // 列表id
const submitId = ref('') // 新建提交时所用的id
+const $route = useRoute() // 路由参数
const ruleFormRef = ref() // 表单ref
const form = ref({
siteExecutiveNo: '', // 现场检测编号
@@ -40,6 +41,7 @@
applyPerson: '', // 申请人
applyPersonName: '', // 申请人名称
applyTime: '', // 申请时间
+ directorId: '', // 负责人id
directorName: '', // 负责人
taskSource: '', // 任务来源-字典code
taskSourceName: '', // 任务来源-字典value
@@ -66,7 +68,7 @@
})
// 校验规则
const formRules = ref({
- directorName: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
+ directorId: [{ required: true, message: '要求负责人不能为空', trigger: ['blur', 'change'] }],
taskSource: [{ required: true, message: '要求任务来源不能为空', trigger: ['blur', 'change'] }],
preCost: [{ required: true, message: '要求预计计量费用不能为空', trigger: ['blur', 'change'] }],
preStartTime: [{ required: true, message: '要求预计开始时间不能为空', trigger: ['blur', 'change'] }],
@@ -77,6 +79,13 @@
executiveItem: [{ required: true, message: '要求现场测试、校准或检定项目不能为空', trigger: ['blur', 'change'] }],
orderCode: [{ required: true, message: '要求委托书编号不能为空', trigger: ['blur', 'change'] }],
})
+// -----------------------------------------------路由参数---------------------------------
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// ---------------------------------------------负责人-----------------------------------
// 选择器模糊查询
const remoteMethod = (query: string) => {
@@ -153,7 +162,7 @@
const meterPersonColumns = ref([
{ text: '姓名', value: 'name', width: '220' },
{ text: '人员编号', value: 'staffNo', width: '160' },
- { text: '工作部门', value: 'deptId' },
+ { text: '工作部门', value: 'deptName' },
{ text: '计量专业', value: 'major' },
{ text: '证书编号', value: 'verifierCertificateNo' },
{ text: '证书有效期', value: 'certificateDate', width: '120' },
@@ -175,7 +184,10 @@
// 只添加列表里不存在的
const index = form.value.meterStaffList.findIndex((i: any) => item.staffNo === i.staffNo)
if (index === -1) {
- form.value.meterStaffList.push(item)
+ form.value.meterStaffList.push({
+ ...item,
+ deptName: item.deptId,
+ })
}
})
}
@@ -199,7 +211,7 @@
{
name: '', // 姓名
staffNo: '', // 人员编号
- deptId: '', // 工作部门
+ deptName: '', // 工作部门
major: '', // 计量专业
verifierCertificateNo: '', // 证书编号
certificateDate: '', // 证书有效期
@@ -345,19 +357,25 @@
if (index !== -1) {
form.value.equipmentInfoList.splice(indexEquipment, 1)
}
- form.value.equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
+ //
+ const equipmentInfoList = form.value.equipmentInfoList.map((item: { id: string }) => {
return {
id: item.id,
}
})
- form.value.meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
+ const meterStaffList = form.value.meterStaffList.map((item: { id: string }) => {
return {
id: item.id,
}
})
+ const params = {
+ ...form.value,
+ meterStaffList,
+ equipmentInfoList,
+ }
// 新建
if (pageType.value === 'add') {
- addFieldTestApproveList(form.value).then((res) => {
+ addFieldTestApproveList(params).then((res) => {
submitId.value = res.data.data
ElMessage.success('保存成功')
loading.close()
@@ -368,7 +386,7 @@
// 保存
else if (pageType.value === 'edit') {
if (approvalStatusName.value === '未通过-驳回') {
- failUpdateFieldTestApprove(form.value).then((res) => {
+ failUpdateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -377,7 +395,7 @@
})
}
else {
- updateFieldTestApprove(form.value).then((res) => {
+ updateFieldTestApprove(params).then((res) => {
ElMessage.success('保存成功')
loading.close()
close()
@@ -415,12 +433,39 @@
}
}
-onMounted(() => {
- if (pageType.value !== 'detail') {
- fetchUserList() // 获取用户列表
- getDict()// 字典
- }
+// 获取详细信息
+const getInfo = () => {
+ 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 changedirectorId = (val) => {
+ console.log('00000', val)
+}
+
+onMounted(async () => {
+ fetchUserList() // 获取用户列表
+ await getDict()// 字典
+ form.value.processId = $route.query.processId as string // 任务id
+ approvalStatusName.value = $route.query.approvalStatusName as string // 审批类型名称
if (pageType.value !== 'add') {
+ getInfo() // 获取详情
getApprovalRecord(form.value.processId)
}
form.value.siteExecutiveName = '现场检测审批单' // 现场检测审批名字
@@ -488,16 +533,18 @@
-
+
diff --git a/src/views/business/fieldTest/approve/list.vue b/src/views/business/fieldTest/approve/list.vue
index ff359d2..e24ed44 100644
--- a/src/views/business/fieldTest/approve/list.vue
+++ b/src/views/business/fieldTest/approve/list.vue
@@ -36,9 +36,9 @@
const columns = ref([
{ text: '现场检测编号', value: 'siteExecutiveNo', align: 'center', width: '160px' },
{ text: '委托方名称', value: 'customerName', align: 'center' },
- { text: '联系人', value: 'director', align: 'center' },
- { text: '电话', value: 'phone', align: 'center' },
- { text: '委托方地址', value: 'fullAddress', align: 'center' },
+ { text: '联系人', value: 'deliverer', align: 'center' },
+ { text: '电话', value: 'delivererTel', align: 'center' },
+ { text: '委托方地址', value: 'customerAddress', align: 'center' },
{ text: '现场测试、校准或检定项目', value: 'executiveItem', align: 'center' },
{ text: '负责人', value: 'directorName', align: 'center' },
{ text: '申请时间', value: 'applyTime', align: 'center', width: '180px' },
@@ -201,14 +201,13 @@
approvalDialog.value.initDialog('refuse', row.taskId)
}
else if (val === 'detail' || val === 'edit') { // 详情和编辑
- // $router.push({
- // path: `subpackage/apply/${val}/${row.id}`,
- // query: {
- // formId: listQuery.value.formId,
- // approvalStatusName: row.applyApprovalStatusName, // 审批状态名称
- // applyProcessId: row.applyProcessId, // 流程实例
- // },
- // })
+ $router.push({
+ path: `/fieldTest/approve/${val}/${row.id}`,
+ query: {
+ approvalStatusName: row.approvalStatusName, // 审批状态名称
+ processId: row.processId, // 流程实例
+ },
+ })
}
}
// 审批结束回调
diff --git a/src/views/business/fieldTest/components/selectApproveList.vue b/src/views/business/fieldTest/components/selectApproveList.vue
new file mode 100644
index 0000000..bcf7f88
--- /dev/null
+++ b/src/views/business/fieldTest/components/selectApproveList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/edit.vue b/src/views/business/fieldTest/record/edit.vue
index 438dbfa..da49a12 100644
--- a/src/views/business/fieldTest/record/edit.vue
+++ b/src/views/business/fieldTest/record/edit.vue
@@ -2,8 +2,12 @@
-
+
@@ -122,7 +206,7 @@
-
+
选择
@@ -201,7 +285,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/fieldTest/record/record-interface.ts b/src/views/business/fieldTest/record/record-interface.ts
index 46d3ed0..725e074 100644
--- a/src/views/business/fieldTest/record/record-interface.ts
+++ b/src/views/business/fieldTest/record/record-interface.ts
@@ -36,5 +36,6 @@
temperature: string // 温度
humidity: string // 湿度
remark: string // 备注
+ siteExecutiveEquipmentRelationList: any
}
diff --git a/src/views/business/schedule/interchangeReceipt/selectOrder.vue b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
index 1b04afb..5501edf 100644
--- a/src/views/business/schedule/interchangeReceipt/selectOrder.vue
+++ b/src/views/business/schedule/interchangeReceipt/selectOrder.vue
@@ -61,7 +61,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急 2全部 1是 0否
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
})
@@ -117,7 +117,7 @@
customerName: '', // 委托方名称
deliverer: '', // 送样人
isUrgent: 2, // 是否加急
- status: 0, // 接收状态
+ status: 2, // 接收状态 2已接收
offset: 1,
limit: 5,
}
@@ -202,7 +202,7 @@
/>
-
+
{
+ getOrderSampleList(listQuery.value).then((response) => {
list.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
diff --git a/src/views/business/subpackage/certificate/certificate-interface.ts b/src/views/business/subpackage/certificate/certificate-interface.ts
index 6b96a33..2ebbadd 100644
--- a/src/views/business/subpackage/certificate/certificate-interface.ts
+++ b/src/views/business/subpackage/certificate/certificate-interface.ts
@@ -16,7 +16,7 @@
certificateCode: string // 证书号
certificateName: string // 证书名称
outsourcerName: string // 检测单位名称
- printStatus: string // 打印状态(1已打印、0未打印,不传为查询全部)
+ printStatus: string | number // 打印状态(1已打印、0未打印,不传为查询全部)
sampleName: string // 样品名称
sampleNo: string // 样品编号
sampleModel: string // 型号
@@ -26,10 +26,11 @@
// 详情表单
export interface IForm {
+ id: string // 主键
certificateCode: string // 证书号
certificateName: string // 证书名称
- expirationDate: string // 证书有效期
- issuanceDate: string // 证书出具日期
+ expirationDate?: string // 证书有效期
+ issuanceDate?: string // 证书出具日期
certificateFile: string // 证书文件
originalRecordFile: string // 原始记录文件
orderId: string // 委托书id
diff --git a/src/views/business/subpackage/certificate/components/selectSample.vue b/src/views/business/subpackage/certificate/components/selectSample.vue
index c738f9b..0c8d48b 100644
--- a/src/views/business/subpackage/certificate/components/selectSample.vue
+++ b/src/views/business/subpackage/certificate/components/selectSample.vue
@@ -5,9 +5,10 @@
import { ElMessage } from 'element-plus'
import type { ISampleList } from '../../subpackage-interface'
import type { TableColumn } from '@/components/NormalTable/table_interface'
-import { getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
+import { detail, getListPage, listPageBySubpackage } from '@/api/business/subpackage/apply'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IList } from '@/views/business/subpackage/apply/apply-interface'
+import { getSampleListByCertificate } from '@/api/business/subpackage/certificate'
const props = defineProps({
visible: {
@@ -33,7 +34,7 @@
})
const emits = defineEmits(['changeVisible', 'clickConfirmSample'])
-const sampleType = '1' // 默认分包项目
+const sampleType = ref('1') // 默认分包项目
const sampleTypeMap = [
{
id: '1',
@@ -44,39 +45,31 @@
name: '样品库',
},
]
-const projectMap = [
- {
- id: '1',
- name: '分包项目',
- },
- {
- id: '2',
- name: '样品库',
- },
-]
// 查询条件
-const listQuery: Ref = ref({
- id: '',
- orderCode: '', // 原始记录单编号
+const listQuery = ref({
sampleName: '', // 样品名称
sampleNo: '', // 样品编号
- customerNo: '', // 委托方编号、委托方代码
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
offset: 1,
limit: 20,
})
-// 表头
+// 分包项目表头
const columns = ref([
{ text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
{ text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
- { text: '分包方编号', value: 'customerNo', align: 'center' },
+ // { text: '分包方编号', value: 'customerNo', align: 'center' },
{ text: '分包方名称', value: 'customerName', align: 'center' },
{ text: '样品型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
{ text: '备注', value: 'remark', align: 'center', width: '180px' },
])
+// 样品库表头
+const sampleColumns = ref([
+ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center', fixed: true },
+ { text: '样品名称', value: 'sampleName', width: '120', align: 'center', fixed: true },
+ { text: '样品型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center', width: '180px' },
+ { text: '备注', value: 'remark', align: 'center', width: '180px' },
+])
// 表格数据
const list = ref([])
// 总数
@@ -86,23 +79,6 @@
// 选中的内容
const checkoutList = ref([])
-// 数据查询
-function fetchData(isNowPage = false) {
- loadingTable.value = true
- if (!isNowPage) {
- // 是否显示当前页,否则跳转第一页
- listQuery.value.offset = 1
- }
- // listQuery.value.customerId = props.customerId
- // listQuery.value.id = props.orderId
- listQuery.value.customerNo = props.customerNo
- listPageBySubpackage(listQuery.value).then((response) => {
- list.value = response.data.rows
- total.value = parseInt(response.data.total)
- loadingTable.value = false
- })
-}
-
// 多选发生改变时
function handleSelectionChange(e: any) {
checkoutList.value = e.map((item: any) => {
@@ -112,37 +88,6 @@
}
})
}
-// 点击搜索
-const searchList = () => {
- fetchData(true)
-}
-// 点击重置
-const clearList = () => {
- listQuery.value = {
- id: '',
- orderCode: '', // 原始记录单编号
- sampleName: '', // 样品名称
- sampleNo: '', // 样品编号
- customerNo: '', // 委托方id
- customerName: '', // 委托方名称
- startTime: '',
- endTime: '',
- offset: 1,
- limit: 20,
- }
- fetchData(true)
-}
-
-// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
-const changePage = (val: { size?: number; page?: number }) => {
- if (val && val.size) {
- listQuery.value.limit = val.size
- }
- if (val && val.page) {
- listQuery.value.offset = val.page
- }
- fetchData(true)
-}
// ---------------------------------------分包项目----------------------------------------
const projectList = ref([]) // 分包已通过项目列表
@@ -167,7 +112,6 @@
const response = await getListPage(params)
projectList.value = response.data.rows
projectListOptions.value = response.data.rows
- selectProject.value = response.data.rows[0].id
}
// 选择器模糊查询
@@ -185,7 +129,68 @@
projectListOptions.value = projectList.value
}
}
+
+// 获取详情信息
+const getDetail = (id: string) => {
+ loadingTable.value = true
+ detail({ id, sampleName: listQuery.value.sampleName, sampleNo: listQuery.value.sampleNo }).then((res) => {
+ list.value = res.data.sampleList.filter((item: ISampleList) => {
+ return item !== null
+ })
+ list.value = list.value.map((item: ISampleList) => {
+ return {
+ ...item,
+ id: item.sampleId,
+ }
+ })
+ loadingTable.value = false
+ })
+}
+
+// 选中的项目发生变化
+const changeProject = (id: string) => {
+ getDetail(id)
+}
+
// --------------------------------------------------------------------------------------
+
+// -----------------------------------------样品库---------------------------------------
+// 获取样品库中样品列表
+// 数据查询
+function fetchData(isNowPage = false) {
+ // 查询条件
+ const params = {
+ customerId: '', // 委托方id
+ customerName: '', // 委托方名称
+ sampleName: listQuery.value.sampleName, // 样品名称
+ sampleNo: listQuery.value.sampleNo, // 样品编号
+ offset: listQuery.value.offset,
+ limit: listQuery.value.limit,
+ }
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ listQuery.value.offset = 1
+ }
+ getSampleListByCertificate(params).then((response) => {
+ list.value = response.data.rows
+ total.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
+}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+const changePage = (val: { size?: number; page?: number }) => {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchData(true)
+}
+
+// -----------------------------------------------------------------------------------
// 点击取消
const cancle = () => {
emits('changeVisible', false)
@@ -204,14 +209,52 @@
cancle()
}
+// 点击搜索
+const searchList = () => {
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+// 点击重置
+const clearList = () => {
+ listQuery.value = {
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+ }
+ if (sampleType.value === '1') { // 分包项目
+ getDetail(selectProject.value)
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+}
+
watch(() => props.visible, (newValue) => {
if (newValue) {
- console.log('pppp', props.customerNo)
fetchProjectList().then(() => {
- fetchData(true)
+ sampleType.value === '1'
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id) // 默认分包第一个项目
})
}
})
+watch(sampleType, (newVal) => {
+ list.value = []
+ if (newVal === '1') { // 分包
+ fetchProjectList().then(() => { // 分包项目
+ selectProject.value = projectList.value[0].id
+ getDetail(projectList.value[0].id)
+ })
+ }
+ else { // 样品库
+ fetchData(true)
+ }
+})
@@ -248,17 +291,18 @@
/>
-
+
@@ -268,9 +312,10 @@
@@ -207,9 +232,9 @@
@@ -222,7 +247,8 @@
:disabled="pageType === 'detail'"
/>
-
+
+
+
-
+
无
@@ -325,7 +351,7 @@
-
+
无
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 868f00d..a2dacdb 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -49,7 +49,7 @@
{ text: '型号', value: 'sampleModel', align: 'center' },
{ text: '出厂编号', value: 'manufacturingNo', align: 'center' },
{ text: '检测单位', value: 'outsourcerName', align: 'center' },
- { text: '打印状态', value: 'printStatus', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
{ text: '创建时间', value: 'createTime', align: 'center', width: '180px' },
])
const list = ref([]) // 表格数据
@@ -66,7 +66,12 @@
// 模拟数据
loadingTable.value = false
getcertificateList(listQuery.value).then((response) => {
- list.value = response.data.rows
+ list.value = response.data.rows.map((item: IList) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
total.value = parseInt(response.data.total)
loadingTable.value = false
})
@@ -158,9 +163,22 @@
}
// 点击编辑或详情
-const handleDetail = (row: IList, type: 'edit' | 'detail') => {
+const handleDetail = (row: any, type: 'edit' | 'detail') => {
$router.push({
- path: `/subpackage/certificate/${type}/${row.id}`,
+ path: `/subpackage/${type}/${row.id}`,
+ query: {
+ certificateCode: row.certificateCode, // 证书号
+ certificateName: row.certificateName, // 证书名称
+ expirationDate: row.expirationDate, // 证书有效期
+ issuanceDate: row.issuanceDate, // 证书出具日期
+ certificateFile: row.certificateFile, // 证书文件
+ originalRecordFile: row.originalRecordFile, // 原始记录文件
+ outsourcerName: row.outsourcerName, // 检测单位名称-分包方名称
+ sampleName: row.sampleName, // 样品名称
+ sampleNo: row.sampleNo, // 样品编号
+ sampleModel: row.sampleModel, // 型号
+ manufacturingNo: row.manufacturingNo, // 出厂编号
+ },
})
}
@@ -213,8 +231,8 @@
-
-
+
+
diff --git a/src/views/business/subpackage/check/list.vue b/src/views/business/subpackage/check/list.vue
index 93f9f52..1f28f53 100644
--- a/src/views/business/subpackage/check/list.vue
+++ b/src/views/business/subpackage/check/list.vue
@@ -32,9 +32,9 @@
const active = ref('')
// 查询条件
const listQuery: Ref = ref({
- applicantEndTime: '', // 开始时间
+ checkStartTime: '', // 开始时间
+ checkEndTime: '', // 结束时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -94,9 +94,9 @@
// 重置
const reset = () => {
listQuery.value = {
- applicantEndTime: '', // 开始时间
+ checkEndTime: '', // 开始时间
applicantName: '', // 申请人名称
- applicantStartTime: '', // 结束时间
+ checkStartTime: '', // 结束时间
approvalStatus: active.value, // 申请状态
formId: SCHEDULE.BUSINESS_SUBPACKAGE_CHECK, // 表单id
outsourcerName: '', // 分包方名称
@@ -111,13 +111,15 @@
// 时间变更
watch(timeRange, (val) => {
+ console.log(val[0])
+
if (val) {
- listQuery.value.applicantStartTime = `${val[0]}`
- listQuery.value.applicantEndTime = `${val[1]}`
+ listQuery.value.checkStartTime = `${val[0]}`
+ listQuery.value.checkEndTime = `${val[1]}`
}
else {
- listQuery.value.applicantStartTime = ''
- listQuery.value.applicantEndTime = ''
+ listQuery.value.checkStartTime = ''
+ listQuery.value.checkEndTime = ''
}
})
// 打印
diff --git a/src/views/business/subpackage/record/edit.vue b/src/views/business/subpackage/record/edit.vue
index b5dae4f..b1f507f 100644
--- a/src/views/business/subpackage/record/edit.vue
+++ b/src/views/business/subpackage/record/edit.vue
@@ -16,6 +16,7 @@
import { SCHEDULE } from '@/utils/scheduleDict'
import { detail } from '@/api/business/subpackage/approval'
import { getListPage } from '@/api/business/subpackage/check'
+import { getcertificateList } from '@/api/business/subpackage/certificate'
import { addAbilityList, addPersonList, delAbilityList, delPersonList, getAbilityList, getPersonList } from '@/api/business/subpackage/record'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
@@ -136,6 +137,7 @@
const loadingTable = ref(false) // 表格loading
const checkTotal = ref(0) // 项目记录
+const certificateTotal = ref(0) // 证书记录total
const checkListQuery = ref({
applicantEndTime: '', // 开始时间
applicantName: '', // 申请人名称
@@ -148,6 +150,16 @@
offset: 1,
limit: 20,
})
+const certificateListQuery = ref({
+ certificateCode: '', // 证书号
+ certificateName: '', // 证书名称
+ outsourcerId: '', // 检测单位,分包方id
+ printStatus: '', // 打印状态(1已打印、0未打印,不传为查询全部)
+ sampleName: '', // 样品名称
+ sampleNo: '', // 样品编号
+ offset: 1,
+ limit: 20,
+})
// 获取项目记录
const fetchProjectRecords = function (isNowPage = false) {
loadingTable.value = true
@@ -166,15 +178,23 @@
const fetchContractRecords = () => {
}
-// 获取检定证书 待测试
-const fetchCertifications = function () {
- const postData = {
- sampleId: '',
- customeId: dataForm.value.id,
+// 获取检定证书
+const fetchCertifications = function (isNowPage = false) {
+ loadingTable.value = true
+ if (!isNowPage) {
+ // 是否显示当前页,否则跳转第一页
+ certificateListQuery.value.offset = 1
}
- // getCertificationByCustomer(postData).then((res) => {
- // dataList.value.certificationRecords = res.data.rows
- // })
+ getcertificateList(certificateListQuery.value).then((response) => {
+ dataList.value.certificationRecords = response.data.rows.map((item: any) => {
+ return {
+ ...item,
+ printStatusName: item.printStatus == 0 ? '未打印' : item.printStatus == 1 ? '已打印' : '',
+ }
+ })
+ certificateTotal.value = parseInt(response.data.total)
+ loadingTable.value = false
+ })
}
// 获取人员列表
const fetchPersonList = () => {
@@ -222,12 +242,12 @@
{
name: '项目记录',
columns: [
- { text: '分包项目编号', value: 'projectNo' },
- { text: '分包项目名称', value: 'projectName' },
- { text: '申请人', value: 'applicantName' },
- { text: '申请时间', value: 'applicantTime' },
- { text: '验收状况', value: 'checkConclusion' },
- { text: '验收时间', value: 'checkTime' },
+ { text: '分包项目编号', value: 'projectNo', align: 'center' },
+ { text: '分包项目名称', value: 'projectName', align: 'center' },
+ { text: '申请人', value: 'applicantName', align: 'center' },
+ { text: '申请时间', value: 'applicantTime', align: 'center' },
+ { text: '验收状况', value: 'checkConclusion', align: 'center' },
+ { text: '验收时间', value: 'checkTime', align: 'center' },
],
pagination: true,
list: 'projectRecords',
@@ -236,12 +256,12 @@
{
name: '合同记录',
columns: [
- { text: '合同编号', value: 'contractCode' },
- { text: '合同名称', value: 'contractName' },
- { text: '合同金额', value: 'contractPrice' },
- { text: '合同状态', value: 'contractStatus' },
- { text: '合同时间', value: 'contractTime' },
- { text: '负责人', value: 'aCompanyDutyman' },
+ { text: '合同编号', value: 'contractCode', align: 'center' },
+ { text: '合同名称', value: 'contractName', align: 'center' },
+ { text: '合同金额', value: 'contractPrice', align: 'center' },
+ { text: '合同状态', value: 'contractStatus', align: 'center' },
+ { text: '合同时间', value: 'contractTime', align: 'center' },
+ { text: '负责人', value: 'aCompanyDutyman', align: 'center' },
],
query: {
id: '',
@@ -260,11 +280,14 @@
offset: 1,
},
columns: [
- { text: '证书编号', value: 'certificationCode' },
- { text: '证书名称', value: 'certificationName' },
- { text: '证书类型', value: 'certificationType' },
- { text: '证书出具日期', value: 'effectiveDate' },
- { text: '证书有效期', value: 'expirationDate' },
+ { text: '证书编号', value: 'certificateCode', align: 'center', width: '160px' },
+ { text: '证书名称', value: 'certificateName', align: 'center' },
+ { text: '样品编号', value: 'sampleNo', align: 'center', width: '160px' },
+ { text: '样品名称', value: 'sampleName', align: 'center' },
+ { text: '型号', value: 'sampleModel', align: 'center' },
+ { text: '出厂编号', value: 'manufacturingNo', align: 'center' },
+ { text: '检测单位', value: 'outsourcerName', align: 'center' },
+ { text: '打印状态', value: 'printStatusName', align: 'center' },
],
list: 'certificationRecords',
pagination: true,
@@ -366,6 +389,13 @@
currentMenuDetailObj.value!.searchFunc!()
}
}
+ else if (currentMenuDetail.value === '检定证书') {
+ if (val.value && currentMenuDetailObj) {
+ certificateListQuery.value.offset = val.value.offset
+ certificateListQuery.value.limit = val.value.limit
+ currentMenuDetailObj.value!.searchFunc!()
+ }
+ }
}
// 监听上面表格按钮切换
@@ -957,7 +987,7 @@
-
+
diff --git a/src/views/business/subpackage/subpackage-interface.ts b/src/views/business/subpackage/subpackage-interface.ts
index 4f35907..1e67b23 100644
--- a/src/views/business/subpackage/subpackage-interface.ts
+++ b/src/views/business/subpackage/subpackage-interface.ts
@@ -4,9 +4,11 @@
projectNo: string // 分包项目编号
outsourcerName: string // 分包方名称
applicantName: string // 申请人名称
- applicantStartTime: string // 申请开始日期
- applicantEndTime: string // 申请结束日期
- approvalStatus: string // 审批状态
+ applicantStartTime?: string // 申请开始日期
+ applicantEndTime?: string // 申请结束日期
+ approvalStatus?: string // 审批状态
+ checkStartTime?: string // 开始时间
+ checkEndTime: string // 结束时间
createUserId?: string // 验收人id
formId: string
offset: number
@@ -71,6 +73,7 @@
sampleNo: string // 样品编号
startTime: string // 开始时间
endTime: string // 结束时间
+ sampleId?: string // 样品id
}
// 项目选择查询参数
diff --git a/src/views/device/standingBook/fixedAssets.vue b/src/views/device/standingBook/fixedAssets.vue
index de9dd29..f44160d 100644
--- a/src/views/device/standingBook/fixedAssets.vue
+++ b/src/views/device/standingBook/fixedAssets.vue
@@ -1,4 +1,4 @@
-
+