(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["userSupplierRegister"],{"5d87":function(e,r,s){},aa0b:function(e,r,s){},b3a4:function(e,r,s){"use strict";s.r(r);var t=function(){var e=this,r=e.$createElement,s=e._self._c||r;return s("div",{staticClass:"login-content"},[s("div",{staticClass:"login-banner"}),s("div",{staticClass:"login-form"},[s("div",{staticClass:"company-name"},[e._v("注册")]),s("a-form-model",{ref:"registerForm",staticClass:"user-layout-login",attrs:{model:e.form,rules:e.rules}},[s("a-form-model-item",{attrs:{prop:"supplierFullName"}},[s("a-input",{attrs:{size:"large",placeholder:"请输入供应商全称"},model:{value:e.form.supplierFullName,callback:function(r){e.$set(e.form,"supplierFullName",r)},expression:"form.supplierFullName"}})],1),s("a-form-model-item",{attrs:{prop:"username"}},[s("a-input",{attrs:{size:"large",placeholder:"请输入帐户名"},model:{value:e.form.username,callback:function(r){e.$set(e.form,"username",r)},expression:"form.username"}},[s("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),s("a-form-model-item",{attrs:{prop:"password"}},[s("a-input",{attrs:{size:"large",type:"password",autocomplete:"false",placeholder:"请输入密码"},model:{value:e.form.password,callback:function(r){e.$set(e.form,"password",r)},expression:"form.password"}},[s("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),s("a-form-model-item",{attrs:{prop:"password2"}},[s("a-input",{attrs:{size:"large",type:"password",autocomplete:"false",placeholder:"确认密码"},model:{value:e.form.password2,callback:function(r){e.$set(e.form,"password2",r)},expression:"form.password2"}},[s("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),s("a-form-model-item",{attrs:{prop:"email"}},[s("a-input",{attrs:{size:"large",placeholder:"请输入邮箱"},model:{value:e.form.email,callback:function(r){e.$set(e.form,"email",r)},expression:"form.email"}})],1),s("a-form-model-item",{attrs:{prop:"phone"}},[s("a-input",{attrs:{size:"large",type:"text",placeholder:"请输入手机号码"},model:{value:e.form.phone,callback:function(r){e.$set(e.form,"phone",r)},expression:"form.phone"}})],1),s("a-form-model-item",{staticStyle:{"margin-top":"16px","margin-bottom":"16px"}},[s("a-button",{staticClass:"login-button",attrs:{size:"large",type:"primary","html-type":"submit"},on:{click:function(r){return r.stopPropagation(),r.preventDefault(),e.submitForm(r)}}},[e._v("\n          注册\n        ")])],1)],1)],1)])},a=[],o=s("0fea"),i=s("4ec3"),l={name:"SuplierRegister",data:function(){return{inviteCode:"",form:{supplierFullName:"",username:"",password:"",password2:"",email:"",phone:""},rules:{supplierFullName:[{required:!0,message:"供应商名称不能为空"}],username:[{required:!0,message:"用户名不能为空"},{validator:this.checkUsername,trigger:"blur"}],password:[{required:!0,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message:"密码由8位数字、大小写字母和特殊符号组成"}],password2:[{validator:this.handlePasswordCheck}],email:[{required:!0,message:"邮箱不能为空"}],phone:[{required:!0,pattern:/^1\d{10}$/,message:"请输入正确的手机号"}]}}},mounted:function(){this.queryParam=this.$route.query},methods:{checkUsername:function(e,r,s){var t={username:r};Object(i["l"])(t).then((function(e){e.success?s():s("用户名已存在!")}))},handlePasswordCheck:function(e,r,s){var t=this.form.password;void 0===r&&s(new Error("请输入密码")),r&&t&&r.trim()!==t.trim()&&s(new Error("两次密码不一致")),s()},submitForm:function(){var e=this,r=this;this.$refs.registerForm.validate((function(s){if(s){var t=Object.assign({},r.form,r.queryParam);Object(o["f"])("/supplier/supplierManage/register",t).then((function(r){r.success?(e.$notification.success({message:"提示",description:"注册成功"}),window.location.href="/"):e.$notification["error"]({message:"注册失败",description:r.message,duration:2})}))}}))}}},n=l,m=(s("ff75"),s("e88f"),s("0b56")),p=Object(m["a"])(n,t,a,!1,null,"689860d1",null);r["default"]=p.exports},e88f:function(e,r,s){"use strict";s("5d87")},ff75:function(e,r,s){"use strict";s("aa0b")}}]);