mrzcc
2020-02-17 e64d8b88b4c177360874f5d6ea46d67f8495cdfc
WebService/src/main/resources/components/orgPackage/add-org/addOrg.js
@@ -13,7 +13,6 @@
                parentOrgId: '',
                description: '',
                belongCommunityId: '',
                communityId: '',
                parentOrg:[],
                belongCommunitys:[]
@@ -31,8 +30,7 @@
        }
        ,
        _initMethod: function () {
            //查询入驻的小区
            vc.component._loadAddEnterCommunitys();
        }
        ,
        _initEvent: function () {
@@ -40,10 +38,12 @@
                if (_param.hasOwnProperty('parentOrgId')) {
                    vc.component.addOrgInfo.parentOrgId = _param.parentOrgId;
                    vc.component.addOrgInfo.orgLevel = _param.orgLevel;
                    if(_param.parentOrgId == 3){ // 部门是不能改小区的,是依赖分公司的小区信息
                        vc.component.addOrgInfo.communityId = _param.belongCommunityId;
                    if(_param.orgLevel == 3){ // 部门是不能改小区的,是依赖分公司的小区信息
                        vc.component.addOrgInfo.belongCommunityId = _param.belongCommunityId;
                    }
                }
                //查询入驻的小区
                vc.component._loadAddEnterCommunitys();
                $('#addOrgModel').modal('show');
            });
        }
@@ -89,18 +89,6 @@
                            errInfo: "上级ID不正确"
                        },
                    ],
                    'addOrgInfo.belongCommunityId': [
                        {
                            limit: "required",
                            param: "",
                            errInfo: "隶属小区不能为空"
                        },
                        {
                            limit: "num",
                            param: "",
                            errInfo: "隶属小区不正确"
                        },
                    ],
                    'addOrgInfo.description': [
                        {
@@ -115,9 +103,8 @@
            }
            ,
            saveOrgInfo: function () {
                vc.component.addOrgInfo.belongCommunityId = vc.component.addOrgInfo.communityId;
                if (!vc.component.addOrgValidate()) {
                    vc.message(vc.validate.errInfo);
                    vc.toast(vc.validate.errInfo);
                    return;
                }