瀏覽代碼

bug处理

zhengkaixin 2 年之前
父節點
當前提交
9bfd76365c
共有 1 個文件被更改,包括 11 次插入10 次删除
  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("-",".");