|
@@ -90,17 +90,17 @@
|
|
|
<el-input maxlength="50" readonly="true" v-model="scope.row.buyerName" ></el-input>
|
|
|
</template>
|
|
|
</el-table-column >
|
|
|
- <el-table-column prop="amount" label="金额" align="center" width="90" :edit-render="{}" show-overflow="title">
|
|
|
+ <el-table-column prop="amount" label="金额" align="center" width="120" :edit-render="{}" show-overflow="title">
|
|
|
<template #edit="scope">
|
|
|
<el-input maxlength="15" readonly="true" v-model="scope.row.amount" @input="scope.row.amount = twoDecimalPlaces(scope.row.amount)" @change="countAmount(scope.row)"></el-input>
|
|
|
</template>
|
|
|
</el-table-column >
|
|
|
- <el-table-column prop="taxAmount" label="税额" align="center" width="90" :edit-render="{}" show-overflow="title">
|
|
|
+ <el-table-column prop="taxAmount" label="税额" align="center" width="120" :edit-render="{}" show-overflow="title">
|
|
|
<template #edit="scope">
|
|
|
<el-input maxlength="15" readonly="true" v-model="scope.row.taxAmount" @input="scope.row.taxAmount = twoDecimalPlaces(scope.row.taxAmount)" @change="countAmount(scope.row)"></el-input>
|
|
|
</template>
|
|
|
</el-table-column >
|
|
|
- <el-table-column prop="count" label="价税合计" align="center" width="90" :edit-render="{}" show-overflow="title">
|
|
|
+ <el-table-column prop="count" label="价税合计" align="center" width="120" :edit-render="{}" show-overflow="title">
|
|
|
<template #edit="scope">
|
|
|
<el-input disabled="true" v-model="scope.row.count" ></el-input>
|
|
|
</template>
|
|
@@ -528,6 +528,7 @@
|
|
|
const validCompanyFiles = [];//存放符合公司的文件
|
|
|
let errorFiles = [];//存放数据格式错误的文件
|
|
|
let errorDateFiles = [];//存放日期格式错误的文件
|
|
|
+ let isUsedFiles = [];//存放已经被报销的文件
|
|
|
for (let i = 0; i < filesToUpload.length; i++) {
|
|
|
const item = filesToUpload[i];
|
|
|
if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
|
|
@@ -554,6 +555,13 @@
|
|
|
this.reNumFiles.push(data.InvoiceNumber)
|
|
|
continue;
|
|
|
}
|
|
|
+ //查询当前发票号是否已经被报销
|
|
|
+ let isUsed = await this.ossService.isUsedByInvoiceNumber(data.InvoiceNumber);
|
|
|
+ console.log('isUsed',isUsed)
|
|
|
+ if (isUsed){
|
|
|
+ isUsedFiles.push(data.InvoiceNumber)
|
|
|
+ continue;
|
|
|
+ }
|
|
|
let inDate = this.formatDate(data.IssueTime)
|
|
|
if (inDate.indexOf("NaN") != -1 && this.commonJS.isNotEmpty(inDate)){
|
|
|
errorDateFiles.push(item.raw.name);
|
|
@@ -593,6 +601,7 @@
|
|
|
errorFiles = [...new Set(errorFiles)];
|
|
|
invalidFiles = [...new Set(invalidFiles)];
|
|
|
errorDateFiles = [...new Set(errorDateFiles)];
|
|
|
+ isUsedFiles = [...new Set(isUsedFiles)];
|
|
|
// 提示重复文件
|
|
|
if (this.duplicateFileNames.length > 0) {
|
|
|
this.$message.warning(`以下文件已经上传,跳过了这些文件:\n${this.duplicateFileNames.join('\n')}`);
|
|
@@ -617,6 +626,10 @@
|
|
|
if (errorDateFiles.length > 0){
|
|
|
this.$message.warning(`文件: "\n${errorDateFiles.join('\n')}" 日期格式错误,已从上传列表中删除。`);
|
|
|
}
|
|
|
+ //已经被报销的文件
|
|
|
+ if (isUsedFiles.length > 0){
|
|
|
+ this.$message.warning(`书店发票编号为: "\n${isUsedFiles.join('\n')}" 已经发起或已完成报销,无法重复报销`);
|
|
|
+ }
|
|
|
// 重置计数器
|
|
|
this.uploadingCount = 0;
|
|
|
this.totalCount = 0; // 可以根据需求来重置
|