From 080a8023c4cee319c54d4054e8f7ee3d44dea7cf Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Sun, 7 Apr 2024 13:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionJobDetail/index.ts | 20 +- .../inspectionJob/inspectionJobMain/index.ts | 16 +- .../inspectionPlan/addForm.vue | 3 +- .../basicDataManage/inspectionPlan/index.vue | 1 - .../inspectionTemplate/addForm.vue | 16 +- .../qms/inspection/inspectionJob/addForm.vue | 1010 +++++++++++++++++ .../qms/inspection/inspectionJob/index.vue | 39 +- .../inspectionJob/inspectionJobMain.data.ts | 12 +- 8 files changed, 1077 insertions(+), 40 deletions(-) create mode 100644 src/views/qms/inspection/inspectionJob/addForm.vue diff --git a/src/api/qms/inspectionJob/inspectionJobDetail/index.ts b/src/api/qms/inspectionJob/inspectionJobDetail/index.ts index 742627e2b..12679e310 100644 --- a/src/api/qms/inspectionJob/inspectionJobDetail/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobDetail/index.ts @@ -28,38 +28,42 @@ export const getInspectionJobDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/inspection/inspection-job-detail/senior', data }) + return await request.post({ url: '/qms/inspection-job-detail/senior', data }) } else { - return await request.get({ url: `/inspection/inspection-job-detail/page`, params }) + return await request.get({ url: `/qms/inspection-job-detail/page`, params }) } } +//查询检验申请列表 +export const getInspectionJobDetailList = async (id: number) => { + return await request.get({ url: `/qms/inspection-job-detail/list?masterId=` + id }) +} // 查询检验申请详情 export const getInspectionJobDetail = async (id: number) => { - return await request.get({ url: `/inspection/inspection-job-detail/get?id=` + id }) + return await request.get({ url: `/qms/inspection-job-detail/get?id=` + id }) } // 新增检验申请 export const createInspectionJobDetail = async (data: InspectionJobDetailVO) => { - return await request.post({ url: `/inspection/inspection-job-detail/create`, data }) + return await request.post({ url: `/qms/inspection-job-detail/create`, data }) } // 修改检验申请 export const updateInspectionJobDetail = async (data: InspectionJobDetailVO) => { - return await request.put({ url: `/inspection/inspection-job-detail/update`, data }) + return await request.put({ url: `/qms/inspection-job-detail/update`, data }) } // 删除检验申请 export const deleteInspectionJobDetail = async (id: number) => { - return await request.delete({ url: `/inspection/inspection-job-detail/delete?id=` + id }) + return await request.delete({ url: `/qms/inspection-job-detail/delete?id=` + id }) } // 导出检验申请 Excel export const exportInspectionJobDetail = async (params) => { - return await request.download({ url: `/inspection/inspection-job-detail/export-excel`, params }) + return await request.download({ url: `/qms/inspection-job-detail/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/inspection/inspection-job-detail/get-import-template' }) + return request.download({ url: '/qms/inspection-job-detail/get-import-template' }) } diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index 7bb8b4411..96170650a 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -28,38 +28,38 @@ export const getInspectionJobMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/inspection/inspection-job-main/senior', data }) + return await request.post({ url: '/qms/inspection-job-main/senior', data }) } else { - return await request.get({ url: `/inspection/inspection-job-main/page`, params }) + return await request.get({ url: `/qms/inspection-job-main/page`, params }) } } // 查询检验申请详情 export const getInspectionJobMain = async (id: number) => { - return await request.get({ url: `/inspection/inspection-job-main/get?id=` + id }) + return await request.get({ url: `/qms/inspection-job-main/get?id=` + id }) } // 新增检验申请 export const createInspectionJobMain = async (data: InspectionJobMainVO) => { - return await request.post({ url: `/inspection/inspection-job-main/create`, data }) + return await request.post({ url: `/qms/inspection-job-main/create`, data }) } // 修改检验申请 export const updateInspectionJobMain = async (data: InspectionJobMainVO) => { - return await request.put({ url: `/inspection/inspection-job-main/update`, data }) + return await request.put({ url: `/qms/inspection-job-main/update`, data }) } // 删除检验申请 export const deleteInspectionJobMain = async (id: number) => { - return await request.delete({ url: `/inspection/inspection-job-main/delete?id=` + id }) + return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id }) } // 导出检验申请 Excel export const exportInspectionJobMain = async (params) => { - return await request.download({ url: `/inspection/inspection-job-main/export-excel`, params }) + return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/inspection/inspection-job-main/get-import-template' }) + return request.download({ url: '/qms/inspection-job-main/get-import-template' }) } diff --git a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue index 591a4a6cb..f427dbd65 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue @@ -7,7 +7,7 @@ :close-on-click-modal="false" :vLoading="formLoading" > -
+
@@ -879,6 +879,7 @@ const submitForm = async () => { try { const validateForm1 = await validateForm(formProcessRef.value) console.log(validateForm1) + console.log(data.value) await formMainRef.value.validate() if (!data.value.process || data.value.process.length == 0) { message.error(`请添加工序`) diff --git a/src/views/qms/basicDataManage/inspectionPlan/index.vue b/src/views/qms/basicDataManage/inspectionPlan/index.vue index a77b24eb8..787063cb2 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/index.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/index.vue @@ -60,7 +60,6 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import AddForm from './addForm.vue' import * as InspectionPlanApi from '@/api/qms/inspectionPlan' -import { json } from 'stream/consumers' defineOptions({ name: 'AgvLocationrelation' }) diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue index 28d00ba06..2d701589d 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue @@ -6,7 +6,7 @@ :close-on-click-modal="false" :vLoading="formLoading" > -
+
@@ -571,6 +571,9 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any version: '', process: [] } + rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false + rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false + rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false } tabIndex = data.value.process.length + 1 @@ -625,9 +628,9 @@ const buttonBaseClick1 = (val) => { isDestructionInspection: '', resultEntryMethod: '', featureType: '', - quantifyIsCapping: '', - quantifyIsLowlimit: '', - quantifyIsTarget: '', + quantifyIsCapping: false, + quantifyIsLowlimit: false, + quantifyIsTarget: false, quantifyTarget: '', quantifyCapping: '', quantifyLowlimit: '', @@ -636,8 +639,9 @@ const buttonBaseClick1 = (val) => { quantifyQuantifyCode: '' } }) - console.log(data.value.process) - + rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false + rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false + rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false editableTabsValue.value = newTabName dialogVisibleName.value = false } else { diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue new file mode 100644 index 000000000..3f8177d67 --- /dev/null +++ b/src/views/qms/inspection/inspectionJob/addForm.vue @@ -0,0 +1,1010 @@ + + + + + diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index 48b31afaa..6b393c63d 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -27,13 +27,22 @@ - - + @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> --> + import download from '@/utils/download' import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules } from './inspectionJobMain.data' + import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data' + import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' + import AddForm from './addForm.vue' + import * as InspectionPlanApi from '@/api/qms/inspectionPlan' // 采购订单 defineOptions({ name: 'InspectionJobMain' }) @@ -160,18 +173,19 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 - // defaultButtons.mainListEditBtn(null), // 编辑 - // defaultButtons.mainListDeleteBtn(null), // 删除 + // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 + // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - if (val == 'edit') { // 编辑 - openForm('update', row) + if (val == 'mainJobExe') { // 执行 + execute('update', row) } - else if (val == 'delete') { // 删除 + else if (val == 'mainJobClo') { // 关闭 handleDelete(row.id) } } @@ -188,7 +202,12 @@ const openDetail = (row : any, titleName : any, titleValue : any) => { detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain') } - + //执行 + + const basicFormRef = ref() + const execute = async (type : string, row ?: number) => { + basicFormRef.value.open(type, row) + } /** 删除按钮操作 */ const handleDelete = async (id : number) => { try { diff --git a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts index 42da7a50d..91d5ab456 100644 --- a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts @@ -76,12 +76,12 @@ export const InspectionJobMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: false, }, - { - label: '检验方案Json', - field: 'inspectionSchemeJson', - sort: 'custom', - isSearch: false, - }, + // { + // label: '检验方案Json', + // field: 'inspectionSchemeJson', + // sort: 'custom', + // isSearch: false, + // }, { label: '检验批次', field: 'inspectionBatch',