Browse Source

11

master_hella_20240701
zhang_li 8 months ago
parent
commit
e686aa451e
  1. 7
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  2. 40
      src/views/qms/inspection/inspectionJob/addForm.vue
  3. 8
      src/views/qms/inspection/inspectionJob/index.vue
  4. 21
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

7
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -44,7 +44,8 @@ export const exportInspectionJobMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' }) return request.download({ url: '/qms/inspection-job-main/get-import-template' })
} }
//查询检验申请列表 //查询包装列表
export const getInspectionJobPackageList = async (id: number) => { export const getInspectionJobPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id })   return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id })
} }

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

@ -18,6 +18,23 @@
:is-col="true" :is-col="true"
@opensearchTable="opensearchTable" @opensearchTable="opensearchTable"
/> />
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm
ref="tableFormRef"
style="width:100%;"
:maxHeight = "490"
:tableFields="tableAllSchemas.tableFormColumns"
:tableFormRules="tableFormRules"
:tableData="data.packageVOList"
:isShowButton="false"
:isShowReduceButton="false"
>
<template v-slot="{row}">
<slot :row="row"></slot>
</template>
</TableForm>
</div>
<el-tabs <el-tabs
v-model="editableTabsValue" v-model="editableTabsValue"
class="demo-tabs" class="demo-tabs"
@ -241,7 +258,7 @@
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
> >
<el-form-item label="合格数量" required> <el-form-item label="合格数量" required>
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" /> <el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col
@ -250,7 +267,7 @@
> >
<el-form-item label="不合格数量" required> <el-form-item label="不合格数量" required>
<el-input <el-input
v-model="cur.unqualifiedQuantity" v-model="cur.unqualifiedQuantity" type="number"
placeholder="请输入不合格数量" placeholder="请输入不合格数量"
/> />
</el-form-item> </el-form-item>
@ -277,7 +294,7 @@
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" /> <el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col
@ -365,6 +382,7 @@ import * as DynamicRuleApi from '@/api/qms/dynamicRule' //动态修改规则
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' // import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' // import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' // import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@ -411,7 +429,18 @@ const props = defineProps({
type: Object, type: Object,
required: true, required: true,
default: null default: null
} },
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
tableFormRules: {
type: Array,
required: true,
default: null
},
}) })
const { t } = useI18n() // const { t } = useI18n() //
@ -424,6 +453,8 @@ const formMainRef = ref()
const formFeaturesRef = ref() const formFeaturesRef = ref()
const formProcessRef = ref() const formProcessRef = ref()
const formSchema = ref(props.formAllSchemas?.formSchema) const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const data = ref({ const data = ref({
code: '', code: '',
@ -511,6 +542,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
console.log(data.value) console.log(data.value)
let list = [] let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageVOList = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => { list.forEach((item, index) => {
editableTabsValue.value = index + 1 editableTabsValue.value = index + 1
item.name = index + 1 item.name = index + 1

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

@ -33,6 +33,8 @@
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas" :formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas" :formAllSchemasMain="InspectionTemplateMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionJobMainRules" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm" @submitForm="submitForm"
@ -40,7 +42,8 @@
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas" ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules" :detailAllSchemas="InspectionJobDetail.allSchemas"
:detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail" :apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail" :apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage" :apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
@ -53,7 +56,7 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage} from './inspectionJobMain.data' import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.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'
@ -63,6 +66,7 @@
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
console.log(InspectionJobMain)
// //
defineOptions({ name: 'InspectionJobMain' }) defineOptions({ name: 'InspectionJobMain' })

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

@ -536,18 +536,27 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{
disabled:true
}
}, },
{ {
label: '包装号', label: '包装号',
field: 'packageCode', field: 'packageCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{
disabled:true
}
}, },
{ {
label: '包装规格', label: '包装规格',
field: 'packageSpecificationCode', field: 'packageSpecificationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{
disabled:true
}
}, },
{ {
label: '数量', label: '数量',
@ -558,11 +567,23 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
tableForm:{
disabled:true
}
}, },
{ {
label: '计量单位', label: '计量单位',
field: 'measuringUnit', field: 'measuringUnit',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm:{
disabled:true
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
}, },
])) ]))

Loading…
Cancel
Save