Paul 2 лет назад
Родитель
Сommit
a1b29aa3e2
2 измененных файлов с 47 добавлено и 46 удалено
  1. 3 2
      New Text Document.html
  2. 44 44
      js/check.xlsx.full.js

+ 3 - 2
New Text Document.html

@@ -268,12 +268,13 @@ var files = event.target.files;
                             return;
                           };
                           //checkBalanceFile(workbook,logID,strStartDate,strEndDate,userID)
-                          checkSalaryFile(workbook,"message","202204","汤孝俊");
+                          checkSalaryFile(workbook,"message","202205","林玲");
                          // if (document.getElementById('TextBox3').innerHTML == ""&&document.getElementById('FileUpload1').value != "") {                           
                          //     document.getElementById('Button1').disabled =false;
                               //alert("pass!")                             
                         //  }
-                       alert(makeSalaryJSONstring(workbook));
+                       //alert(makeSalaryJSONstring(workbook));
+                       console.log(makeSalaryJSONstring(workbook));
                       });
          });//id=my6
 

+ 44 - 44
js/check.xlsx.full.js

@@ -503,7 +503,7 @@ function makeJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -519,16 +519,16 @@ function makeJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -710,7 +710,7 @@ function makeIncomeJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -726,16 +726,16 @@ function makeIncomeJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -863,7 +863,7 @@ function makeBalanceJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -879,16 +879,16 @@ function makeBalanceJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -996,7 +996,7 @@ function makeInvoiceJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1012,16 +1012,16 @@ function makeInvoiceJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1112,7 +1112,7 @@ function makeInvoiceSplitJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1128,16 +1128,16 @@ function makeInvoiceSplitJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1241,7 +1241,7 @@ function makeSalaryJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1257,16 +1257,16 @@ function makeSalaryJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1372,7 +1372,7 @@ function makeCashInJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1388,16 +1388,16 @@ function makeCashInJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1503,7 +1503,7 @@ function makeCashOutJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1519,16 +1519,16 @@ function makeCashOutJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1620,7 +1620,7 @@ function makeB14CJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1636,16 +1636,16 @@ function makeB14CJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1737,7 +1737,7 @@ function makeB15CJSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1753,16 +1753,16 @@ function makeB15CJSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet
 	
@@ -1857,7 +1857,7 @@ function makeB16toB19JSONstring(workbook){
 			   if (R===2) {
 				   strB +="[";
 			   }else{
-				   strB +="|[";
+				   strB +="[";
 			   };
 			   for (var C = 2; C <= arrayFunNames[i].length+1; ++C) {//loop col	
 	
@@ -1873,16 +1873,16 @@ function makeB16toB19JSONstring(workbook){
 						};
 					 } else {
 						if (arrayFunNames[i][C-2]==="日期") {
-							strB += formatExcelDate(worksheet[cell_ref].v,"-") + ",";		 
+							strB += formatExcelDate(worksheet[cell_ref].v,"-") + "";		 
 						}else{
-							strB += worksheet[cell_ref].v + ","; 
+							strB += worksheet[cell_ref].v + ""; 
 						};
 					 };
 	
 			   };//loop col				
 			 strB +="]";		
 		   };//loop row					 
-		   strB +="]\",";
+		   strB +="]\"";
 	   };// 只检查有数据行的sheet
 	};//loop sheet