diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/report/index.vue b/src/views/quality/internal/report/index.vue
index 151c2e4..c6b73b1 100644
--- a/src/views/quality/internal/report/index.vue
+++ b/src/views/quality/internal/report/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/report/index.vue b/src/views/quality/internal/report/index.vue
index 151c2e4..c6b73b1 100644
--- a/src/views/quality/internal/report/index.vue
+++ b/src/views/quality/internal/report/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/scene/components/edit.vue b/src/views/quality/internal/scene/components/edit.vue
index 5efbc09..3ff0480 100644
--- a/src/views/quality/internal/scene/components/edit.vue
+++ b/src/views/quality/internal/scene/components/edit.vue
@@ -16,6 +16,7 @@
import quality from '/public/config/quality.json'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
+import { getInternalPlanList, detailInternalPlan } from '@/api/quality/internal/internalPlan'
// import { getUserList } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
@@ -60,7 +61,7 @@
// 自动填充数据
if ($route.query.data) {
const data = JSON.parse($route.query.data as string)
- console.log(data, 'data')
+ // console.log(data, 'data')
// 获取用户列表
ruleForm.value.yearNum = data.yearNum
ruleForm.value.yearTime = data.yearTime
@@ -71,6 +72,10 @@
// ruleForm.value.groupLeader = data.groupLeader
ruleForm.value.sceneUsers = data.teamMembers
}
+ // 填充
+ ruleForm.value.requirements = `(1)受审核部门认证做好审核前准备,指定专人配合内审组工作;
+(2)现场审核结束后,各受审部门及时提交整改计划并抓紧落实;
+(3)整改验证应在3个月内(${dayjs().add(3,'month').format('YYYY-MM-DD')}前)结束,特殊情况不能完成的需经批准后才可延期。`
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
@@ -86,6 +91,38 @@
})
}
})
+// 根据年 、次、实验室自动匹配
+watch([() =>ruleForm.value.bizLabCode, () => ruleForm.value.yearNum, () => ruleForm.value.yearTime], () => {
+ if($route.path.includes('create')) {
+ if(ruleForm.value.bizLabCode && ruleForm.value.yearNum && ruleForm.value.yearTime) {
+ // 需要查询对应的内部审核计划
+ getInternalPlanList({
+ planStatus: '1',
+ bizLabCode: ruleForm.value.bizLabCode,
+ offset: '1',
+ limit: 20,
+ }).then(res => {
+ const data = res.data.rows
+ if(data.filter(item => String(item.yearNum) === ruleForm.value.yearNum && String(item.yearTime) === ruleForm.value.yearTime).length) {
+ // 自动填充
+ console.log(data[0])
+ detailInternalPlan({id: data[0].id}).then(res => {
+ console.log(res.data, '详情')
+ ruleForm.value.groupLeader = res.data.groupLeader
+ ruleForm.value.sceneUsers = (res.data.planUserList || []).map((item) => item.userName)
+ ruleForm.value.auditObjective = res.data.auditObjective
+ ruleForm.value.auditScope = res.data.auditScope
+ })
+ }
+ else {
+ ElMessage.warning('请先创建对应的内部审核计划')
+ }
+ })
+ }
+ }
+},{
+ deep: true
+})
const labelList = ref<{ id: string; value: string; name: string }[]>()// 实验室+
const yearList = ref<{ id: string; value: string; name: string }[]>([])// 年度
const monthList = ref<{ id: string; value: string; name: string }[]>([])// 月份
@@ -534,7 +571,7 @@
-
+
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/report/index.vue b/src/views/quality/internal/report/index.vue
index 151c2e4..c6b73b1 100644
--- a/src/views/quality/internal/report/index.vue
+++ b/src/views/quality/internal/report/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/scene/components/edit.vue b/src/views/quality/internal/scene/components/edit.vue
index 5efbc09..3ff0480 100644
--- a/src/views/quality/internal/scene/components/edit.vue
+++ b/src/views/quality/internal/scene/components/edit.vue
@@ -16,6 +16,7 @@
import quality from '/public/config/quality.json'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
+import { getInternalPlanList, detailInternalPlan } from '@/api/quality/internal/internalPlan'
// import { getUserList } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
@@ -60,7 +61,7 @@
// 自动填充数据
if ($route.query.data) {
const data = JSON.parse($route.query.data as string)
- console.log(data, 'data')
+ // console.log(data, 'data')
// 获取用户列表
ruleForm.value.yearNum = data.yearNum
ruleForm.value.yearTime = data.yearTime
@@ -71,6 +72,10 @@
// ruleForm.value.groupLeader = data.groupLeader
ruleForm.value.sceneUsers = data.teamMembers
}
+ // 填充
+ ruleForm.value.requirements = `(1)受审核部门认证做好审核前准备,指定专人配合内审组工作;
+(2)现场审核结束后,各受审部门及时提交整改计划并抓紧落实;
+(3)整改验证应在3个月内(${dayjs().add(3,'month').format('YYYY-MM-DD')}前)结束,特殊情况不能完成的需经批准后才可延期。`
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
@@ -86,6 +91,38 @@
})
}
})
+// 根据年 、次、实验室自动匹配
+watch([() =>ruleForm.value.bizLabCode, () => ruleForm.value.yearNum, () => ruleForm.value.yearTime], () => {
+ if($route.path.includes('create')) {
+ if(ruleForm.value.bizLabCode && ruleForm.value.yearNum && ruleForm.value.yearTime) {
+ // 需要查询对应的内部审核计划
+ getInternalPlanList({
+ planStatus: '1',
+ bizLabCode: ruleForm.value.bizLabCode,
+ offset: '1',
+ limit: 20,
+ }).then(res => {
+ const data = res.data.rows
+ if(data.filter(item => String(item.yearNum) === ruleForm.value.yearNum && String(item.yearTime) === ruleForm.value.yearTime).length) {
+ // 自动填充
+ console.log(data[0])
+ detailInternalPlan({id: data[0].id}).then(res => {
+ console.log(res.data, '详情')
+ ruleForm.value.groupLeader = res.data.groupLeader
+ ruleForm.value.sceneUsers = (res.data.planUserList || []).map((item) => item.userName)
+ ruleForm.value.auditObjective = res.data.auditObjective
+ ruleForm.value.auditScope = res.data.auditScope
+ })
+ }
+ else {
+ ElMessage.warning('请先创建对应的内部审核计划')
+ }
+ })
+ }
+ }
+},{
+ deep: true
+})
const labelList = ref<{ id: string; value: string; name: string }[]>()// 实验室+
const yearList = ref<{ id: string; value: string; name: string }[]>([])// 年度
const monthList = ref<{ id: string; value: string; name: string }[]>([])// 月份
@@ -534,7 +571,7 @@
-
+
diff --git a/src/views/quality/internal/scene/index.vue b/src/views/quality/internal/scene/index.vue
index f043238..a819272 100644
--- a/src/views/quality/internal/scene/index.vue
+++ b/src/views/quality/internal/scene/index.vue
@@ -133,6 +133,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -282,7 +285,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/report/index.vue b/src/views/quality/internal/report/index.vue
index 151c2e4..c6b73b1 100644
--- a/src/views/quality/internal/report/index.vue
+++ b/src/views/quality/internal/report/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/scene/components/edit.vue b/src/views/quality/internal/scene/components/edit.vue
index 5efbc09..3ff0480 100644
--- a/src/views/quality/internal/scene/components/edit.vue
+++ b/src/views/quality/internal/scene/components/edit.vue
@@ -16,6 +16,7 @@
import quality from '/public/config/quality.json'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
+import { getInternalPlanList, detailInternalPlan } from '@/api/quality/internal/internalPlan'
// import { getUserList } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
@@ -60,7 +61,7 @@
// 自动填充数据
if ($route.query.data) {
const data = JSON.parse($route.query.data as string)
- console.log(data, 'data')
+ // console.log(data, 'data')
// 获取用户列表
ruleForm.value.yearNum = data.yearNum
ruleForm.value.yearTime = data.yearTime
@@ -71,6 +72,10 @@
// ruleForm.value.groupLeader = data.groupLeader
ruleForm.value.sceneUsers = data.teamMembers
}
+ // 填充
+ ruleForm.value.requirements = `(1)受审核部门认证做好审核前准备,指定专人配合内审组工作;
+(2)现场审核结束后,各受审部门及时提交整改计划并抓紧落实;
+(3)整改验证应在3个月内(${dayjs().add(3,'month').format('YYYY-MM-DD')}前)结束,特殊情况不能完成的需经批准后才可延期。`
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
@@ -86,6 +91,38 @@
})
}
})
+// 根据年 、次、实验室自动匹配
+watch([() =>ruleForm.value.bizLabCode, () => ruleForm.value.yearNum, () => ruleForm.value.yearTime], () => {
+ if($route.path.includes('create')) {
+ if(ruleForm.value.bizLabCode && ruleForm.value.yearNum && ruleForm.value.yearTime) {
+ // 需要查询对应的内部审核计划
+ getInternalPlanList({
+ planStatus: '1',
+ bizLabCode: ruleForm.value.bizLabCode,
+ offset: '1',
+ limit: 20,
+ }).then(res => {
+ const data = res.data.rows
+ if(data.filter(item => String(item.yearNum) === ruleForm.value.yearNum && String(item.yearTime) === ruleForm.value.yearTime).length) {
+ // 自动填充
+ console.log(data[0])
+ detailInternalPlan({id: data[0].id}).then(res => {
+ console.log(res.data, '详情')
+ ruleForm.value.groupLeader = res.data.groupLeader
+ ruleForm.value.sceneUsers = (res.data.planUserList || []).map((item) => item.userName)
+ ruleForm.value.auditObjective = res.data.auditObjective
+ ruleForm.value.auditScope = res.data.auditScope
+ })
+ }
+ else {
+ ElMessage.warning('请先创建对应的内部审核计划')
+ }
+ })
+ }
+ }
+},{
+ deep: true
+})
const labelList = ref<{ id: string; value: string; name: string }[]>()// 实验室+
const yearList = ref<{ id: string; value: string; name: string }[]>([])// 年度
const monthList = ref<{ id: string; value: string; name: string }[]>([])// 月份
@@ -534,7 +571,7 @@
-
+
diff --git a/src/views/quality/internal/scene/index.vue b/src/views/quality/internal/scene/index.vue
index f043238..a819272 100644
--- a/src/views/quality/internal/scene/index.vue
+++ b/src/views/quality/internal/scene/index.vue
@@ -133,6 +133,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -282,7 +285,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/workManage/components/edit.vue b/src/views/quality/internal/workManage/components/edit.vue
index 382a347..5732e19 100644
--- a/src/views/quality/internal/workManage/components/edit.vue
+++ b/src/views/quality/internal/workManage/components/edit.vue
@@ -4,7 +4,7 @@
import fileList from './fileList.vue'
import { getDictByCode } from '@/api/system/dict'
import { getUserList } from '@/api/system/user'
-import { addWork, detailWork } from '@/api/quality/internal/workManage'
+import { addWork, detailWork, updateWork } from '@/api/quality/internal/workManage'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
import useUserStore from '@/store/modules/user'
@@ -88,34 +88,50 @@
userList1.value = await filterUser(quality.roleTips['质量负责人'])
// userList2.value = await filterUser(quality.roleTips['内审组长'])
userList3.value = await filterUser(quality.roleTips['内审组员'])
- console.log(userList3.value, 'userList3.value')
+ // console.log(userList3.value, 'userList3.value')
}
fetchDict()
const fileRef = ref()
// 新建
-const createRow = () => {
+const isSave = ref(false)
+const createRow = (type: string, isCreate: boolean) => {
const data = {
...ruleForm.value,
internalAuditFiles: fileRef.value.list,
workName: `${ruleForm.value.yearTime}年第${ruleForm.value.yearNum}次内部审核工作`,
createId: userStore.id,
createName: userStore.name,
+ status: type === 'save'? '0': '1'
}
if (ruleForm.value.teamMembers.length) {
data.teamMembers = data.teamMembers.join(',')
- }
- addWork(data).then((res) => {
+ };
+ (isCreate ? addWork : updateWork)(data).then((res) => {
+ if(type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value =true
+ }
+ else {
ElMessage.success('添加成功')
$router.go(-1)
+ }
})
}
// 保存按钮
-const saveForm = async (formEl: FormInstance | undefined) => {
+
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if(type === 'submit' && !isSave.value) {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
if ($route.path.includes('create')) {
- createRow()
+ createRow(type, true)
+ }
+ else {
+ createRow(type, false)
}
// else if ($route.path.includes('update')) {
// updateRow()
@@ -199,7 +215,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/report/index.vue b/src/views/quality/internal/report/index.vue
index 151c2e4..c6b73b1 100644
--- a/src/views/quality/internal/report/index.vue
+++ b/src/views/quality/internal/report/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/scene/components/edit.vue b/src/views/quality/internal/scene/components/edit.vue
index 5efbc09..3ff0480 100644
--- a/src/views/quality/internal/scene/components/edit.vue
+++ b/src/views/quality/internal/scene/components/edit.vue
@@ -16,6 +16,7 @@
import quality from '/public/config/quality.json'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
+import { getInternalPlanList, detailInternalPlan } from '@/api/quality/internal/internalPlan'
// import { getUserList } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
@@ -60,7 +61,7 @@
// 自动填充数据
if ($route.query.data) {
const data = JSON.parse($route.query.data as string)
- console.log(data, 'data')
+ // console.log(data, 'data')
// 获取用户列表
ruleForm.value.yearNum = data.yearNum
ruleForm.value.yearTime = data.yearTime
@@ -71,6 +72,10 @@
// ruleForm.value.groupLeader = data.groupLeader
ruleForm.value.sceneUsers = data.teamMembers
}
+ // 填充
+ ruleForm.value.requirements = `(1)受审核部门认证做好审核前准备,指定专人配合内审组工作;
+(2)现场审核结束后,各受审部门及时提交整改计划并抓紧落实;
+(3)整改验证应在3个月内(${dayjs().add(3,'month').format('YYYY-MM-DD')}前)结束,特殊情况不能完成的需经批准后才可延期。`
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
@@ -86,6 +91,38 @@
})
}
})
+// 根据年 、次、实验室自动匹配
+watch([() =>ruleForm.value.bizLabCode, () => ruleForm.value.yearNum, () => ruleForm.value.yearTime], () => {
+ if($route.path.includes('create')) {
+ if(ruleForm.value.bizLabCode && ruleForm.value.yearNum && ruleForm.value.yearTime) {
+ // 需要查询对应的内部审核计划
+ getInternalPlanList({
+ planStatus: '1',
+ bizLabCode: ruleForm.value.bizLabCode,
+ offset: '1',
+ limit: 20,
+ }).then(res => {
+ const data = res.data.rows
+ if(data.filter(item => String(item.yearNum) === ruleForm.value.yearNum && String(item.yearTime) === ruleForm.value.yearTime).length) {
+ // 自动填充
+ console.log(data[0])
+ detailInternalPlan({id: data[0].id}).then(res => {
+ console.log(res.data, '详情')
+ ruleForm.value.groupLeader = res.data.groupLeader
+ ruleForm.value.sceneUsers = (res.data.planUserList || []).map((item) => item.userName)
+ ruleForm.value.auditObjective = res.data.auditObjective
+ ruleForm.value.auditScope = res.data.auditScope
+ })
+ }
+ else {
+ ElMessage.warning('请先创建对应的内部审核计划')
+ }
+ })
+ }
+ }
+},{
+ deep: true
+})
const labelList = ref<{ id: string; value: string; name: string }[]>()// 实验室+
const yearList = ref<{ id: string; value: string; name: string }[]>([])// 年度
const monthList = ref<{ id: string; value: string; name: string }[]>([])// 月份
@@ -534,7 +571,7 @@
-
+
diff --git a/src/views/quality/internal/scene/index.vue b/src/views/quality/internal/scene/index.vue
index f043238..a819272 100644
--- a/src/views/quality/internal/scene/index.vue
+++ b/src/views/quality/internal/scene/index.vue
@@ -133,6 +133,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -282,7 +285,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/workManage/components/edit.vue b/src/views/quality/internal/workManage/components/edit.vue
index 382a347..5732e19 100644
--- a/src/views/quality/internal/workManage/components/edit.vue
+++ b/src/views/quality/internal/workManage/components/edit.vue
@@ -4,7 +4,7 @@
import fileList from './fileList.vue'
import { getDictByCode } from '@/api/system/dict'
import { getUserList } from '@/api/system/user'
-import { addWork, detailWork } from '@/api/quality/internal/workManage'
+import { addWork, detailWork, updateWork } from '@/api/quality/internal/workManage'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
import useUserStore from '@/store/modules/user'
@@ -88,34 +88,50 @@
userList1.value = await filterUser(quality.roleTips['质量负责人'])
// userList2.value = await filterUser(quality.roleTips['内审组长'])
userList3.value = await filterUser(quality.roleTips['内审组员'])
- console.log(userList3.value, 'userList3.value')
+ // console.log(userList3.value, 'userList3.value')
}
fetchDict()
const fileRef = ref()
// 新建
-const createRow = () => {
+const isSave = ref(false)
+const createRow = (type: string, isCreate: boolean) => {
const data = {
...ruleForm.value,
internalAuditFiles: fileRef.value.list,
workName: `${ruleForm.value.yearTime}年第${ruleForm.value.yearNum}次内部审核工作`,
createId: userStore.id,
createName: userStore.name,
+ status: type === 'save'? '0': '1'
}
if (ruleForm.value.teamMembers.length) {
data.teamMembers = data.teamMembers.join(',')
- }
- addWork(data).then((res) => {
+ };
+ (isCreate ? addWork : updateWork)(data).then((res) => {
+ if(type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value =true
+ }
+ else {
ElMessage.success('添加成功')
$router.go(-1)
+ }
})
}
// 保存按钮
-const saveForm = async (formEl: FormInstance | undefined) => {
+
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if(type === 'submit' && !isSave.value) {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
if ($route.path.includes('create')) {
- createRow()
+ createRow(type, true)
+ }
+ else {
+ createRow(type, false)
}
// else if ($route.path.includes('update')) {
// updateRow()
@@ -199,7 +215,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
diff --git a/src/views/quality/internal/workManage/index.vue b/src/views/quality/internal/workManage/index.vue
index 47008d5..5e5ccf0 100644
--- a/src/views/quality/internal/workManage/index.vue
+++ b/src/views/quality/internal/workManage/index.vue
@@ -4,6 +4,7 @@
import { getDictByCode } from '@/api/system/dict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { exportFile } from '@/utils/exportUtils'
+import useUserStore from '@/store/modules/user'
import { deleteWork, exportInternalWorkZip, getWorkList } from '@/api/quality/internal/workManage'
// 查询条件
const listQuery = ref({
@@ -12,11 +13,15 @@
offset: 1,
limit: 20,
})
+const active = ref('全部')
+const buttonBoxActive = ref('InternalWork')
+const menu = ref([])
// 列表数据
const tableList = ref([])
const total = ref(0)
const loadingTable = ref(true)
const checkoutList = ref([])// 选中的内容
+const userInfo = useUserStore()
// 列
const columns = ref([
{ text: '年度', value: 'yearTime', align: 'center' },
@@ -28,12 +33,16 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getWorkList(listQuery.value).then((response) => {
+ // 状态(0,草稿 1公开)
+ getWorkList({ ...listQuery.value, status: active.value, createId: active.value === '0' ? userInfo.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -81,6 +90,15 @@
},
})
}
+// 编辑
+const editRow = (row: any) => {
+ $router.push({
+ path: `/internalwork/update`,
+ query: {
+ id: row.id,
+ },
+ })
+}
// 下载
const downRow = (row: any) => {
const params = {
@@ -121,8 +139,39 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
+
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const labelList = ref<{ id: string; value: string; name: string }[]>()// 实验室
const yearList = ref<{ id: string; value: string; name: string }[]>([])// 年度
@@ -150,39 +199,28 @@
+
-
+
-
+
-
-
+
+
-
+
@@ -191,37 +229,21 @@
-
+
-
+
下载
-
+
查看
-
+
+ 编辑
+
+
删除
@@ -231,4 +253,3 @@
-
diff --git a/src/api/quality/internal/internalPlan.ts b/src/api/quality/internal/internalPlan.ts
index f9de914..6580a6f 100644
--- a/src/api/quality/internal/internalPlan.ts
+++ b/src/api/quality/internal/internalPlan.ts
@@ -60,3 +60,11 @@
responseType: 'blob',
})
}
+// 通知内审成员
+// export function noticePerson(data: any) {
+// return request({
+// url: '/quality/internalAuditPlan/exportZip',
+// method: 'post',
+// data,
+// })
+// }
diff --git a/src/api/quality/internal/workManage.ts b/src/api/quality/internal/workManage.ts
index 1a32f68..ca6ed05 100644
--- a/src/api/quality/internal/workManage.ts
+++ b/src/api/quality/internal/workManage.ts
@@ -18,6 +18,13 @@
data,
})
}
+export function updateWork(data: any) {
+ return request({
+ url: '/quality/internalAuditManagement/update',
+ method: 'post',
+ data,
+ })
+}
// 删除
export function deleteWork(data: any) {
return request({
diff --git a/src/views/quality/correct/handle/index.vue b/src/views/quality/correct/handle/index.vue
index 9a22d49..acf5762 100644
--- a/src/views/quality/correct/handle/index.vue
+++ b/src/views/quality/correct/handle/index.vue
@@ -175,6 +175,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -325,7 +328,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/dissatisfied/index.vue b/src/views/quality/internal/dissatisfied/index.vue
index 2201cde..3de267f 100644
--- a/src/views/quality/internal/dissatisfied/index.vue
+++ b/src/views/quality/internal/dissatisfied/index.vue
@@ -161,6 +161,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -310,7 +313,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/inspect/components/checkContent.vue b/src/views/quality/internal/inspect/components/checkContent.vue
index 4724fcc..a6eb5a9 100644
--- a/src/views/quality/internal/inspect/components/checkContent.vue
+++ b/src/views/quality/internal/inspect/components/checkContent.vue
@@ -15,6 +15,15 @@
watch(() => $props.data, (newVal) => {
if (newVal.length) {
list.value = $props.data
+ list.value.forEach((item) => {
+ if(!item.isEdit) {
+ item.isEdit = '0'
+ item.isEditName = '否'
+ }
+ else {
+ item.isEditName = item.isEdit === '0' ? '否' : '是'
+ }
+ })
}
else {
list.value = []
@@ -26,7 +35,8 @@
{ text: '检查内容', value: 'inspectionContent', required: false },
{ text: '检查方法', value: 'inspectionMethod', required: false },
{ text: '检查结果', value: 'inspectionRes', required: true },
- { text: '依据(GJB2725A质量手册、程序文件', value: 'refStandard', required: false, width: '180' },
+ { text: '依据(GJB2725A质量手册、程序文件)', value: 'refStandard', required: false, width: '180' },
+ { text: '已编辑', value: 'isEditName', required: false, width: '80' },
])
// 检查数据列表
@@ -43,6 +53,11 @@
list,
checkCertificateList,
})
+const changeInput = (value: string) => {
+ const index = list.value.findIndex((item) => item.inspectionRes === value)
+ list.value[index].isEdit = '1'
+ list.value[index].isEditName = '是'
+}
@@ -58,22 +73,24 @@
*{{ item.text }}
- {{ scope.row[item.value] }}
- {{ scope.row[item.value] }}
+
-
+
diff --git a/src/views/quality/internal/inspect/index.vue b/src/views/quality/internal/inspect/index.vue
index 70b9428..83fc878 100644
--- a/src/views/quality/internal/inspect/index.vue
+++ b/src/views/quality/internal/inspect/index.vue
@@ -163,6 +163,9 @@
deep: true,
})
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -313,7 +316,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/internalPlan/components/detail.vue b/src/views/quality/internal/internalPlan/components/detail.vue
index 96707c4..30d26b8 100644
--- a/src/views/quality/internal/internalPlan/components/detail.vue
+++ b/src/views/quality/internal/internalPlan/components/detail.vue
@@ -53,28 +53,29 @@
ElMessage.warning('下载失败')
}
}
+// 保存提交后自动通知
// 通知内审组成员
-const notice = () => {
- ElMessage.warning('敬请期待')
-}
+// const notice = () => {
+// ElMessage.warning('敬请期待')
+// }
-
+
下载
打印
-
+
$router.go(-1)">
关闭
diff --git a/src/views/quality/internal/internalPlan/components/edit.vue b/src/views/quality/internal/internalPlan/components/edit.vue
index 796c56d..0417489 100644
--- a/src/views/quality/internal/internalPlan/components/edit.vue
+++ b/src/views/quality/internal/internalPlan/components/edit.vue
@@ -46,18 +46,26 @@
bizLabCode: [{ required: true, message: '实验室必选', trigger: ['blur', 'change'] }],
yearTime: [{ required: true, message: '年份必选', trigger: ['blur', 'change'] }],
yearNum: [{ required: true, message: '月份必选', trigger: ['blur', 'change'] }],
+ groupLeader: [{ required: true, message: '组长必选', trigger: ['blur', 'change'] }],
})
onMounted(() => {
if ($route.path.includes('create')) {
ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间
ruleForm.value.commanderId = userStore.id
ruleForm.value.commanderName = userStore.name
+ // 预制内容
+ // 审核目的
+ ruleForm.value.auditObjective = '验证实验室的质量活动是否持续地符合质量管理体系文件要求和 GJB2725A-2001《测试实验室和校准实验室通用要求》。'
+ // 审核范围
+ ruleForm.value.auditScope = '质量管理体系所涉及的部门、岗位、人员、设备、设施、相关活动及实施记录。 受审核部门: 西昌实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组 海口实验室:热工力学组、电学电源组、无线电脉冲组、综合管理组。'
+ // 审核依据
+ ruleForm.value.auditBasis = 'GJB2725A-2001测试实验室和校准实验室通用要求 实验室质量管理体系文件。'
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
// 获取详情
detailInternalPlan({ id: $route.query.id as string }).then((res) => {
- console.log(res.data, '详情')
+ console.log(res.data, '详情1111')
ruleForm.value = res.data
if (res.data.planUserList) {
ruleForm.value.planUserList = res.data.planUserList.map((item: any) => item.userName)
@@ -68,20 +76,41 @@
})
}
})
-const createRow = (data: any) => {
- addInternalPlan(data).then((res) => {
- ElMessage.success('添加成功')
- $router.go(-1)
+const isSave = ref(false)
+const createRow = (data: any, type: string) => {
+ addInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('添加成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
-const updateRow = (data: any) => {
- updateInternalPlan(data).then((res) => {
- ElMessage.success('修改成功')
- $router.go(-1)
+const updateRow = (data: any, type: string) => {
+ updateInternalPlan({...data, planStatus: type === 'save'? '0': '1'}).then((res) => {
+ // ElMessage.success('修改成功')
+ // $router.go(-1)
+ if (type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value = true
+ }
+ else {
+ ElMessage.success('添加成功')
+ $router.go(-1)
+ }
})
}
// 保存
-const saveForm = async (formEl: FormInstance | undefined) => {
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if (!isSave.value && type === 'submit') {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
@@ -108,11 +137,11 @@
}
})
}
- if ($route.path.includes('create')) {
- createRow(data)
+ if ($route.path.includes('create') && type === 'save') {
+ createRow(data, type)
}
else {
- updateRow(data)
+ updateRow(data, type)
}
})
}
@@ -173,7 +202,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
@@ -181,49 +213,36 @@
-
+
-
+
-
+
-
+
年第
-
+
次内部审核计划
@@ -239,15 +258,8 @@
-
+
@@ -286,7 +298,8 @@
-
+
{{ item.name }}
{{ item.deptName }}
@@ -296,13 +309,10 @@
-
-
+
+
{{ item.name }}
{{ item.deptName }}
@@ -336,8 +346,9 @@
.isDetail {
::v-deep {
- .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before,
- .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before {
+
+ .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label::before,
+ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before {
content: "";
display: none;
}
diff --git a/src/views/quality/internal/internalPlan/index.vue b/src/views/quality/internal/internalPlan/index.vue
index af664ce..955b1e9 100644
--- a/src/views/quality/internal/internalPlan/index.vue
+++ b/src/views/quality/internal/internalPlan/index.vue
@@ -7,7 +7,9 @@
import { deleteInternalPlan, exportInternalPlanZip, getInternalPlanList } from '@/api/quality/internal/internalPlan'
import useUserStore from '@/store/modules/user'
import { exportFile } from '@/utils/exportUtils'
-
+const active = ref('全部')
+const buttonBoxActive = ref('InternalPlan')
+const menu = ref([])
const userStore = useUserStore()
// 查询条件
const listQuery = ref({
@@ -47,12 +49,15 @@
])
// 数据查询
function fetchData(isNowPage = false) {
+ if (/[\u4e00-\u9fa5]/.test(active.value)) {
+ return
+ }
loadingTable.value = true
if (!isNowPage) {
// 是否显示当前页,否则跳转第一页
listQuery.value.offset = 1
}
- getInternalPlanList(listQuery.value).then((response) => {
+ getInternalPlanList({...listQuery.value, planStatus: active.value, commanderId: active.value === '0' ? userStore.id : '' }).then((response) => {
tableList.value = response.data.rows
total.value = parseInt(response.data.total)
loadingTable.value = false
@@ -123,8 +128,38 @@
})
})
}
+
+const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
+ active.value = val
+ window.sessionStorage.setItem(buttonBoxActive.value, val)
+ setTimeout(() => {
+ clearList() // 刷新
+ })
+
+}
onMounted(async () => {
- searchList()
+ // searchList()
+ setTimeout(() => {
+ menu.value = [
+ {
+ name: '全部',
+ id: '1',
+ },
+ {
+ name: '草稿箱',
+ id: '0',
+ },
+ ]
+ if (window.sessionStorage.getItem(buttonBoxActive.value) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive.value) || '全部'))) {
+ active.value = window.sessionStorage.getItem(buttonBoxActive.value)!
+ }
+ else {
+ active.value = menu.value.find(item => item.name === '全部')!.id as string // 全部
+ }
+ })
})
const { proxy } = getCurrentInstance() as any
@@ -158,47 +193,34 @@
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
@@ -207,38 +229,17 @@
-
+
-
+
详情
-
+
编辑
-
+
删除
diff --git a/src/views/quality/internal/registration/index.vue b/src/views/quality/internal/registration/index.vue
index d8c800f..357399a 100644
--- a/src/views/quality/internal/registration/index.vue
+++ b/src/views/quality/internal/registration/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/report/index.vue b/src/views/quality/internal/report/index.vue
index 151c2e4..c6b73b1 100644
--- a/src/views/quality/internal/report/index.vue
+++ b/src/views/quality/internal/report/index.vue
@@ -131,6 +131,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -280,7 +283,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/scene/components/edit.vue b/src/views/quality/internal/scene/components/edit.vue
index 5efbc09..3ff0480 100644
--- a/src/views/quality/internal/scene/components/edit.vue
+++ b/src/views/quality/internal/scene/components/edit.vue
@@ -16,6 +16,7 @@
import quality from '/public/config/quality.json'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
+import { getInternalPlanList, detailInternalPlan } from '@/api/quality/internal/internalPlan'
// import { getUserList } from '@/api/system/user'
const $route = useRoute()
const $router = useRouter()
@@ -60,7 +61,7 @@
// 自动填充数据
if ($route.query.data) {
const data = JSON.parse($route.query.data as string)
- console.log(data, 'data')
+ // console.log(data, 'data')
// 获取用户列表
ruleForm.value.yearNum = data.yearNum
ruleForm.value.yearTime = data.yearTime
@@ -71,6 +72,10 @@
// ruleForm.value.groupLeader = data.groupLeader
ruleForm.value.sceneUsers = data.teamMembers
}
+ // 填充
+ ruleForm.value.requirements = `(1)受审核部门认证做好审核前准备,指定专人配合内审组工作;
+(2)现场审核结束后,各受审部门及时提交整改计划并抓紧落实;
+(3)整改验证应在3个月内(${dayjs().add(3,'month').format('YYYY-MM-DD')}前)结束,特殊情况不能完成的需经批准后才可延期。`
}
else {
rules.value.fileCode = [{ required: true, message: '文件编号必填', trigger: ['blur', 'change'] }]
@@ -86,6 +91,38 @@
})
}
})
+// 根据年 、次、实验室自动匹配
+watch([() =>ruleForm.value.bizLabCode, () => ruleForm.value.yearNum, () => ruleForm.value.yearTime], () => {
+ if($route.path.includes('create')) {
+ if(ruleForm.value.bizLabCode && ruleForm.value.yearNum && ruleForm.value.yearTime) {
+ // 需要查询对应的内部审核计划
+ getInternalPlanList({
+ planStatus: '1',
+ bizLabCode: ruleForm.value.bizLabCode,
+ offset: '1',
+ limit: 20,
+ }).then(res => {
+ const data = res.data.rows
+ if(data.filter(item => String(item.yearNum) === ruleForm.value.yearNum && String(item.yearTime) === ruleForm.value.yearTime).length) {
+ // 自动填充
+ console.log(data[0])
+ detailInternalPlan({id: data[0].id}).then(res => {
+ console.log(res.data, '详情')
+ ruleForm.value.groupLeader = res.data.groupLeader
+ ruleForm.value.sceneUsers = (res.data.planUserList || []).map((item) => item.userName)
+ ruleForm.value.auditObjective = res.data.auditObjective
+ ruleForm.value.auditScope = res.data.auditScope
+ })
+ }
+ else {
+ ElMessage.warning('请先创建对应的内部审核计划')
+ }
+ })
+ }
+ }
+},{
+ deep: true
+})
const labelList = ref<{ id: string; value: string; name: string }[]>()// 实验室+
const yearList = ref<{ id: string; value: string; name: string }[]>([])// 年度
const monthList = ref<{ id: string; value: string; name: string }[]>([])// 月份
@@ -534,7 +571,7 @@
-
+
diff --git a/src/views/quality/internal/scene/index.vue b/src/views/quality/internal/scene/index.vue
index f043238..a819272 100644
--- a/src/views/quality/internal/scene/index.vue
+++ b/src/views/quality/internal/scene/index.vue
@@ -133,6 +133,9 @@
})
}
const changeCurrentButton = (val: string) => {
+ if (/[\u4e00-\u9fa5]/.test(val)) {
+ return
+ }
active.value = val
window.sessionStorage.setItem(buttonBoxActive, val)
clearList() // 刷新
@@ -282,7 +285,7 @@
}
onMounted(async () => {
await getDict()
- if (window.sessionStorage.getItem(buttonBoxActive)) {
+ if (window.sessionStorage.getItem(buttonBoxActive) && !(/[\u4e00-\u9fa5]/.test(window.sessionStorage.getItem(buttonBoxActive) || '全部'))) {
active.value = window.sessionStorage.getItem(buttonBoxActive)!
}
else {
diff --git a/src/views/quality/internal/workManage/components/edit.vue b/src/views/quality/internal/workManage/components/edit.vue
index 382a347..5732e19 100644
--- a/src/views/quality/internal/workManage/components/edit.vue
+++ b/src/views/quality/internal/workManage/components/edit.vue
@@ -4,7 +4,7 @@
import fileList from './fileList.vue'
import { getDictByCode } from '@/api/system/dict'
import { getUserList } from '@/api/system/user'
-import { addWork, detailWork } from '@/api/quality/internal/workManage'
+import { addWork, detailWork, updateWork } from '@/api/quality/internal/workManage'
import { filterUser } from '@/views/quality/internal/workManage/components/filterUser'
import { getStaffList } from '@/api/resource/register'
import useUserStore from '@/store/modules/user'
@@ -88,34 +88,50 @@
userList1.value = await filterUser(quality.roleTips['质量负责人'])
// userList2.value = await filterUser(quality.roleTips['内审组长'])
userList3.value = await filterUser(quality.roleTips['内审组员'])
- console.log(userList3.value, 'userList3.value')
+ // console.log(userList3.value, 'userList3.value')
}
fetchDict()
const fileRef = ref()
// 新建
-const createRow = () => {
+const isSave = ref(false)
+const createRow = (type: string, isCreate: boolean) => {
const data = {
...ruleForm.value,
internalAuditFiles: fileRef.value.list,
workName: `${ruleForm.value.yearTime}年第${ruleForm.value.yearNum}次内部审核工作`,
createId: userStore.id,
createName: userStore.name,
+ status: type === 'save'? '0': '1'
}
if (ruleForm.value.teamMembers.length) {
data.teamMembers = data.teamMembers.join(',')
- }
- addWork(data).then((res) => {
+ };
+ (isCreate ? addWork : updateWork)(data).then((res) => {
+ if(type === 'save') {
+ ElMessage.success('保存成功')
+ isSave.value =true
+ }
+ else {
ElMessage.success('添加成功')
$router.go(-1)
+ }
})
}
// 保存按钮
-const saveForm = async (formEl: FormInstance | undefined) => {
+
+const saveForm = async (formEl: FormInstance | undefined, type: string) => {
+ if(type === 'submit' && !isSave.value) {
+ ElMessage.warning('请先保存')
+ return
+ }
if (!formEl) { return }
await formEl.validate((valid, fields) => {
if (valid) {
if ($route.path.includes('create')) {
- createRow()
+ createRow(type, true)
+ }
+ else {
+ createRow(type, false)
}
// else if ($route.path.includes('update')) {
// updateRow()
@@ -199,7 +215,10 @@
-
+
+ 提交
+
+
保存
$router.go(-1)">
diff --git a/src/views/quality/internal/workManage/index.vue b/src/views/quality/internal/workManage/index.vue
index 47008d5..5e5ccf0 100644
--- a/src/views/quality/internal/workManage/index.vue
+++ b/src/views/quality/internal/workManage/index.vue
@@ -4,6 +4,7 @@
import { getDictByCode } from '@/api/system/dict'
import type { TableColumn } from '@/components/NormalTable/table_interface'
import { exportFile } from '@/utils/exportUtils'
+import useUserStore from '@/store/modules/user'
import { deleteWork, exportInternalWorkZip, getWorkList } from '@/api/quality/internal/workManage'
// 查询条件
const listQuery = ref({
@@ -12,11 +13,15 @@
offset: 1,
limit: 20,
})
+const active = ref