Browse Source

检验任务,记录模板,方案添加变革记录和详情

hella_online_20240904
zhang_li 2 months ago
parent
commit
8d9769078d
  1. 2
      src/components/Detail/src/Detail.vue
  2. 340
      src/views/qms/inspectionJob/detail.vue
  3. 25
      src/views/qms/inspectionJob/index.vue
  4. 759
      src/views/qms/inspectionRecord/detail.vue
  5. 26
      src/views/qms/inspectionRecord/index.vue
  6. 764
      src/views/qms/inspectionRecordFirst/detail.vue
  7. 472
      src/views/qms/inspectionRecordFirst/index.vue
  8. 430
      src/views/qms/inspectionScheme/detail.vue
  9. 20
      src/views/qms/inspectionScheme/index.vue
  10. 46
      src/views/qms/inspectionScheme/inspectionScheme.data.ts
  11. 423
      src/views/qms/inspectionTemplate/detail.vue
  12. 16
      src/views/qms/inspectionTemplate/index.vue

2
src/components/Detail/src/Detail.vue

@ -44,6 +44,8 @@
:schema="allSchemas.detailSchema" :schema="allSchemas.detailSchema"
:columns="2" :columns="2"
/> />
<!-- 检验工序用到插槽 -->
<slot v-if="isBasic && !tabsExtend" :data="detailData" name="basicBottom" :key="detailData.id"></slot>
<!-- 单表切换tabs 展现table --> <!-- 单表切换tabs 展现table -->
<Table <Table
v-if="isBasic && tabsExtend" v-if="isBasic && tabsExtend"

340
src/views/qms/inspectionJob/detail.vue

@ -1,104 +1,165 @@
<template> <template>
<div> <div style="margin-top: 20px">
<el-drawer v-model="isShowDrawer" title="详情" direction="rtl" size="80%" v-loading="detailLoading"> <el-tabs
<template #header> v-model="editableTabsValue"
<div class="font-size-18px"> class="demo-tabs"
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span> type="border-card"
</div> tab-position="left"
</template> :stretch="false"
<ContentWrap v-if="!isBasic"> >
<Descriptions :data="data" labelClassName="label-class-name" label-align="left" direction="vertical" :column="8" :schema="allSchemas.detailSchema" :columns="2" width="200px" /> <el-tab-pane
</ContentWrap> v-for="item in data.subList"
<ContentWrap> :key="item.name"
<el-tabs v-model="editableTabsValue" class="demo-tabs" type="border-card" tab-position="left" :stretch="false"> :label="item.processDescribe"
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name"> :name="item.name"
<div class="small-title">检验工序</div> >
<el-form :model="item" label-width="auto" ref="formProcessRef"> <div class="small-title">检验工序</div>
<el-row :gutter="20"> <el-form :model="item" label-width="auto" ref="formProcessRef">
<el-col :span="12"> <el-row :gutter="20">
<el-form-item label="编码" prop="processCode"> <el-col :span="12">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> <el-form-item label="编码" prop="processCode">
</el-form-item> <el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-col> </el-form-item>
<el-col :span="12"> </el-col>
<el-form-item label="描述" prop="processDescribe"> <el-col :span="12">
<el-input v-model="item.processDescribe" :disabled="true" /> <el-form-item label="描述" prop="processDescribe">
</el-form-item> <el-input v-model="item.processDescribe" :disabled="true" />
</el-col> </el-form-item>
<el-col :span="12"> </el-col>
<el-form-item label="顺序号" prop="sequenceCode"> <el-col :span="12">
<el-input v-model="item.sequenceCode" :disabled="true" /> <el-form-item label="顺序号" prop="sequenceCode">
</el-form-item> <el-input v-model="item.sequenceCode" :disabled="true" />
</el-col> </el-form-item>
</el-row> </el-col>
</el-form> </el-row>
<div class="small-title">检验特性</div> </el-form>
<el-form :model="item" label-width="auto" ref="formFeaturesRef"> <div class="small-title">检验特性</div>
<el-row :gutter="20"> <el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-col :span="12"> <el-row :gutter="20">
<el-form-item label="编码"> <el-col :span="12">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.number" placeholder="根据系统生成" :disabled="true" /> <el-form-item label="编码">
</el-form-item> <el-input
</el-col> v-model="item.inspectionJobCharacteristicsRespVO.number"
<el-col :span="12"> placeholder="根据系统生成"
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description"> :disabled="true"
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" /> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检验方法" prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode"> <el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description">
<div style="display: flex; width: 100%"> <el-input
<el-input v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName" disabled placeholder="请选择检验方法" /> v-model="item.inspectionJobCharacteristicsRespVO.description"
</div> :disabled="true"
</el-form-item> />
</el-col> </el-form-item>
<el-col :span="12"> </el-col>
<el-form-item label="采样过程编码" prop="inspectionJobCharacteristicsRespVO.samplingProcessCode"> <el-col :span="12">
<div style="display: flex; width: 100%"> <el-form-item
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" /> label="检验方法"
</div> prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode"
</el-form-item> >
</el-col> <div style="display: flex; width: 100%">
<el-col :span="12"> <el-input
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsRespVO.sampleQty"> v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName"
<div style="display: flex; width: 100%"> disabled
<el-input v-model="item.inspectionJobCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" /> placeholder="请选择检验方法"
</div> />
</el-form-item> </div>
</el-col> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsRespVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.samplingProcessName"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsRespVO.sampleQty"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsRespVO.samplePieceSize"> <el-form-item
<div style="display: flex; width: 100%"> label="每份样品量"
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplePieceSize" disabled placeholder="请输入每份样品量" /> prop="inspectionJobCharacteristicsRespVO.samplePieceSize"
</div> >
</el-form-item> <div style="display: flex; width: 100%">
</el-col> <el-input
<el-col :span="12"> v-model="item.inspectionJobCharacteristicsRespVO.samplePieceSize"
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsRespVO.isCanUpdate"> disabled
<el-switch v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" disabled /> placeholder="请输入每份样品量"
</el-form-item> />
</el-col> </div>
<el-col :span="12"> </el-form-item>
<el-form-item label="结果录入方式" prop="inspectionJobCharacteristicsRespVO.resultEntryMethod"> </el-col>
<el-select v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod" placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event,item)" disabled> <el-col :span="12">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-form-item
</el-select> label="是否允许修改特征值"
</el-form-item> prop="inspectionJobCharacteristicsRespVO.isCanUpdate"
</el-col> >
<el-col :span="12"> <el-switch v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" disabled />
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType"> </el-form-item>
<el-select v-model="item.inspectionJobCharacteristicsRespVO.featureType" placeholder="请选择特征类型" @change="changeFeatureType" disabled> </el-col>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-col :span="12">
</el-select> <el-form-item
</el-form-item> label="结果录入方式"
</el-col> prop="inspectionJobCharacteristicsRespVO.resultEntryMethod"
</el-row> >
</el-form> <el-select
</el-tab-pane> v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod"
</el-tabs> placeholder="请选择结果录入方式"
</ContentWrap> @change="resultEntryMethodChange($event, item)"
</el-drawer> disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionJobCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</div> </div>
</template> </template>
@ -108,79 +169,26 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Detail' }) defineOptions({ name: 'Detail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({ const props = defineProps({
// data: {
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object, type: Object,
required: true, required: true,
default: null default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
})
data.value.subList = list
} finally {
detailLoading.value = false
}
} }
} })
defineExpose({ openDetail }) // open console.log(props.data)
const data = ref(props.data.data)
const editableTabsValue = ref('1')
onMounted(async () => {
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(data.value.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
})
data.value.subList = list
})
</script> </script>
<style lang="scss"> <style lang="scss">
.el-drawer__body { .el-drawer__body {

25
src/views/qms/inspectionJob/index.vue

@ -61,21 +61,12 @@
@submitForm="submitForm" @submitForm="submitForm"
@close="getList" @close="getList"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionJobMain.allSchemas">
ref="detailRef" <template #basicBottom="data">
:isBasic="false" <DetailView :data="data" />
:allSchemas="InspectionJobMain.allSchemas" </template>
:detailAllSchemas="InspectionJobDetail.allSchemas" </Detail>
:detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/>
<!-- 包装信息 --> <!-- 包装信息 -->
<ListTable <ListTable
ref="listTableRef" ref="listTableRef"
@ -120,7 +111,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
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 DetailView from './detail.vue'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
@ -347,7 +338,7 @@ const checkQualityReport = async (row) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
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, 'jobInspectionMain')
} }
// //

