wuxw
2019-09-01 b6324e71edfc0d5c061ee5017a5c8eb2065e6b6b
java110-code-generator/src/main/resources/web/add/add.js
@@ -1,8 +1,13 @@
(function(vc){
    vc.extends({
        propTypes: {
               callBackListener:vc.propTypes.string, //父组件名称
               callBackFunction:vc.propTypes.string //父组件监听方法
        },
        data:{
            add@@TemplateCode@@Info:{
                @@templateKey@@:'',
                @@templateCodeColumns@@
            }
        },
@@ -19,18 +24,9 @@
                return vc.validate.validate({
                    add@@TemplateCode@@Info:vc.component.add@@TemplateCode@@Info
                },{
                    'add@@TemplateCode@@Info.name':[
                        {
                            limit:"required",
                            param:"",
                            errInfo:"楼名称不能为空"
                        },
                        {
                            limit:"maxin",
                            param:"2,10",
                            errInfo:"楼名称长度必须在2位至10位"
                        },
                    ]
                    @@addTemplateCodeValidate@@
                });
            },
@@ -42,6 +38,12 @@
                }
                vc.component.add@@TemplateCode@@Info.communityId = vc.getCurrentCommunity().communityId;
                //不提交数据将数据 回调给侦听处理
                if(vc.notNull($props.callBackListener)){
                    vc.emit($props.callBackListener,$props.callBackFunction,vc.component.add@@TemplateCode@@Info);
                    $('#add@@TemplateCode@@Model').modal('hide');
                    return ;
                }
                vc.http.post(
                    'add@@TemplateCode@@',