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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检验类型" prop="testTypeCode"> <el-form-item label="检验类型" prop="inspectionType">
<!-- <div style="display: flex; width: 100%"> <!-- <div style="display: flex; width: 100%">
<el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型" /> <el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型" />
<el-button <el-button
@ -75,7 +75,7 @@
><Icon icon="ep:search" /> ><Icon icon="ep:search" />
</el-button> </el-button>
</div> --> </div> -->
<el-select v-model="data.testTypeCode" placeholder="请选择检验类型"> <el-select v-model="data.inspectionType" placeholder="请选择检验类型">
<el-option <el-option
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_TYPE)" v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_TYPE)"
:key="dict.value" :key="dict.value"
@ -691,7 +691,7 @@ const data = ref({
code: '', code: '',
itemCode: '', itemCode: '',
version: '', version: '',
testTypeCode: '', inspectionType:'',
programmeTemplateCode: '', programmeTemplateCode: '',
splitRule: '', splitRule: '',
aql: '', aql: '',
@ -717,7 +717,7 @@ if (props.basicFormWidth) {
const rules = ref({ const rules = ref({
itemCode: [{ required: true, message: '请选择物料', trigger: 'blur' }], itemCode: [{ required: true, message: '请选择物料', trigger: 'blur' }],
version: [{ 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: [ programmeTemplateCode: [
{ required: true, message: '请选择检验模板', trigger: ['blur', 'change'] } { required: true, message: '请选择检验模板', trigger: ['blur', 'change'] }
], ],
@ -811,7 +811,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
code: '', code: '',
itemCode: '', itemCode: '',
version: '', version: '',
testTypeCode: '', inspectionType: '',
programmeTemplateCode: '', programmeTemplateCode: '',
splitRule: '', splitRule: '',
aql: '', aql: '',
@ -1081,7 +1081,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
data.value[formField] = val[0].code data.value[formField] = val[0].code
if (formField == 'itemCode') { if (formField == 'itemCode') {
data.value.itemName = val[0].name data.value.itemName = val[0].name
} else if (formField == 'testTypeCode') { } else if (formField == 'inspectionType') {
data.value.testTypeName = val[0].description data.value.testTypeName = val[0].description
} else if (formField == 'programmeTemplateCode') { } else if (formField == 'programmeTemplateCode') {
data.value.programmeTemplateName = val[0].description 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, description: data.description,
itemCode: data.itemCode, itemCode: data.itemCode,
version: data.version, version: data.version,
testTypeCode: data.testTypeCode, inspectionType: data.inspectionType,
programmeTemplateCode: data.programmeTemplateCode, programmeTemplateCode: data.programmeTemplateCode,
splitRule: data.splitRule, splitRule: data.splitRule,
aql: data.aql, aql: data.aql,
@ -170,10 +170,10 @@ const submitForm = async (formType,data) => {
content:JSON.stringify(data.process) content:JSON.stringify(data.process)
} }
if (formType === 'create') { if (formType === 'create') {
await InspectionSchemeApi.inspectionSchemeCreat(data1) await InspectionSchemeApi.InspectionSchemeCreat(data1)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await InspectionSchemeApi.inspectionSchemeUpdate(data1) await InspectionSchemeApi.InspectionSchemeUpdate(data1)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
@ -192,7 +192,7 @@ const handleDelete = async (id: number) => {
// //
await message.delConfirm() await message.delConfirm()
// //
await InspectionSchemeApi.inspectionSchemeDelete(id) await InspectionSchemeApi.InspectionSchemeDelete(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() await getList()

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

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

Loading…
Cancel
Save