diff --git a/src/views/modules/project/projectInfo/com_project_info_part.vue b/src/views/modules/project/projectInfo/com_project_info_part.vue index f539b71..c4d8d62 100644 --- a/src/views/modules/project/projectInfo/com_project_info_part.vue +++ b/src/views/modules/project/projectInfo/com_project_info_part.vue @@ -751,7 +751,7 @@ - 查询 + 查询 @@ -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() },