Просмотр исходного кода

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

unknown 5 лет назад
Родитель
Сommit
eb3a20c1d3

+ 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"){