Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 8 months ago
parent
commit
01341648ff
  1. 20
      src/api/qms/inspectionJob/inspectionJobDetail/index.ts
  2. 16
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  3. 2
      src/utils/dict.ts
  4. 7
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts
  5. 3
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  6. 1
      src/views/qms/basicDataManage/inspectionPlan/index.vue
  7. 16
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  8. 1010
      src/views/qms/inspection/inspectionJob/addForm.vue
  9. 39
      src/views/qms/inspection/inspectionJob/index.vue
  10. 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) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} 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 { } 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) => { 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) => { 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) => { 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) => { 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 // 导出检验申请 Excel
export const exportInspectionJobDetail = async (params) => { 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 = () => { 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) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} 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 { } 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) => { 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) => { 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) => { 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) => { 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 // 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => { 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 = () => { 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' })
} }

2
src/utils/dict.ts

@ -285,7 +285,7 @@ export enum DICT_TYPE {
MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单) MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单)
MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式 MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式
MES_PLANDO_STATUS='mes_plando_status', //计划执行状 MES_PLANDO_STATUS='mes_plando_status', //计划执行状
PLAN_TYPE_MES='plan_type_mes',
//========== QMS ========== //========== QMS ==========
SAMPLING_TYPE = "sampling_type", // 取样类型 SAMPLING_TYPE = "sampling_type", // 取样类型

7
src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

@ -38,7 +38,12 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '计划类型', label: '计划类型',
field: 'planType', field: 'planType',
sort: 'custom', sort: 'custom',
isSearch: true dictType: DICT_TYPE.PLAN_TYPE_MES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
}, },
{ {
label: '备注', label: '备注',

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

@ -7,7 +7,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:vLoading="formLoading" :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-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20"> <el-row gutter="20">
<el-col :span="12"> <el-col :span="12">
@ -879,6 +879,7 @@ const submitForm = async () => {
try { try {
const validateForm1 = await validateForm(formProcessRef.value) const validateForm1 = await validateForm(formProcessRef.value)
console.log(validateForm1) console.log(validateForm1)
console.log(data.value)
await formMainRef.value.validate() await formMainRef.value.validate()
if (!data.value.process || data.value.process.length == 0) { if (!data.value.process || data.value.process.length == 0) {
message.error(`请添加工序`) 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 Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan' import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
import { json } from 'stream/consumers'
defineOptions({ name: 'AgvLocationrelation' }) defineOptions({ name: 'AgvLocationrelation' })

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

@ -6,7 +6,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:vLoading="formLoading" :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" /> --> <!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> -->
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef"> <el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20"> <el-row gutter="20">
@ -571,6 +571,9 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
version: '', version: '',
process: [] 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 tabIndex = data.value.process.length + 1
@ -625,9 +628,9 @@ const buttonBaseClick1 = (val) => {
isDestructionInspection: '', isDestructionInspection: '',
resultEntryMethod: '', resultEntryMethod: '',
featureType: '', featureType: '',
quantifyIsCapping: '', quantifyIsCapping: false,
quantifyIsLowlimit: '', quantifyIsLowlimit: false,
quantifyIsTarget: '', quantifyIsTarget: false,
quantifyTarget: '', quantifyTarget: '',
quantifyCapping: '', quantifyCapping: '',
quantifyLowlimit: '', quantifyLowlimit: '',
@ -636,8 +639,9 @@ const buttonBaseClick1 = (val) => {
quantifyQuantifyCode: '' 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 editableTabsValue.value = newTabName
dialogVisibleName.value = false dialogVisibleName.value = false
} else { } else {

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

File diff suppressed because it is too large

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

@ -27,13 +27,22 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules" <!-- <BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :tableAllSchemas="InspectionJobDetail.allSchemas" :formAllSchemas="InspectionJobMain.allSchemas" :tableAllSchemas="InspectionJobDetail.allSchemas"
:tableFormRules="InspectionJobDetailRules" :tableData="tableData" :tableFormRules="InspectionJobDetailRules" :tableData="tableData"
:apiUpdate="InspectionJobMainApi.updateInspectionJobMain" :apiCreate="InspectionJobMainApi.createInspectionJobMain" :apiUpdate="InspectionJobMainApi.updateInspectionJobMain" :apiCreate="InspectionJobMainApi.createInspectionJobMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" :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" <Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules" :detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
@ -51,11 +60,15 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules } from './inspectionJobMain.data' 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 InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
// //
defineOptions({ name: 'InspectionJobMain' }) defineOptions({ name: 'InspectionJobMain' })
@ -160,18 +173,19 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListEditBtn(null), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'mainJobExe') { //
openForm('update', row) execute('update', row)
} }
else if (val == 'delete') { // else if (val == 'mainJobClo') { //
handleDelete(row.id) handleDelete(row.id)
} }
} }
@ -188,7 +202,12 @@
const openDetail = (row : any, titleName : any, titleValue : any) => { const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain') 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) => { const handleDelete = async (id : number) => {
try { try {

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

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

Loading…
Cancel
Save