Переглянути джерело

回显空发票异常处理,并且限制回显的空发票再次上传

huangguoce 2 тижнів тому
батько
коміт
cb29a3d554

+ 0 - 1
src/views/common/DigitalInvoiceUploadComponent.vue

@@ -524,7 +524,6 @@ export default {
 					const formBody = new FormData();
 					formBody.append('file', file.raw);
 					const data1 = await this.ossService.disposeXmlFile(formBody);
-					console.log(data1);
 
 					if (JSON.stringify(data1) === "{}") {
 						this.$message.warning({ message: `数电发票:${file.raw.name}格式错误` });

+ 8 - 0
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -1518,6 +1518,14 @@ export default {
 			})
 		},
 		startForm(callback) {
+			const invalidItem = this.$refs.invoiceReimbursementUpLoadComponent.getDataList().find(
+				item => !item.number || item.number.toString().trim() === ''
+			);
+
+			if (invalidItem) {
+				this.$message.warning({ message: `数电发票: ${invalidItem.name} 格式错误` });
+				return;
+			}
 			this.loading = true
 			if (this.commonJS.isNotEmpty(this.inputForm.id)) {
 				this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {