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 = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' })
}
//查询检验申请列表
//查询包装列表
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"
@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
v-model="editableTabsValue"
class="demo-tabs"
@ -241,7 +258,7 @@
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<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-col>
<el-col
@ -250,7 +267,7 @@
>
<el-form-item label="不合格数量" required>
<el-input
v-model="cur.unqualifiedQuantity"
v-model="cur.unqualifiedQuantity" type="number"
placeholder="请输入不合格数量"
/>
</el-form-item>
@ -277,7 +294,7 @@
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<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-col>
<el-col
@ -365,6 +382,7 @@ import * as DynamicRuleApi from '@/api/qms/dynamicRule' //动态修改规则
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
const { proxy } = getCurrentInstance()
@ -411,7 +429,18 @@ const props = defineProps({
type: Object,
required: true,
default: null
}
},
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
tableFormRules: {
type: Array,
required: true,
default: null
},
})
const { t } = useI18n() //
@ -424,6 +453,8 @@ const formMainRef = ref()
const formFeaturesRef = ref()
const formProcessRef = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const data = ref({
code: '',
@ -511,6 +542,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
console.log(data.value)
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageVOList = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1

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

@ -33,6 +33,8 @@
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
@ -40,7 +42,8 @@
<!-- 详情 -->
<Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
:detailAllSchemas="InspectionJobDetail.allSchemas"
:detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
@ -53,7 +56,7 @@
<script setup lang="ts">
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 * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
@ -63,6 +66,7 @@
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
console.log(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',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
}
},
{
label: '数量',
@ -558,11 +567,23 @@ export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
value: 0
},
tableForm:{
disabled:true
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
},
]))

Loading…
Cancel
Save