|
@@ -260,8 +260,8 @@
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
|
// 附件
|
|
|
- if (data.data.attachList) {
|
|
|
- data.data.attachList.forEach((item) => {
|
|
|
+ if (data.data.attachListA) {
|
|
|
+ data.data.attachListA.forEach((item) => {
|
|
|
this.fileList1.push({
|
|
|
name: item.fileName,
|
|
|
url: item.url,
|
|
@@ -269,6 +269,42 @@
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ if (data.data.attachListB) {
|
|
|
+ data.data.attachListB.forEach((item) => {
|
|
|
+ this.fileList2.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.attachListC) {
|
|
|
+ data.data.attachListC.forEach((item) => {
|
|
|
+ this.fileList3.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.attachListD) {
|
|
|
+ data.data.attachListD.forEach((item) => {
|
|
|
+ this.fileList4.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.attachListE) {
|
|
|
+ data.data.attachListE.forEach((item) => {
|
|
|
+ this.fileList5.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -285,9 +321,9 @@
|
|
|
// 附件
|
|
|
let fList1 = this.fileList1
|
|
|
if (fList1.length > 0) {
|
|
|
- this.dataForm.attachList = []
|
|
|
+ this.dataForm.attachListA = []
|
|
|
for (let i = 0; i < fList1.length; i++) {
|
|
|
- this.dataForm.attachList.push({
|
|
|
+ this.dataForm.attachListA.push({
|
|
|
fileName: fList1[i].name,
|
|
|
url: fList1[i].url
|
|
|
})
|
|
@@ -296,6 +332,58 @@
|
|
|
this.$message.error('请上传文件')
|
|
|
return
|
|
|
}
|
|
|
+ let fList2 = this.fileList2
|
|
|
+ if (fList2.length > 0) {
|
|
|
+ this.dataForm.attachListB = []
|
|
|
+ for (let i = 0; i < fList2.length; i++) {
|
|
|
+ this.dataForm.attachListB.push({
|
|
|
+ fileName: fList2[i].name,
|
|
|
+ url: fList2[i].url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (this.type === 0) { // 新增时判断
|
|
|
+ this.$message.error('请上传文件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let fList3 = this.fileList3
|
|
|
+ if (fList3.length > 0) {
|
|
|
+ this.dataForm.attachListC = []
|
|
|
+ for (let i = 0; i < fList3.length; i++) {
|
|
|
+ this.dataForm.attachListC.push({
|
|
|
+ fileName: fList3[i].name,
|
|
|
+ url: fList3[i].url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (this.type === 2) { // 重新评审时判断
|
|
|
+ this.$message.error('请上传文件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let fList4 = this.fileList4
|
|
|
+ if (fList4.length > 0) {
|
|
|
+ this.dataForm.attachListD = []
|
|
|
+ for (let i = 0; i < fList4.length; i++) {
|
|
|
+ this.dataForm.attachListD.push({
|
|
|
+ fileName: fList4[i].name,
|
|
|
+ url: fList4[i].url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (this.type === 2) { // 重新评审时判断
|
|
|
+ this.$message.error('请上传文件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let fList5 = this.fileList5
|
|
|
+ if (fList5.length > 0) {
|
|
|
+ this.dataForm.attachListE = []
|
|
|
+ for (let i = 0; i < fList5.length; i++) {
|
|
|
+ this.dataForm.attachListE.push({
|
|
|
+ fileName: fList5[i].name,
|
|
|
+ url: fList5[i].url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else if (this.type === 3) { // 取消供应商时判断
|
|
|
+ this.$message.error('请上传文件')
|
|
|
+ return
|
|
|
+ }
|
|
|
// save or update
|
|
|
let path = ''
|
|
|
if (this.type === 0) path = 'save'
|