Jelajahi Sumber

信息上报
Signed-off-by: lijunqing <lijunqing@dashoo.cn>

lijunqing 6 tahun lalu
induk
melakukan
347baf874f

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/selectbusiness/selectservice.go

@@ -76,7 +76,7 @@ func (s *SelectService) GetUp( supplierCertTableName string, pageIndex, itemsPer
 
 
 	var sql string
-	sql = `  select (select FullName from Base_Organize where Id = a.CommitComId) FullName,a.CommitComId,a.SupplierTypeName,`
+	sql = `  select (select FullName from Base_Organize where Id = a.CommitComId) FullName,max(a.CommitComId) CommitComId,a.SupplierTypeName,`
 	sql +=`  count(a.Status=6 or null ) HeGe,count(a.Status=-5 or null ) BuHeGe,count(a.Status=-5 or null ) + count(a.Status=6 or null ) ZongShu `
 	sql += ` from ` + supplierCertTableName + ` a `
 	sql += ` where a.CommitComId is not null and  a.CommitComId!="" and  a.CommitComId!=0 ` + where

+ 13 - 11
src/dashoo.cn/frontend_web/src/pages/select/informationreporting/index.vue

@@ -112,18 +112,20 @@ export default {
 
   methods: {
     getSpanArr(data) {
-      for (var i = 0; i < data.length; i++) {
-        if (i === 0) {
-          this.spanArr.push(1);
-          this.pos = 0;
-        } else {
-          // 判断当前元素与上一个元素是否相同
-          if (data[i].FullName === data[i - 1].FullName) {
-            this.spanArr[this.pos] += 1;
-            this.spanArr.push(0);
-          } else {
+      if(data!=null&&data!=""){
+        for (var i = 0; i < data.length; i++) {
+          if (i === 0) {
             this.spanArr.push(1);
-            this.pos = i;
+            this.pos = 0;
+          } else {
+            // 判断当前元素与上一个元素是否相同
+            if (data[i].FullName === data[i - 1].FullName) {
+              this.spanArr[this.pos] += 1;
+              this.spanArr.push(0);
+            } else {
+              this.spanArr.push(1);
+              this.pos = i;
+            }
           }
         }
       }