|
@@ -637,7 +637,10 @@
|
|
|
workAttachmentDtoList: [],
|
|
|
financeInvoiceDetailDTOList: [],
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
- financeInvoiceInvalidDTO: {}
|
|
|
+ financeInvoiceInvalidDTO: {},
|
|
|
+ receivablesDate: '',
|
|
|
+ receivablesStatus: '',
|
|
|
+ isReceivables: ''
|
|
|
},
|
|
|
programRow: '',
|
|
|
bankList: [],
|
|
@@ -722,7 +725,10 @@
|
|
|
invalidStatus: '',
|
|
|
invoiceId: '',
|
|
|
remarks: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ receivablesDate: '',
|
|
|
+ receivablesStatus: '',
|
|
|
+ isReceivables: ''
|
|
|
}
|
|
|
this.inputForm.id = id
|
|
|
this.visible = true
|
|
@@ -811,20 +817,48 @@
|
|
|
return
|
|
|
}
|
|
|
if (this.receivablesFlag === true) {
|
|
|
- this.inputForm.financeInvoiceReceivablesDTOList.forEach((item, index) => {
|
|
|
- if (this.commonJS.isEmpty(item.remittanceUnit)) {
|
|
|
- this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款单位” 为空,请重新输入')
|
|
|
- throw new Error()
|
|
|
- }
|
|
|
- if (this.commonJS.isEmpty(item.remittanceAmount) || item.remittanceAmount === 0 || item.remittanceAmount === '0') {
|
|
|
- this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款金额” 为空,请重新输入')
|
|
|
- throw new Error()
|
|
|
- }
|
|
|
- if (this.commonJS.isEmpty(item.remittanceDate)) {
|
|
|
- this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款时间” 为空,请重新输入')
|
|
|
- throw new Error()
|
|
|
+ this.inputForm.isReceivables = '1' // 当前的页面为收款页面时,将isReceivables赋值为:1,后端接收到isReceivables值为1时,则判定当前页面为收款页面
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
|
|
|
+ let allNumber = 0 // 获取收款明细中的总金额
|
|
|
+ this.inputForm.financeInvoiceReceivablesDTOList.forEach((item, index) => {
|
|
|
+ if (this.commonJS.isEmpty(item.remittanceUnit)) {
|
|
|
+ this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款单位” 为空,请重新输入')
|
|
|
+ throw new Error()
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.remittanceAmount) || item.remittanceAmount === 0 || item.remittanceAmount === '0') {
|
|
|
+ this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款金额” 为空,请重新输入')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ allNumber = parseFloat(parseFloat(allNumber) + parseFloat(item.remittanceAmount))
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.remittanceDate)) {
|
|
|
+ this.$message.warning('收款明细中第 ' + (index + 1) + ' 条数据的 “汇款时间” 为空,请重新输入')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ // this.inputForm.receivablesDate 是发票的收款时间
|
|
|
+ if (index === 0) {
|
|
|
+ this.inputForm.receivablesDate = item.remittanceDate
|
|
|
+ } else {
|
|
|
+ if (item.remittanceDate > this.inputForm.receivablesDate) {
|
|
|
+ this.inputForm.receivablesDate = item.remittanceDate
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (parseFloat(this.inputForm.account) < parseFloat(allNumber)) {
|
|
|
+ this.$message.warning('收款明细的总金额不能超过发票总金额,请重新输入')
|
|
|
+ throw new Error('收款明细的总金额不能超过发票总金额,请重新输入')
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
|
|
|
+ // 如果收款明细中的数据不是空,则将是否收款的状态改为部分收款
|
|
|
+ this.inputForm.receivablesStatus = '2'
|
|
|
+ } else {
|
|
|
+ // 如果收款明细中的数据是空,则将是否收款的状态改为未收款
|
|
|
+ this.inputForm.receivablesStatus = '0'
|
|
|
+ // 如果收款明细中的数据是空,则将收款日期置空
|
|
|
+ this.inputForm.receivablesDate = ''
|
|
|
+ }
|
|
|
}
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -882,7 +916,10 @@
|
|
|
workAttachmentDtoList: [],
|
|
|
financeInvoiceDetailDTOList: [],
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
- financeInvoiceInvalidDTO: {}
|
|
|
+ financeInvoiceInvalidDTO: {},
|
|
|
+ receivablesDate: '',
|
|
|
+ receivablesStatus: '',
|
|
|
+ isReceivables: ''
|
|
|
}
|
|
|
this.bankList = []
|
|
|
this.detailFlag = false
|
|
@@ -1135,7 +1172,6 @@
|
|
|
}
|
|
|
},
|
|
|
async beforeUploadDetailCode (file) {
|
|
|
- console.log('110', this.inputForm.taxpayerIdentificationNo)
|
|
|
await this.checkIdentificationNo()
|
|
|
const formBody = new FormData()
|
|
|
formBody.append('file', file.raw)
|