Przeglądaj źródła

上传文件后缀名大小写问题调整

user5 9 miesięcy temu
rodzic
commit
e5ae087e0c

+ 1 - 0
src/api/sys/OSSService.js

@@ -259,6 +259,7 @@ export async function openWindowOnUrl (row) {
   await getTemporaryByUrl(row.url).then((data) => {
     rowUrl = data
   })
+	suffix = suffix.toLowerCase();
   if (suffix === 'pdf' || suffix === 'xml') {
     window.open('https://view.xdocin.com/xdoc?_xdoc=' + encodeURIComponent(rowUrl), '_blank')
   } else if (suffix === 'rar' || suffix === 'zip' || suffix === 'jar' || suffix === '7z') {

+ 8 - 4
src/views/common/InvoiceReimbursementUpLoadComponent.vue

@@ -307,7 +307,8 @@
 
 				const spliceLength2 = fileName.lastIndexOf(".");
 				var fileNameSuffix = fileName.slice(spliceLength2 + 1);
-				if(fileNameSuffix === "xml" ) {
+				let lowerFileNameSuffix = fileNameSuffix.toLowerCase();
+				if(lowerFileNameSuffix === "xml" ) {
 					//对上传的xml文件信息进行处理并通过后端接口进行解析返回到父页面进行调整
 					const formBody = new FormData()
 					formBody.append('file', file.raw)
@@ -483,7 +484,8 @@
 
 			  const spliceLength2 = fileName.lastIndexOf(".");
 			  var fileNameSuffix = fileName.slice(spliceLength2 + 1);
-			  if(fileNameSuffix === "xml" ) {
+			  let lowerFileNameSuffix = fileNameSuffix.toLowerCase();
+			  if(lowerFileNameSuffix === "xml" ) {
 				  //对上传的xml文件信息进行处理并通过后端接口进行解析返回到父页面进行调整
 				  const formBody = new FormData()
 				  if(null === row.raw || undefined === row.raw){
@@ -540,7 +542,8 @@
 
 			  const spliceLength2 = fileName.lastIndexOf(".");
 			  var fileNameSuffix = fileName.slice(spliceLength2 + 1);
-			  if(fileNameSuffix === "xml" ) {
+			  let lowerFileNameSuffix = fileNameSuffix.toLowerCase();
+			  if(lowerFileNameSuffix === "xml" ) {
 				  //对上传的xml文件信息进行处理并通过后端接口进行解析返回到父页面进行调整
 				  const formBody = new FormData()
 				  if(null === row.raw || undefined === row.raw){
@@ -604,7 +607,8 @@
 
 			  const spliceLength2 = fileName.lastIndexOf(".");
 			  var fileNameSuffix = fileName.slice(spliceLength2 + 1);
-			  if(fileNameSuffix === "xml" ) {
+			  let lowerFileNameSuffix = fileNameSuffix.toLowerCase();
+			  if(lowerFileNameSuffix === "xml" ) {
 				  //对上传的xml文件信息进行处理并通过后端接口进行解析返回到父页面进行调整
 				  const formBody = new FormData()
 				  if(null === row.raw || undefined === row.raw){

+ 2 - 0
src/views/zs/reimbursement/info/ReimbursementForm.vue

@@ -2076,6 +2076,7 @@
         this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
       },
 		invoiceReimbursementDisposeData: function (data,file) {
+			console.log(data)
 			var invoiceReimbursements = this.inputForm.invoiceReimbursements;
 			//创建判断值,若行信息存在相同的发票号,则进行数据检查调整,若不存在发票号,则新增行,并将信息写入
 			var includeFlag = false;
@@ -2084,6 +2085,7 @@
 			}
 			//将购买方的名称中括号全部转换成英文进行比较
 			var buyerInformationBuyerName = data.BuyerInformationBuyerName.replace(/(/g, '(').replace(/)/g, ')')
+			console.log(buyerInformationBuyerName)
 			if("中审众环会计师事务所(特殊普通合伙)江苏分所" !== buyerInformationBuyerName){
 				//删除上传的附件信息
 				this.$refs.invoiceReimbursementUpLoadComponent.parentDeleteById(file)