From 7398927cf1d14067e37a604674205aa733246124 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 8 Apr 2024 11:31:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionJobDetail/index.ts | 26 +- .../inspectionRecordDetail/index.ts | 48 +-- .../inspectionRecordMain/index.ts | 16 +- .../qms/inspection/inspectionJob/addForm.vue | 127 ++++--- .../qms/inspection/inspectionJob/detail.vue | 310 ++++++++++++++++++ .../qms/inspection/inspectionJob/index.vue | 16 +- .../inspection/inspectionRecord/detail.vue | 310 ++++++++++++++++++ .../qms/inspection/inspectionRecord/index.vue | 18 +- 8 files changed, 733 insertions(+), 138 deletions(-) create mode 100644 src/views/qms/inspection/inspectionJob/detail.vue create mode 100644 src/views/qms/inspection/inspectionRecord/detail.vue diff --git a/src/api/qms/inspectionJob/inspectionJobDetail/index.ts b/src/api/qms/inspectionJob/inspectionJobDetail/index.ts index 12679e310..1b71cd0a1 100644 --- a/src/api/qms/inspectionJob/inspectionJobDetail/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobDetail/index.ts @@ -1,27 +1,5 @@ import request from '@/config/axios' -export interface InspectionJobDetailVO { - number: string - applicationDate: localdate - applicationTime: Date - requestStartTime: Date - requestEndTime: Date - finishTime: Date - supplierCode: string - materialCode: string - batch: string - requestInspectionNum: number - referenceOrderCode: string - referenceOrderRow: number - referenceCertificateCode: string - referenceCertificateRow: number - inspectionSchemeCode: string - inspectionStageCode: string - applicationPackageCode: string - inspectionLevel: string - aqlValue: number - available: string -} // 查询检验申请列表 export const getInspectionJobDetailPage = async (params) => { @@ -44,12 +22,12 @@ export const getInspectionJobDetail = async (id: number) => { } // 新增检验申请 -export const createInspectionJobDetail = async (data: InspectionJobDetailVO) => { +export const createInspectionJobDetail = async (data) => { return await request.post({ url: `/qms/inspection-job-detail/create`, data }) } // 修改检验申请 -export const updateInspectionJobDetail = async (data: InspectionJobDetailVO) => { +export const updateInspectionJobDetail = async (data) => { return await request.put({ url: `/qms/inspection-job-detail/update`, data }) } diff --git a/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts b/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts index ad565f913..16dfb87a8 100644 --- a/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts +++ b/src/api/qms/inspectionRecord/inspectionRecordDetail/index.ts @@ -1,65 +1,47 @@ import request from '@/config/axios' -export interface InspectionRecordDetailVO { - number: string - applicationDate: localdate - applicationTime: Date - requestStartTime: Date - requestEndTime: Date - finishTime: Date - supplierCode: string - materialCode: string - batch: string - requestInspectionNum: number - referenceOrderCode: string - referenceOrderRow: number - referenceCertificateCode: string - referenceCertificateRow: number - inspectionSchemeCode: string - inspectionStageCode: string - applicationPackageCode: string - inspectionLevel: string - aqlValue: number - available: string -} + // 查询检验申请列表 export const getInspectionRecordDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/inspection/inspection-recordord-detail/senior', data }) + return await request.post({ url: '/qms/inspection-record-detail/senior', data }) } else { - return await request.get({ url: `/inspection/inspectirecordrecord-detail/page`, params }) + return await request.get({ url: `/qms/inspection-record-detail/page`, params }) } } - +// 查询检验申请列表 +export const getInspectionRecordDetailList = async (id: number) => { + return await request.get({ url: `/qms/inspection-record-detail/list?masterId=` + id }) +} // 查询检验申请详情 export const getInspectionRecordDetail = async (id: number) => { - return await request.get({ url: `/inspection/insperecordon-record-detail/get?id=` + id }) + return await request.get({ url: `/qms/inspection-record-detail/get?id=` + id }) } // 新增检验申请 -export const createInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { - return await request.post({ url: `/inspection/inrecordction-record-detail/create`, data }) +export const createInspectionRecordDetail = async (data) => { + return await request.post({ url: `/qms/inspection-record-detail/create`, data }) } // 修改检验申请 -export const updateInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { - return await request.put({ url: `/inspectionrecordspection-record-detail/update`, data }) +export const updateInspectionRecordDetail = async (data) => { + return await request.put({ url: `/qms/inspection-record-detail/update`, data }) } // 删除检验申请 export const deleteInspectionRecordDetail = async (id: number) => { - return await request.delete({ url: `/inspectrecord/inspection-record-detail/delete?id=` + id }) + return await request.delete({ url: `/qms/inspection-record-detail/delete?id=` + id }) } // 导出检验申请 Excel export const exportInspectionRecordDetail = async (params) => { - return await request.download({ url: `/insprecordion/inspection-record-detail/export-excel`, params }) + return await request.download({ url: `/qms/inspection-record-detail/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/irecordection/inspection-record-detail/get-import-template' }) + return request.download({ url: '/qms/inspection-record-detail/get-import-template' }) } diff --git a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts index 225443425..02663e294 100644 --- a/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts +++ b/src/api/qms/inspectionRecord/inspectionRecordMain/index.ts @@ -28,38 +28,38 @@ export const getInspectionRecordMainPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/inspection/inspection-record-main/senior', data }) + return await request.post({ url: '/qms/inspection-record-main/senior', data }) } else { - return await request.get({ url: `/inspection/inspection-record-main/page`, params }) + return await request.get({ url: `/qms/inspection-record-main/page`, params }) } } // 查询检验申请详情 export const getInspectionRecordMain = async (id: number) => { - return await request.get({ url: `/inspection/inspection-record-main/get?id=` + id }) + return await request.get({ url: `/qms/inspection-record-main/get?id=` + id }) } // 新增检验申请 export const createInspectionRecordMain = async (data: InspectionRecordMainVO) => { - return await request.post({ url: `/inspection/inspection-record-main/create`, data }) + return await request.post({ url: `/qms/inspection-record-main/create`, data }) } // 修改检验申请 export const updateInspectionRecordMain = async (data: InspectionRecordMainVO) => { - return await request.put({ url: `/inspection/inspection-record-main/update`, data }) + return await request.put({ url: `/qms/inspection-record-main/update`, data }) } // 删除检验申请 export const deleteInspectionRecordMain = async (id: number) => { - return await request.delete({ url: `/inspection/inspection-record-main/delete?id=` + id }) + return await request.delete({ url: `/qms/inspection-record-main/delete?id=` + id }) } // 导出检验申请 Excel export const exportInspectionRecordMain = async (params) => { - return await request.download({ url: `/inspection/inspection-record-main/export-excel`, params }) + return await request.download({ url: `/qms/inspection-record-main/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/inspection/inspection-record-main/get-import-template' }) + return request.download({ url: '/qms/inspection-record-main/get-import-template' }) } diff --git a/src/views/qms/inspection/inspectionJob/addForm.vue b/src/views/qms/inspection/inspectionJob/addForm.vue index d6051c4d7..3a469b564 100644 --- a/src/views/qms/inspection/inspectionJob/addForm.vue +++ b/src/views/qms/inspection/inspectionJob/addForm.vue @@ -20,7 +20,6 @@ /> - @@ -315,6 +313,9 @@ import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //选择集 + +const { proxy } = getCurrentInstance() + const message = useMessage() // 消息弹窗 const props = defineProps({ @@ -441,6 +442,9 @@ const rules = ref({ 'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [ { required: true, message: '请输入选择结束时间', trigger: 'blur' } ], +qualifiedQuantity: [ + { required: true, message: '请输入选择结束时间', trigger: 'blur' } +], }) @@ -465,30 +469,30 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any item.name = index + 1 item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[] - // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true - if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) { - // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true - for(let i=0;i { const valid = await elForm.validate() if (!valid) return // const bol1 = await validateForm(formProcessRef.value) - // const bol2 = await validateForm(formFeaturesRef.value) - // console.log(bol2) - // if (!bol2) { - // message.error(`模板中有检验工序和检验特性未填写完全`) - // return - // } + const bol2 = await validateForm(formFeaturesRef.value) + if (!bol2) { + message.error(`模板中有检验工序和检验特性未填写完全`) + return + } // 判断附加费用数组是否有未填的选项 let arrBol = data.value.subList.map((item, index) => { + let arr1 = [] if(item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1){ - return item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ + arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ return !cur.qualifiedQuantity || !cur.unqualifiedQuantity - }) + })) + } + if(item.samplingProcessRespVO.evaluationMode == 1){ + arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ + return !cur.estimateCode ||!cur.defectLevel + })) + } + if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0){ + arr1.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ + return !cur.inspectionValue + })) + } + if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1){ + arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ + return !cur.qualitativeCode + })) } + return arr1 }) - console.log(arrBol) - let isEmpty1 = arrBol.some(item=>item== true) - if (isEmpty1) { - proxy.$modal.msgError("请填写完整信息"); - return; - } - return - // if (!data.value.process || data.value.process.length == 0) { - // message.error(`请添加工序`) - // return - // } - // const bol1 = await validateForm(formProcessRef.value) - // const bol2 = await validateForm(formFeaturesRef.value) - // if (!bol1 || !bol2) { - // message.error(`模板中有检验工序和检验特性未填写完全`) - // return - // } - // const arr = data.value.process.filter( - // (item) => - // !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && - // !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && - // !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && - // item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 - // ) - // console.log(arr) - // if (arr && arr.length > 0) { - // const str = arr.map((item) => item.description).join(',') - // message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) - // return - // } +// console.log(arrBol) +// let isEmpty1 = arrBol.filter(item=>item == true) +// arrBol.forEach(item=>{ +// console.log('1q1q') +// console.log(typeof item) +// }) + // setTimeout(()=>{ + // console.log(arrBol.includes(true)) + // },2000) if (formType.value == 'create') { // 主子表——提交请求 emit('submitForm', formType.value, data.value) diff --git a/src/views/qms/inspection/inspectionJob/detail.vue b/src/views/qms/inspection/inspectionJob/detail.vue new file mode 100644 index 000000000..5c401950d --- /dev/null +++ b/src/views/qms/inspection/inspectionJob/detail.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index 66577f3c3..b5e4ed1cb 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -43,14 +43,23 @@ :formAllSchemas="InspectionJobMain.allSchemas" @submitForm="submitForm" /> + - + :isShowAddBtn="false" :detailButtonIsShow="true"/> --> +
+ + + + + + + + +
检验工序
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
检验特性
+ + + + + + + + + + + + + + +
+ +
+
+
+ + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+ + + + + diff --git a/src/views/qms/inspection/inspectionRecord/index.vue b/src/views/qms/inspection/inspectionRecord/index.vue index 7116df0d8..89e8ab19d 100644 --- a/src/views/qms/inspection/inspectionRecord/index.vue +++ b/src/views/qms/inspection/inspectionRecord/index.vue @@ -35,17 +35,23 @@ @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> - - + @searchTableSuccessDetail="searchTableSuccessDetail" :isShowAddBtn="false" :detailButtonIsShow="true" /> --> + -