Explorar el Código

Merge branch 'fix/Process.number_execption_when_showcaculte' into 'develop'

Merge of fix/[流程表单]修复数字组件设置为显示时计算时没有显示为0的问题 to develop

See merge request o2oa/o2oa!178
蔡祥熠 hace 5 años
padre
commit
1291a29042
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      o2web/source/x_component_process_Xform/Number.js

+ 3 - 0
o2web/source/x_component_process_Xform/Number.js

@@ -181,6 +181,9 @@ MWF.xApplication.process.Xform.Number = MWF.APPNumber =  new Class({
             this.validationMode();
         }.bind(this));
     },
+    _computeValue: function(value){
+        return (this.json.defaultValue.code) ? this.form.Macro.exec(this.json.defaultValue.code, this): (value || "0");
+    },
     getValue: function(){
         var value = this._getBusinessData();
         if (!value) value = this._computeValue();