-
+
{{ tag.name || tag.userName }}
diff --git a/src/api/quality/meeting/meeting.ts b/src/api/quality/meeting/meeting.ts
index fc00f26..e58e042 100644
--- a/src/api/quality/meeting/meeting.ts
+++ b/src/api/quality/meeting/meeting.ts
@@ -77,6 +77,14 @@
params: data,
})
}
+// 参会人员确认
+export function confirmMeeting(data: any) {
+ return request({
+ url: `/quality/bizQualityConferenceRecord/confirm?id=${data.id}`,
+ method: 'get',
+ // params: data,
+ })
+}
// 更具url获取列表
export function getListByUrl(data: any, url: string) {
return request({
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index fa23f8d..d0c8f90 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -250,8 +250,6 @@
@selection-change="handleSelectionChange" @select="selectClick" @row-click="rowClick" @row-dblclick="rowDbClick"
@filter-change="filterChange"
>
-
-
+
{
- const data = res.data.rows
- const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
- if (flag) {
- result = true
- }
- else {
- result = false
- ElMessage.warning('请先创建对应的管理评审工作')
- }
- })
+ const res = await getReviewWorkList({ offset: 1, limit: 9999, managementStatus: '0' })
+ const data = res.data.rows
+ const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
+ if (flag) {
+ result = true
+ }
+ else {
+ result = false
+ ElMessage.warning('请先创建对应的管理评审工作')
+ }
}
return result
}
diff --git a/src/views/quality/meeting/components/edit.vue b/src/views/quality/meeting/components/edit.vue
index 0f0beef..246d7dc 100644
--- a/src/views/quality/meeting/components/edit.vue
+++ b/src/views/quality/meeting/components/edit.vue
@@ -3,11 +3,12 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
-// import userListDialog from './userDialog.vue'
-import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
+import userListDialog from './userDialog.vue'
+// import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
import { getDictByCode } from '@/api/system/dict'
import { getListByUrl, getMeetingDetail, getMeetingPerson, getrelWorkList, getrelWorkType, handlerMeeting, sendPerson } from '@/api/quality/meeting/meeting'
import useUserStore from '@/store/modules/user'
+import { getSearchDept } from '@/api/quality/supervise/record'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -129,6 +130,7 @@
type: 'warning',
},
).then((res) => {
+ loading.value = true
if ($route.path.includes('create')) {
ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => ({ ...item, userId: item.id }))
}
@@ -148,12 +150,35 @@
}
})
}
+ console.log(ruleForm.value.qualityUserDto.userIds, 'ruleForm.value.qualityUserDto.userIds')
ruleForm.value.qualityUserDto.id = ruleForm.value.id
- handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
- isSave.value = true
- ElMessage.success('操作成功')
- // close()
+ getSearchDept({}).then(res => {
+ // console.log(res.data)
+ if (ruleForm.value.qualityUserDto.userIds.every((item: any) => res.data.filter((citem: any) => citem.deptId === item.deptId).length)) {
+ handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
+ isSave.value = true
+ ElMessage.success('操作成功')
+ loading.value = false
+ close()
+ }).catch(() => {
+ loading.value = false
+ })
+ }
+ else {
+ // 提示
+ let msg = [] as string[]
+ ruleForm.value.qualityUserDto.userIds.forEach((item: any) => {
+ if(!res.data.filter((citem: any) => citem.deptId === item.deptId).length) {
+ msg.push(item.name)
+ }
+ })
+ ElMessage.warning(`未查询到${msg.join('、')}用户的LabCode,请联系管理员`)
+ loading.value = false
+ }
+ }).catch(() => {
+ loading.value = false
})
+
})
}
})
@@ -183,6 +208,7 @@
watch(() => ruleForm.value.relType, (newVal) => {
if (flag.value) {
ruleForm.value.targetId = ''
+ workList.value = []
}
if (newVal) {
// console.log(newVal, relTypeList.value)
@@ -235,23 +261,23 @@
}
// 发送确认
const sendConfirm = () => {
- if ($route.path.includes('detail')) {
- // 发送通知
- ElMessage.warning('敬请期待')
- return
- }
- if (!isSave.value) {
- ElMessage.warning('请先保存')
- }
- else {
- ElMessage.warning('敬请期待')
- // isSave.value
- // 发送与会人员确认
- // sendPerson().then((res) => {
- // ElMessage.success('发送成功')
- // isSave.value = false
- // })
- }
+ // if ($route.path.includes('detail')) {
+ // // 发送通知
+ // ElMessage.warning('敬请期待')
+ // return
+ // }
+ // if (!isSave.value) {
+ // ElMessage.warning('请先保存')
+ // }
+ // else {
+ // ElMessage.warning('敬请期待')
+ // isSave.value
+ // 发送与会人员确认
+ sendPerson({ id: $route.query.id }).then((res) => {
+ ElMessage.success('发送成功')
+ isSave.value = false
+ })
+ // }
}
const { proxy } = getCurrentInstance() as any
@@ -262,16 +288,17 @@
-
+
发送与会人员确认
-
+
+
保存
@@ -279,12 +306,15 @@
-
+
-
+
@@ -299,39 +329,24 @@
-
+
-
+
-
+
@@ -367,15 +382,9 @@
-
+
{{ tag.name || tag.userName }}
diff --git a/src/views/quality/meeting/index.vue b/src/views/quality/meeting/index.vue
index db5fbd7..811042c 100644
--- a/src/views/quality/meeting/index.vue
+++ b/src/views/quality/meeting/index.vue
@@ -154,6 +154,7 @@
v-if="proxy.hasPerm('/quality/meeting/record/update')"
size="small"
type="primary"
+ :disabled="String(row.isSend) === '1'"
link
@click="handler('update', row)"
>
diff --git a/src/api/quality/meeting/meeting.ts b/src/api/quality/meeting/meeting.ts
index fc00f26..e58e042 100644
--- a/src/api/quality/meeting/meeting.ts
+++ b/src/api/quality/meeting/meeting.ts
@@ -77,6 +77,14 @@
params: data,
})
}
+// 参会人员确认
+export function confirmMeeting(data: any) {
+ return request({
+ url: `/quality/bizQualityConferenceRecord/confirm?id=${data.id}`,
+ method: 'get',
+ // params: data,
+ })
+}
// 更具url获取列表
export function getListByUrl(data: any, url: string) {
return request({
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index fa23f8d..d0c8f90 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -250,8 +250,6 @@
@selection-change="handleSelectionChange" @select="selectClick" @row-click="rowClick" @row-dblclick="rowDbClick"
@filter-change="filterChange"
>
-
-
+
{
- const data = res.data.rows
- const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
- if (flag) {
- result = true
- }
- else {
- result = false
- ElMessage.warning('请先创建对应的管理评审工作')
- }
- })
+ const res = await getReviewWorkList({ offset: 1, limit: 9999, managementStatus: '0' })
+ const data = res.data.rows
+ const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
+ if (flag) {
+ result = true
+ }
+ else {
+ result = false
+ ElMessage.warning('请先创建对应的管理评审工作')
+ }
}
return result
}
diff --git a/src/views/quality/meeting/components/edit.vue b/src/views/quality/meeting/components/edit.vue
index 0f0beef..246d7dc 100644
--- a/src/views/quality/meeting/components/edit.vue
+++ b/src/views/quality/meeting/components/edit.vue
@@ -3,11 +3,12 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
-// import userListDialog from './userDialog.vue'
-import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
+import userListDialog from './userDialog.vue'
+// import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
import { getDictByCode } from '@/api/system/dict'
import { getListByUrl, getMeetingDetail, getMeetingPerson, getrelWorkList, getrelWorkType, handlerMeeting, sendPerson } from '@/api/quality/meeting/meeting'
import useUserStore from '@/store/modules/user'
+import { getSearchDept } from '@/api/quality/supervise/record'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -129,6 +130,7 @@
type: 'warning',
},
).then((res) => {
+ loading.value = true
if ($route.path.includes('create')) {
ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => ({ ...item, userId: item.id }))
}
@@ -148,12 +150,35 @@
}
})
}
+ console.log(ruleForm.value.qualityUserDto.userIds, 'ruleForm.value.qualityUserDto.userIds')
ruleForm.value.qualityUserDto.id = ruleForm.value.id
- handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
- isSave.value = true
- ElMessage.success('操作成功')
- // close()
+ getSearchDept({}).then(res => {
+ // console.log(res.data)
+ if (ruleForm.value.qualityUserDto.userIds.every((item: any) => res.data.filter((citem: any) => citem.deptId === item.deptId).length)) {
+ handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
+ isSave.value = true
+ ElMessage.success('操作成功')
+ loading.value = false
+ close()
+ }).catch(() => {
+ loading.value = false
+ })
+ }
+ else {
+ // 提示
+ let msg = [] as string[]
+ ruleForm.value.qualityUserDto.userIds.forEach((item: any) => {
+ if(!res.data.filter((citem: any) => citem.deptId === item.deptId).length) {
+ msg.push(item.name)
+ }
+ })
+ ElMessage.warning(`未查询到${msg.join('、')}用户的LabCode,请联系管理员`)
+ loading.value = false
+ }
+ }).catch(() => {
+ loading.value = false
})
+
})
}
})
@@ -183,6 +208,7 @@
watch(() => ruleForm.value.relType, (newVal) => {
if (flag.value) {
ruleForm.value.targetId = ''
+ workList.value = []
}
if (newVal) {
// console.log(newVal, relTypeList.value)
@@ -235,23 +261,23 @@
}
// 发送确认
const sendConfirm = () => {
- if ($route.path.includes('detail')) {
- // 发送通知
- ElMessage.warning('敬请期待')
- return
- }
- if (!isSave.value) {
- ElMessage.warning('请先保存')
- }
- else {
- ElMessage.warning('敬请期待')
- // isSave.value
- // 发送与会人员确认
- // sendPerson().then((res) => {
- // ElMessage.success('发送成功')
- // isSave.value = false
- // })
- }
+ // if ($route.path.includes('detail')) {
+ // // 发送通知
+ // ElMessage.warning('敬请期待')
+ // return
+ // }
+ // if (!isSave.value) {
+ // ElMessage.warning('请先保存')
+ // }
+ // else {
+ // ElMessage.warning('敬请期待')
+ // isSave.value
+ // 发送与会人员确认
+ sendPerson({ id: $route.query.id }).then((res) => {
+ ElMessage.success('发送成功')
+ isSave.value = false
+ })
+ // }
}
const { proxy } = getCurrentInstance() as any
@@ -262,16 +288,17 @@
-
+
发送与会人员确认
-
+
+
保存
@@ -279,12 +306,15 @@
-
+
-
+
@@ -299,39 +329,24 @@
-
+
-
+
-
+
@@ -367,15 +382,9 @@
-
+
{{ tag.name || tag.userName }}
diff --git a/src/views/quality/meeting/index.vue b/src/views/quality/meeting/index.vue
index db5fbd7..811042c 100644
--- a/src/views/quality/meeting/index.vue
+++ b/src/views/quality/meeting/index.vue
@@ -154,6 +154,7 @@
v-if="proxy.hasPerm('/quality/meeting/record/update')"
size="small"
type="primary"
+ :disabled="String(row.isSend) === '1'"
link
@click="handler('update', row)"
>
diff --git a/src/views/quality/review/report/components/edit.vue b/src/views/quality/review/report/components/edit.vue
index 5a7b49a..9d87172 100644
--- a/src/views/quality/review/report/components/edit.vue
+++ b/src/views/quality/review/report/components/edit.vue
@@ -120,6 +120,7 @@
await formEl.validate(async (valid, fields) => {
if (valid) {
const ress = await valiateWork(ruleForm.value.yearTime, ruleForm.value.yearNum, ruleForm.value.bizLabCode, '管理评审')
+ console.log(ress, 'ress')
if (!ress) { return }
const data = {
...ruleForm.value,
diff --git a/src/api/quality/meeting/meeting.ts b/src/api/quality/meeting/meeting.ts
index fc00f26..e58e042 100644
--- a/src/api/quality/meeting/meeting.ts
+++ b/src/api/quality/meeting/meeting.ts
@@ -77,6 +77,14 @@
params: data,
})
}
+// 参会人员确认
+export function confirmMeeting(data: any) {
+ return request({
+ url: `/quality/bizQualityConferenceRecord/confirm?id=${data.id}`,
+ method: 'get',
+ // params: data,
+ })
+}
// 更具url获取列表
export function getListByUrl(data: any, url: string) {
return request({
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index fa23f8d..d0c8f90 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -250,8 +250,6 @@
@selection-change="handleSelectionChange" @select="selectClick" @row-click="rowClick" @row-dblclick="rowDbClick"
@filter-change="filterChange"
>
-
-
+
{
- const data = res.data.rows
- const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
- if (flag) {
- result = true
- }
- else {
- result = false
- ElMessage.warning('请先创建对应的管理评审工作')
- }
- })
+ const res = await getReviewWorkList({ offset: 1, limit: 9999, managementStatus: '0' })
+ const data = res.data.rows
+ const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
+ if (flag) {
+ result = true
+ }
+ else {
+ result = false
+ ElMessage.warning('请先创建对应的管理评审工作')
+ }
}
return result
}
diff --git a/src/views/quality/meeting/components/edit.vue b/src/views/quality/meeting/components/edit.vue
index 0f0beef..246d7dc 100644
--- a/src/views/quality/meeting/components/edit.vue
+++ b/src/views/quality/meeting/components/edit.vue
@@ -3,11 +3,12 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
-// import userListDialog from './userDialog.vue'
-import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
+import userListDialog from './userDialog.vue'
+// import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
import { getDictByCode } from '@/api/system/dict'
import { getListByUrl, getMeetingDetail, getMeetingPerson, getrelWorkList, getrelWorkType, handlerMeeting, sendPerson } from '@/api/quality/meeting/meeting'
import useUserStore from '@/store/modules/user'
+import { getSearchDept } from '@/api/quality/supervise/record'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -129,6 +130,7 @@
type: 'warning',
},
).then((res) => {
+ loading.value = true
if ($route.path.includes('create')) {
ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => ({ ...item, userId: item.id }))
}
@@ -148,12 +150,35 @@
}
})
}
+ console.log(ruleForm.value.qualityUserDto.userIds, 'ruleForm.value.qualityUserDto.userIds')
ruleForm.value.qualityUserDto.id = ruleForm.value.id
- handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
- isSave.value = true
- ElMessage.success('操作成功')
- // close()
+ getSearchDept({}).then(res => {
+ // console.log(res.data)
+ if (ruleForm.value.qualityUserDto.userIds.every((item: any) => res.data.filter((citem: any) => citem.deptId === item.deptId).length)) {
+ handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
+ isSave.value = true
+ ElMessage.success('操作成功')
+ loading.value = false
+ close()
+ }).catch(() => {
+ loading.value = false
+ })
+ }
+ else {
+ // 提示
+ let msg = [] as string[]
+ ruleForm.value.qualityUserDto.userIds.forEach((item: any) => {
+ if(!res.data.filter((citem: any) => citem.deptId === item.deptId).length) {
+ msg.push(item.name)
+ }
+ })
+ ElMessage.warning(`未查询到${msg.join('、')}用户的LabCode,请联系管理员`)
+ loading.value = false
+ }
+ }).catch(() => {
+ loading.value = false
})
+
})
}
})
@@ -183,6 +208,7 @@
watch(() => ruleForm.value.relType, (newVal) => {
if (flag.value) {
ruleForm.value.targetId = ''
+ workList.value = []
}
if (newVal) {
// console.log(newVal, relTypeList.value)
@@ -235,23 +261,23 @@
}
// 发送确认
const sendConfirm = () => {
- if ($route.path.includes('detail')) {
- // 发送通知
- ElMessage.warning('敬请期待')
- return
- }
- if (!isSave.value) {
- ElMessage.warning('请先保存')
- }
- else {
- ElMessage.warning('敬请期待')
- // isSave.value
- // 发送与会人员确认
- // sendPerson().then((res) => {
- // ElMessage.success('发送成功')
- // isSave.value = false
- // })
- }
+ // if ($route.path.includes('detail')) {
+ // // 发送通知
+ // ElMessage.warning('敬请期待')
+ // return
+ // }
+ // if (!isSave.value) {
+ // ElMessage.warning('请先保存')
+ // }
+ // else {
+ // ElMessage.warning('敬请期待')
+ // isSave.value
+ // 发送与会人员确认
+ sendPerson({ id: $route.query.id }).then((res) => {
+ ElMessage.success('发送成功')
+ isSave.value = false
+ })
+ // }
}
const { proxy } = getCurrentInstance() as any
@@ -262,16 +288,17 @@
-
+
发送与会人员确认
-
+
+
保存
@@ -279,12 +306,15 @@
-
+
-
+
@@ -299,39 +329,24 @@
-
+
-
+
-
+
@@ -367,15 +382,9 @@
-
+
{{ tag.name || tag.userName }}
diff --git a/src/views/quality/meeting/index.vue b/src/views/quality/meeting/index.vue
index db5fbd7..811042c 100644
--- a/src/views/quality/meeting/index.vue
+++ b/src/views/quality/meeting/index.vue
@@ -154,6 +154,7 @@
v-if="proxy.hasPerm('/quality/meeting/record/update')"
size="small"
type="primary"
+ :disabled="String(row.isSend) === '1'"
link
@click="handler('update', row)"
>
diff --git a/src/views/quality/review/report/components/edit.vue b/src/views/quality/review/report/components/edit.vue
index 5a7b49a..9d87172 100644
--- a/src/views/quality/review/report/components/edit.vue
+++ b/src/views/quality/review/report/components/edit.vue
@@ -120,6 +120,7 @@
await formEl.validate(async (valid, fields) => {
if (valid) {
const ress = await valiateWork(ruleForm.value.yearTime, ruleForm.value.yearNum, ruleForm.value.bizLabCode, '管理评审')
+ console.log(ress, 'ress')
if (!ress) { return }
const data = {
...ruleForm.value,
diff --git a/src/views/workbench/work/workList.vue b/src/views/workbench/work/workList.vue
index ed6bec7..495918a 100644
--- a/src/views/workbench/work/workList.vue
+++ b/src/views/workbench/work/workList.vue
@@ -9,6 +9,7 @@
import type { dictType } from '@/global'
import { batchUpdateWorkStatus, getWorkListPage, updateWorkStatus } from '@/api/workBench/message'
import useUserStore from '@/store/modules/user'
+import { confirmMeeting } from '@/api/quality/meeting/meeting'
const $router = useRouter()
const messageSourceModuleList = ref([]) // 来源模块
const labCode = ref('') // 实验室
@@ -132,14 +133,27 @@
$router.push({
path: `${WORKPATHS[name]}`,
})
- } else if(name === '内审计划工作提醒') {
+ } else if (name === '内审计划工作提醒') {
$router.push({
path: `${WORKPATHS[name]}`,
query: {
id: row.businessId,
- data: JSON.stringify({ commanderId: ''})
+ data: JSON.stringify({ commanderId: '' })
}
})
+
+ }
+ else if (name === '会议确认提醒') {
+ // 确认消息
+ confirmMeeting({ id: row.businessId }).then(res => {
+ $router.push({
+ path: `${WORKPATHS[name]}`,
+ query: {
+ id: row.businessId,
+ data: JSON.stringify({ commanderId: '' })
+ }
+ })
+ })
}
else {
$router.push({
@@ -265,25 +279,17 @@
-
+
-
+
diff --git a/src/api/quality/meeting/meeting.ts b/src/api/quality/meeting/meeting.ts
index fc00f26..e58e042 100644
--- a/src/api/quality/meeting/meeting.ts
+++ b/src/api/quality/meeting/meeting.ts
@@ -77,6 +77,14 @@
params: data,
})
}
+// 参会人员确认
+export function confirmMeeting(data: any) {
+ return request({
+ url: `/quality/bizQualityConferenceRecord/confirm?id=${data.id}`,
+ method: 'get',
+ // params: data,
+ })
+}
// 更具url获取列表
export function getListByUrl(data: any, url: string) {
return request({
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index fa23f8d..d0c8f90 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -250,8 +250,6 @@
@selection-change="handleSelectionChange" @select="selectClick" @row-click="rowClick" @row-dblclick="rowDbClick"
@filter-change="filterChange"
>
-
-
+
{
- const data = res.data.rows
- const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
- if (flag) {
- result = true
- }
- else {
- result = false
- ElMessage.warning('请先创建对应的管理评审工作')
- }
- })
+ const res = await getReviewWorkList({ offset: 1, limit: 9999, managementStatus: '0' })
+ const data = res.data.rows
+ const flag = data.some((item: any) => String(item.yearTime) === String(yearTime) && String(item.yearNum) === String(yearNum) && item.bizLabCode === bizLabCode)
+ if (flag) {
+ result = true
+ }
+ else {
+ result = false
+ ElMessage.warning('请先创建对应的管理评审工作')
+ }
}
return result
}
diff --git a/src/views/quality/meeting/components/edit.vue b/src/views/quality/meeting/components/edit.vue
index 0f0beef..246d7dc 100644
--- a/src/views/quality/meeting/components/edit.vue
+++ b/src/views/quality/meeting/components/edit.vue
@@ -3,11 +3,12 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
-// import userListDialog from './userDialog.vue'
-import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
+import userListDialog from './userDialog.vue'
+// import userListDialog from '@/views/resource/common/selectPersonBydeptIdDialog.vue'
import { getDictByCode } from '@/api/system/dict'
import { getListByUrl, getMeetingDetail, getMeetingPerson, getrelWorkList, getrelWorkType, handlerMeeting, sendPerson } from '@/api/quality/meeting/meeting'
import useUserStore from '@/store/modules/user'
+import { getSearchDept } from '@/api/quality/supervise/record'
const $route = useRoute()
const $router = useRouter()
const userStore = useUserStore()
@@ -129,6 +130,7 @@
type: 'warning',
},
).then((res) => {
+ loading.value = true
if ($route.path.includes('create')) {
ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => ({ ...item, userId: item.id }))
}
@@ -148,12 +150,35 @@
}
})
}
+ console.log(ruleForm.value.qualityUserDto.userIds, 'ruleForm.value.qualityUserDto.userIds')
ruleForm.value.qualityUserDto.id = ruleForm.value.id
- handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
- isSave.value = true
- ElMessage.success('操作成功')
- // close()
+ getSearchDept({}).then(res => {
+ // console.log(res.data)
+ if (ruleForm.value.qualityUserDto.userIds.every((item: any) => res.data.filter((citem: any) => citem.deptId === item.deptId).length)) {
+ handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => {
+ isSave.value = true
+ ElMessage.success('操作成功')
+ loading.value = false
+ close()
+ }).catch(() => {
+ loading.value = false
+ })
+ }
+ else {
+ // 提示
+ let msg = [] as string[]
+ ruleForm.value.qualityUserDto.userIds.forEach((item: any) => {
+ if(!res.data.filter((citem: any) => citem.deptId === item.deptId).length) {
+ msg.push(item.name)
+ }
+ })
+ ElMessage.warning(`未查询到${msg.join('、')}用户的LabCode,请联系管理员`)
+ loading.value = false
+ }
+ }).catch(() => {
+ loading.value = false
})
+
})
}
})
@@ -183,6 +208,7 @@
watch(() => ruleForm.value.relType, (newVal) => {
if (flag.value) {
ruleForm.value.targetId = ''
+ workList.value = []
}
if (newVal) {
// console.log(newVal, relTypeList.value)
@@ -235,23 +261,23 @@
}
// 发送确认
const sendConfirm = () => {
- if ($route.path.includes('detail')) {
- // 发送通知
- ElMessage.warning('敬请期待')
- return
- }
- if (!isSave.value) {
- ElMessage.warning('请先保存')
- }
- else {
- ElMessage.warning('敬请期待')
- // isSave.value
- // 发送与会人员确认
- // sendPerson().then((res) => {
- // ElMessage.success('发送成功')
- // isSave.value = false
- // })
- }
+ // if ($route.path.includes('detail')) {
+ // // 发送通知
+ // ElMessage.warning('敬请期待')
+ // return
+ // }
+ // if (!isSave.value) {
+ // ElMessage.warning('请先保存')
+ // }
+ // else {
+ // ElMessage.warning('敬请期待')
+ // isSave.value
+ // 发送与会人员确认
+ sendPerson({ id: $route.query.id }).then((res) => {
+ ElMessage.success('发送成功')
+ isSave.value = false
+ })
+ // }
}
const { proxy } = getCurrentInstance() as any
@@ -262,16 +288,17 @@
-
+
发送与会人员确认
-
+
+
保存
@@ -279,12 +306,15 @@
-
+
-
+
@@ -299,39 +329,24 @@
-
+
-
+
-
+
@@ -367,15 +382,9 @@
-
+
{{ tag.name || tag.userName }}
diff --git a/src/views/quality/meeting/index.vue b/src/views/quality/meeting/index.vue
index db5fbd7..811042c 100644
--- a/src/views/quality/meeting/index.vue
+++ b/src/views/quality/meeting/index.vue
@@ -154,6 +154,7 @@
v-if="proxy.hasPerm('/quality/meeting/record/update')"
size="small"
type="primary"
+ :disabled="String(row.isSend) === '1'"
link
@click="handler('update', row)"
>
diff --git a/src/views/quality/review/report/components/edit.vue b/src/views/quality/review/report/components/edit.vue
index 5a7b49a..9d87172 100644
--- a/src/views/quality/review/report/components/edit.vue
+++ b/src/views/quality/review/report/components/edit.vue
@@ -120,6 +120,7 @@
await formEl.validate(async (valid, fields) => {
if (valid) {
const ress = await valiateWork(ruleForm.value.yearTime, ruleForm.value.yearNum, ruleForm.value.bizLabCode, '管理评审')
+ console.log(ress, 'ress')
if (!ress) { return }
const data = {
...ruleForm.value,
diff --git a/src/views/workbench/work/workList.vue b/src/views/workbench/work/workList.vue
index ed6bec7..495918a 100644
--- a/src/views/workbench/work/workList.vue
+++ b/src/views/workbench/work/workList.vue
@@ -9,6 +9,7 @@
import type { dictType } from '@/global'
import { batchUpdateWorkStatus, getWorkListPage, updateWorkStatus } from '@/api/workBench/message'
import useUserStore from '@/store/modules/user'
+import { confirmMeeting } from '@/api/quality/meeting/meeting'
const $router = useRouter()
const messageSourceModuleList = ref([]) // 来源模块
const labCode = ref('') // 实验室
@@ -132,14 +133,27 @@
$router.push({
path: `${WORKPATHS[name]}`,
})
- } else if(name === '内审计划工作提醒') {
+ } else if (name === '内审计划工作提醒') {
$router.push({
path: `${WORKPATHS[name]}`,
query: {
id: row.businessId,
- data: JSON.stringify({ commanderId: ''})
+ data: JSON.stringify({ commanderId: '' })
}
})
+
+ }
+ else if (name === '会议确认提醒') {
+ // 确认消息
+ confirmMeeting({ id: row.businessId }).then(res => {
+ $router.push({
+ path: `${WORKPATHS[name]}`,
+ query: {
+ id: row.businessId,
+ data: JSON.stringify({ commanderId: '' })
+ }
+ })
+ })
}
else {
$router.push({
@@ -265,25 +279,17 @@
-
+
-
+
diff --git a/src/views/workbench/work/workPaths.ts b/src/views/workbench/work/workPaths.ts
index 413041c..93a37a4 100644
--- a/src/views/workbench/work/workPaths.ts
+++ b/src/views/workbench/work/workPaths.ts
@@ -14,5 +14,6 @@
文件发放通知提醒: '/file/grantNotice/approved',
标准装置核查提醒: '/standard/checkDataList',
收到委托方满意度调查表提醒: '/customer/questionnaire',
- 内审计划工作提醒: '/internalplan/detail'
+ 内审计划工作提醒: '/internalplan/detail',
+ 会议确认提醒: '/meetinglist/detail'
}