webpackJsonp([41],{XrLh:function(e,t){},pNkh:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("aA9S"),o=r.n(a),i=r("4YfN"),l=r.n(i),m=r("AKaA"),n=r("NTL1"),s=r("SJI6"),d=r("8V46"),c={name:"baseinfoDialog",props:{dialogVisible:{type:Boolean,default:!1},baseInfo:{type:Object,default:function(){return{}}},nationCodeList:{type:Array,default:function(){return[]}}},data:function(){return{form:{memberId:"",memberName:"",memberGender:null,memberBirthday:"",birthType:1,remark:"",phoneNumber:"",nationCode:""},rules:{remark:[{required:!0,message:"请输入原因备注",trigger:"blur"}]},btnLoading:!1}},computed:l()({},Object(s.mapState)(["showEditClique"])),methods:{cancel:function(){this.$refs.form.resetFields(),this.$emit("update:dialogVisible",!1)},submit:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;e.btnLoading=!0,Object(m.a)(n.a.updateBaseDetail,o()({},e.form)).then(function(t){0===t.data.errorCode?setTimeout(function(){e.btnLoading=!1,Object(d.c)(),e.$refs.form.resetFields(),e.$emit("update:dialogVisible",!1),e.$emit("refresh")},4500):(Object(d.a)(),e.btnLoading=!1)}).catch(function(t){e.btnLoading=!1,Object(d.b)(t)})})}},watch:{dialogVisible:function(e,t){if(e){var r=this.baseInfo,a=r.memberId,i=r.memberName,l=r.memberGender,m=r.memberBirthday,n=r.birthType,s=r.remark,d=r.phoneNumber,c=r.nationCode;this.form=o()({},this.form,{memberId:a,memberName:i,memberGender:l,memberBirthday:m,birthType:n,remark:s,phoneNumber:d,nationCode:c}),this.$refs.form.clearValidate()}}}},b={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-dialog",{attrs:{title:"编辑基本信息","custom-class":"customer-dailog",visible:e.dialogVisible,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.cancel}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"133px"}},[r("el-form-item",{attrs:{label:"姓名：",prop:"memberName"}},[r("el-input",{staticStyle:{width:"252px"},attrs:{type:"text",maxlength:"10","show-word-limit":"",placeholder:"请输姓名"},model:{value:e.form.memberName,callback:function(t){e.$set(e.form,"memberName",t)},expression:"form.memberName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"性别：",prop:"memberGender"}},[r("el-select",{staticStyle:{width:"252px"},attrs:{placeholder:"请选择"},model:{value:e.form.memberGender,callback:function(t){e.$set(e.form,"memberGender",t)},expression:"form.memberGender"}},[r("el-option",{attrs:{label:"男",value:1}}),e._v(" "),r("el-option",{attrs:{label:"女",value:2}})],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"出生日期：",prop:"memberBirthday"}},[r("el-select",{staticStyle:{width:"106px","margin-right":"6px"},attrs:{placeholder:"请选择"},model:{value:e.form.birthType,callback:function(t){e.$set(e.form,"birthType",t)},expression:"form.birthType"}},[r("el-option",{attrs:{label:"阳历",value:1}}),e._v(" "),r("el-option",{attrs:{label:"农历",value:0}})],1),e._v(" "),r("el-date-picker",{staticStyle:{width:"136px"},attrs:{clearable:!1,"value-format":"timestamp",type:"date",placeholder:"选择日期"},model:{value:e.form.memberBirthday,callback:function(t){e.$set(e.form,"memberBirthday",t)},expression:"form.memberBirthday"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"手机号码：",prop:"phoneNumber"}},[r("el-select",{staticStyle:{width:"75px","margin-right":"6px"},model:{value:e.form.nationCode,callback:function(t){e.$set(e.form,"nationCode",t)},expression:"form.nationCode"}},e._l(e.nationCodeList,function(e){return r("el-option",{key:e.dictCode,attrs:{value:e.dictCode,label:e.dictName}})}),1),e._v(" "),r("el-input",{staticStyle:{width:"301px"},model:{value:e.form.phoneNumber,callback:function(t){e.$set(e.form,"phoneNumber",t)},expression:"form.phoneNumber"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"原因备注：",prop:"remark"}},[r("el-input",{staticStyle:{width:"386px"},attrs:{type:"text",maxlength:"20","show-word-limit":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary",loading:e.btnLoading},on:{click:e.submit}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var f=r("C7Lr")(c,b,!1,function(e){r("XrLh")},null,null);t.default=f.exports}});