wuxw
2019-07-18 a54a28a5a26e86d6b32990bfbb174c350b917b47
WebService/src/main/resources/components/edit-staff/editStaff.js
@@ -32,68 +32,68 @@
                vc.component.editStaffInfo.address = _staffInfo.address;
            },
            editStaffValidate(){
                            return vc.validate.validate({
                                editStaffInfo:vc.component.editStaffInfo
                            },{
                                'editStaffInfo.username':[
                                    {
                                        limit:"required",
                                        param:"",
                                        errInfo:"用户名不能为空"
                                    },
                                    {
                                        limit:"maxin",
                                        param:"2,10",
                                        errInfo:"用户名长度必须在2位至10位"
                                    },
                                ],
                                'editStaffInfo.email':[
                                    {
                                        limit:"required",
                                        param:"",
                                        errInfo:"密码不能为空"
                                    },
                                    {
                                        limit:"email",
                                        param:"",
                                        errInfo:"不是有效的邮箱"
                                    },
                                ],
                                'editStaffInfo.tel':[
                                    {
                                        limit:"required",
                                        param:"",
                                        errInfo:"手机号不能为空"
                                    },
                                    {
                                        limit:"phone",
                                        param:"",
                                        errInfo:"不是有效的手机号"
                                    }
                                ],
                                'editStaffInfo.sex':[
                                    {
                                        limit:"required",
                                        param:"",
                                        errInfo:"性别不能为空"
                                    }
                                ],
                                'editStaffInfo.address':[
                                    {
                                        limit:"required",
                                        param:"",
                                        errInfo:"地址不能为空"
                                    },
                                    {
                                        limit:"maxLength",
                                        param:"200",
                                        errInfo:"地址长度不能超过200位"
                                    },
                                ]
                            });
                return vc.validate.validate({
                    editStaffInfo:vc.component.editStaffInfo
                },{
                    'editStaffInfo.username':[
                        {
                            limit:"required",
                            param:"",
                            errInfo:"用户名不能为空"
                        },
            editStaffInfo:function(){
                        {
                            limit:"maxin",
                            param:"2,10",
                            errInfo:"用户名长度必须在2位至10位"
                        },
                    ],
                    'editStaffInfo.email':[
                        {
                            limit:"required",
                            param:"",
                            errInfo:"密码不能为空"
                        },
                        {
                            limit:"email",
                            param:"",
                            errInfo:"不是有效的邮箱"
                        },
                    ],
                    'editStaffInfo.tel':[
                        {
                            limit:"required",
                            param:"",
                            errInfo:"手机号不能为空"
                        },
                        {
                            limit:"phone",
                            param:"",
                            errInfo:"不是有效的手机号"
                        }
                    ],
                    'editStaffInfo.sex':[
                        {
                            limit:"required",
                            param:"",
                            errInfo:"性别不能为空"
                        }
                    ],
                    'editStaffInfo.address':[
                        {
                            limit:"required",
                            param:"",
                            errInfo:"地址不能为空"
                        },
                        {
                            limit:"maxLength",
                            param:"200",
                            errInfo:"地址长度不能超过200位"
                        },
                    ]
                });
            },
            editStaffSubmit:function(){
                 if(!vc.component.editStaffValidate()){
                    vc.component.editStaffInfo.errorInfo = vc.validate.errInfo;
                    return ;