|
|
@ -92,7 +92,7 @@ |
|
|
|
@success="getList" |
|
|
|
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas" |
|
|
|
:tableFormRules="ProdcutscrapBomScrapRules" |
|
|
|
:tableData="detatableDataBom.tableList" |
|
|
|
:tableData="bomTableList" |
|
|
|
:isBusiness="true" |
|
|
|
:isShowButton="false" |
|
|
|
:isShowReduceButton="false" |
|
|
@ -105,8 +105,20 @@ |
|
|
|
:footButttondata="footButttondata" |
|
|
|
@footButtonClick="buttonBaseClickBom" |
|
|
|
@formSelectChange="formSelectChange" |
|
|
|
> |
|
|
|
<template #TableFormHead> |
|
|
|
<el-form inline> |
|
|
|
<!-- @input="row[headerItem.field] = row[headerItem.field].replace(/[^\d\.-]/g, '')" --> |
|
|
|
<el-form-item label="物料代码"> |
|
|
|
<el-input v-model="bomSearchData" clearable placeholder="请输入物料代码"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="info" plain @click="bomSearchClick"><Icon class="mr-5px" icon="ep:search" />{{ t('common.query') }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
/> |
|
|
|
</template> |
|
|
|
</BasicForm> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/productscrap-request-main/import" :importTemplateData="importTemplateData" |
|
|
@ -233,6 +245,18 @@ const buttonBaseClickBom = (val) => { |
|
|
|
detailBomRef.value.dialogVisible = false |
|
|
|
} |
|
|
|
} |
|
|
|
const bomTableList = ref<any[]>([]) |
|
|
|
const bomSearchData = ref('') |
|
|
|
const bomSearchClick = ()=>{ |
|
|
|
if(!bomSearchData.value){ |
|
|
|
bomTableList.value = detatableDataBom.tableList |
|
|
|
}else{ |
|
|
|
let itemCodes = bomSearchData.value.split(',') |
|
|
|
console.log('itemCodes',itemCodes) |
|
|
|
bomTableList.value = detatableDataBom.tableList.filter(item=>itemCodes.indexOf(item['itemCode'])>-1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const banchBomPage = async (fromLocationCode,item) => { |
|
|
|
const params = { |
|
|
|
location_code:fromLocationCode, |
|
|
@ -272,6 +296,7 @@ const buttonOperationClick = async (row, label, index,isSave = false)=> { |
|
|
|
detatableDataBom.params.fromLocationCode = row.fromLocationCode |
|
|
|
|
|
|
|
await getDetailListBom() |
|
|
|
bomTableList.value = detatableDataBom.tableList |
|
|
|
console.log(row.fromLocationCode); |
|
|
|
detatableDataBom.tableList.forEach(async (item) => { |
|
|
|
console.log(333,item) |
|
|
@ -330,6 +355,7 @@ const handleDeleteTableBom = (item, index) => { |
|
|
|
if (itemIndex > -1) { |
|
|
|
detatableDataBom.tableList.splice(itemIndex, 1) |
|
|
|
} |
|
|
|
bomSearchClick() |
|
|
|
} |
|
|
|
|
|
|
|
const tableSelectionDeleteBom = (selection) => { |
|
|
@ -369,6 +395,7 @@ const tableFormButton = async (val , row) => { |
|
|
|
detailQty.value = row.qty |
|
|
|
detatableDataBom.params.isRecord = true |
|
|
|
await getDetailListBom() |
|
|
|
bomTableList.value = detatableDataBom.tableList |
|
|
|
//详情 |
|
|
|
isShowFooterButtton.value = false |
|
|
|
isShowReduceButtonSelection.value = false |
|
|
|