Browse Source

2025/8/7

master
Aoi_Tori 5 months ago
parent
commit
c1fa670c8f
  1. 28
      src/views/modules/project/projectInfo/com_project_info_part.vue

28
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -3598,15 +3598,27 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/
formData.append("orderRef3", this.searchData.customerId) formData.append("orderRef3", this.searchData.customerId)
formData.append("searchType", this.searchData.searchType) formData.append("searchType", this.searchData.searchType)
formData.append("partNos", this.searchData.partNos) formData.append("partNos", this.searchData.partNos)
formData.append("limit", this.searchData.limit)
formData.append("page", this.searchData.page)
this.isLoading = true this.isLoading = true
readPartFromFile(formData).then(({data}) => { readPartFromFile(formData).then(({data}) => {
if (data && data.code === 0) { 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.isLoading = false
this.uploadVisible = false this.uploadVisible = false
} else { } else {
@ -3620,5 +3632,7 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/
</script> </script>
<style scoped> <style scoped>
.el-message-box__message {
white-space: pre-line;
}
</style> </style>
Loading…
Cancel
Save