|
|
@@ -36,6 +36,18 @@ Ext.define('saas.util.FormUtil', {
|
|
|
});
|
|
|
Ext.Array.each(items, function(item) {
|
|
|
|
|
|
+ // 设置必填
|
|
|
+ if(item.allowBlank==false){
|
|
|
+ // TODO 需要判断类型
|
|
|
+ item.beforeLabelTextTpl = "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(item.xtype == 'textfield') {
|
|
|
+ Ext.applyIf(item, {
|
|
|
+ maxLength: 50
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
if(item.xtype == 'datefield') {
|
|
|
Ext.applyIf(item, {
|
|
|
format: 'Y-m-d'
|
|
|
@@ -51,12 +63,6 @@ Ext.define('saas.util.FormUtil', {
|
|
|
formModel.set(item.name, 0);
|
|
|
}
|
|
|
|
|
|
- // 设置必填
|
|
|
- if(item.allowBlank==false){
|
|
|
- // TODO 需要判断类型
|
|
|
- item.beforeLabelTextTpl = "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>";
|
|
|
- }
|
|
|
-
|
|
|
// 如果是从表为其绑定store
|
|
|
if(item.xtype == 'detailGridField') {
|
|
|
var index = form.detailCount;
|