759
src/views/qms/inspectionRecord/detail.vue

@ -1,123 +1,112 @@
<template> <template>
<div> <div style="margin-top: 20px">
<el-drawer <el-tabs
v-model="isShowDrawer" v-model="editableTabsValue"
title="详情" class="demo-tabs"
direction="rtl" type="border-card"
size="80%" tab-position="left"
v-loading="detailLoading" :stretch="false"
> >
<template #header> <el-tab-pane
<div class="font-size-18px"> v-for="item in data.subList"
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span> :key="item.name"
</div> :label="item.processDescribe"
</template> :name="item.name"
<ContentWrap v-if="!isBasic"> >
<Descriptions <div class="small-title">检验工序</div>
:data="data" <el-form :model="item" label-width="auto" ref="formProcessRef">
labelClassName="label-class-name" <el-row :gutter="20">
label-align="left" <el-col :span="12">
direction="vertical" <el-form-item label="编码" prop="processCode">
:column="8" <el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
:schema="allSchemas.detailSchema" </el-form-item>
:columns="2" </el-col>
width="200px" <el-col :span="12">
/> <el-form-item label="描述" prop="processDescribe">
</ContentWrap> <el-input v-model="item.processDescribe" :disabled="true" />
<ContentWrap> </el-form-item>
<el-tabs </el-col>
v-model="editableTabsValue" <el-col :span="12">
class="demo-tabs" <el-form-item label="顺序号" prop="sequenceCode">
type="border-card" <el-input v-model="item.sequenceCode" :disabled="true" />
tab-position="left" </el-form-item>
:stretch="false" </el-col>
> </el-row>
<el-tab-pane </el-form>
v-for="item in data.subList" <div class="small-title">检验特性</div>
:key="item.name" <el-form :model="item" label-width="auto" ref="formFeaturesRef">
:label="item.processDescribe" <el-row :gutter="20">
:name="item.name" <el-col :span="12">
> <el-form-item label="编码">
<div class="small-title">检验工序</div> <el-input
<el-form :model="item" label-width="auto" ref="formProcessRef"> v-model="item.inspectionRecordCharacteristicsRespVO.number"
<el-row :gutter="20"> placeholder="根据系统生成"
<el-col :span="12"> :disabled="true"
<el-form-item label="编码" prop="processCode"> />
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="12">
<el-col :span="12"> <el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description">
<el-form-item label="描述" prop="processDescribe"> <el-input
<el-input v-model="item.processDescribe" :disabled="true" /> v-model="item.inspectionRecordCharacteristicsRespVO.description"
</el-form-item> :disabled="true"
</el-col> />
<el-col :span="12"> </el-form-item>
<el-form-item label="顺序号" prop="sequenceCode"> </el-col>
<el-input v-model="item.sequenceCode" :disabled="true" /> <el-col :span="12">
</el-form-item> <el-form-item
</el-col> label="检验方法"
</el-row> prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
</el-form> >
<div class="small-title">检验特性</div> <div style="display: flex; width: 100%">
<el-form :model="item" label-width="auto" ref="formFeaturesRef"> <el-input
<el-row :gutter="20"> v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
<el-col :span="12"> disabled
<el-form-item label="编码"> placeholder="请输入检验方法"
<el-input />
v-model="item.inspectionRecordCharacteristicsRespVO.number" </div>
placeholder="根据系统生成" </el-form-item>
:disabled="true" </el-col>
/> <el-col :span="12">
</el-form-item> <el-form-item
</el-col> label="采样过程"
<el-col :span="12"> prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
<el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description"> >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.description" :disabled="true" /> <div style="display: flex; width: 100%">
</el-form-item> <el-input
</el-col> v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
<el-col :span="12"> disabled
<el-form-item placeholder="请输入采样过程"
label="检验方法" />
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode" </div>
> </el-form-item>
<div style="display: flex; width: 100%"> </el-col>
<el-input <el-col :span="12">
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName" <el-form-item
disabled label="采样过程编码"
placeholder="请输入检验方法" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode"
/> >
</div> <div style="display: flex; width: 100%">
</el-form-item> <el-input
</el-col> v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
<el-col :span="12"> disabled
<el-form-item placeholder="请选择采样过程编码"
label="采样过程" />
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod" </div>
> </el-form-item>
<div style="display: flex; width: 100%"> </el-col>
<el-input <el-col :span="12">
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" <el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
disabled <div style="display: flex; width: 100%">
placeholder="请输入采样过程" <el-input
/> v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty"
</div> disabled
</el-form-item> placeholder="请输入样品份数"
</el-col> />
<el-col :span="12"> </div>
<el-form-item label="采样过程编码" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode"> </el-form-item>
<div style="display: flex; width: 100%"> </el-col>
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" /> <!-- <el-col :span="12">
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item <el-form-item
label="动态修改规则编码" label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode" prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
@ -131,181 +120,317 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="是否允许修改特征值" label="是否允许修改特征值"
prop="inspectionRecordCharacteristicsRespVO.isCanUpdate" prop="inspectionRecordCharacteristicsRespVO.isCanUpdate"
> >
<el-switch <el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate" v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="特征类型"
prop="inspectionRecordCharacteristicsRespVO.featureType"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="开始时间"
prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结束时间"
prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="计量单位"
prop="inspectionRecordCharacteristicsRespVO.quantifyUom"
v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom"
placeholder="请选择计量单位"
disabled
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.UOM)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="小数位"
prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal"
v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item
prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit"
label="是否设定下限"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget"
label="是否设定目标值"
v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionRecordCharacteristicsRespVO.featureType == 0 &&
item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping
"
>
<el-form-item
label="上限值"
prop="inspectionRecordCharacteristicsRespVO.quantifyCapping"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping"
type="number"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionRecordCharacteristicsRespVO.featureType == 0 &&
item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit"
type="number"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionRecordCharacteristicsRespVO.featureType == 0 &&
item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget
"
>
<el-form-item
label="目标值"
prop="inspectionRecordCharacteristicsRespVO.quantifyTarget"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget"
type="number"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="评估代码">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode"
placeholder="请选择评估代码"
disabled
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
disabled
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="24"
v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO
.recordInspectionQuantifyList"
:key="i"
style="
border: 1px solid #dedede;
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
"
>
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col
:span="12"
v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量">
<el-input
v-model="cur.qualifiedQuantity"
placeholder="请输入合格数量"
type="number"
disabled disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item :span="12"
label="结果录入方式" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod" >
> <el-form-item label="不合格数量">
<el-select <el-input
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod" v-model="cur.unqualifiedQuantity"
placeholder="请选择结果录入方式" type="number"
@change="resultEntryMethodChange($event,item)" placeholder="请输入不合格数量"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionRecordCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item label="结束时间" prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime"> :span="12"
<el-date-picker v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'"
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime" >
type="datetime" <el-form-item label="检验值">
placeholder="请选择结束时间" <el-input
style="width: 100%" v-model="cur.inspectionValue"
value-format="x" placeholder="请输入检验值"
type="number"
disabled disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item label="计量单位" prop="inspectionRecordCharacteristicsRespVO.quantifyUom" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" > :span="12"
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom" placeholder="请选择计量单位" disabled > v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'"
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.UOM)" >
:key="dict.value" <el-form-item label="选定集">
:label="dict.label" <el-select v-model="cur.qualitativeCode" placeholder="请选择选定集" disabled>
:value="dict.value" /> <el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item label="小数位" prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" > :span="12"
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal" disabled/> v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'"
</el-form-item> >
</el-col> <el-form-item label="缺陷级别">
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"> <el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-form-item label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" > <el-option
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping" disabled/> v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
</el-form-item> :key="dict.value"
</el-col> :label="dict.label"
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"> :value="dict.value"
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" label="是否设定下限" > />
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget" label="是否设定目标值" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping">
<el-form-item label="上限值" prop="inspectionRecordCharacteristicsRespVO.quantifyCapping" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit">
<el-form-item label="下限值" prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget">
<el-form-item label="目标值" prop="inspectionRecordCharacteristicsRespVO.quantifyTarget" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="评估代码">
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode" placeholder="请选择评估代码" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" disabled/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'">
<el-form-item label="检验值">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
disabled
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<el-form-item label="缺陷级别">
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row> </el-row>
</el-form> </el-col>
</el-tab-pane> </el-row>
</el-tabs> </el-form>
</ContentWrap> </el-tab-pane>
</el-drawer> </el-tabs>
</div> </div>
</template> </template>
@ -315,80 +440,30 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'InspectionRecordDetail' }) defineOptions({ name: 'InspectionRecordDetail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({ const props = defineProps({
// data: {
allSchemas: {
type: Object, type: Object,
required: true, required: true,
default: null default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
} finally {
detailLoading.value = false
}
} }
} })
defineExpose({ openDetail }) // open console.log(props.data)
const data = ref(props.data.data)
const editableTabsValue = ref('1')
onMounted(async () => {
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(data.value.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList =
item.inspectionRecordCharacteristicsRespVO.featureType == 1
? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList
: item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
})
</script> </script>
<style lang="scss"> <style lang="scss">
.el-drawer__body { .el-drawer__body {

26
src/views/qms/inspectionRecord/index.vue

@ -68,20 +68,12 @@
@submitForm="submitFormExecute" @submitForm="submitFormExecute"
/> />
<Detail <!-- 详情 -->
ref="detailRef" <Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionRecordMain.allSchemas">
:isBasic="false" <template #basicBottom="data">
:allSchemas="InspectionRecordMain.allSchemas" <DetailView :data="data" />
:detailAllSchemas="InspectionRecordDetail.allSchemas" </template>
:detailAllSchemasRules="InspectionRecordDetailRules" </Detail>
:apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail"
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail"
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage"
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/>
<!-- 包装信息 --> <!-- 包装信息 -->
<ListTable <ListTable
ref="listTableRef" ref="listTableRef"
@ -123,7 +115,7 @@ import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import UseAddForm from './useAddForm.vue' import UseAddForm from './useAddForm.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import DetailView from './detail.vue'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
@ -255,7 +247,7 @@ const butttondata = (row) => {
hide: isShowMainButton(row, 'publish'), hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-main:pub' hasPermi: 'qms:inspection-recode-main:pub'
}), // }), //
defaultButtons.mainListCloseBtn({ defaultButtons.mainListCloseBtn({
hide: isShowMainButton(row, 'publish'), hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-main:close' hasPermi: 'qms:inspection-recode-main:close'
}), // }), //
@ -347,7 +339,7 @@ const openUseForm = async (type: string, row?: any) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionRecordMain') detailRef.value.openDetail(row, titleName, titleValue, 'recordInspectionMain')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

764
src/views/qms/inspectionRecordFirst/detail.vue

@ -1,123 +1,112 @@
<template> <template>
<div> <div style="margin-top: 20px">
<el-drawer <el-tabs
v-model="isShowDrawer" v-model="editableTabsValue"
title="详情" class="demo-tabs"
direction="rtl" type="border-card"
size="80%" tab-position="left"
v-loading="detailLoading" :stretch="false"
> >
<template #header> <el-tab-pane
<div class="font-size-18px"> v-for="item in data.subList"
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span> :key="item.name"
</div> :label="item.processDescribe"
</template> :name="item.name"
<ContentWrap v-if="!isBasic"> >
<Descriptions <div class="small-title">检验工序</div>
:data="data" <el-form :model="item" label-width="auto" ref="formProcessRef">
labelClassName="label-class-name" <el-row :gutter="20">
label-align="left" <el-col :span="12">
direction="vertical" <el-form-item label="编码" prop="processCode">
:column="8" <el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
:schema="allSchemas.detailSchema" </el-form-item>
:columns="2" </el-col>
width="200px" <el-col :span="12">
/> <el-form-item label="描述" prop="processDescribe">
</ContentWrap> <el-input v-model="item.processDescribe" :disabled="true" />
<ContentWrap> </el-form-item>
<el-tabs </el-col>
v-model="editableTabsValue" <el-col :span="12">
class="demo-tabs" <el-form-item label="顺序号" prop="sequenceCode">
type="border-card" <el-input v-model="item.sequenceCode" :disabled="true" />
tab-position="left" </el-form-item>
:stretch="false" </el-col>
> </el-row>
<el-tab-pane </el-form>
v-for="item in data.subList" <div class="small-title">检验特性</div>
:key="item.name" <el-form :model="item" label-width="auto" ref="formFeaturesRef">
:label="item.processDescribe" <el-row :gutter="20">
:name="item.name" <el-col :span="12">
> <el-form-item label="编码">
<div class="small-title">检验工序</div> <el-input
<el-form :model="item" label-width="auto" ref="formProcessRef"> v-model="item.inspectionRecordCharacteristicsRespVO.number"
<el-row :gutter="20"> placeholder="根据系统生成"
<el-col :span="12"> :disabled="true"
<el-form-item label="编码" prop="processCode"> />
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="12">
<el-col :span="12"> <el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description">
<el-form-item label="描述" prop="processDescribe"> <el-input
<el-input v-model="item.processDescribe" :disabled="true" /> v-model="item.inspectionRecordCharacteristicsRespVO.description"
</el-form-item> :disabled="true"
</el-col> />
<el-col :span="12"> </el-form-item>
<el-form-item label="顺序号" prop="sequenceCode"> </el-col>
<el-input v-model="item.sequenceCode" :disabled="true" /> <el-col :span="12">
</el-form-item> <el-form-item
</el-col> label="检验方法"
</el-row> prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
</el-form> >
<div class="small-title">检验特性</div> <div style="display: flex; width: 100%">
<el-form :model="item" label-width="auto" ref="formFeaturesRef"> <el-input
<el-row :gutter="20"> v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
<el-col :span="12"> disabled
<el-form-item label="编码"> placeholder="请输入检验方法"
<el-input />
v-model="item.inspectionRecordCharacteristicsRespVO.number" </div>
placeholder="根据系统生成" </el-form-item>
:disabled="true" </el-col>
/> <el-col :span="12">
</el-form-item> <el-form-item
</el-col> label="采样过程"
<el-col :span="12"> prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
<el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description"> >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.description" :disabled="true" /> <div style="display: flex; width: 100%">
</el-form-item> <el-input
</el-col> v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
<el-col :span="12"> disabled
<el-form-item placeholder="请输入采样过程"
label="检验方法" />
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode" </div>
> </el-form-item>
<div style="display: flex; width: 100%"> </el-col>
<el-input <el-col :span="12">
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName" <el-form-item
disabled label="采样过程编码"
placeholder="请输入检验方法" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode"
/> >
</div> <div style="display: flex; width: 100%">
</el-form-item> <el-input
</el-col> v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
<el-col :span="12"> disabled
<el-form-item placeholder="请选择采样过程编码"
label="采样过程" />
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod" </div>
> </el-form-item>
<div style="display: flex; width: 100%"> </el-col>
<el-input <el-col :span="12">
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" <el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
disabled <div style="display: flex; width: 100%">
placeholder="请输入采样过程" <el-input
/> v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty"
</div> disabled
</el-form-item> placeholder="请输入样品份数"
</el-col> />
<el-col :span="12"> </div>
<el-form-item label="采样过程编码" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode"> </el-form-item>
<div style="display: flex; width: 100%"> </el-col>
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" /> <!-- <el-col :span="12">
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item <el-form-item
label="动态修改规则编码" label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode" prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
@ -131,186 +120,317 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="是否允许修改特征值" label="是否允许修改特征值"
prop="inspectionRecordCharacteristicsRespVO.isCanUpdate" prop="inspectionRecordCharacteristicsRespVO.isCanUpdate"
> >
<el-switch <el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate" v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="特征类型"
prop="inspectionRecordCharacteristicsRespVO.featureType"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="开始时间"
prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结束时间"
prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="计量单位"
prop="inspectionRecordCharacteristicsRespVO.quantifyUom"
v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom"
placeholder="请选择计量单位"
disabled
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.UOM)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="小数位"
prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal"
v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item
prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit"
label="是否设定下限"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget"
label="是否设定目标值"
v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionRecordCharacteristicsRespVO.featureType == 0 &&
item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping
"
>
<el-form-item
label="上限值"
prop="inspectionRecordCharacteristicsRespVO.quantifyCapping"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping"
type="number"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionRecordCharacteristicsRespVO.featureType == 0 &&
item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit"
type="number"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionRecordCharacteristicsRespVO.featureType == 0 &&
item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget
"
>
<el-form-item
label="目标值"
prop="inspectionRecordCharacteristicsRespVO.quantifyTarget"
>
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget"
type="number"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="评估代码">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode"
placeholder="请选择评估代码"
disabled
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
disabled
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="24"
v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO
.recordInspectionQuantifyList"
:key="i"
style="
border: 1px solid #dedede;
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
"
>
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col
:span="12"
v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量">
<el-input
v-model="cur.qualifiedQuantity"
placeholder="请输入合格数量"
type="number"
disabled disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item :span="12"
label="结果录入方式" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod" >
> <el-form-item label="不合格数量">
<el-select <el-input
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod" v-model="cur.unqualifiedQuantity"
placeholder="请选择结果录入方式" type="number"
@change="resultEntryMethodChange($event,item)" placeholder="请输入不合格数量"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionRecordCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item label="结束时间" prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime"> :span="12"
<el-date-picker v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'"
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime" >
type="datetime" <el-form-item label="检验值">
placeholder="请选择结束时间" <el-input
style="width: 100%" v-model="cur.inspectionValue"
value-format="x" placeholder="请输入检验值"
type="number"
disabled disabled
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item label="计量单位" prop="inspectionRecordCharacteristicsRespVO.quantifyUom" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" > :span="12"
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom" placeholder="请选择计量单位" disabled > v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'"
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.UOM)" >
:key="dict.value" <el-form-item label="选定集">
:label="dict.label" <el-select v-model="cur.qualitativeCode" placeholder="请选择选定集" disabled>
:value="dict.value" /> <el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col
<el-form-item label="小数位" prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" > :span="12"
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal" disabled/> v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'"
</el-form-item> >
</el-col> <el-form-item label="缺陷级别">
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"> <el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-form-item label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" > <el-option
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping" disabled/> v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
</el-form-item> :key="dict.value"
</el-col> :label="dict.label"
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0"> :value="dict.value"
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" label="是否设定下限" > />
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget" label="是否设定目标值" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping">
<el-form-item label="上限值" prop="inspectionRecordCharacteristicsRespVO.quantifyCapping" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit">
<el-form-item label="下限值" prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget">
<el-form-item label="目标值" prop="inspectionRecordCharacteristicsRespVO.quantifyTarget" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="评估代码">
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode" placeholder="请选择评估代码" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" disabled/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'">
<el-form-item label="检验值">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
disabled
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<el-form-item label="缺陷级别">
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="cur.remark" placeholder="" type="number" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row> </el-row>
</el-form> </el-col>
</el-tab-pane> </el-row>
</el-tabs> </el-form>
</ContentWrap> </el-tab-pane>
</el-drawer> </el-tabs>
</div> </div>
</template> </template>
@ -320,80 +440,30 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'InspectionRecordDetail' }) defineOptions({ name: 'InspectionRecordDetail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({ const props = defineProps({
// data: {
allSchemas: {
type: Object, type: Object,
required: true, required: true,
default: null default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
} finally {
detailLoading.value = false
}
} }
} })
defineExpose({ openDetail }) // open console.log(props.data)
const data = ref(props.data.data)
const editableTabsValue = ref('1')
onMounted(async () => {
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(data.value.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList =
item.inspectionRecordCharacteristicsRespVO.featureType == 1
? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList
: item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
})
</script> </script>
<style lang="scss"> <style lang="scss">
.el-drawer__body { .el-drawer__body {

472
src/views/qms/inspectionRecordFirst/index.vue

@ -1,35 +1,53 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams" <Search
@reset="setSearchParams" :schema="InspectionRecordMain.allSchemas.searchSchema"
/> @search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" <TableHead
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :HeadButttondata="HeadButttondata"
:allSchemas="InspectionRecordMain.allSchemas" /> @button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionRecordMain.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ <Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }"
v-model:sort="tableObject.sort"> v-model:pageSize="tableObject.pageSize"
<template #number="{row}"> v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 新增 --> <!-- 新增 -->
<AddForm <AddForm
ref="basicFormRef" ref="basicFormRef"
basicFormWidth="80" basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
@ -39,137 +57,167 @@
@submitForm="submitForm" @submitForm="submitForm"
/> />
<Detail <!-- 详情 -->
ref="detailRef" :isBasic="false" :allSchemas="InspectionRecordMain.allSchemas" <Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionRecordMain.allSchemas">
:detailAllSchemas="InspectionRecordDetail.allSchemas" :detailAllSchemasRules="InspectionRecordDetailRules" <template #basicBottom="data">
:apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail" <DetailView :data="data" />
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail" </template>
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage" </Detail>
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail" <!-- 包装信息 -->
:isShowAddBtn="false" :detailButtonIsShow="true" <ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas"
:detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"
/> />
<!-- 包装信息 --> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas" <el-dialog
:detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules" v-model="showQualityReport"
:list="list"/> :title="t('质检明细')"
<el-dialog :append-to-body="false"
v-model="showQualityReport" destroy-on-close
:title="t('质检明细')" fullscreen
:append-to-body="false" >
destroy-on-close <iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog> </el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules,InspectionRecordPackage, InspectionRecordPackageRules} from './inspectionRecordFirstMain.data' import {
// import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data' InspectionRecordMain,
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain' InspectionRecordMainRules,
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail' InspectionRecordDetail,
import * as defaultButtons from '@/utils/disposition/defaultButtons' InspectionRecordDetailRules,
import ListTable from '@/components/ListTable/src/ListTable.vue' InspectionRecordPackage,
import TableHead from '@/components/TableHead/src/TableHead.vue' InspectionRecordPackageRules
import AddForm from '../inspectionRecordFirst/addForm.vue' } from './inspectionRecordFirstMain.data'
import Detail from './detail.vue' // import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data'
import { getReportUrl } from '@/utils/systemParam' import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from '../inspectionRecordFirst/addForm.vue'
import DetailView from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from '../inspectionTemplate/inspectionTemplate.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
defineOptions({ name: 'InspectionRecordMain' }) defineOptions({ name: 'InspectionRecordMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns) const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns)
if(routeName.value=='InspectRecordMain'){ if (routeName.value == 'InspectRecordMain') {
tableColumns.value = tableColumns.value.filter(item=>{ tableColumns.value = tableColumns.value.filter((item) => {
return item.label!='操作' return item.label != '操作'
})
}
//
const updataTableColumns = (val) => {
if (routeName.value == 'InspectRecordMain') {
tableColumns.value = val.filter((item) => {
return item.label != '操作'
}) })
} else {
tableColumns.value = val
} }
// }
const updataTableColumns = (val) => {
if(routeName.value=='InspectRecordMain'){
tableColumns.value = val.filter(item=>{
return item.label!='操作'
})
}else{
tableColumns.value = val
}
}
//
const { tableObject, tableMethods } = useTable({
getListApi: InspectionRecordMainApi.getInspectionRecordMainPage //
})
// //
const { tableObject, tableMethods } = useTable({ const { getList, setSearchParams } = tableMethods
getListApi: InspectionRecordMainApi.getInspectionRecordMainPage //
})
// //
const { getList, setSearchParams } = tableMethods let HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultExportBtn(null), //
let HeadButttondata = [ defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultAddBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultExportBtn(null), // defaultButtons.defaultSetBtn(null) //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
openForm('create') //
} else if (val == 'import') { // openForm('create')
handleImport() } else if (val == 'import') {
} else if (val == 'export') { // //
handleExport() handleImport()
} else if (val == 'refresh') { // } else if (val == 'export') {
getList() //
} else if (val == 'filtrate') { // handleExport()
} else { // } else if (val == 'refresh') {
console.log('其他按钮', item) //
} getList()
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
} }
}
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
return row.isPublished return row.isPublished
} }
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:update' }), // defaultButtons.mainListEditBtn({
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:delete' }), // hide: isShowMainButton(row, 'publish'),
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi: 'qms:inspection-recode-first-main:pub' }), // hasPermi: 'wms:inspection-recode-first-main:update'
defaultButtons.mainExport({ hide: !row.isPublished }),// }), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) // defaultButtons.mainListDeleteBtn({
] hide: isShowMainButton(row, 'publish'),
} hasPermi: 'wms:inspection-recode-first-main:delete'
}), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-first-main:pub'
}), //
defaultButtons.mainExport({ hide: !row.isPublished }), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref() const listTableRef = ref()
const list = ref([]) const list = ref([])
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION) const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION)
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision") // const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision")
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') {
openForm('update', row) //
}else if (val == 'delete') { // openForm('update', row)
handleDelete(row.id) } else if (val == 'delete') {
}else if (val == 'mainOrderPub') { // //
handleOrderPub(row) handleDelete(row.id)
}else if (val == 'mainPlanCheckQualityReport') { } else if (val == 'mainOrderPub') {
//
handleOrderPub(row)
} else if (val == 'mainPlanCheckQualityReport') {
// //
checkQualityReport(row) checkQualityReport(row)
} else if (val == 'mainExport') { } else if (val == 'mainExport') {
@ -177,7 +225,7 @@ const buttonBaseClick = (val, item) => {
handleMainExport(row) handleMainExport(row)
} }
} }
// //
const reportHeight = ref(window.innerHeight - 120) const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false) const showQualityReport = ref(false)
const qualityReport = ref('') const qualityReport = ref('')
@ -185,51 +233,50 @@ const checkQualityReport = async (row) => {
showQualityReport.value = true showQualityReport.value = true
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = async (type : string, row ?: number) => { const openForm = async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionRecordMain')
}
/** 删除按钮操作 */ /** 详情操作 */
const handleDelete = async (id : number) => { const detailRef = ref()
try { const openDetail = (row: any, titleName: any, titleValue: any) => {
// detailRef.value.openDetail(row, titleName, titleValue, 'recordInspectionMain')
await message.delConfirm() }
//
await InspectionRecordMainApi.deleteInspectionRecordMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handleOrderPub = async (row : object) => {
try {
//
await message.confirm(t('common.confirmPublish'))
//
await InspectionRecordMainApi.publishInspectionRecordMain(row.id)
message.success(t('common.publishSuccess'))
//
await getList()
} catch { }
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await InspectionRecordMainApi.deleteInspectionRecordMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 发布按钮操作 */
const handleOrderPub = async (row: object) => {
try {
//
await message.confirm(t('common.confirmPublish'))
//
await InspectionRecordMainApi.publishInspectionRecordMain(row.id)
message.success(t('common.publishSuccess'))
//
await getList()
} catch {}
}
/** 列表导出按钮操作 */ /** 列表导出按钮操作 */
const handleMainExport = async (row: any) => { const handleMainExport = async (row: any) => {
try { try {
await message.exportConfirm() await message.exportConfirm()
// //
loadStart() loadStart()
tableObject.params.number = row.number tableObject.params.number = row.number
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
@ -240,72 +287,71 @@ const handleMainExport = async (row: any) => {
} }
} }
/** 导出按钮操作 */
/** 导出按钮操作 */ const handleExport = async () => {
const handleExport = async () => { try {
try { //
// await message.exportConfirm()
await message.exportConfirm() //
// loadStart()
loadStart() const excelTitle = ref(route.meta.title)
const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params)
const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
loadDone() loadDone()
}
} }
}
/** /**
* tableForm方法 * tableForm方法
*/ */
const tableFormKeys = {} const tableFormKeys = {}
InspectionRecordDetail.allSchemas.tableFormColumns.forEach(item => { InspectionRecordDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) const tableData = ref([])
// // // //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
// data.subList = tableData.value // // data.subList = tableData.value //
try { try {
basicFormRef.value.formLoading = true basicFormRef.value.formLoading = true
if (formType === 'create') { if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data) await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
}else { } else {
await InspectionRecordMainApi.updateInspectionRecordFirstMain(data) await InspectionRecordMainApi.updateInspectionRecordFirstMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
} }
// }
//
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters.push({ searchData.filters.push({
action: "==", action: '==',
column: "inspectionType", column: 'inspectionType',
value: "11" value: '11'
}) })
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
}
getList() //
} }
getList() //
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
tableObject.params = { tableObject.params = {
available: 'TRUE', available: 'TRUE',
inspectionType:'11' inspectionType: '11'
} }
getList() getList()
}) })
</script> </script>

