|
|
|
@ -751,7 +751,7 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="searchTypeChange">查询</el-button> |
|
|
|
<el-button type="primary" @click="searchPartImport">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
@ -1041,7 +1041,9 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ |
|
|
|
'searchData.searchType'(newVal,oldVal){ |
|
|
|
this.searchData.partNo = '' |
|
|
|
this.searchData.partDesc = '' |
|
|
|
this.searchTypeChange(); |
|
|
|
if (this.partModelFlag) { |
|
|
|
this.searchPartImport() |
|
|
|
} |
|
|
|
}, |
|
|
|
partModelFlag(newVal,oldVal){ |
|
|
|
if (newVal === false){ |
|
|
|
@ -2701,13 +2703,15 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ |
|
|
|
this.partSelections2 = [] |
|
|
|
this.partList1 = [] |
|
|
|
this.partList2 = [] |
|
|
|
this.totalPage = 0 |
|
|
|
this.pageIndex = 1 |
|
|
|
this.searchData.searchType = 'N' |
|
|
|
this.searchData.partNo = '' |
|
|
|
this.searchData.partDesc = '' |
|
|
|
this.searchData.partNos = '' |
|
|
|
this.searchData.plmPartNo = '' |
|
|
|
this.searchData.finalPartNo = '' |
|
|
|
this.handleGetProjectPartList(); |
|
|
|
this.partModelFlag = true |
|
|
|
}, |
|
|
|
|
|
|
|
handleGetProjectPartList(){ |
|
|
|
@ -2724,11 +2728,20 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 改变事件 |
|
|
|
// 料号导入弹窗查询按钮入口,需校验至少填写一个搜索条件 |
|
|
|
searchPartImport () { |
|
|
|
const { plmPartNo, finalPartNo, partDesc } = this.searchData |
|
|
|
if (!plmPartNo && !finalPartNo && !partDesc) { |
|
|
|
this.$message.warning('请至少输入 PLM物料编码、IFS物料编码 或 物料名称 其中一项后再查询!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.pageIndex = 1 |
|
|
|
this.searchTypeChange() |
|
|
|
}, |
|
|
|
|
|
|
|
// 改变事件(添加/删除物料后自动刷新时调用) |
|
|
|
searchTypeChange () { |
|
|
|
// 使用 map 提取 partNo 并加上单引号 |
|
|
|
let partNos = this.partList2.map(part => part.partNo) |
|
|
|
// 使用 join 将 partNo 连接成一个字符串 |
|
|
|
this.searchData.partNos = partNos.join(",") |
|
|
|
this.handleGetProjectPartList() |
|
|
|
}, |
|
|
|
|