|
|
|
@ -3598,15 +3598,27 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ |
|
|
|
formData.append("orderRef3", this.searchData.customerId) |
|
|
|
formData.append("searchType", this.searchData.searchType) |
|
|
|
formData.append("partNos", this.searchData.partNos) |
|
|
|
formData.append("limit", this.searchData.limit) |
|
|
|
formData.append("page", this.searchData.page) |
|
|
|
this.isLoading = true |
|
|
|
readPartFromFile(formData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
data.rows.list.forEach(item => { |
|
|
|
item.partNo = item.plmPartNo |
|
|
|
this.partList2.push(item) |
|
|
|
}) |
|
|
|
if (data.rows.list.length > 0) { |
|
|
|
if(typeof data.rows.list[0] ==='string'){ |
|
|
|
let exceptionString = data.rows.list.join("") |
|
|
|
this.$message({ |
|
|
|
message: exceptionString, |
|
|
|
type: 'warning', |
|
|
|
dangerouslyUseHTMLString: true |
|
|
|
}); |
|
|
|
} else { |
|
|
|
data.rows.list.forEach(item => { |
|
|
|
item.partNo = item.plmPartNo |
|
|
|
this.partList2.push(item) |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.success('文件中没有数据') |
|
|
|
} |
|
|
|
|
|
|
|
this.isLoading = false |
|
|
|
this.uploadVisible = false |
|
|
|
} else { |
|
|
|
@ -3620,5 +3632,7 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
|
|
|
.el-message-box__message { |
|
|
|
white-space: pre-line; |
|
|
|
} |
|
|
|
</style> |