|
@@ -14,6 +14,7 @@
|
|
|
show-overflow
|
|
|
show-footer
|
|
|
ref="baseTable"
|
|
|
+ :key="baseKey"
|
|
|
class="vxe-table-element"
|
|
|
:data="inputForm.financeInvoiceBaseDTOList"
|
|
|
style="margin-left: 5em"
|
|
@@ -464,6 +465,7 @@
|
|
|
show-overflow
|
|
|
show-footer
|
|
|
ref="detailTable"
|
|
|
+ :key="detailKey"
|
|
|
class="vxe-table-element"
|
|
|
:data="inputForm.financeInvoiceDetailDTOList"
|
|
|
style="margin-left: 5em"
|
|
@@ -567,6 +569,7 @@
|
|
|
show-overflow
|
|
|
show-footer
|
|
|
ref="receivablesTable"
|
|
|
+ :key="receivablesKey"
|
|
|
class="vxe-table-element"
|
|
|
:data="inputForm.financeInvoiceReceivablesDTOList"
|
|
|
style="margin-left: 5em"
|
|
@@ -708,7 +711,10 @@
|
|
|
err: '',
|
|
|
keyWatch: '',
|
|
|
importVisible: false,
|
|
|
- yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}]
|
|
|
+ yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}],
|
|
|
+ baseKey: '',
|
|
|
+ detailKey: '',
|
|
|
+ receivablesKey: ''
|
|
|
}
|
|
|
},
|
|
|
financeInvoiceService: null,
|
|
@@ -860,7 +866,9 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.billingPeopleReal)) {
|
|
|
this.inputForm.billingPeopleReal = JSON.parse(localStorage.getItem('user')).id
|
|
|
}
|
|
|
-
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
|
|
|
+ this.inputForm.financeInvoiceBaseDTOList = []
|
|
|
+ }
|
|
|
if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList) || this.inputForm.workAttachmentDtoList.length === 0) {
|
|
|
this.inputForm.workAttachmentDtoList = []
|
|
|
}
|
|
@@ -879,7 +887,8 @@
|
|
|
this.inputForm.billingDate = this.moment(new Date()).format('YYYY-MM-DD')
|
|
|
}
|
|
|
}
|
|
|
- if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && this.inputForm.financeInvoiceDetailDTOList.length === 0) {
|
|
|
+ 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: '',
|
|
|
number: '',
|
|
@@ -1002,7 +1011,7 @@
|
|
|
}
|
|
|
acc = (acc + parseFloat(parseFloat(item.account).toFixed(2)))
|
|
|
})
|
|
|
- if (acc !== this.inputForm.account) {
|
|
|
+ if (parseFloat(acc).toFixed(2) !== parseFloat(this.inputForm.account).toFixed(2)) {
|
|
|
this.loading = false
|
|
|
this.$message.warning('发票明细中 “开票金额”总和 与发票详情中 “发票金额” 不等')
|
|
|
throw new Error()
|
|
@@ -1124,9 +1133,12 @@
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- this.$refs.baseTable.insert().then((data) => {
|
|
|
- this.inputForm.financeInvoiceBaseDTOList.push(data)
|
|
|
- })
|
|
|
+ this.$refs.baseTable.insertAt({})
|
|
|
+ this.inputForm.financeInvoiceBaseDTOList.push({})
|
|
|
+ this.baseKey = Math.random()
|
|
|
+ // this.$refs.baseTable.insert().then((data) => {
|
|
|
+ // this.inputForm.financeInvoiceBaseDTOList.push(data)
|
|
|
+ // })
|
|
|
}
|
|
|
if (type === 'detail') {
|
|
|
this.$refs.detailTable.insert().then((data) => {
|
|
@@ -1184,7 +1196,9 @@
|
|
|
contractId: item.contractId,
|
|
|
programId: item.id
|
|
|
}
|
|
|
+ this.$refs.baseTable.insertAt(r)
|
|
|
this.inputForm.financeInvoiceBaseDTOList.push(r)
|
|
|
+ this.baseKey = Math.random()
|
|
|
}
|
|
|
})
|
|
|
this.$forceUpdate()
|