|
@@ -1277,6 +1277,7 @@
|
|
|
this.amountKey = Math.random()
|
|
|
}
|
|
|
if (type === 'invoiceReimbursement') {
|
|
|
+ console.log("新增行操作2:")
|
|
|
let d = {}
|
|
|
if (this.commonJS.isEmpty(this.inputForm.invoiceReimbursements)) {
|
|
|
this.inputForm.invoiceReimbursements = []
|
|
@@ -1343,6 +1344,7 @@
|
|
|
}
|
|
|
},
|
|
|
insertInvoiceReimbursementEvent (type,value) {
|
|
|
+ console.log("新增行操作:",value)
|
|
|
if (type === 'invoiceReimbursement') {
|
|
|
if (this.commonJS.isEmpty(this.inputForm.invoiceReimbursements)) {
|
|
|
this.inputForm.invoiceReimbursements = []
|
|
@@ -2214,49 +2216,57 @@
|
|
|
if(!invoiceReimbursements) {
|
|
|
invoiceReimbursements = [];
|
|
|
}
|
|
|
- this.reimbursementService.getEffectiveDataByInvoiceNumber(data.InvoiceNumber,this.inputForm.id).then((decide) => {
|
|
|
- if(!decide.success){
|
|
|
- //删除上传的附件信息
|
|
|
- this.$refs.invoiceReimbursementUpLoadComponent.parentDeleteById(file)
|
|
|
- //进行提醒
|
|
|
- this.$message.warning(decide.message)
|
|
|
- }else{
|
|
|
- invoiceReimbursements.forEach(item => {
|
|
|
- if(item.number === data.InvoiceNumber) {
|
|
|
- includeFlag = true;
|
|
|
- item.invoiceType = data.InherentLabelGeneralOrSpecialVATLabelCode;
|
|
|
- item.invoiceProjectName = data.IssuItemInformationItemName;
|
|
|
- item.number = data.InvoiceNumber;
|
|
|
- item.invoiceDate = data.IssueTime;
|
|
|
- item.invoiceUnit = data.SellerInformationSellerName;
|
|
|
- item.amount = data.BasicInformationTotalAmWithoutTax;
|
|
|
- item.taxAmount = data.BasicInformationTotalTaxAm;
|
|
|
- item.count = data.BasicInformationTotalTaxincludedAmount;
|
|
|
- item.buyerName = data.BuyerInformationBuyerName;
|
|
|
- }
|
|
|
- })
|
|
|
- //列表中未查到相同发票号
|
|
|
- if(!includeFlag){
|
|
|
- let value = {
|
|
|
- invoiceType: data.InherentLabelGeneralOrSpecialVATLabelCode,
|
|
|
- invoiceProjectName: data.IssuItemInformationItemName,
|
|
|
- number: data.InvoiceNumber,
|
|
|
- invoiceDate: data.IssueTime,
|
|
|
- invoiceUnit: data.SellerInformationSellerName,
|
|
|
- amount: data.BasicInformationTotalAmWithoutTax,
|
|
|
- taxAmount: data.BasicInformationTotalTaxAm,
|
|
|
- count: data.BasicInformationTotalTaxincludedAmount,
|
|
|
- buyerName: data.BuyerInformationBuyerName,
|
|
|
- remarks: ''
|
|
|
+ if("江苏兴光资产评估有限公司" !== data.BuyerInformationBuyerName){
|
|
|
+ //删除上传的附件信息
|
|
|
+ this.$refs.invoiceReimbursementUpLoadComponent.parentDeleteById(file)
|
|
|
+ //进行提醒
|
|
|
+ this.$message.warning("仅可上传江苏兴光资产评估有限公司的报销数电发票")
|
|
|
+ }else{
|
|
|
+ this.reimbursementService.getEffectiveDataByInvoiceNumber(data.InvoiceNumber,this.inputForm.id).then((decide) => {
|
|
|
+ if(!decide.success){
|
|
|
+ //删除上传的附件信息
|
|
|
+ this.$refs.invoiceReimbursementUpLoadComponent.parentDeleteById(file)
|
|
|
+ //进行提醒
|
|
|
+ this.$message.warning(decide.message)
|
|
|
+ }else{
|
|
|
+ invoiceReimbursements.forEach(item => {
|
|
|
+ if(item.number === data.InvoiceNumber) {
|
|
|
+ includeFlag = true;
|
|
|
+ item.invoiceType = data.InherentLabelGeneralOrSpecialVATLabelCode;
|
|
|
+ item.invoiceProjectName = data.IssuItemInformationItemName;
|
|
|
+ item.number = data.InvoiceNumber;
|
|
|
+ item.invoiceDate = data.IssueTime;
|
|
|
+ item.invoiceUnit = data.SellerInformationSellerName;
|
|
|
+ item.amount = data.BasicInformationTotalAmWithoutTax;
|
|
|
+ item.taxAmount = data.BasicInformationTotalTaxAm;
|
|
|
+ item.count = data.BasicInformationTotalTaxincludedAmount;
|
|
|
+ item.buyerName = data.BuyerInformationBuyerName;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //列表中未查到相同发票号
|
|
|
+ if(!includeFlag){
|
|
|
+ let value = {
|
|
|
+ invoiceType: data.InherentLabelGeneralOrSpecialVATLabelCode,
|
|
|
+ invoiceProjectName: data.IssuItemInformationItemName,
|
|
|
+ number: data.InvoiceNumber,
|
|
|
+ invoiceDate: data.IssueTime,
|
|
|
+ invoiceUnit: data.SellerInformationSellerName,
|
|
|
+ amount: data.BasicInformationTotalAmWithoutTax,
|
|
|
+ taxAmount: data.BasicInformationTotalTaxAm,
|
|
|
+ count: data.BasicInformationTotalTaxincludedAmount,
|
|
|
+ buyerName: data.BuyerInformationBuyerName,
|
|
|
+ remarks: ''
|
|
|
+ }
|
|
|
+ this.insertInvoiceReimbursementEvent('invoiceReimbursement',value)
|
|
|
}
|
|
|
- this.insertInvoiceReimbursementEvent('invoiceReimbursement',value)
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- }).catch(() => {
|
|
|
- this.$refs.inputForm.resetFields()
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
invoiceReimbursementDispose: function (data) {
|