소스 검색

[流程表单]数据网格有合计的时候,忽略非数字进行合计,而不是显示NaN

unknown 5 년 전
부모
커밋
eb3a20c1d3
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      o2web/source/x_component_process_Xform/DatagridMobile.js
  2. 1 1
      o2web/source/x_component_process_Xform/DatagridPC.js

+ 1 - 1
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -973,7 +973,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class({
                     if (m.type=="number"){
                         var cell = cells[m.index];
                         var addv = cell.get("text").toFloat();
-                        tmpV = tmpV.plus(addv);
+                        tmpV = tmpV.plus(addv||0);
                         //tmpV = tmpV + addv;
                     }
                     if (m.type=="count"){

+ 1 - 1
o2web/source/x_component_process_Xform/DatagridPC.js

@@ -850,7 +850,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class({
                         if (m.type=="number"){
                             var cell = cells[m.index];
                             var addv = cell.get("text").toFloat();
-                            tmpV = tmpV.plus(addv);
+                            tmpV = tmpV.plus(addv||0);
                             //tmpV = tmpV + addv;
                         }
                         if (m.type=="count"){