Browse Source

检验方案修改检验类型字段

master_hella_20240701
songguoqiang 8 months ago
parent
commit
df99da0fd6
  1. 12
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  2. 8
      src/views/qms/basicDataManage/inspectionScheme/index.vue
  3. 2
      src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

12
src/views/qms/basicDataManage/inspectionScheme/addForm.vue

@ -52,7 +52,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验类型" prop="testTypeCode">
<el-form-item label="检验类型" prop="inspectionType">
<!-- <div style="display: flex; width: 100%">
<el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型" />
<el-button
@ -75,7 +75,7 @@
><Icon icon="ep:search" />
</el-button>
</div> -->
<el-select v-model="data.testTypeCode" placeholder="请选择检验类型">
<el-select v-model="data.inspectionType" placeholder="请选择检验类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_TYPE)"
:key="dict.value"
@ -691,7 +691,7 @@ const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
inspectionType:'',
programmeTemplateCode: '',
splitRule: '',
aql: '',
@ -717,7 +717,7 @@ if (props.basicFormWidth) {
const rules = ref({
itemCode: [{ required: true, message: '请选择物料', trigger: 'blur' }],
version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
testTypeCode: [{ required: true, message: '请选择检验类型', trigger: ['blur', 'change'] }],
inspectionType: [{ required: true, message: '请选择检验类型', trigger: ['blur', 'change'] }],
programmeTemplateCode: [
{ required: true, message: '请选择检验模板', trigger: ['blur', 'change'] }
],
@ -811,7 +811,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
code: '',
itemCode: '',
version: '',
testTypeCode: '',
inspectionType: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
@ -1081,7 +1081,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
data.value[formField] = val[0].code
if (formField == 'itemCode') {
data.value.itemName = val[0].name
} else if (formField == 'testTypeCode') {
} else if (formField == 'inspectionType') {
data.value.testTypeName = val[0].description
} else if (formField == 'programmeTemplateCode') {
data.value.programmeTemplateName = val[0].description

8
src/views/qms/basicDataManage/inspectionScheme/index.vue

@ -159,7 +159,7 @@ const submitForm = async (formType,data) => {
description: data.description,
itemCode: data.itemCode,
version: data.version,
testTypeCode: data.testTypeCode,
inspectionType: data.inspectionType,
programmeTemplateCode: data.programmeTemplateCode,
splitRule: data.splitRule,
aql: data.aql,
@ -170,10 +170,10 @@ const submitForm = async (formType,data) => {
content:JSON.stringify(data.process)
}
if (formType === 'create') {
await InspectionSchemeApi.inspectionSchemeCreat(data1)
await InspectionSchemeApi.InspectionSchemeCreat(data1)
message.success(t('common.createSuccess'))
} else {
await InspectionSchemeApi.inspectionSchemeUpdate(data1)
await InspectionSchemeApi.InspectionSchemeUpdate(data1)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -192,7 +192,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await InspectionSchemeApi.inspectionSchemeDelete(id)
await InspectionSchemeApi.InspectionSchemeDelete(id)
message.success(t('common.delSuccess'))
//
await getList()

2
src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

@ -115,7 +115,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},{
label: '检验类型编码',
field: 'testTypeCode',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
sort: 'custom',

Loading…
Cancel
Save