浏览代码

会计-发票-发票金额调整

sangwenwei 6 月之前
父节点
当前提交
2cb3aa8cdb

+ 5 - 0
src/views/cw/invoice/InvoiceForm.vue

@@ -949,6 +949,11 @@
             if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
               this.inputForm.workAttachmentDtoList = []
             }
+			  if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceDetailDTOList)) {
+				  this.inputForm.financeInvoiceDetailDTOList.forEach((item)=>{
+					  item.account = parseFloat(parseFloat(item.account).toFixed(2));
+				  })
+			  }
             this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'invoice')
             this.loading = false
           })

+ 2 - 1
src/views/cw/invoice/InvoiceFormTask.vue

@@ -1243,7 +1243,8 @@
 						  for (let j = 0; j < i; j++) {
 						  	sun = (100*sun + 100* this.inputForm.financeInvoiceBaseDTOList[j].account)/100
 						  }
-						  console.log(sun)
+						  sun = parseFloat(sun.toFixed(2));
+						  console.log('111',sun)
 						  this.inputForm.financeInvoiceDetailDTOList.push({
 							  code: '',
 							  number: '',

+ 5 - 1
src/views/cw/invoice/InvoiceFormTaskInvalid.vue

@@ -807,7 +807,11 @@
                 tax: '',
                 allAmount: ''
               })
-            }
+            }else {
+				this.inputForm.financeInvoiceDetailDTOList.forEach((item)=>{
+					item.account = parseFloat(parseFloat(item.account).toFixed(2));
+				})
+			}
             this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'invoice')
             this.loading = false
           })

+ 8 - 2
src/views/cw/invoice/InvoiceUpdateForm.vue

@@ -946,7 +946,9 @@
                 this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
               }
             }
-            if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && (this.commonJS.isEmpty(this.inputForm.financeInvoiceDetailDTOList) || this.inputForm.financeInvoiceDetailDTOList.length === 0)) {
+			  this.inputForm.account = parseFloat(parseFloat(this.inputForm.account).toFixed(2));
+			  console.log('this.inputForm.account',this.inputForm.account)
+			  if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && (this.commonJS.isEmpty(this.inputForm.financeInvoiceDetailDTOList) || this.inputForm.financeInvoiceDetailDTOList.length === 0)) {
               this.inputForm.financeInvoiceDetailDTOList = []
               this.inputForm.financeInvoiceDetailDTOList.push({
                 code: '',
@@ -957,7 +959,11 @@
                 tax: '',
                 allAmount: ''
               })
-            }
+            }else {
+				  this.inputForm.financeInvoiceDetailDTOList.forEach((item)=>{
+					  item.account = parseFloat(parseFloat(item.account).toFixed(2));
+				  })
+			  }
             this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'invoice')
             this.loading = false
           })