sangwenwei 6 mesiacov pred
rodič
commit
062c13ff91

+ 7 - 2
src/views/ccpm/reimbursement/info/InfoList.vue

@@ -121,6 +121,10 @@
 				</el-option>
 			</el-select>
 		</el-form-item>
+		<el-form-item v-if="showHideItem" label="发票号" prop="financeNumber">
+			<el-input style="width: 150px" v-model="searchForm.financeNumber" placeholder="请输入发票号" clearable>
+			</el-input>
+		</el-form-item>
       <el-form-item>
         <el-button @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
         <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
@@ -230,7 +234,7 @@
 				<el-button v-if="hasPermission('ccpm:user:payment') && scope.row.paymentStatus !== '1'" text type="primary"  @click="payment(scope.row)">付款</el-button>
 				<el-button v-if="hasPermission('ccpm:user:payment') && scope.row.paymentStatus === '1'" text type="primary"  @click="rePayment(scope.row)">撤回付款</el-button>
 				<!--								文件补充-->
-				<el-button v-if="hasPermission('file:supplement')&& (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
+				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
@@ -300,7 +304,8 @@
           reportNumber: '',
           sourceType: '',
 			no:'',
-			paymentStatus:''
+			paymentStatus:'',
+			financeNumber:''
         },
         dataList: [],
         tablePage: {

+ 31 - 22
src/views/common/DigitalInvoiceUploadComponent.vue

@@ -164,7 +164,7 @@
 		  totalCount: 0, // 记录总的文件数量
 		  duplicateFileNames: [], // 存储重复文件名
 		  noXmlFiles: [], // 存储非当前公司的文件名
-		  reNumFiles: [], // 存储重复发票号
+		  // reNumFiles: [], // 存储重复发票号
 		  toCompany:'', //用于区分属于哪个公司的数电发票,
       }
     },
@@ -475,7 +475,14 @@
 				// 检查该文件标识是否已存在
 				if (uploadedFileIdentifiers.has(fileIdentifier)) {
 					// 记录重复文件名
-					this.duplicateFileNames.push(fileName);
+					const formBody = new FormData();
+					formBody.append('file', item.raw);
+					const data = await this.ossService.disposeXmlFile(formBody);
+					if (this.commonJS.isNotEmpty(data.InvoiceNumber)){
+						this.duplicateFileNames.push(fileName+"-"+data.InvoiceNumber);
+						console.log('222',data.InvoiceNumber)
+						console.log('this.duplicateFileNames',this.duplicateFileNames)
+					}
 				} else {
 					// 文件没有重复,加入上传列表
 					filesToUpload.push(item);
@@ -560,16 +567,18 @@
 								// this.$message.warning("仅可上传江苏兴光项目管理有限公司的报销数电发票");
 								continue;
 							}
