|
@ -21,7 +21,7 @@ |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="data.itemCode" |
|
|
v-model="data.itemCode" |
|
|
placeholder="请选择物料编码" |
|
|
placeholder="请选择物料编码" |
|
|
@blur="onBlur('item', ItemBasicApi.getItembasicPage)" |
|
|
@blur="onItemBlur('item', ItemBasicApi.getItembasicPage)" |
|
|
@focus="onFocus" |
|
|
@focus="onFocus" |
|
|
/> |
|
|
/> |
|
|
<el-button |
|
|
<el-button |
|
@ -1448,6 +1448,51 @@ const changeIsTarget = (e, item) => { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 物料失去焦点校验 |
|
|
|
|
|
const onItemBlur= 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['itemName'] = obj.name |
|
|
|
|
|
dataObj['description'] = obj.desc1 |
|
|
|
|
|
} else { |
|
|
|
|
|
message.alert('暂无数据') |
|
|
|
|
|
dataObj[field + 'Code'] = '' |
|
|
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
|
|
Butttondata = [ |
|
|
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
|
|
] |
|
|
|
|
|
count.value++ |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//失去焦点 |
|
|
//失去焦点 |
|
|
const onBlur = async (field, pageApi, item) => { |
|
|
const onBlur = async (field, pageApi, item) => { |
|
|
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value |
|
|
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value |
|
|