Browse Source

检验任务,模板

master_hella_20240701
zhang_li 8 months ago
parent
commit
080a8023c4
  1. 20
      src/api/qms/inspectionJob/inspectionJobDetail/index.ts
  2. 16
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  3. 3
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  4. 1
      src/views/qms/basicDataManage/inspectionPlan/index.vue
  5. 16
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  6. 1010
      src/views/qms/inspection/inspectionJob/addForm.vue
  7. 37
      src/views/qms/inspection/inspectionJob/index.vue
  8. 12
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

20
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' })
}

16
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' })
}

3
src/views/qms/basicDataManage/inspectionPlan/addForm.vue

@ -7,7 +7,7 @@
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20">
<el-col :span="12">
@ -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(`请添加工序`)

1
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' })

16
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -6,7 +6,7 @@
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> -->
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20">
@ -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 {

1010
src/views/qms/inspection/inspectionJob/addForm.vue

File diff suppressed because it is too large

37
src/views/qms/inspection/inspectionJob/index.vue

@ -27,13 +27,22 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules"
<!-- <BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :tableAllSchemas="InspectionJobDetail.allSchemas"
:tableFormRules="InspectionJobDetailRules" :tableData="tableData"
:apiUpdate="InspectionJobMainApi.updateInspectionJobMain" :apiCreate="InspectionJobMainApi.createInspectionJobMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:rules="InspectionTemplateRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
@ -51,11 +60,15 @@
<script setup lang="ts">
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 {

12
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

@ -76,12 +76,12 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
},
{
label: '检验方案Json',
field: 'inspectionSchemeJson',
sort: 'custom',
isSearch: false,
},
// {
// label: '检验方案Json',
// field: 'inspectionSchemeJson',
// sort: 'custom',
// isSearch: false,
// },
{
label: '检验批次',
field: 'inspectionBatch',

Loading…
Cancel
Save