Browse Source

检验模板失去焦点

hella_online_20240829
zhang_li 4 months ago
parent
commit
c0698771b1
  1. 77
      src/views/qms/inspectionTemplate/addForm.vue

77
src/views/qms/inspectionTemplate/addForm.vue

@ -27,14 +27,14 @@
</el-col>
<el-col :span="12">
<el-form-item
label="动态修改规则"
label="动态修改规则编码"
prop="dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="data.dynamicUpdateName"
disabled
placeholder="请选择动态修改规则"
v-model="data.dynamicUpdateCode"
placeholder="请选择动态修改规则编码"
@blur='dynamicUpdateCodeBlur'
/>
<el-button
type="info"
@ -64,6 +64,20 @@
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="动态修改规则描述"
prop="dynamicUpdateName"
>
<div style="display: flex; width: 100%">
<el-input
v-model="data.dynamicUpdateName"
placeholder="请选择动态修改规则描述"
disabled
/>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs
@ -158,14 +172,15 @@
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
label="检验方法编码"
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName"
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode"
placeholder="请选择检验方法编码"
disabled
placeholder="请选择检验方法"
@blur='inspectionMethodCodeBlur(item)'
/>
<el-button
type="info"
@ -195,6 +210,20 @@
</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="采样过程编码"
@ -1039,6 +1068,40 @@ const copy = (item)=>{
data.value.process.push(newItem)
editableTabsValue.value = newItem.name
}
//
const dynamicUpdateCodeBlur = async () => {
const _searchCondition = {}
const filters: any[] = []
filters.push(
{
action: '==',
column: 'available',
value: 'TRUE'
},
{
column: 'code',
action: '==',
value: data.value?.dynamicUpdateCode?.trim()
}
)
//
_searchCondition.isSearch = true
_searchCondition.filters = filters
const array = await DynamicRuleApi.getDynamicRulePage(_searchCondition)
const obj = array.list[0]
if (obj) {
data.value.dynamicUpdateName = obj.description
} else {
message.alert('暂无数据')
data.value.dynamicUpdateCode =''
data.value.dynamicUpdateName =''
}
}
//
const inspectionMethodCodeBlur = async () => {
}
</script>
<style scoped>
.small-title {

Loading…
Cancel
Save