-							var flag = this.invoiceReimbursementDispose(data)
-							if (flag){
-								this.reNumFiles.push(data.InvoiceNumber)
-								continue;
-							}
-							//查询当前发票号是否已经被报销
-							let isUsed = await this.ossService.isUsedByInvoiceNumber(data.InvoiceNumber);
-							if (isUsed){
-								isUsedFiles.push(data.InvoiceNumber)
-								continue;
+							if (this.commonJS.isNotEmpty(data.InvoiceNumber)){
+								var flag = this.invoiceReimbursementDispose(data)
+								if (flag){
+										this.duplicateFileNames.push(item.raw.name +"-"+data.InvoiceNumber)
+										continue;
+								}
+								//查询当前发票号是否已经被报销
+								let isUsed = await this.ossService.isUsedByInvoiceNumber(data.InvoiceNumber);
+								if (isUsed){
+									isUsedFiles.push(item.raw.name +"-"+data.InvoiceNumber)
+									continue;
+								}
 							}
 							let inDate = this.formatDate(data.IssueTime)
 							if (inDate.indexOf("NaN") != -1 && this.commonJS.isNotEmpty(inDate)){
@@ -596,38 +605,38 @@
 			if (this.uploadingCount === this.totalCount) {
 				this.duplicateFileNames = [...new Set(this.duplicateFileNames)];
 				this.noXmlFiles = [...new Set(this.noXmlFiles)];
-				this.reNumFiles = [...new Set(this.reNumFiles)];
+				// this.reNumFiles = [...new Set(this.reNumFiles)];
 				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')}`);
+					this.$message.warning({message:`以下文件已经上传,跳过了这些文件:<br>${this.duplicateFileNames.join('<br>')}`,dangerouslyUseHTMLString: true});
 				}
 				// 提示xml文件不是当前公司报销的文件
 				if (this.noXmlFiles.length > 0) {
-					this.$message.warning(`仅可上传${this.toCompany}的报销数电发票:\n${this.noXmlFiles.join('\n')}`);
+					this.$message.warning({message:`仅可上传${this.toCompany}的报销数电发票:<br>${this.noXmlFiles.join('<br>')}`,dangerouslyUseHTMLString: true});
 				}
 				// 提示发票号重复文件
-				if (this.reNumFiles.length > 0) {
-					this.$message.error(`发票号:\n${this.reNumFiles.join('\n')}已上传,请勿重复上传`);
-				}
+				// if (this.reNumFiles.length > 0) {
+				// 	this.$message.error(`发票号:\n${this.reNumFiles.join('\n')}已上传,请勿重复上传`);
+				// }
 				//数电发票格式错误的文件
 				if (errorFiles.length > 0){
-					this.$message.warning(`上传的数电发票格式错误:\n${errorFiles.join('\n')}`);
+					this.$message.warning({message:`上传的数电发票格式错误:<br>${errorFiles.join('<br>')}`,dangerouslyUseHTMLString: true});
 				}
 				//临时路径错误的文件
 				if (invalidFiles.length > 0){
-					this.$message.warning(`文件: "\n${invalidFiles.join('\n')}" 获取失败,已从上传列表中删除。`);
+					this.$message.warning({message:`文件: "<br>${invalidFiles.join('<br>')}" 获取失败,已从上传列表中删除。`,dangerouslyUseHTMLString: true});
 				}
 				//临时路径错误的文件
 				if (errorDateFiles.length > 0){
-					this.$message.warning(`文件: "\n${errorDateFiles.join('\n')}" 日期格式错误,已从上传列表中删除。`);
+					this.$message.warning({message:`文件: "<br>${errorDateFiles.join('<br>')}" 日期格式错误,已从上传列表中删除。`,dangerouslyUseHTMLString: true});
 				}
 				//已经被报销的文件
 				if (isUsedFiles.length > 0){
-					this.$message.warning(`数电发票编号为: "\n${isUsedFiles.join('\n')}" 已经发起或已完成报销,无法重复报销`);
+					this.$message.warning({message:`数电发票编号为: "<br>${isUsedFiles.join('<br>')}" 已经发起或已完成报销,无法重复报销`,dangerouslyUseHTMLString: true});
 				}
 				// 重置计数器
 				this.uploadingCount = 0;

+ 7 - 3
src/views/consultancy/reimbursement/info/InfoList.vue

@@ -121,7 +121,10 @@
 				</el-option>
 			</el-select>
 		</el-form-item>
-
+		<el-form-item v-if="showHideItem" label="发票号" prop="financeNumber">
+			<el-input style="width: 150px" v-model="searchForm.financeNumber" placeholder="请输入发票号" clearable>
+			</el-input>
+		</el-form-item>
       <el-form-item>
         <el-button @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
         <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
@@ -230,7 +233,7 @@
 				<el-button v-if="hasPermission('consultancy:user:payment') && scope.row.paymentStatus !== '1'" text type="primary"  @click="payment(scope.row)">付款</el-button>
 				<el-button v-if="hasPermission('consultancy:user:payment') && scope.row.paymentStatus === '1'" text type="primary"  @click="rePayment(scope.row)">撤回付款</el-button>
 				<!--								文件补充-->
-				<el-button v-if="hasPermission('file:supplement')&& (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
+				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
@@ -302,7 +305,8 @@
           reportNumber: '',
           sourceType: '',
 			no:'',
-			paymentStatus:''
+			paymentStatus:'',
+			financeNumber:''
         },
         dataList: [],
         tablePage: {

+ 7 - 2
src/views/cw/reimbursementApproval/info/InfoList.vue

@@ -120,6 +120,10 @@
 					</el-option>
 				</el-select>
 			</el-form-item>
+			<el-form-item v-if="showHideItem" label="发票号" prop="financeNumber">
+				<el-input style="width: 150px" v-model="searchForm.financeNumber" placeholder="请输入发票号" clearable>
+				</el-input>
+			</el-form-item>
 
 			<el-form-item>
 				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
@@ -243,7 +247,7 @@
 								<el-button v-if="hasPermission('cw:user:payment') && scope.row.paymentStatus === '1'" text type="primary"  @click="rePayment(scope.row)">撤回付款</el-button>
 
 <!--								文件补充-->
-								<el-button v-if="hasPermission('file:supplement')&& (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
+								<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 								<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 								<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
 								<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
@@ -317,7 +321,8 @@
 					reportNumber: '',
 					sourceType: '',
 					no:'',
-					paymentStatus:''
+					paymentStatus:'',
+					financeNumber:''
 				},
 				dataList: [],
 				tablePage: {

+ 7 - 2
src/views/reimbursement/info/InfoList.vue

@@ -112,6 +112,10 @@
 				</el-option>
 			</el-select>
 		</el-form-item>
+		<el-form-item v-if="showHideItem" label="发票号" prop="financeNumber">
+			<el-input style="width: 150px" v-model="searchForm.financeNumber" placeholder="请输入发票号" clearable>
+			</el-input>
+		</el-form-item>
 
       <el-form-item>
         <el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
@@ -222,7 +226,7 @@
 				<el-button v-if="hasPermission('pg:user:payment') && scope.row.paymentStatus === '1'" text type="primary"  @click="rePayment(scope.row)">撤回付款</el-button>
 
 				<!--								文件补充-->
-				<el-button v-if="hasPermission('file:supplement')&& (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
+				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
@@ -292,7 +296,8 @@
           remiType: '',
           amounts: [],
           reportNumber: '',
-		  paymentStatus:''
+		  paymentStatus:'',
+			financeNumber:''
         },
         dataList: [],
         tablePage: {

+ 7 - 3
src/views/zs/reimbursement/info/InfoList.vue

@@ -121,7 +121,10 @@
       <!--<el-form-item v-if="showHideItem" label="报告号" prop="reportNumber">
         <el-input size="small" v-model="searchForm.reportNumber" placeholder="请输入报告号" clearable></el-input>
       </el-form-item>-->
-
+		<el-form-item v-if="showHideItem" label="发票号" prop="financeNumber">
+			<el-input style="width: 150px" v-model="searchForm.financeNumber" placeholder="请输入发票号" clearable>
+			</el-input>
+		</el-form-item>
       <el-form-item>
         <el-button @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
         <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
@@ -237,7 +240,7 @@
 				<el-button v-if="hasPermission('zs:user:payment') && scope.row.paymentStatus !== '1'" text type="primary"  @click="payment(scope.row)">付款</el-button>
 				<el-button v-if="hasPermission('zs:user:payment') && scope.row.paymentStatus === '1'" text type="primary"  @click="rePayment(scope.row)">撤回付款</el-button>
 				<!--								文件补充-->
-				<el-button v-if="hasPermission('file:supplement')&& (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
+				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
@@ -311,7 +314,8 @@
           reportNumber: '',
           sourceType: '',
 			no:'',
-			paymentStatus:''
+			paymentStatus:'',
+			financeNumber:''
         },
         dataList: [],
         tablePage: {