430
src/views/qms/inspectionScheme/detail.vue

@ -0,0 +1,430 @@
<template>
<div class="main-body">
<div class="left">
<div
class="tabs-label"
:class="element.name == editableTabsValue ? 'active' : ''"
v-for="(element, index) in data.process"
:key="index"
@click.stop="chooseTabs(element, index)"
>
<span>{{ element.description }}</span>
</div>
</div>
<div class="right">
<div v-for="(item, index) in data.process" :key="index">
<div v-show="item.name == editableTabsValue">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="code">
<el-input v-model="item.code" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方案模板编码">
<el-input
v-model="item.inspectionCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="description">
<el-input v-model="item.description" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编码">
<el-input
v-model="item.inspectionCharCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.code"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionCharacteristicsBaseVO.description">
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode"
placeholder="请选择检验方法"
disabled
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法描述"
prop="inspectionCharacteristicsBaseVO.inspectionMethodName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionCharacteristicsBaseVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessCode"
placeholder="请选择采样过程"
disabled
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程描述"
prop="inspectionCharacteristicsBaseVO.inspectionMethodName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
disabled
placeholder="请选择采样过程描述"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionCharacteristicsBaseVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod"
placeholder="请选择结果录入方式"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionCharacteristicsBaseVO.featureType">
<!-- <el-input v-model="item.featureType" /> -->
<el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item label="计量单位" prop="inspectionCharacteristicsBaseVO.quantifyUom">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item label="小数位" prop="inspectionCharacteristicsBaseVO.quantifyDecimal">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
label="是否设定下限"
>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget"
label="是否设定目标值"
>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionCharacteristicsBaseVO.featureType == 0 &&
item.inspectionCharacteristicsBaseVO.quantifyIsCapping
"
>
<el-form-item label="上限值" prop="inspectionCharacteristicsBaseVO.quantifyCapping">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping"
disabled
type="number"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionCharacteristicsBaseVO.featureType == 0 &&
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit"
>
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit"
disabled
type="number"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionCharacteristicsBaseVO.featureType == 0 &&
item.inspectionCharacteristicsBaseVO.quantifyIsTarget
"
>
<el-form-item label="目标值" prop="inspectionCharacteristicsBaseVO.quantifyTarget">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget"
disabled
type="number"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1">
<el-form-item
label="选定集"
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode"
placeholder="请选择选定集"
disabled
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1">
<el-form-item
label="选定集描述"
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName"
disabled
placeholder="请选择选定集描述"
/>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const props = defineProps({
data: {
type: Object,
required: true,
default: null
}
})
console.log(props.data)
const data = ref(props.data.data)
const editableTabsValue = ref('1')
onMounted(async () => {
data.value.process = []
let list = []
if (data.value.content) {
list = JSON.parse(data.value.content)
} else {
list = await InspectionProcessPageApi.getListByTempleteCode(data.value.programmeTemplateCode)
}
console.log(99, data.value)
console.log(99, list)
editableTabsValue.value = '1'
let arr = []
list.forEach((item, index) => {
let obj = {
inspectionCode: item.inspectionCode,
description: item.description,
inspectionCharCode: item.inspectionCharCode,
sequenceCode: item.sequenceCode,
name: String(index + 1),
inspectionCharacteristicsBaseVO: {
description: item.inspectionCharacteristicsBaseVO.description,
featureType: item.inspectionCharacteristicsBaseVO.featureType,
inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode,
inspectionMethodName: item.inspectionCharacteristicsBaseVO.inspectionMethodName,
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode,
isCanUpdate: item.inspectionCharacteristicsBaseVO.isCanUpdate,
isDestructionInspection: item.inspectionCharacteristicsBaseVO.isDestructionInspection,
quantifyCapping: item.inspectionCharacteristicsBaseVO.quantifyCapping,
quantifyDecimal: item.inspectionCharacteristicsBaseVO.quantifyDecimal,
quantifyIsCapping: item.inspectionCharacteristicsBaseVO.quantifyIsCapping,
quantifyIsLowlimit: item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit,
quantifyIsTarget: item.inspectionCharacteristicsBaseVO.quantifyIsTarget,
quantifyLowlimit: item.inspectionCharacteristicsBaseVO.quantifyLowlimit,
quantifyQuantifyCode: item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode,
quantifyQuantifyName: item.inspectionCharacteristicsBaseVO.quantifyQuantifyName,
quantifyTarget: item.inspectionCharacteristicsBaseVO.quantifyTarget,
quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom,
resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod,
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode,
samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName
}
}
data.value.process.push(obj)
})
})
const chooseTabs = (element, index) => {
if (element.name == editableTabsValue.value) return
editableTabsValue.value = element.name
}
console.log(data.value.process)
</script>
<style scoped lang="scss">
.small-title {
font-weight: bold;
padding: 0px 10px 10px;
color: #1a8bfc;
font-size: 16px;
}
.main-body {
display: flex;
margin-top: 20px;
.left {
width: 200px;
background: rgb(245, 247, 250);
border: 1px solid rgb(220, 223, 230);
min-height: 60px;
position: relative;
padding: 6px 0px;
font-size: 14px;
.plus-icon {
cursor: pointer;
position: absolute;
right: 0px;
top: 0px;
border: 1px solid rgb(220, 223, 230);
background: rgb(245, 247, 250);
display: flex;
align-items: center;
justify-items: center;
padding: 1px;
}
}
}
.tabs-label {
padding: 4px 20px 4px 20px;
min-height: 30px;
justify-content: flex-end;
display: flex;
align-items: center;
cursor: pointer;
word-break: break-all;
}
.active {
background: white;
}
.right {
border: 1px solid rgb(220, 223, 230);
flex: 1;
width: 0px;
padding: 20px;
}
</style>

