diff --git a/src/api/business/certManage/changeApply.ts b/src/api/business/certManage/changeApply.ts index edbdf7d..dcf2c41 100644 --- a/src/api/business/certManage/changeApply.ts +++ b/src/api/business/certManage/changeApply.ts @@ -106,7 +106,7 @@ // 导出word/pdf/打印 export function getStream(data: any) { return request({ - url: '/equipment/lend/exportFile', + url: `${prefix}/exportFile`, method: 'post', responseType: 'blob', data, diff --git a/src/api/business/certManage/changeApply.ts b/src/api/business/certManage/changeApply.ts index edbdf7d..dcf2c41 100644 --- a/src/api/business/certManage/changeApply.ts +++ b/src/api/business/certManage/changeApply.ts @@ -106,7 +106,7 @@ // 导出word/pdf/打印 export function getStream(data: any) { return request({ - url: '/equipment/lend/exportFile', + url: `${prefix}/exportFile`, method: 'post', responseType: 'blob', data, diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 99cbbaa..c61d3fb 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -4,14 +4,11 @@ import type { FormRules } from 'element-plus' import dayjs from 'dayjs' import type { IForm } from '../apply-interface' +import SelectCertDialog from '../dialog/selectCertDialog.vue' import type { dictType } from '@/global' import { getDictByCode } from '@/api/system/dict' -import { getUserList } from '@/api/system/user' import { SCHEDULE } from '@/utils/scheduleDict' import useUserStore from '@/store/modules/user' -import { useCheckList } from '@/commonMethods/useCheckList' -import type { IAccessory } from '@/views/equipement/info/book/book-interface' -import { useDoubleClickTableRow, useSetAllRowReadable } from '@/commonMethods/useSetAllRowReadable' import { addChangeCertApplyList, failUpdateChangeCertApplyList, getInfo, submit, updateChangeCertApplyList } from '@/api/business/certManage/changeApply' const props = defineProps({ pageType: { // 页面类型 add新建 edit编辑 detail详情 @@ -19,7 +16,7 @@ requre: true, default: 'detail', }, - id: { + id: { // id type: String, requre: true, }, @@ -27,7 +24,7 @@ type: String, requre: true, }, - processId: { + processId: { // 流程实例id type: String, }, }) @@ -79,12 +76,21 @@ changeTypeList.value = response.data }) } +getDict() // -----------------------------------------------保存---------------------------------------------- /** * 点击保存 * @param formEl 基本信息表单ref */ const saveForm = async () => { + if (!form.value.changeAnalysis) { + ElMessage.warning('补充/更换原因及影响分析不能为空') + return false + } + if (!form.value.recallAnalysis) { + ElMessage.warning('召回原因及影响分析不能为空') + return false + } await ruleFormRef.value.validate((valid: boolean) => { if (valid) { // 基本信息表单通过校验 ElMessageBox.confirm( @@ -101,8 +107,6 @@ text: '加载中...', background: 'rgba(255, 255, 255, 0.8)', }) - console.log('props.processId', props.processId) - const params = { ...form.value, id: infoId.value, @@ -111,7 +115,7 @@ if (props.pageType === 'add') { // 新建 addChangeCertApplyList(params).then((res) => { loading.close() - // form.value.registerNo = res.data.registerNo // 登记表编号 + form.value.changeApplyNo = res.data.changeApplyNo // 登记表编号 infoId.value = res.data.id // id emits('addSuccess', infoId.value) ElMessage.success('已保存') @@ -175,6 +179,25 @@ // attachmentList.value = res.data.attachmentList // 设备列表 }) } + +// -----------------------------------------选择证书---------------------------------------------- +const selectCertDialogRef = ref() // 选择证书组件ref +// 点击选择证书 +const selectUpdateCertNo = () => { + selectCertDialogRef.value.initDialog() +} + +// 确认选择证书 +const confirmSelect = (val: any) => { + // if (val && val.length) { + // form.value.changeReportId = val[0].id // 更换证书id + // form.value.changeReportName = val[0].changeReportName // 更换证书 / 报告名称 + // form.value.changeReportNo = val[0].changeReportNo // 更换证书编号 + form.value.changeReportId = '123456789' // 更换证书id + form.value.changeReportName = '证书1' // 更换证书 / 报告名称 + form.value.changeReportNo = 'zs123456789' // 更换证书编号 + // } +} // ---------------------------------------------钩子---------------------------------------------- watch(() => props.id, (newValue) => { infoId.value = newValue! @@ -209,6 +232,20 @@ > + + + + + + + + + + + + + + - + 选择 @@ -272,9 +309,13 @@ - - - + + + 补充 + + + 更换 + @@ -311,4 +352,6 @@ + + diff --git a/src/api/business/certManage/changeApply.ts b/src/api/business/certManage/changeApply.ts index edbdf7d..dcf2c41 100644 --- a/src/api/business/certManage/changeApply.ts +++ b/src/api/business/certManage/changeApply.ts @@ -106,7 +106,7 @@ // 导出word/pdf/打印 export function getStream(data: any) { return request({ - url: '/equipment/lend/exportFile', + url: `${prefix}/exportFile`, method: 'post', responseType: 'blob', data, diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 99cbbaa..c61d3fb 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -4,14 +4,11 @@ import type { FormRules } from 'element-plus' import dayjs from 'dayjs' import type { IForm } from '../apply-interface' +import SelectCertDialog from '../dialog/selectCertDialog.vue' import type { dictType } from '@/global' import { getDictByCode } from '@/api/system/dict' -import { getUserList } from '@/api/system/user' import { SCHEDULE } from '@/utils/scheduleDict' import useUserStore from '@/store/modules/user' -import { useCheckList } from '@/commonMethods/useCheckList' -import type { IAccessory } from '@/views/equipement/info/book/book-interface' -import { useDoubleClickTableRow, useSetAllRowReadable } from '@/commonMethods/useSetAllRowReadable' import { addChangeCertApplyList, failUpdateChangeCertApplyList, getInfo, submit, updateChangeCertApplyList } from '@/api/business/certManage/changeApply' const props = defineProps({ pageType: { // 页面类型 add新建 edit编辑 detail详情 @@ -19,7 +16,7 @@ requre: true, default: 'detail', }, - id: { + id: { // id type: String, requre: true, }, @@ -27,7 +24,7 @@ type: String, requre: true, }, - processId: { + processId: { // 流程实例id type: String, }, }) @@ -79,12 +76,21 @@ changeTypeList.value = response.data }) } +getDict() // -----------------------------------------------保存---------------------------------------------- /** * 点击保存 * @param formEl 基本信息表单ref */ const saveForm = async () => { + if (!form.value.changeAnalysis) { + ElMessage.warning('补充/更换原因及影响分析不能为空') + return false + } + if (!form.value.recallAnalysis) { + ElMessage.warning('召回原因及影响分析不能为空') + return false + } await ruleFormRef.value.validate((valid: boolean) => { if (valid) { // 基本信息表单通过校验 ElMessageBox.confirm( @@ -101,8 +107,6 @@ text: '加载中...', background: 'rgba(255, 255, 255, 0.8)', }) - console.log('props.processId', props.processId) - const params = { ...form.value, id: infoId.value, @@ -111,7 +115,7 @@ if (props.pageType === 'add') { // 新建 addChangeCertApplyList(params).then((res) => { loading.close() - // form.value.registerNo = res.data.registerNo // 登记表编号 + form.value.changeApplyNo = res.data.changeApplyNo // 登记表编号 infoId.value = res.data.id // id emits('addSuccess', infoId.value) ElMessage.success('已保存') @@ -175,6 +179,25 @@ // attachmentList.value = res.data.attachmentList // 设备列表 }) } + +// -----------------------------------------选择证书---------------------------------------------- +const selectCertDialogRef = ref() // 选择证书组件ref +// 点击选择证书 +const selectUpdateCertNo = () => { + selectCertDialogRef.value.initDialog() +} + +// 确认选择证书 +const confirmSelect = (val: any) => { + // if (val && val.length) { + // form.value.changeReportId = val[0].id // 更换证书id + // form.value.changeReportName = val[0].changeReportName // 更换证书 / 报告名称 + // form.value.changeReportNo = val[0].changeReportNo // 更换证书编号 + form.value.changeReportId = '123456789' // 更换证书id + form.value.changeReportName = '证书1' // 更换证书 / 报告名称 + form.value.changeReportNo = 'zs123456789' // 更换证书编号 + // } +} // ---------------------------------------------钩子---------------------------------------------- watch(() => props.id, (newValue) => { infoId.value = newValue! @@ -209,6 +232,20 @@ > + + + + + + + + + + + + + + - + 选择 @@ -272,9 +309,13 @@ - - - + + + 补充 + + + 更换 + @@ -311,4 +352,6 @@ + + diff --git a/src/views/business/certManage/apply/detail.vue b/src/views/business/certManage/apply/detail.vue index bb85de0..3928286 100644 --- a/src/views/business/certManage/apply/detail.vue +++ b/src/views/business/certManage/apply/detail.vue @@ -1,3 +1,105 @@ + + + - {{ 11 }} + + + + + 导出word + + + 导出pdf + + + 打印 + + + 关闭 + + + + + + 敬请期待 + + + + + diff --git a/src/api/business/certManage/changeApply.ts b/src/api/business/certManage/changeApply.ts index edbdf7d..dcf2c41 100644 --- a/src/api/business/certManage/changeApply.ts +++ b/src/api/business/certManage/changeApply.ts @@ -106,7 +106,7 @@ // 导出word/pdf/打印 export function getStream(data: any) { return request({ - url: '/equipment/lend/exportFile', + url: `${prefix}/exportFile`, method: 'post', responseType: 'blob', data, diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 99cbbaa..c61d3fb 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -4,14 +4,11 @@ import type { FormRules } from 'element-plus' import dayjs from 'dayjs' import type { IForm } from '../apply-interface' +import SelectCertDialog from '../dialog/selectCertDialog.vue' import type { dictType } from '@/global' import { getDictByCode } from '@/api/system/dict' -import { getUserList } from '@/api/system/user' import { SCHEDULE } from '@/utils/scheduleDict' import useUserStore from '@/store/modules/user' -import { useCheckList } from '@/commonMethods/useCheckList' -import type { IAccessory } from '@/views/equipement/info/book/book-interface' -import { useDoubleClickTableRow, useSetAllRowReadable } from '@/commonMethods/useSetAllRowReadable' import { addChangeCertApplyList, failUpdateChangeCertApplyList, getInfo, submit, updateChangeCertApplyList } from '@/api/business/certManage/changeApply' const props = defineProps({ pageType: { // 页面类型 add新建 edit编辑 detail详情 @@ -19,7 +16,7 @@ requre: true, default: 'detail', }, - id: { + id: { // id type: String, requre: true, }, @@ -27,7 +24,7 @@ type: String, requre: true, }, - processId: { + processId: { // 流程实例id type: String, }, }) @@ -79,12 +76,21 @@ changeTypeList.value = response.data }) } +getDict() // -----------------------------------------------保存---------------------------------------------- /** * 点击保存 * @param formEl 基本信息表单ref */ const saveForm = async () => { + if (!form.value.changeAnalysis) { + ElMessage.warning('补充/更换原因及影响分析不能为空') + return false + } + if (!form.value.recallAnalysis) { + ElMessage.warning('召回原因及影响分析不能为空') + return false + } await ruleFormRef.value.validate((valid: boolean) => { if (valid) { // 基本信息表单通过校验 ElMessageBox.confirm( @@ -101,8 +107,6 @@ text: '加载中...', background: 'rgba(255, 255, 255, 0.8)', }) - console.log('props.processId', props.processId) - const params = { ...form.value, id: infoId.value, @@ -111,7 +115,7 @@ if (props.pageType === 'add') { // 新建 addChangeCertApplyList(params).then((res) => { loading.close() - // form.value.registerNo = res.data.registerNo // 登记表编号 + form.value.changeApplyNo = res.data.changeApplyNo // 登记表编号 infoId.value = res.data.id // id emits('addSuccess', infoId.value) ElMessage.success('已保存') @@ -175,6 +179,25 @@ // attachmentList.value = res.data.attachmentList // 设备列表 }) } + +// -----------------------------------------选择证书---------------------------------------------- +const selectCertDialogRef = ref() // 选择证书组件ref +// 点击选择证书 +const selectUpdateCertNo = () => { + selectCertDialogRef.value.initDialog() +} + +// 确认选择证书 +const confirmSelect = (val: any) => { + // if (val && val.length) { + // form.value.changeReportId = val[0].id // 更换证书id + // form.value.changeReportName = val[0].changeReportName // 更换证书 / 报告名称 + // form.value.changeReportNo = val[0].changeReportNo // 更换证书编号 + form.value.changeReportId = '123456789' // 更换证书id + form.value.changeReportName = '证书1' // 更换证书 / 报告名称 + form.value.changeReportNo = 'zs123456789' // 更换证书编号 + // } +} // ---------------------------------------------钩子---------------------------------------------- watch(() => props.id, (newValue) => { infoId.value = newValue! @@ -209,6 +232,20 @@ > + + + + + + + + + + + + + + - + 选择 @@ -272,9 +309,13 @@ - - - + + + 补充 + + + 更换 + @@ -311,4 +352,6 @@ + + diff --git a/src/views/business/certManage/apply/detail.vue b/src/views/business/certManage/apply/detail.vue index bb85de0..3928286 100644 --- a/src/views/business/certManage/apply/detail.vue +++ b/src/views/business/certManage/apply/detail.vue @@ -1,3 +1,105 @@ + + + - {{ 11 }} + + + + + 导出word + + + 导出pdf + + + 打印 + + + 关闭 + + + + + + 敬请期待 + + + + + diff --git a/src/views/business/certManage/apply/dialog/selectCertDialog.vue b/src/views/business/certManage/apply/dialog/selectCertDialog.vue new file mode 100644 index 0000000..c3e9141 --- /dev/null +++ b/src/views/business/certManage/apply/dialog/selectCertDialog.vue @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/api/business/certManage/changeApply.ts b/src/api/business/certManage/changeApply.ts index edbdf7d..dcf2c41 100644 --- a/src/api/business/certManage/changeApply.ts +++ b/src/api/business/certManage/changeApply.ts @@ -106,7 +106,7 @@ // 导出word/pdf/打印 export function getStream(data: any) { return request({ - url: '/equipment/lend/exportFile', + url: `${prefix}/exportFile`, method: 'post', responseType: 'blob', data, diff --git a/src/views/business/certManage/apply/components/basic.vue b/src/views/business/certManage/apply/components/basic.vue index 99cbbaa..c61d3fb 100644 --- a/src/views/business/certManage/apply/components/basic.vue +++ b/src/views/business/certManage/apply/components/basic.vue @@ -4,14 +4,11 @@ import type { FormRules } from 'element-plus' import dayjs from 'dayjs' import type { IForm } from '../apply-interface' +import SelectCertDialog from '../dialog/selectCertDialog.vue' import type { dictType } from '@/global' import { getDictByCode } from '@/api/system/dict' -import { getUserList } from '@/api/system/user' import { SCHEDULE } from '@/utils/scheduleDict' import useUserStore from '@/store/modules/user' -import { useCheckList } from '@/commonMethods/useCheckList' -import type { IAccessory } from '@/views/equipement/info/book/book-interface' -import { useDoubleClickTableRow, useSetAllRowReadable } from '@/commonMethods/useSetAllRowReadable' import { addChangeCertApplyList, failUpdateChangeCertApplyList, getInfo, submit, updateChangeCertApplyList } from '@/api/business/certManage/changeApply' const props = defineProps({ pageType: { // 页面类型 add新建 edit编辑 detail详情 @@ -19,7 +16,7 @@ requre: true, default: 'detail', }, - id: { + id: { // id type: String, requre: true, }, @@ -27,7 +24,7 @@ type: String, requre: true, }, - processId: { + processId: { // 流程实例id type: String, }, }) @@ -79,12 +76,21 @@ changeTypeList.value = response.data }) } +getDict() // -----------------------------------------------保存---------------------------------------------- /** * 点击保存 * @param formEl 基本信息表单ref */ const saveForm = async () => { + if (!form.value.changeAnalysis) { + ElMessage.warning('补充/更换原因及影响分析不能为空') + return false + } + if (!form.value.recallAnalysis) { + ElMessage.warning('召回原因及影响分析不能为空') + return false + } await ruleFormRef.value.validate((valid: boolean) => { if (valid) { // 基本信息表单通过校验 ElMessageBox.confirm( @@ -101,8 +107,6 @@ text: '加载中...', background: 'rgba(255, 255, 255, 0.8)', }) - console.log('props.processId', props.processId) - const params = { ...form.value, id: infoId.value, @@ -111,7 +115,7 @@ if (props.pageType === 'add') { // 新建 addChangeCertApplyList(params).then((res) => { loading.close() - // form.value.registerNo = res.data.registerNo // 登记表编号 + form.value.changeApplyNo = res.data.changeApplyNo // 登记表编号 infoId.value = res.data.id // id emits('addSuccess', infoId.value) ElMessage.success('已保存') @@ -175,6 +179,25 @@ // attachmentList.value = res.data.attachmentList // 设备列表 }) } + +// -----------------------------------------选择证书---------------------------------------------- +const selectCertDialogRef = ref() // 选择证书组件ref +// 点击选择证书 +const selectUpdateCertNo = () => { + selectCertDialogRef.value.initDialog() +} + +// 确认选择证书 +const confirmSelect = (val: any) => { + // if (val && val.length) { + // form.value.changeReportId = val[0].id // 更换证书id + // form.value.changeReportName = val[0].changeReportName // 更换证书 / 报告名称 + // form.value.changeReportNo = val[0].changeReportNo // 更换证书编号 + form.value.changeReportId = '123456789' // 更换证书id + form.value.changeReportName = '证书1' // 更换证书 / 报告名称 + form.value.changeReportNo = 'zs123456789' // 更换证书编号 + // } +} // ---------------------------------------------钩子---------------------------------------------- watch(() => props.id, (newValue) => { infoId.value = newValue! @@ -209,6 +232,20 @@ > + + + + + + + + + + + + + + - + 选择 @@ -272,9 +309,13 @@ - - - + + + 补充 + + + 更换 + @@ -311,4 +352,6 @@ + + diff --git a/src/views/business/certManage/apply/detail.vue b/src/views/business/certManage/apply/detail.vue index bb85de0..3928286 100644 --- a/src/views/business/certManage/apply/detail.vue +++ b/src/views/business/certManage/apply/detail.vue @@ -1,3 +1,105 @@ + + + - {{ 11 }} + + + + + 导出word + + + 导出pdf + + + 打印 + + + 关闭 + + + + + + 敬请期待 + + + + + diff --git a/src/views/business/certManage/apply/dialog/selectCertDialog.vue b/src/views/business/certManage/apply/dialog/selectCertDialog.vue new file mode 100644 index 0000000..c3e9141 --- /dev/null +++ b/src/views/business/certManage/apply/dialog/selectCertDialog.vue @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/business/certManage/apply/list.vue b/src/views/business/certManage/apply/list.vue index eda1353..cac304f 100644 --- a/src/views/business/certManage/apply/list.vue +++ b/src/views/business/certManage/apply/list.vue @@ -46,7 +46,7 @@ // 表头 const columns = ref([ - { text: '申请单编号', value: 'changeApplyNo', align: 'center', width: '160' }, + { text: '申请单编号', value: 'changeApplyNo', align: 'center', width: '180' }, { text: '申请单名称', value: 'changeApplyName', align: 'center' }, { text: '更换证书编号', value: 'changeReportNo', align: 'center', width: '160' }, { text: '更换证书/报告名称', value: 'changeReportName', align: 'center' },