Browse Source

批量归档

sangwenwei 1 year ago
parent
commit
2fdd3e6db9
1 changed files with 18 additions and 5 deletions
  1. 18 5
      src/views/cw/fillingbatch/FillingbatchForm.vue

+ 18 - 5
src/views/cw/fillingbatch/FillingbatchForm.vue

@@ -524,11 +524,12 @@
 						this.loading = false
 						throw new Error()
 					}
-					for await (let item of result) {
-						this.$refs.batchTable.insertAt(item)
-						this.inputForm.cwFillingbatchProjects.push(item)
-						this.tableKeyProject = Math.random()
-					}
+					// for await (let item of result) {
+					// 	this.$refs.batchTable.insertAt(item)
+					// 	this.inputForm.cwFillingbatchProjects.push(item)
+					// 	this.tableKeyProject = Math.random()
+					// }
+					await this.detailPush(result)
 					this.importVisible = false
 					this.loading = false
 				}).catch(() => {
@@ -536,6 +537,18 @@
 					this.loading = false
 				})
 			},
+			async detailPush(data) {
+				if (this.commonJS.isNotEmpty(data)) {
+					await data.forEach(item => {
+						if (this.commonJS.isNotEmpty(item.cwFillingbatchFiles)){
+							this.getFile(item.cwFillingbatchFiles)
+						}
+						console.log('item',item)
+					})
+					this.getProgram(data)
+				}
+				this.$message.success('导入完成')
+			},