Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
ljlong_2630 8 months ago
parent
commit
5c69706f0f
  1. 317
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  2. 50
      src/views/qms/basicDataManage/inspectionPlan/index.vue
  3. 213
      src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts
  4. 66
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

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

@ -1,4 +1,5 @@
<template>
<div>
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
@ -15,8 +16,29 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="description">
<el-input v-model="data.description" placeholder="请填写描述" />
<el-form-item label="物料编码" prop="itemCode">
<div style="display: flex; width: 100%">
<el-input v-model="data.itemCode" disabled placeholder="请选择物料编码" />
<el-button
type="info"
plain
style="width: 40px"
@click="
opensearchTable(
'itemCode',
null,
'物料编码',
Itembasic.allSchemas,
ItemBasicApi.getItembasicPage,
null,
false,
'form',
null
)
"
><Icon icon="ep:search" />
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
@ -25,46 +47,66 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验类型编码" prop="testTypeCode" >
<el-form-item label="检验类型编码" prop="testTypeCode">
<div style="display: flex; width: 100%">
<el-input
v-model="data.testTypeCode"
disabled
placeholder="请选择检验类型编码"
/>
<el-input v-model="data.testTypeCode" disabled placeholder="请选择检验类型编码" />
<el-button
type="info"
plain
style="width: 40px"
@click="opensearchTable('testTypeCode', null,'检验类型',SamplingProcess.allSchemas,SamplingProcessApi.getSamplingProcessPage,null,false,null,item)"
><Icon icon="ep:search"/>
@click="
opensearchTable(
'testTypeCode',
null,
'检验类型',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
false,
'form',
null
)
"
><Icon icon="ep:search" />
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验模板编码" prop="programmeTemplateCode" >
<div style="display: flex; width: 100%">
<el-input
v-model="data.testTypeCode"
disabled
placeholder="请选择检验模板编码"
/>
<el-button
type="info"
plain
style="width: 40px"
@click="opensearchTable('programmeTemplateCode', null,'检验类型',SamplingProcess.allSchemas,SamplingProcessApigetSamplingProcessPage,null,false,null,item)"
><Icon icon="ep:search"/>
</el-button>
<el-form-item label="检验模板编码" prop="programmeTemplateCode">
<div style="display: flex; width: 100%">
<el-input
v-model="data.programmeTemplateCode"
disabled
placeholder="请选择检验模板编码"
/>
<el-button
type="info"
plain
style="width: 40px"
@click="
opensearchTable(
'programmeTemplateCode',
null,
'检验模板编码',
InspectionTemplateMain.allSchemas,
InspectionTemplateApi.inspectionTemplatePage,
null,
false,
'form',
null
)
"
><Icon icon="ep:search" />
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="拆分规则" prop="splitRule">
<el-select v-model="data.splitRule" placeholder="请选择拆分规则" >
<el-select v-model="data.splitRule" placeholder="请选择拆分规则">
<el-option
v-for="dict in getStrDictOptions( DICT_TYPE.SPLIT_RULES )"
v-for="dict in getStrDictOptions(DICT_TYPE.SPLIT_RULES)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -74,9 +116,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="aql" prop="aql">
<el-select v-model="data.aql" placeholder="请选择aql" >
<el-select v-model="data.aql" placeholder="请选择aql">
<el-option
v-for="dict in getStrDictOptions( DICT_TYPE.BASIC_AQL )"
v-for="dict in getStrDictOptions(DICT_TYPE.BASIC_AQL)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -86,9 +128,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="检验水平" prop="inspectionLevel">
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平" >
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_LEVEL )"
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_LEVEL)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -102,7 +144,8 @@
v-model="data.effectiveDate"
type="datetime"
placeholder="请选择生效时间"
style="width:100%"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
@ -112,7 +155,8 @@
v-model="data.expirationDate"
type="datetime"
placeholder="请选择失效时间"
style="width:100%"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
@ -297,17 +341,7 @@
label="是否允许修改特征值"
prop="inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate"
placeholder="请选择是否允许修改特征值"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -337,6 +371,7 @@
v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-option
v-for="dict in getStrDictOptions(
@ -355,18 +390,8 @@
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
placeholder="请选择是否设定上限"
@change="changeIsCapping"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -375,7 +400,10 @@
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" />
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -384,18 +412,9 @@
label="是否设定下限"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
placeholder="请选择是否设定下限"
@change="changeLowlimit"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -404,7 +423,10 @@
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" />
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -413,18 +435,8 @@
label="是否设定目标值"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
placeholder="请选择是否设定目标值"
@change="changeIsTarget"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -433,7 +445,10 @@
prop="inspectionCharacteristicsBaseVO.quantifyTarget"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" />
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
@ -443,7 +458,10 @@
prop="inspectionCharacteristicsBaseVO.quantifyUom"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" />
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -452,7 +470,10 @@
prop="inspectionCharacteristicsBaseVO.quantifyDecimal"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" />
<el-input
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -484,6 +505,7 @@
item
)
"
v-if="item.inspectionCharacteristicsBaseVO.isCanUpdate"
><Icon icon="ep:search"
/></el-button>
</div>
@ -514,6 +536,7 @@
</template>
</Dialog>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</div>
</template>
<script setup lang="ts">
@ -524,6 +547,10 @@ import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { SearchTable } from '@/components/SearchTable'
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data'
import * as SamplingProcessApi from '@/api/qms/samplingProcess'
import { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data'
import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItemBasicApi from '@/api/wms/itembasic'
const message = useMessage() //
const props = defineProps({
@ -570,21 +597,19 @@ const formProcessRef = ref()
const data = ref({
code: '',
description: '',
itemCode: '',
version: '',
available:true,
testTypeCode:'',
programmeTemplateCode:'',
splitRule:'',
aql:'',
inspectionLevel:'',
effectiveDate:'',
expirationDate:'',
available: true,
process: []
})
const isYesList = [
{
value: true,
label: '是'
},
{
value: false,
label: '否'
}
]
const dialogVisibleName = ref(false)
const nameForm = ref({
name: ''
@ -596,11 +621,15 @@ if (props.basicFormWidth) {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
const rules = ref({
description: [{ required: true, message: '请填写描述', trigger: 'blur' }],
itemCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }],
version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }],
sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }],
inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }],
testTypeCode: [{ required: true, message: '请选择检验类型编码', trigger: ['blur', 'change'] }],
programmeTemplateCode: [{ required: true, message: '请选择检验模板编码', trigger:['blur', 'change'] }],
splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change']}],
aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change']}],
inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change']}],
effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change']}],
expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change']}],
'inspectionCharacteristicsBaseVO.description': [
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] }
],
@ -666,28 +695,27 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (row) {
data.value = row
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
//
if(item.quantifyIsCapping){
if (item.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
}else{
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if(item.quantifyIsLowlimit){
if (item.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
}else{
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if(item.quantifyIsTarget){
if (item.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
}else{
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
})
data.value.process = list
} else {
@ -695,7 +723,14 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
code: '',
description: '',
version: '',
available:true,
testTypeCode:'',
programmeTemplateCode:'',
splitRule:'',
aql:'',
inspectionLevel:'',
effectiveDate:'',
expirationDate:'',
available: true,
process: []
}
}
@ -809,27 +844,33 @@ const submitForm = async () => {
await formMainRef.value.validate()
if (!data.value.process || data.value.process.length == 0) {
message.error(`请添加工序`)
return;
return
}
const bol1 = await validateForm(formProcessRef.value)
const bol2 = await validateForm(formFeaturesRef.value)
if (!bol1 || !bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`)
return;
return
}
const arr = data.value.process.filter(item=>(!item.inspectionCharacteristicsBaseVO.quantifyIsCapping&&!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit&&!item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&item.inspectionCharacteristicsBaseVO.featureType == 0))
const arr = data.value.process.filter(
(item) =>
!item.inspectionCharacteristicsBaseVO.quantifyIsCapping &&
!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit &&
!item.inspectionCharacteristicsBaseVO.quantifyIsTarget &&
item.inspectionCharacteristicsBaseVO.featureType == 0
)
console.log(arr)
if(arr&&arr.length>0){
const str = arr.map(item=>item.description).join(',')
if (arr && arr.length > 0) {
const str = arr.map((item) => item.description).join(',')
message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`)
return;
return
}
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data)
emit('submitForm', formType.value, data.value)
} else {
//
emit('submitForm', formType.value, data)
emit('submitForm', formType.value, data.value)
}
} catch {
console.log(111)
@ -866,7 +907,6 @@ const opensearchTable = (
type,
row
) => {
console.log(988, row)
const _searchCondition = {}
//
if (searchCondition && searchCondition.length > 0) {
@ -932,15 +972,42 @@ const opensearchTable = (
}
//
// val row
const searchTableSuccess = (formField, searchField, val, type, row) => {
console.log(row)
data.value.process.forEach((item) => {
if (item.description == row.description) {
item.inspectionCharacteristicsBaseVO[formField] = val[0].code
const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
console.log(formField)
console.log(val[0].code)
console.log(type)
data.value[formField] = val[0].code
if (formField == 'programmeTemplateCode') {
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
//
if (item.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if (item.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if (item.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
})
data.value.process = list
}
})
}
// row.inspectionCharacteristicsBaseVO.inspectionMethodCode = val[0].code
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
//

50
src/views/qms/basicDataManage/inspectionPlan/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionTemplateMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="InspectionPlanMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -11,7 +11,7 @@
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionTemplateMain.allSchemas"
:allSchemas="InspectionPlanMain.allSchemas"
/>
<!-- 列表 -->
@ -48,25 +48,19 @@
:rules="InspectionTemplateRules"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="InspectionTemplateMain.allSchemas"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/agv-locationrelation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from './inspectionPlan.data'
import {InspectionPlanMain } from './inspectionPlan.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
import { json } from 'stream/consumers'
defineOptions({ name: 'AgvLocationrelation' })
@ -76,7 +70,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionTemplateMain.allSchemas.tableColumns)
const tableColumns = ref(InspectionPlanMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
@ -147,12 +141,35 @@ const openForm = (type: string, row?: any) => {
// form
const submitForm = async (formType,data) => {
console.log(data.value)
var isHave =InspectionPlanMain.allSchemas.formSchema.some(function (item) {
return item.field === 'effectiveDate' || item.field === 'expirationDate';
});
if(isHave){
if(data.effectiveDate && data.expirationDate && data.effectiveDate >=data.expirationDate){
message.error('失效时间要大于生效时间')
return;
}
}
const data1 = {
id: data.id,
code: data.code,
itemCode: data.itemCode,
version: data.version,
testTypeCode: data.testTypeCode,
programmeTemplateCode: data.programmeTemplateCode,
splitRule: data.splitRule,
aql: data.aql,
inspectionLevel: data.inspectionLevel,
effectiveDate: data.effectiveDate,
expirationDate: data.expirationDate,
available: data.available,
content:JSON.stringify(data.process)
}
if (formType === 'create') {
await InspectionPlanApi.inspectionPlanCreat(data.value)
await InspectionPlanApi.inspectionPlanCreat(data1)
message.success(t('common.createSuccess'))
} else {
await InspectionPlanApi.inspectionPlanUpdate(data.value)
await InspectionPlanApi.inspectionPlanUpdate(data1)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -193,5 +210,4 @@ onMounted(async () => {
getList()
})
</script>
./inspectionPlan.data
</script>

213
src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts

@ -68,7 +68,7 @@ export const InspectionTemplateRules = reactive({
{ required: true, message: '请输入选择集编码', trigger: 'blur' }
],
})
export const InspectionTemplateMain = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
@ -81,207 +81,68 @@ export const InspectionTemplateMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '描述',
field: 'description',
label: '物料编码',
field: 'itemCode',
sort: 'custom',
},{
label: '版本',
field: 'version',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
export const InspectionTemplateProcess = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
form:{
componentProps:{
disabled:true,
placeholder:'系统自动获取'
}
}
},
{
label: '描述',
field: 'description',
sort: 'custom',
isForm:false
},{
label: '检验方案模板编码',
field: 'inspectionCode',
sort: 'custom',
},{
label: '顺序号',
field: 'sequenceCode',
},{
label: '检验特性编码',
field: 'inspectionCharCode',
sort: 'custom',
}
]))
export const InspectionTemplateFeatures= useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
form:{
componentProps:{
disabled:true,
placeholder:'系统自动获取'
}
}
},
{
label: '描述',
field: 'describe',
sort: 'custom',
},{
label: '检验方法编码',
field: 'inspectionMethodCode',
sort: 'custom',
},{
label: '采样过程编码',
field: 'dynamicUpdateCode',
label: '检验类型编码',
field: 'testTypeCode',
sort: 'custom',
},{
label: '动态修改规则编码',
field: 'inspectionMethod',
sort: 'custom',
},{
label: '是否允许修改特征值',
field: 'isCanUpdate',
sort: 'custom',
form:{
component:'Select',
api: () => [{
value:0,
label:'是'
},{
value:1,
label:'否'
}],
componentProps:{
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},{
label: '是否破坏性检验',
field: 'isDestructionInspection',
label: '检验模板编码',
field: 'programmeTemplateCode',
sort: 'custom',
form:{
component:'Select',
api: () => [{
value:0,
label:'是'
},{
value:1,
label:'否'
}],
componentProps:{
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},{
label: '结果录入方式',
field: 'resultEntryMethod',
label: '拆分规则',
field: 'splitRule',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY,
dictClass: 'string',
dictType: DICT_TYPE.SPLIT_RULES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
table: {
width: 150
},
},
},{
label: '特征类型',
field: 'featureType',
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE,
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
},
},{
label: '是否设定上限',
field: 'quantifyIsCapping',
sort: 'custom',
form:{
component:'Select',
api: () => [{
value:0,
label:'是'
},{
value:1,
label:'否'
}],
componentProps:{
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},{
label: '是否设定下限',
field: 'quantifyIsLowlimit',
sort: 'custom',
form:{
component:'Select',
api: () => [{
value:0,
label:'是'
},{
value:1,
label:'否'
}],
componentProps:{
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
}
}
},{
label: '目标值',
field: 'quantifyTarget',
sort: 'custom',
},{
label: '上限值',
field: 'quantifyCapping',
sort: 'custom',
},{
label: '下限值',
field: 'quantifyLowlimit',
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
},
},{
label: '计量单位',
field: 'quantifyUom',
label: '生效时间',
field: 'effectiveDate',
sort: 'custom',
},{
label: '小数位',
field: 'quantifyDecimal',
label: '失效时间',
field: 'expirationDate',
sort: 'custom',
},{
label: '选择集编码',
field: 'quantifyQuantifyCode',
label: '是否可用',
field: 'available',
sort: 'custom',
form:{
component:'Select'
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
]))

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

@ -8,8 +8,8 @@
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> -->
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef" gutter="20">
<el-row>
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="code">
<el-input v-model="data.code" placeholder="根据系统生成" :disabled="true" />
@ -226,17 +226,7 @@
label="是否允许修改特征值"
prop="inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-select
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate"
placeholder="请选择是否允许修改特征值"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -286,18 +276,7 @@
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping"/>
<!-- <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
placeholder="请选择是否设定上限"
@change="changeIsCapping"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
@ -316,18 +295,7 @@
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit"/>
<!-- <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
placeholder="请选择是否设定下限"
@change="changeLowlimit"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
@ -346,18 +314,7 @@
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget"/>
<!-- <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
placeholder="请选择是否设定目标值"
@change="changeIsTarget"
>
<el-option
v-for="item in isYesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
@ -516,16 +473,7 @@ const data = ref({
version: '',
process: []
})
const isYesList = [
{
value: true,
label: '是'
},
{
value: false,
label: '否'
}
]
const dialogVisibleName = ref(false)
const nameForm = ref({
name: ''

Loading…
Cancel
Save