Browse Source

bug处理

zhengkaixin 2 years ago
parent
commit
9bfd76365c
1 changed files with 11 additions and 10 deletions
  1. 11 10
      pagesFinance/statistics/index.vue

+ 11 - 10
pagesFinance/statistics/index.vue

@@ -842,26 +842,27 @@
  								if(this.headitemby==""){
 									this.headitemby=value
 								}
-								var i = 5
-								// if (this.type_head == 1) {
-								// 	i = 3;
-								// } else {
-								// 	i = 5;
-								// }
+								var i = 0
+								if (this.type_head == 1) {
+									i = 0;
+								} else {
+									i = 3;
+								}
 								var showvalue = "";
-								var key = value.substring(0,8);
+								var key = value.substring(0,8-i);
+								
 								if (showkey == ""||value==this.headitemby) {
 									showkey = key
 								
 									showvalue = value
-									showvalue = value.substring(5)
+									showvalue = value.substring(5-i)
 								} else {
 									if (key != showkey) {
 										showkey = key
 										showvalue = value
-										showvalue = value.substring(5)
+										showvalue = value.substring(5-i)
 									} else {
-										showvalue = value.substring(8)
+										showvalue = value.substring(8-i)
 									}
 								}
  								return showvalue.replace("-",".");