diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue index 221bdca..2c5c2ff 100644 --- a/src/views/measure/source/components/baseInfoDetail.vue +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -200,7 +200,7 @@ - + - + import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue index 221bdca..2c5c2ff 100644 --- a/src/views/measure/source/components/baseInfoDetail.vue +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -200,7 +200,7 @@ - + - + - + - + - + 无 diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue index 221bdca..2c5c2ff 100644 --- a/src/views/measure/source/components/baseInfoDetail.vue +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -200,7 +200,7 @@ - + - + - + - + - + 无 diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue new file mode 100644 index 0000000..0703ad2 --- /dev/null +++ b/src/views/measure/train/components/planListDialog.vue @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue index 221bdca..2c5c2ff 100644 --- a/src/views/measure/source/components/baseInfoDetail.vue +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -200,7 +200,7 @@ - + - + - + - + - + 无 diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue new file mode 100644 index 0000000..0703ad2 --- /dev/null +++ b/src/views/measure/train/components/planListDialog.vue @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/measure/train/planAdd.vue b/src/views/measure/train/planAdd.vue index 61f6af0..2b67950 100644 --- a/src/views/measure/train/planAdd.vue +++ b/src/views/measure/train/planAdd.vue @@ -51,9 +51,9 @@ const ruleFormRef = ref() const columns = [ { text: '学员名称', value: 'name' }, - { text: '单位名称', value: 'company' }, + { text: '单位名称', value: 'deptName' }, { text: '技术职称', value: 'technologyJob' }, - { text: '签到时间', value: 'signTime', type: '下拉' }, + { text: '签到时间', value: 'createtime' }, ] const dialogVisible = ref(false) const addPersonList = ref({ @@ -91,15 +91,6 @@ { required: true, message: '培训内容不能为空', trigger: 'blur' }, ], }) // 表单验证规则 -// 新增校验规则 -const addRules = ref({ - name: [{ required: true, message: '学员名称不能为空', trigger: 'blur' }], - company: [{ required: true, message: '单位名称不能为空', trigger: 'blur' }], - technologyJob: [ - { required: true, message: '技术职称不能为空', trigger: 'blur' }, - ], - signTime: [{ required: true, message: '签到时间不能为空', trigger: 'blur' }], -}) // 表单验证规则 // 初始化router const $router = useRouter() // 关闭新增页面的回调 @@ -112,22 +103,30 @@ userListRef.value.initDialog() } const addRoow = () => { - Object.keys(addPersonList.value).forEach( - key => (addPersonList.value[key] = ''), + formInline.value.trainStaffList.push( + JSON.parse(JSON.stringify(addPersonList.value)), ) - dialogVisible.value = true +} +// 记录点击的第几行 +const listIndex = ref(0) +// 计量人员Ref +const userTrainRef = ref() +// 选择计量人员 +const handleClick = (index: number) => { + listIndex.value = index + userTrainRef.value.initDialog() } // 点击关闭 const handleClose = () => { dialogVisible.value = false } -// 点击弹窗的完成追加到表格数组中 -const addPushList = () => { - formInline.value.trainStaffList.push( - JSON.parse(JSON.stringify(addPersonList.value)), - ) - handleClose() -} +// // 点击弹窗的完成追加到表格数组中 +// const addPushList = () => { +// formInline.value.trainStaffList.push( +// JSON.parse(JSON.stringify(addPersonList.value)), +// ) +// handleClose() +// } // 删除行 const deleteList = () => { formInline.value.trainStaffList = formInline.value.trainStaffList.filter( @@ -151,7 +150,6 @@ } // 选择完负责人的函数 const confirmPerson = (object: confirmPersonType) => { - console.log(object) formInline.value.director = object.name } if (infoId.value && infoId.value !== '') { @@ -159,6 +157,12 @@ formInline.value = res.data }) } +// 选完计量人员 +const confirmTrainPerson = (object: confirmPersonType) => { + console.log(object) + formInline.value.trainStaffList[listIndex.value] = object + formInline.value.trainStaffList[listIndex.value].staffId = object.id +} // 点击提交 const getAddList = async ( formEl: FormInstance | undefined, @@ -270,11 +274,11 @@ > - + @@ -312,6 +316,7 @@ - - 删除行 - 增加行 + + 删除行 + + align="center" + > + + + + + 选择 + + + + + - - - - - - - - - - - - - - - - - - - + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue index 221bdca..2c5c2ff 100644 --- a/src/views/measure/source/components/baseInfoDetail.vue +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -200,7 +200,7 @@ - + - + - + - + - + 无 diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue new file mode 100644 index 0000000..0703ad2 --- /dev/null +++ b/src/views/measure/train/components/planListDialog.vue @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/measure/train/planAdd.vue b/src/views/measure/train/planAdd.vue index 61f6af0..2b67950 100644 --- a/src/views/measure/train/planAdd.vue +++ b/src/views/measure/train/planAdd.vue @@ -51,9 +51,9 @@ const ruleFormRef = ref() const columns = [ { text: '学员名称', value: 'name' }, - { text: '单位名称', value: 'company' }, + { text: '单位名称', value: 'deptName' }, { text: '技术职称', value: 'technologyJob' }, - { text: '签到时间', value: 'signTime', type: '下拉' }, + { text: '签到时间', value: 'createtime' }, ] const dialogVisible = ref(false) const addPersonList = ref({ @@ -91,15 +91,6 @@ { required: true, message: '培训内容不能为空', trigger: 'blur' }, ], }) // 表单验证规则 -// 新增校验规则 -const addRules = ref({ - name: [{ required: true, message: '学员名称不能为空', trigger: 'blur' }], - company: [{ required: true, message: '单位名称不能为空', trigger: 'blur' }], - technologyJob: [ - { required: true, message: '技术职称不能为空', trigger: 'blur' }, - ], - signTime: [{ required: true, message: '签到时间不能为空', trigger: 'blur' }], -}) // 表单验证规则 // 初始化router const $router = useRouter() // 关闭新增页面的回调 @@ -112,22 +103,30 @@ userListRef.value.initDialog() } const addRoow = () => { - Object.keys(addPersonList.value).forEach( - key => (addPersonList.value[key] = ''), + formInline.value.trainStaffList.push( + JSON.parse(JSON.stringify(addPersonList.value)), ) - dialogVisible.value = true +} +// 记录点击的第几行 +const listIndex = ref(0) +// 计量人员Ref +const userTrainRef = ref() +// 选择计量人员 +const handleClick = (index: number) => { + listIndex.value = index + userTrainRef.value.initDialog() } // 点击关闭 const handleClose = () => { dialogVisible.value = false } -// 点击弹窗的完成追加到表格数组中 -const addPushList = () => { - formInline.value.trainStaffList.push( - JSON.parse(JSON.stringify(addPersonList.value)), - ) - handleClose() -} +// // 点击弹窗的完成追加到表格数组中 +// const addPushList = () => { +// formInline.value.trainStaffList.push( +// JSON.parse(JSON.stringify(addPersonList.value)), +// ) +// handleClose() +// } // 删除行 const deleteList = () => { formInline.value.trainStaffList = formInline.value.trainStaffList.filter( @@ -151,7 +150,6 @@ } // 选择完负责人的函数 const confirmPerson = (object: confirmPersonType) => { - console.log(object) formInline.value.director = object.name } if (infoId.value && infoId.value !== '') { @@ -159,6 +157,12 @@ formInline.value = res.data }) } +// 选完计量人员 +const confirmTrainPerson = (object: confirmPersonType) => { + console.log(object) + formInline.value.trainStaffList[listIndex.value] = object + formInline.value.trainStaffList[listIndex.value].staffId = object.id +} // 点击提交 const getAddList = async ( formEl: FormInstance | undefined, @@ -270,11 +274,11 @@ > - + @@ -312,6 +316,7 @@ - - 删除行 - 增加行 + + 删除行 + + align="center" + > + + + + + 选择 + + + + + - - - - - - - - - - - - - - - - - - - + + diff --git a/src/views/measure/train/trainLogAdd.vue b/src/views/measure/train/trainLogAdd.vue index 91e9bf4..afdae6d 100644 --- a/src/views/measure/train/trainLogAdd.vue +++ b/src/views/measure/train/trainLogAdd.vue @@ -3,6 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import type { IOptions } from './plan_interface' import userListDialog from './components/userListDialog.vue' +import PlanListDialog from './components/planListDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' import useUserStore from '@/store/modules/user.ts' import { @@ -10,7 +11,6 @@ getListLogAdd, getListLogDetail, getListLogupdate, - getPlanIdList, } from '@/api/system/plan' const loading = ref(false) // 表单加载状态 @@ -76,6 +76,7 @@ trainEffect: [{ required: true, message: '培训效果不能为空', trigger: 'blur' }], problems: [{ required: true, message: '存在问题不能为空', trigger: 'blur' }], improveMethod: [{ required: true, message: '改进措施不能为空', trigger: 'blur' }], + trainContent: [{ required: true, message: '培训内容不能为空', trigger: 'blur' }], }) // 表单验证规则 const userListRef = ref() const addPersonList = ref({ @@ -92,21 +93,6 @@ const ListDetail = ref([]) // 控制是否显示输入框开关 const isNameShow = ref(true) -// 获取到组织信息 -const getDept = () => { - const params = { - createTime: '', - deptId: 0, - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - trainTime: '', - } - getPlanIdList(params).then((response) => { - options.value = response.data - }) -} -getDept() // 初始化router const $router = useRouter() // 关闭新增页面的回调 @@ -124,8 +110,8 @@ remark: '', signTime: '', technologyJob: '', - planId: 0, - staffId: 0, + planId: '', + staffId: '', isNameShow: false, } trainList.value.push(object) @@ -171,6 +157,8 @@ // 点击删除和编辑的参数类型 interface rowReturn { isNameShow: boolean + id: string + planName: string } // 双击表格中默认显示的name const dblclickName = (row: rowReturn) => { @@ -192,6 +180,7 @@ if (buttonType === '提交' && pageType.value !== 'edit') { getListLogAdd(formInline.value).then((res) => { if (res.code === 200) { + ElMessage.success('提交成功') close() } }) @@ -205,6 +194,7 @@ formInline.value.id = infoId.value getListLogupdate(formInline.value).then((res) => { if (res.code === 200) { + ElMessage.success('提交成功') close() } }) @@ -230,10 +220,28 @@ userListRef.value.initDialog() listIndex.value = index } + +const planListDialog = ref() +// 选择培训数据 +const selectPlanId = () => { + planListDialog.value.initDialog() +} +// 选择培训数据完成之后 +const confirmPlan = (data: rowReturn) => { + getListDetail({ id: data.id }).then((res) => { + ListDetail.value = res.data.trainStaffList + res.data.preparer = name + formInline.value = { ...res.data } + formInline.value.planId = data.id + formInline.value.trainName = data.planName + }) +} // 选择完负责人的函数 -const confirmPerson = (object: object) => { +const confirmPerson = (object: rowReturn) => { if (!trainList.value.includes(object)) { trainList.value[listIndex.value] = object + trainList.value[listIndex.value].staffId = object.id + delete trainList.value[listIndex.value].id } else { ElMessage.warning('该学员已经存在') @@ -273,11 +281,11 @@ > - + @@ -291,22 +299,22 @@ - - + - - + + + 选择 + + + @@ -373,6 +381,17 @@ + + + + + + + + + diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 655d6e7..064780f 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -73,6 +73,15 @@ }) } +// 删除申请列表信息 +export function getOperateDelete(data: object) { + return request({ + url: '/standard/approval/operate/delete', + method: 'post', + data, + }) +} + // 新建申请列表信息 export function getStandardLisAdd(data: object) { return request({ diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 21710f8..cf3ce2d 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -209,13 +209,45 @@ name: 'reportOnCredentialsAdd', component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'), meta: { - title: '检测详情', + title: '证书报告详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/lab/reportOnCredentialsApproval', }, }, + { + path: 'primitiveLogList', + name: 'PrimitiveLogList', + component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'), + meta: { + title: '原始记录', + icon: 'ep:key', + auth: '/lab/primitiveLogList', + }, + }, + { + path: 'environmentalList', + name: 'EnvironmentalList', + component: () => import('@/views/business/lab/environmental/environmentalList.vue'), + meta: { + title: '环境记录单', + icon: 'ep:key', + auth: '/lab/environmentalList', + }, + }, + { + path: 'environmentalList/:type/:id?', + name: 'EnvironmentalAdd', + component: () => import('@/views/business/lab/environmental/environmentalAdd.vue'), + meta: { + title: '环境记录单详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/environmentalList', + }, + }, ], }, ] diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index 993d66c..cbc5c47 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -238,7 +238,7 @@ }, }, { - path: ':type/:id?', + path: 'Apply:type/:id?', name: 'standardListAdd', component: () => import('@/views/device/standardEquipment/components/listApply/listPageAdd.vue'), meta: { diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue new file mode 100644 index 0000000..e572d09 --- /dev/null +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -0,0 +1,250 @@ + + + + + + + + 提交 + + + 打印 + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/business/lab/environmental/environmentalList.vue b/src/views/business/lab/environmental/environmentalList.vue new file mode 100644 index 0000000..98230be --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList.vue @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue new file mode 100644 index 0000000..a598765 --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -0,0 +1,13 @@ + + + + + 原始记录 + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue index 0b15289..97bea6f 100644 --- a/src/views/business/lab/reportOnCredentials/components/baseInfo.vue +++ b/src/views/business/lab/reportOnCredentials/components/baseInfo.vue @@ -218,397 +218,395 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue index 007d8dc..5c3eb39 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsList.vue @@ -212,9 +212,9 @@ } // 跳转到详情 const goDetail = (row: ISupplier) => { - $router.push(`approve/${props.status}/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/detail/${row.id}`) } -// 新建溯源供方 +// 新建证书报告 const add = () => { $router.push('/lab/reportOnCredentialsApproval/add') } @@ -258,7 +258,7 @@ approvalSubmit(row) break case '编辑': - $router.push(`/source/edit/${row.id}`) + $router.push(`/lab/reportOnCredentialsApproval/edit/${row.id}`) break case '同意': approvalDialog.value.initDialog('agree', row.taskId) @@ -299,10 +299,10 @@ if (checkoutList.value.length <= 0 && list.value.length > 0) { printJSON(list.value, properties, '证书报告列表') } - else if (checkoutList.value.length > 0) { - const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) - printJSON(printList, properties, '证书报告列表') - } + // else if (checkoutList.value.length > 0) { + // const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id)) + // printJSON(printList, properties, '证书报告列表') + // } else { ElMessage.warning('无可打印内容') } diff --git a/src/views/device/deviceMaintenance/components/checkList.vue b/src/views/device/deviceMaintenance/components/checkList.vue index a9f3bf7..f3024cf 100644 --- a/src/views/device/deviceMaintenance/components/checkList.vue +++ b/src/views/device/deviceMaintenance/components/checkList.vue @@ -17,7 +17,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', @@ -101,7 +101,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index 8fec470..bd296f1 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -37,7 +37,7 @@ formId: SCHEDULE.DEVICE_FIX_ACCEPTANCE, applyName: '', applyNo: '', - applyType: '', + applyType: '9', businessKeys: [], checkApplyNo: '', checkEndDate: '', diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 1666540..9c8bb99 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -30,10 +30,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -452,7 +452,7 @@ @@ -461,7 +461,7 @@ @@ -470,7 +470,7 @@ @@ -489,7 +489,7 @@ @@ -500,7 +500,7 @@ @@ -513,10 +513,10 @@ @@ -527,7 +527,7 @@ @@ -549,7 +549,7 @@ @@ -559,7 +559,7 @@ *{{ item.text }} - + - + diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 0fda7a8..37248bd 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -38,7 +38,7 @@ applyName: '', applyNo: '', applyPerson: '', - applyType: '7', + applyType: '8', applyUnit: '', businessKeys: [], createUser: '', diff --git a/src/views/device/deviceMaintenance/components/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listPageAdd.vue index 4e2432f..9f04b8b 100644 --- a/src/views/device/deviceMaintenance/components/listPageAdd.vue +++ b/src/views/device/deviceMaintenance/components/listPageAdd.vue @@ -35,10 +35,10 @@ buttonArray.value = ['同意', '驳回', '拒绝'] } else if (pageType.value === 'edit') { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } else { - buttonArray.value = ['保存', '提交'] + buttonArray.value = ['提交', '保存'] } if ($route.params.id) { infoId.value = $route.params.id as string @@ -55,7 +55,7 @@ applyNo: '', applyPerson: '', applyPersonName: '', - applyType: '7', + applyType: '8', applyTypeName: '', applyUnit: '', applyUnitName: '', @@ -65,19 +65,6 @@ createUser: '', equipmentInfoList: [], equipmentList: [], - fileList: [ - { - applyId: null, - createTime: '', - createUser: null, - fileName: '', - id: null, - isDel: null, - minioFileName: '', - remark: '', - updateTime: '', - }, - ], id: null, isDel: null, overhaulPerson: '', @@ -372,7 +359,12 @@ // 点击增加行 const addRoow = () => { // list.value.push(JSON.parse(JSON.stringify(addList.value))) - addRowRef.value.initDialog({ title: '' }) + if (formInline.value.equipmentList.length >= 1 && formInline.value.equipmentList[formInline.value.equipmentList.length - 1].equipmentId === '') { + ElMessage.warning('请完善上一条设备信息') + } + else { + addRowRef.value.initDialog({ title: '' }) + } } // 标准配套设备更换表格删除行 @@ -460,7 +452,7 @@ @@ -469,7 +461,7 @@ @@ -479,7 +471,7 @@ @@ -488,7 +480,7 @@ @@ -509,7 +501,7 @@ v-model="formInline.time" type="datetime" style="width: 100%;" - placeholder="请选择检修时间" + :placeholder="pageType === 'detail' ? '' : '请选择检修时间'" format="YYYY/MM/DD HH:mm" value-format="YYYY-MM-DD h:m" :disabled="pageType === 'detail'" @@ -522,7 +514,7 @@ @@ -561,29 +553,10 @@ *{{ item.text }} - - - - - + diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue index 6f1ff1a..0557531 100644 --- a/src/views/device/deviceMaintenance/components/manageAdd.vue +++ b/src/views/device/deviceMaintenance/components/manageAdd.vue @@ -198,7 +198,7 @@ @@ -218,11 +218,11 @@ @@ -256,7 +256,7 @@ { + sessionStorage.setItem('maintenceCheckListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceCheckListMenu') || '全部' + sessionStorage.getItem('maintenceCheckListMenu') ? sessionStorage.removeItem('maintenceCheckListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/deviceMaintenance/maintenanceList.vue b/src/views/device/deviceMaintenance/maintenanceList.vue index aecaa95..56c7c1b 100644 --- a/src/views/device/deviceMaintenance/maintenanceList.vue +++ b/src/views/device/deviceMaintenance/maintenanceList.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('maintenceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('maintenceListMenu') || '全部' + sessionStorage.getItem('maintenceListMenu') ? sessionStorage.removeItem('maintenceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue index cf3712f..6f7bf0b 100644 --- a/src/views/device/standardEquipment/components/listApply/listPage.vue +++ b/src/views/device/standardEquipment/components/listApply/listPage.vue @@ -6,7 +6,7 @@ import ListSourceAdd from './listPageAdd.vue' import type { TableColumn } from '@/components/NormalTable/table_interface' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' -import { getExportList, getStandardLisdelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' +import { getExportList, getOperateDelete, getUsersDept, getstandardEquipmentApplyList, submitStandardEquipmentApply } from '@/api/device/standard' import { uploadApi } from '@/api/system/notice' import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' @@ -145,7 +145,7 @@ meterMajor: '', organizeName: '', organizeNo: '', - organizeType: '2', + organizeType: '3', pdeptId: null, offset: 1, limit: 999999, @@ -191,7 +191,7 @@ }, ) .then(() => { - getStandardLisdelete({ id: row.id as string }).then((res) => { + getOperateDelete({ id: row.id as string, taskId: row.taskId }).then((res) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -209,7 +209,11 @@ name: 'standardListAdd', params: { type: 'detail', + }, + query: { + title: '详情', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) @@ -271,7 +275,11 @@ name: 'standardListAdd', params: { type: 'edit', + }, + query: { + title: '编辑', id: row.id, + applyType: props.applyType, formId: props.schedule, }, }) diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue index 9832687..c2fca9d 100644 --- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue +++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue @@ -2,13 +2,23 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' +import EquipmentDialog from '../standardList/equipmentDialog.vue' import StandarDialog from './standardDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { getStaffList } from '@/api/measure/person' import { getTypeSelect } from '@/api/system/price' -import { getStandardLisAdd, getStandardList, getStandardListDetail, getUsersDept, submitStandardEquipmentApply, updateStandardEquipmentApply } from '@/api/device/standard' +import { + getStandardLisAdd, + getStandardLisdetali, + getStandardListDetail, + getUsersDept, + submitStandardEquipmentApply, + updateStandardEquipmentApply, +} from '@/api/device/standard' import { UploadFile } from '@/api/measure/file' import useUserStore from '@/store/modules/user' +import showPhoto from '@/views/system/tool/showPhoto.vue' import { submitApproval } from '@/api/approval' const loading = ref(false) // 表单加载状态 const infoId = ref('') // id @@ -26,18 +36,18 @@ const { username } = useUserStore() if ($route.params && $route.params.type) { pageType.value = $route.params.type as string - formId.value = $route.params.formId as string + formId.value = $route.query.formId as string if (pageType.value === 'add') { buttonArray.value = ['提交', '保存'] } else if (pageType.value === 'edit') { - buttonArray.value = ['提交'] + buttonArray.value = ['保存'] } else { buttonArray.value = ['同意', '驳回', '拒绝'] } - if ($route.params.id) { - infoId.value = $route.params.id as string + if ($route.query.id) { + infoId.value = $route.query.id as string } } const ruleFormRef = ref() @@ -87,18 +97,19 @@ const fromListInfo = ref({ applyDept: '', - applyEquipmentList: [], applyNo: '', applyType: $route.query.applyType, applyTypeName: '', approvalStatus: '', + applyEquipmentList: [], + fixedAssetsList: [], approvalStatusName: '', constructionStandardUnitName: '', createTime: null, createUser: null, fileList: [], id: null, - isDel: 0, + isDel: '', processId: '', remark: '', standardEquipmentId: '', @@ -185,8 +196,7 @@ }) } // 数据 -const list = ref([ -]) +const list = ref([]) // 标准配套设备更换表格总数 const total = ref(0) // 审批弹窗开关 @@ -214,13 +224,12 @@ choose: Boolean time: Boolean } -// 申请文档列表 -const filesList = ref([]) + // 标准配套设备更换表头 const columns = ref([ { text: '设备名称', - value: 'assetTypeName', + value: 'equipmentName', align: 'center', required: true, choose: true, @@ -228,7 +237,7 @@ }, { text: '设备编号', - value: 'assetNo', + value: 'equipmentNo', align: 'center', required: true, choose: false, @@ -244,7 +253,7 @@ }, { text: '测量范围', - value: 'assetTypeName', + value: 'mesureRange', align: 'center', required: true, choose: false, @@ -252,7 +261,7 @@ }, { text: '使用部门', - value: 'purpose', + value: 'useDept', align: 'center', required: true, choose: false, @@ -260,7 +269,7 @@ }, { text: '检定时间', - value: 'manufacturingDate', + value: 'mesureDate', align: 'center', required: true, choose: false, @@ -268,7 +277,7 @@ }, { text: '检定结果', - value: 'managerStateName', + value: 'mesureResult', align: 'center', required: true, choose: false, @@ -276,7 +285,7 @@ }, { text: '有效日期', - value: 'mesureCycleName', + value: 'validDate', align: 'center', required: true, choose: false, @@ -347,109 +356,147 @@ $router.back() } const rules = ref({ - standardName: [{ required: true, message: '标准名称不能为空', trigger: 'blur' }], + standardName: [ + { required: true, message: '标准名称不能为空', trigger: 'blur' }, + ], projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }], - constructionStandardProject: [{ required: true, message: '建标项目不能为空', trigger: 'blur' }], - organizeNo: [{ required: true, message: '组织机构代码不能为空', trigger: 'blur' }], - constructionStandardUnitName: [{ required: true, message: '建标单位名称不能为空', trigger: 'blur' }], - standardOwner: [{ required: true, message: '标准负责人不能为空', trigger: 'blur' }], - contactInfo: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }], + constructionStandardProject: [ + { required: true, message: '建标项目不能为空', trigger: 'blur' }, + ], + organizeNo: [ + { required: true, message: '组织机构代码不能为空', trigger: 'blur' }, + ], + constructionStandardUnitName: [ + { required: true, message: '建标单位名称不能为空', trigger: 'blur' }, + ], + standardOwner: [ + { required: true, message: '标准负责人不能为空', trigger: 'blur' }, + ], + contactInfo: [ + { required: true, message: '联系方式不能为空', trigger: 'blur' }, + ], category: [{ required: true, message: '类 别不能为空', trigger: 'blur' }], - standardLevel: [{ required: true, message: '标准等级不能为空', trigger: 'blur' }], - transmitRange: [{ required: true, message: '传递范围不能为空', trigger: 'blur' }], - preparationDate: [{ required: true, message: '筹建日期不能为空', trigger: 'blur' }], - managerState: [{ required: true, message: '管理状态不能为空', trigger: 'blur' }], - measureMajor: [{ required: true, message: '计量专业不能为空', trigger: 'blur' }], - assessmentUnit: [{ required: true, message: '考核单位不能为空', trigger: 'blur' }], - assessDate: [{ required: true, message: '考核日期不能为空', trigger: 'blur' }], - uncertainty: [{ required: true, message: '不确定度不能为空', trigger: 'blur' }], - mesureRange: [{ required: true, message: '测量范围不能为空', trigger: 'blur' }], - standardTemperature: [{ required: true, message: '标准温度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准温度只能为数字', trigger: 'blur' }], - standardHumidity: [{ required: true, message: '标准湿度不能为空', trigger: 'blur' }, - { pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, message: '标准湿度只能为数字', trigger: 'blur' }], + standardLevel: [ + { required: true, message: '标准等级不能为空', trigger: 'blur' }, + ], + transmitRange: [ + { required: true, message: '传递范围不能为空', trigger: 'blur' }, + ], + preparationDate: [ + { required: true, message: '筹建日期不能为空', trigger: 'blur' }, + ], + managerState: [ + { required: true, message: '管理状态不能为空', trigger: 'blur' }, + ], + measureMajor: [ + { required: true, message: '计量专业不能为空', trigger: 'blur' }, + ], + assessmentUnit: [ + { required: true, message: '考核单位不能为空', trigger: 'blur' }, + ], + assessDate: [ + { required: true, message: '考核日期不能为空', trigger: 'blur' }, + ], + uncertainty: [ + { required: true, message: '不确定度不能为空', trigger: 'blur' }, + ], + mesureRange: [ + { required: true, message: '测量范围不能为空', trigger: 'blur' }, + ], + standardTemperature: [ + { required: true, message: '标准温度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准温度只能为数字', + trigger: 'blur', + }, + ], + standardHumidity: [ + { required: true, message: '标准湿度不能为空', trigger: 'blur' }, + { + pattern: /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/, + message: '标准湿度只能为数字', + trigger: 'blur', + }, + ], }) // 表单验证规则 -// 获取数据 -const fetchData = () => { - const params = { - standardNo: '', - standardName: '', - category: '', - managerState: null, - standardLaboratory: null, - preparationDate: null, - id: null, - offset: 1, - limit: 1000000, - } - getStandardList(params).then((response) => { - standardList.value = response.data.rows - }) +// 第几条数据选择 +const listIndex = ref(0) + +const uploadIndex = (row) => { + listIndex.value = row.$index } -fetchData() // 上传请求 const uploadQuarterlyEvaluateFile = (file: any) => { const fd = new FormData() fd.append('multipartFile', file.file) UploadFile(fd).then((res) => { if (res.code === 200) { - fromListInfo.value.fileList[0].minioFileName = res.data[0] + fromListInfo.value.fileList[listIndex.value].minioFileName = res.data[0] // 重置当前验证 ElMessage.success('文件上传成功') + fromListInfo.value.fileList[listIndex.value].choose = true } }) } -const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => { - ElMessage.warning('只能上传一个文件') -} -// 移除时触发 -const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => { - return ElMessageBox.confirm( - `确认移除${uploadFile.name}文件吗 ?`, - ).then( - () => true, - () => false, - - ) -} // 选择标准配套设备 -const userListDialog = ref() -// 第几条数据选择 -const listIndex = ref(0) +const equipmentDialog = ref() // 点击标准配套设备选择按钮 const chooseList = (row: object, index: number) => { listIndex.value = index - userListDialog.value.initDialog() + equipmentDialog.value.initDialog() } -// 选择完成之后的回调 -const confirmPerson = (row: any) => { - fromListInfo.value.applyEquipmentList[listIndex.value] = row[0] - console.log(fromListInfo.value) +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} +// 点击增加行 +const addRoow = () => { + if ( + fromListInfo.value.applyEquipmentList.length >= 1 + && fromListInfo.value.applyEquipmentList[ + fromListInfo.value.applyEquipmentList.length - 1 + ].equipmentId === '' + ) { + ElMessage.warning('请完善上一条设备信息') + } + else { + fromListInfo.value.applyEquipmentList.push({ + equipmentId: '', + standardApplyId: '', + }) + fromListInfo.value.fixedAssetsList.push({}) + } +} +// 选择设备之后 +const equipmentAddRow = (data: object) => { + fromListInfo.value.fixedAssetsList[listIndex.value] = data + fromListInfo.value.applyEquipmentList[listIndex.value].equipmentId = data.id + fromListInfo.value.applyEquipmentList[listIndex.value].standardApplyId + = infoId.value || '' } // 增加申请文档列表 const addRow = () => { - fromListInfo.value.fileList.push({}) + if ( + fromListInfo.value.fileList.length >= 1 + && !fromListInfo.value.fileList[fromListInfo.value.fileList.length - 1] + .fileName + ) { + ElMessage.warning('请完善上一条文件信息') + } + else { + fromListInfo.value.fileList.push({ choose: false }) + } } // 点击文件预览 const uploadShow = (e: any) => { const URL = window.URL || window.webkitURL window.open(URL.createObjectURL(e.raw)) } -const testForm = ref({ - fileList: [], - fileContent: '', -}) -const handleFileChange = (files: any, fileList: any) => { - testForm.value.fileList = fileList - const reader = new FileReader() - reader.readAsText(files.raw) - // reader.onload = (e) => { - // testForm.value.fileContent = e.target!.result?.replace( - // /\n|\r\n/g, - // '', - // ) - // } -} + // 表格选中的数组 const SelectionList = ref([]) // 标准实验室发生改变row类型 @@ -461,25 +508,24 @@ id: string } // 标准实验室发生改变 -const changeDeptList = (row: rowReturn) => { - formInline.value.laboratoryOwnerContact = row.phone - formInline.value.laboratoryOwner = row.director -} +const changeDeptList = (row: rowReturn) => {} // 标准实验室清空时 -const clearDeptList = () => { - formInline.value.laboratoryOwnerContact = '' - formInline.value.laboratoryOwner = '' -} +const clearDeptList = () => {} // 获取详情信息 const getInfo = (id: string | number) => { - getStandardListDetail({ id }).then((res) => { + getStandardLisdetali({ id }).then((res) => { Object.keys(res.data).map((item) => { - if (typeof (res.data[item]) === 'number') { + if (typeof res.data[item] === 'number') { res.data[item] = res.data[item].toString() } }) - formInline.value = res.data - formInline.value.standardEquipmentId = res.data.id + formInline.value = res.data.meterStandardEquipment + fromListInfo.value.standardEquipmentId = res.data.id + fromListInfo.value.fixedAssetsList = res.data.fixedAssetsList + fromListInfo.value.fileList = res.data.fileList.map((item) => { + item.choose = true + return item + }) }) } if (pageType.value !== 'add') { @@ -492,23 +538,18 @@ taskId: fromListInfo.value.taskId!, comments: '', } - ElMessageBox.confirm( - '确认取消该审批吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ) - .then(() => { - submitApproval('revoke', params).then((res) => { - ElMessage({ - type: 'success', - message: '取消成功', - }) + ElMessageBox.confirm('确认取消该审批吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + submitApproval('revoke', params).then((res) => { + ElMessage({ + type: 'success', + message: '取消成功', }) }) + }) } // 点击数据后的操作按钮 const clickBtn = (buttonType: string) => { @@ -532,19 +573,17 @@ // 点击顶部一排按钮 const getAddList = async (item: string, formEl: FormInstance | undefined) => { if (item === '保存' && pageType.value === 'add') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - getStandardLisAdd(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + getStandardLisAdd(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -555,19 +594,17 @@ }) } else if (item === '保存' && pageType.value === 'edit') { - if (!formEl) { return } + if (!formEl) { + return + } await formEl.validate((valid, fields) => { if (valid) { - ElMessageBox.confirm( - '确认保存吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { - updateStandardEquipmentApply(formInline.value).then((res) => { + ElMessageBox.confirm('确认保存吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + updateStandardEquipmentApply(fromListInfo.value).then((res) => { if (res.code === 200) { ElMessage.success('保存成功') addId.value = res.data.id @@ -582,7 +619,10 @@ ElMessage.warning('请先保存') } else { - submitStandardEquipmentApply({ id: addId.value, formId: formId.value }).then((res) => { + submitStandardEquipmentApply({ + id: addId.value, + formId: formId.value, + }).then((res) => { if (res.code === 200) { close() } @@ -613,21 +653,14 @@ }, ] // 审批完成后的回调 -const approvalSuccess = () => { - -} +const approvalSuccess = () => {} // 选择标准装置弹窗ref const standarDialog = ref() // 选择了标准名称后 -const standardChange = (e: any) => { - // getInfo(e) - // formInline.value.standardOwner = e +const standardChange = () => { standarDialog.value.initDialog() } -// 点击增加行 -const addRoow = () => { - fromListInfo.value.applyEquipmentList.push({}) -} + // 点击关闭 const handleClose = () => { dialogVisible.value = false @@ -635,27 +668,25 @@ // 标准配套设备更换表格删除行 const removeRow = (type: string) => { if (SelectionList.value.length > 0) { - ElMessageBox.confirm( - '确认删除选中的数据吗?', - '提示', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - }, - ).then(() => { + ElMessageBox.confirm('确认删除选中的数据吗?', '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { if (type == '1') { - // 删除行 - list.value = list.value.filter((item) => { + // 删除行 + fromListInfo.value.fixedAssetsList = fromListInfo.value.fixedAssetsList.filter((item) => { return !SelectionList.value.includes(item) }) ElMessage.success('删除成功') } else { - // 删除行 - fromListInfo.value.fileList = fromListInfo.value.fileList.filter((item) => { - return !SelectionList.value.includes(item) - }) + // 删除行 + fromListInfo.value.fileList = fromListInfo.value.fileList.filter( + (item) => { + return !SelectionList.value.includes(item) + }, + ) ElMessage.success('删除成功') } }) @@ -668,10 +699,13 @@ const handleSelectionChange = (e: any) => { SelectionList.value = e } -watch(() => formInline.value, (newVal) => { -// 变化后存储 -}, -{ deep: true, immediate: true }) +watch( + () => formInline.value, + (newVal) => { + // 变化后存储 + }, + { deep: true, immediate: true }, +) // 审批弹窗的关闭 const applyListClose = () => { applyShow.value = false @@ -684,8 +718,26 @@ } applyListClose() } +// 标准装置发生改变data类型 +interface dataReturn { + id: string +} +// 获取详情信息 +const getStandarInfo = (id: string | number) => { + getStandardListDetail({ id }).then((res) => { + Object.keys(res.data).map((item) => { + if (typeof res.data[item] === 'number') { + res.data[item] = res.data[item].toString() + } + }) + formInline.value = res.data + fromListInfo.value.standardEquipmentId = res.data.id + }) +} // 选择标准装置完成之后 -const StandarAddRow = (data: object) => {} +const StandarAddRow = (data: dataReturn) => { + getStandarInfo(data.id) +} @@ -714,9 +766,18 @@ - - - + + + 选择 @@ -1024,7 +1085,7 @@ - + - + - + - - - + - + @@ -1109,11 +1160,7 @@ - + 增加行 - + *{{ item.text }} - + - + 增加行 - + 删除行 @@ -1181,7 +1231,11 @@ style="width: 100%;" @selection-change="handleSelectionChange" > - + + - + - + 上传 @@ -1241,7 +1297,10 @@ :key="index" :timestamp="activity.timestamp" > - 审批人:{{ activity.name }} 审批意见:{{ activity.content }} + + 审批人:{{ activity.name }} + 审批意见:{{ activity.content }} + @@ -1252,10 +1311,12 @@ + + - diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index 07b439b..f8fd6a9 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -2,6 +2,7 @@ import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import type { FormInstance, UploadProps, UploadUserFile } from 'element-plus' +import dayjs from 'dayjs' import type { IOptions } from '../../standard_interface' import laboratoryDialog from './laboratoryDialog.vue' import { getStaffList } from '@/api/measure/person' @@ -167,6 +168,7 @@ name: string organizeName: string id: string + deptId: string } // 实验室ref const laboratorydialog = ref() @@ -199,6 +201,13 @@ const personClick = () => { personListdialog.value.initDialog() } +// 测试数据 +const simulateObject = { + data: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 有效日期 + certificateNo: '199926465422', // 证书编号 + authorityOfIssue: 'xxx公司', // 发证单位 + authorityOfDate: dayjs(`${new Date()}`).format('YYYY.MM.DD'), // 发证日期 +} // 选择负责人回调函数 const personListAdd = (data: rowReturn) => { formInline.value.standardOwner = data.id @@ -206,7 +215,7 @@ } // 选择完科室的回调函数 const laboratoryListAdd = (data: rowReturn) => { - formInline.value.standardLaboratory = data.id + formInline.value.standardLaboratory = data.deptId formInline.value.standardLaboratoryName = data.organizeName formInline.value.laboratoryOwner = data.director formInline.value.laboratoryOwnerContact = data.phone @@ -227,6 +236,7 @@ - - - + /> - + diff --git a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue index 6453565..6bda8e3 100644 --- a/src/views/device/standardEquipment/components/standardList/verificationDialog.vue +++ b/src/views/device/standardEquipment/components/standardList/verificationDialog.vue @@ -29,22 +29,11 @@ const total = ref(0) const select = ref(-1) const columns = [ - { - text: '设备名称', - value: 'equipmentName', - }, - { - text: '设备编号', - value: 'equipmentNo', - }, - { - text: '型号', - value: 'manufacturer', - }, - { - text: '管理状态', - value: 'managerStateName', - }] + { text: '文件名称', value: 'fileName' }, + { text: '文件编号', value: 'fileNo' }, + { text: '文件号', value: 'fileCode', align: 'center' }, + { text: '实施时间', value: 'effectiveTime', align: 'center', width: '180' }, + { text: '实施状态', value: 'effectiveStatusName', align: 'center', width: '100' }] // 获取数据列表 const fetchData = () => { diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue index ff45abc..59f7d87 100644 --- a/src/views/device/standardEquipment/components/standardListAdd.vue +++ b/src/views/device/standardEquipment/components/standardListAdd.vue @@ -243,17 +243,32 @@ const listIndex = ref(0) // 新增计量人员 const measurementPersonnelAddRow = () => { - measurementPersonnel.value.push({}) + if (measurementPersonnel.value.length >= 1 && !measurementPersonnel.value[measurementPersonnel.value.length - 1].name) { + ElMessage.warning('请先完善上一条计量人员信息') + } + else { + measurementPersonnel.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增标准配套设备 const corollaryEquipmentAddRow = () => { - corollaryEquipment.value.push({}) + if (corollaryEquipment.value.length >= 1 && !corollaryEquipment.value[corollaryEquipment.value.length - 1].name) { + ElMessage.warning('请先完善上一条配套设备信息') + } + else { + corollaryEquipment.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 新增检定规程 const regulationVerificationAddRow = () => { - regulationVerification.value.push({}) + if (regulationVerification.value.length >= 1 && !regulationVerification.value[regulationVerification.value.length - 1].name) { + ElMessage.warning('请先完善上一条检定规程信息') + } + else { + regulationVerification.value.push({}) + } // ElMessage.warning('请先选择上一条信息') } // 设备ref @@ -350,6 +365,7 @@ measurementPersonnel.value[listIndex.value] = object measurementPersonnel.value[listIndex.value].standardEquipmentId = infoId.value measurementPersonnel.value[listIndex.value].userId = object.id + delete object.id setBatchAdd(measurementPersonnel.value).then((res) => {}) } else { @@ -364,6 +380,7 @@ corollaryEquipment.value[listIndex.value].standardEquipmentId = infoId.value corollaryEquipment.value[listIndex.value].equipmentId = data.id corollaryEquipment.value[listIndex.value].name = data.equipmentName + delete data.id getEquipmenteAdd(corollaryEquipment.value[listIndex.value]).then((res) => {}) } else { @@ -378,6 +395,7 @@ regulationVerification.value[listIndex.value].standardEquipmentId = infoId.value regulationVerification.value[listIndex.value].verifyRegulationId = data.id regulationVerification.value[listIndex.value].name = data.fileName + delete data.id getRegulationAdd(regulationVerification.value[listIndex.value]).then((res) => {}) } else { diff --git a/src/views/measure/source/approve.vue b/src/views/measure/source/approve.vue index 61e887a..44861c9 100644 --- a/src/views/measure/source/approve.vue +++ b/src/views/measure/source/approve.vue @@ -75,6 +75,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('sourceListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('sourceListMenu') || '全部' + sessionStorage.getItem('sourceListMenu') ? sessionStorage.removeItem('sourceListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue] diff --git a/src/views/measure/source/components/baseInfoDetail.vue b/src/views/measure/source/components/baseInfoDetail.vue index 221bdca..2c5c2ff 100644 --- a/src/views/measure/source/components/baseInfoDetail.vue +++ b/src/views/measure/source/components/baseInfoDetail.vue @@ -200,7 +200,7 @@ - + - + - + - + - + 无 diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue new file mode 100644 index 0000000..0703ad2 --- /dev/null +++ b/src/views/measure/train/components/planListDialog.vue @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/measure/train/planAdd.vue b/src/views/measure/train/planAdd.vue index 61f6af0..2b67950 100644 --- a/src/views/measure/train/planAdd.vue +++ b/src/views/measure/train/planAdd.vue @@ -51,9 +51,9 @@ const ruleFormRef = ref() const columns = [ { text: '学员名称', value: 'name' }, - { text: '单位名称', value: 'company' }, + { text: '单位名称', value: 'deptName' }, { text: '技术职称', value: 'technologyJob' }, - { text: '签到时间', value: 'signTime', type: '下拉' }, + { text: '签到时间', value: 'createtime' }, ] const dialogVisible = ref(false) const addPersonList = ref({ @@ -91,15 +91,6 @@ { required: true, message: '培训内容不能为空', trigger: 'blur' }, ], }) // 表单验证规则 -// 新增校验规则 -const addRules = ref({ - name: [{ required: true, message: '学员名称不能为空', trigger: 'blur' }], - company: [{ required: true, message: '单位名称不能为空', trigger: 'blur' }], - technologyJob: [ - { required: true, message: '技术职称不能为空', trigger: 'blur' }, - ], - signTime: [{ required: true, message: '签到时间不能为空', trigger: 'blur' }], -}) // 表单验证规则 // 初始化router const $router = useRouter() // 关闭新增页面的回调 @@ -112,22 +103,30 @@ userListRef.value.initDialog() } const addRoow = () => { - Object.keys(addPersonList.value).forEach( - key => (addPersonList.value[key] = ''), + formInline.value.trainStaffList.push( + JSON.parse(JSON.stringify(addPersonList.value)), ) - dialogVisible.value = true +} +// 记录点击的第几行 +const listIndex = ref(0) +// 计量人员Ref +const userTrainRef = ref() +// 选择计量人员 +const handleClick = (index: number) => { + listIndex.value = index + userTrainRef.value.initDialog() } // 点击关闭 const handleClose = () => { dialogVisible.value = false } -// 点击弹窗的完成追加到表格数组中 -const addPushList = () => { - formInline.value.trainStaffList.push( - JSON.parse(JSON.stringify(addPersonList.value)), - ) - handleClose() -} +// // 点击弹窗的完成追加到表格数组中 +// const addPushList = () => { +// formInline.value.trainStaffList.push( +// JSON.parse(JSON.stringify(addPersonList.value)), +// ) +// handleClose() +// } // 删除行 const deleteList = () => { formInline.value.trainStaffList = formInline.value.trainStaffList.filter( @@ -151,7 +150,6 @@ } // 选择完负责人的函数 const confirmPerson = (object: confirmPersonType) => { - console.log(object) formInline.value.director = object.name } if (infoId.value && infoId.value !== '') { @@ -159,6 +157,12 @@ formInline.value = res.data }) } +// 选完计量人员 +const confirmTrainPerson = (object: confirmPersonType) => { + console.log(object) + formInline.value.trainStaffList[listIndex.value] = object + formInline.value.trainStaffList[listIndex.value].staffId = object.id +} // 点击提交 const getAddList = async ( formEl: FormInstance | undefined, @@ -270,11 +274,11 @@ > - + @@ -312,6 +316,7 @@ - - 删除行 - 增加行 + + 删除行 + + align="center" + > + + + + + 选择 + + + + + - - - - - - - - - - - - - - - - - - - + + diff --git a/src/views/measure/train/trainLogAdd.vue b/src/views/measure/train/trainLogAdd.vue index 91e9bf4..afdae6d 100644 --- a/src/views/measure/train/trainLogAdd.vue +++ b/src/views/measure/train/trainLogAdd.vue @@ -3,6 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import type { IOptions } from './plan_interface' import userListDialog from './components/userListDialog.vue' +import PlanListDialog from './components/planListDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' import useUserStore from '@/store/modules/user.ts' import { @@ -10,7 +11,6 @@ getListLogAdd, getListLogDetail, getListLogupdate, - getPlanIdList, } from '@/api/system/plan' const loading = ref(false) // 表单加载状态 @@ -76,6 +76,7 @@ trainEffect: [{ required: true, message: '培训效果不能为空', trigger: 'blur' }], problems: [{ required: true, message: '存在问题不能为空', trigger: 'blur' }], improveMethod: [{ required: true, message: '改进措施不能为空', trigger: 'blur' }], + trainContent: [{ required: true, message: '培训内容不能为空', trigger: 'blur' }], }) // 表单验证规则 const userListRef = ref() const addPersonList = ref({ @@ -92,21 +93,6 @@ const ListDetail = ref([]) // 控制是否显示输入框开关 const isNameShow = ref(true) -// 获取到组织信息 -const getDept = () => { - const params = { - createTime: '', - deptId: 0, - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - trainTime: '', - } - getPlanIdList(params).then((response) => { - options.value = response.data - }) -} -getDept() // 初始化router const $router = useRouter() // 关闭新增页面的回调 @@ -124,8 +110,8 @@ remark: '', signTime: '', technologyJob: '', - planId: 0, - staffId: 0, + planId: '', + staffId: '', isNameShow: false, } trainList.value.push(object) @@ -171,6 +157,8 @@ // 点击删除和编辑的参数类型 interface rowReturn { isNameShow: boolean + id: string + planName: string } // 双击表格中默认显示的name const dblclickName = (row: rowReturn) => { @@ -192,6 +180,7 @@ if (buttonType === '提交' && pageType.value !== 'edit') { getListLogAdd(formInline.value).then((res) => { if (res.code === 200) { + ElMessage.success('提交成功') close() } }) @@ -205,6 +194,7 @@ formInline.value.id = infoId.value getListLogupdate(formInline.value).then((res) => { if (res.code === 200) { + ElMessage.success('提交成功') close() } }) @@ -230,10 +220,28 @@ userListRef.value.initDialog() listIndex.value = index } + +const planListDialog = ref() +// 选择培训数据 +const selectPlanId = () => { + planListDialog.value.initDialog() +} +// 选择培训数据完成之后 +const confirmPlan = (data: rowReturn) => { + getListDetail({ id: data.id }).then((res) => { + ListDetail.value = res.data.trainStaffList + res.data.preparer = name + formInline.value = { ...res.data } + formInline.value.planId = data.id + formInline.value.trainName = data.planName + }) +} // 选择完负责人的函数 -const confirmPerson = (object: object) => { +const confirmPerson = (object: rowReturn) => { if (!trainList.value.includes(object)) { trainList.value[listIndex.value] = object + trainList.value[listIndex.value].staffId = object.id + delete trainList.value[listIndex.value].id } else { ElMessage.warning('该学员已经存在') @@ -273,11 +281,11 @@ > - + @@ -291,22 +299,22 @@ - - + - - + + + 选择 + + + @@ -373,6 +381,17 @@ + + + + + + + + + diff --git a/src/views/measure/train/trainPlanApprove.vue b/src/views/measure/train/trainPlanApprove.vue index 2421142..1e3144a 100644 --- a/src/views/measure/train/trainPlanApprove.vue +++ b/src/views/measure/train/trainPlanApprove.vue @@ -76,6 +76,17 @@ currentTab.value = currentMenu?.name } } + +// 组件销毁时存入自己的审批类型 下次进去还是原来的审批类型 +onUnmounted(() => { + sessionStorage.setItem('trinPlanListMenu', currentTab.value) +}) +// 挂载的时候找到之前存过的审批类型 +onMounted(() => { + currentTab.value = sessionStorage.getItem('trinPlanListMenu') || '全部' + sessionStorage.getItem('trinPlanListMenu') ? sessionStorage.removeItem('trinPlanListMenu') : '' +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusList[newValue] currentButtons.value = buttonsSet[newValue]