20
src/views/qms/inspectionScheme/index.vue

@ -32,9 +32,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #reqCode="{ row }"> <template #code="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.reqCode)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.reqCode }}</span> <span>{{ row.code }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -50,13 +50,18 @@
<AddForm <AddForm
ref="basicFormRef" ref="basicFormRef"
basicFormWidth="80" basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasMain="InspectionSchemeMain.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:rules="InspectionTemplateRules" :rules="InspectionTemplateRules"
@submitForm="submitForm" @submitForm="submitForm"
/> />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionSchemeMain.allSchemas">
<template #basicBottom="data">
<DetailView :data="data" />
</template>
</Detail>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
ref="importFormRef" ref="importFormRef"
@ -80,6 +85,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' 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 DetailView from './detail.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme' import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import * as SampleCodeApi from '@/api/qms/sampleCode' import * as SampleCodeApi from '@/api/qms/sampleCode'
@ -248,7 +254,7 @@ const submitForm = async (formType, data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAgvLocationrelation') detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionScheme')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

46
src/views/qms/inspectionScheme/inspectionScheme.data.ts

@ -45,25 +45,26 @@ export const InspectionSchemeMain = useCrudSchemas(
} }
}, },
{ {
label: '物料名称', label: '物料编码',
field: 'itemName', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 200 width: 150
}, },
isSearch: true isSearch: true
}, },
{ {
label: '物料编码', label: '物料名称',
field: 'itemCode', field: 'itemName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 200
}, },
isSearch: true isSearch: true
}, },
{ {
label: '描述', label: '方案描述',
field: 'description', field: 'description',
sort: 'custom', sort: 'custom',
table: { table: {
@ -79,7 +80,7 @@ export const InspectionSchemeMain = useCrudSchemas(
} }
}, },
{ {
label: '检验类型编码', label: '检验类型',
field: 'inspectionType', field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE, dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string', dictClass: 'string',
@ -97,37 +98,15 @@ export const InspectionSchemeMain = useCrudSchemas(
width: 175 width: 175
} }
}, },
{ {
label: '拆分规则', label: '动态修改规则',
field: 'splitRule', field: 'dynamicUpdateCode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.SPLIT_RULES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
table: { table: {
width: 175 width: 175
} }
}, },
{
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
},
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
},
isSearch: true
},
{ {
label: '每份样品量', label: '每份样品量',
field: 'samplePieceSize', field: 'samplePieceSize',
@ -136,6 +115,7 @@ export const InspectionSchemeMain = useCrudSchemas(
width: 140 width: 140
} }
}, },
{ {
label: '生效时间', label: '生效时间',
field: 'effectiveDate', field: 'effectiveDate',

423
src/views/qms/inspectionTemplate/detail.vue

@ -0,0 +1,423 @@
<template>
<div class="main-body">
<div class="left">
<div
class="tabs-label"
:class="element.name == editableTabsValue ? 'active' : ''"
v-for="(element, index) in data.process"
:key="index"
@click.stop="chooseTabs(element, index)"
>
<span>{{ element.description }}</span>
</div>
</div>
<div class="right">
<div v-for="(item, index) in data.process" :key="index">
<div v-show="item.name == editableTabsValue">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="code">
<el-input v-model="item.code" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方案模板编码">
<el-input
v-model="item.inspectionCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="description">
<el-input v-model="item.description" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编码">
<el-input
v-model="item.inspectionCharCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.code"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionCharacteristicsBaseVO.description">
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode"
placeholder="请选择检验方法"
disabled
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法描述"
prop="inspectionCharacteristicsBaseVO.inspectionMethodName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionCharacteristicsBaseVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessCode"
placeholder="请选择采样过程"
disabled
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程描述"
prop="inspectionCharacteristicsBaseVO.inspectionMethodName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
disabled
placeholder="请选择采样过程描述"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionCharacteristicsBaseVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod"
placeholder="请选择结果录入方式"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionCharacteristicsBaseVO.featureType">
<!-- <el-input v-model="item.featureType" /> -->
<el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item label="计量单位" prop="inspectionCharacteristicsBaseVO.quantifyUom">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item label="小数位" prop="inspectionCharacteristicsBaseVO.quantifyDecimal">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
label="是否设定下限"
>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0">
<el-form-item
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget"
label="是否设定目标值"
>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionCharacteristicsBaseVO.featureType == 0 &&
item.inspectionCharacteristicsBaseVO.quantifyIsCapping
"
>
<el-form-item label="上限值" prop="inspectionCharacteristicsBaseVO.quantifyCapping">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping"
disabled
type="number"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionCharacteristicsBaseVO.featureType == 0 &&
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit"
>
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit"
disabled
type="number"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionCharacteristicsBaseVO.featureType == 0 &&
item.inspectionCharacteristicsBaseVO.quantifyIsTarget
"
>
<el-form-item label="目标值" prop="inspectionCharacteristicsBaseVO.quantifyTarget">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget"
disabled
type="number"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1">
<el-form-item
label="选定集"
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode"
placeholder="请选择选定集"
disabled
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1">
<el-form-item
label="选定集描述"
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName"
disabled
placeholder="请选择选定集描述"
/>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const props = defineProps({
data: {
type: Object,
required: true,
default: null
}
})
console.log(props.data)
const data = ref(props.data.data)
const editableTabsValue = ref('1')
onMounted(async () => {
data.value.process = []
let list = await InspectionProcessPageApi.getListByTempleteCode(data.value.code)
editableTabsValue.value = '1'
let arr = []
list.forEach((item, index) => {
let obj = {
inspectionCode: item.inspectionCode,
description: item.description,
inspectionCharCode: item.inspectionCharCode,
sequenceCode: item.sequenceCode,
name: String(index + 1),
inspectionCharacteristicsBaseVO: {
description: item.inspectionCharacteristicsBaseVO.description,
featureType: item.inspectionCharacteristicsBaseVO.featureType,
inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode,
inspectionMethodName: item.inspectionCharacteristicsBaseVO.inspectionMethodName,
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode,
isCanUpdate: item.inspectionCharacteristicsBaseVO.isCanUpdate,
isDestructionInspection: item.inspectionCharacteristicsBaseVO.isDestructionInspection,
quantifyCapping: item.inspectionCharacteristicsBaseVO.quantifyCapping,
quantifyDecimal: item.inspectionCharacteristicsBaseVO.quantifyDecimal,
quantifyIsCapping: item.inspectionCharacteristicsBaseVO.quantifyIsCapping,
quantifyIsLowlimit: item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit,
quantifyIsTarget: item.inspectionCharacteristicsBaseVO.quantifyIsTarget,
quantifyLowlimit: item.inspectionCharacteristicsBaseVO.quantifyLowlimit,
quantifyQuantifyCode: item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode,
quantifyQuantifyName: item.inspectionCharacteristicsBaseVO.quantifyQuantifyName,
quantifyTarget: item.inspectionCharacteristicsBaseVO.quantifyTarget,
quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom,
resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod,
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode,
samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName
}
}
data.value.process.push(obj)
})
})
const chooseTabs = (element, index) => {
if (element.name == editableTabsValue.value) return
editableTabsValue.value = element.name
}
console.log(data.value.process)
</script>
<style scoped lang="scss">
.small-title {
font-weight: bold;
padding: 0px 10px 10px;
color: #1a8bfc;
font-size: 16px;
}
.main-body {
display: flex;
margin-top: 20px;
.left {
width: 200px;
background: rgb(245, 247, 250);
border: 1px solid rgb(220, 223, 230);
min-height: 60px;
position: relative;
padding: 6px 0px;
font-size: 14px;
.plus-icon {
cursor: pointer;
position: absolute;
right: 0px;
top: 0px;
border: 1px solid rgb(220, 223, 230);
background: rgb(245, 247, 250);
display: flex;
align-items: center;
justify-items: center;
padding: 1px;
}
}
}
.tabs-label {
padding: 4px 20px 4px 20px;
min-height: 30px;
justify-content: flex-end;
display: flex;
align-items: center;
cursor: pointer;
word-break: break-all;
}
.active {
background: white;
}
.right {
border: 1px solid rgb(220, 223, 230);
flex: 1;
width: 0px;
padding: 20px;
}
</style>

16
src/views/qms/inspectionTemplate/index.vue

@ -32,9 +32,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #reqCode="{ row }"> <template #code="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.reqCode)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.reqCode }}</span> <span>{{ row.code }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -57,8 +57,11 @@
@submitForm="submitForm" @submitForm="submitForm"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionTemplateMain.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionTemplateMain.allSchemas">
<template #basicBottom="data">
<DetailView :data="data" />
</template>
</Detail>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
ref="importFormRef" ref="importFormRef"
@ -84,6 +87,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' 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 DetailView from './detail.vue'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
@ -235,7 +239,7 @@ const submitForm = async (formType, data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAgvLocationrelation') detailRef.value.openDetail(row, titleName, titleValue, 'basicProgrammeTemplate')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

Loading…
Cancel
Save