|
|
@ -34,7 +34,9 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物料编码" prop="itemCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input v-model="data.itemCode" disabled placeholder="请选择物料编码" /> |
|
|
|
<el-input v-model="data.itemCode" placeholder="请选择物料编码" |
|
|
|
@blur="onBlur('item', ItemBasicApi.getItembasicPage)" |
|
|
|
@focus="onFocus"/> |
|
|
|
<el-button type="info" plain style="width: 40px" @click="opensearchItemsTable()" |
|
|
|
><Icon icon="ep:search" /> |
|
|
|
</el-button> |
|
|
@ -56,9 +58,9 @@ |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.inspectionSchemeCode" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方案" |
|
|
|
/> |
|
|
|
@blur="onBlur('inspectionScheme', InspectionSchemeApi.InspectionSchemePage)" |
|
|
|
@focus="onFocus"/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
@ -545,7 +547,7 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" :key="count"/> |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
<Dialog |
|
|
@ -1465,6 +1467,59 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//失去焦点 |
|
|
|
const onBlur = async (field, pageApi, item) => { |
|
|
|
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value |
|
|
|
if (dataObj[field + 'Code']) { |
|
|
|
const _searchCondition = {} |
|
|
|
const filters: any[] = [] |
|
|
|
filters.push( |
|
|
|
{ |
|
|
|
action: '==', |
|
|
|
column: 'available', |
|
|
|
value: 'TRUE' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: 'code', |
|
|
|
action: '==', |
|
|
|
value: dataObj[field + 'Code']?.trim() |
|
|
|
} |
|
|
|
) |
|
|
|
// 参数整理 |
|
|
|
_searchCondition.isSearch = true |
|
|
|
_searchCondition.filters = filters |
|
|
|
const array = await pageApi(_searchCondition) |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
const obj = array.list[0] |
|
|
|
if (obj) { |
|
|
|
dataObj[field + 'Name'] = obj.description |
|
|
|
} else { |
|
|
|
message.alert('暂无数据') |
|
|
|
dataObj[field + 'Code'] = '' |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
} |
|
|
|
} else { |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
const count = ref(0) |
|
|
|
// 聚焦的时候不可以保存 |
|
|
|
const onFocus = () => { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn({ disabled: true }), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.small-title { |
|
|
|