|
@ -34,7 +34,9 @@ |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="物料编码" prop="itemCode"> |
|
|
<el-form-item label="物料编码" prop="itemCode"> |
|
|
<div style="display: flex; width: 100%"> |
|
|
<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()" |
|
|
<el-button type="info" plain style="width: 40px" @click="opensearchItemsTable()" |
|
|
><Icon icon="ep:search" /> |
|
|
><Icon icon="ep:search" /> |
|
|
</el-button> |
|
|
</el-button> |
|
@ -56,9 +58,9 @@ |
|
|
<div style="display: flex; width: 100%"> |
|
|
<div style="display: flex; width: 100%"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="data.inspectionSchemeCode" |
|
|
v-model="data.inspectionSchemeCode" |
|
|
disabled |
|
|
|
|
|
placeholder="请选择检验方案" |
|
|
placeholder="请选择检验方案" |
|
|
/> |
|
|
@blur="onBlur('inspectionScheme', InspectionSchemeApi.InspectionSchemePage)" |
|
|
|
|
|
@focus="onFocus"/> |
|
|
<el-button |
|
|
<el-button |
|
|
type="info" |
|
|
type="info" |
|
|
plain |
|
|
plain |
|
@ -545,7 +547,7 @@ |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> |
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" :key="count"/> |
|
|
</template> |
|
|
</template> |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
<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> |
|
|
</script> |
|
|
<style scoped> |
|
|
<style scoped> |
|
|
.small-title { |
|
|
.small-title { |
|
|