(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/edit"],{"0cf3":function(e,t,n){"use strict";(function(e){n("4481");i(n("66fd"));var t=i(n("9c85"));function i(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},3163:function(e,t,n){"use strict";n.r(t);var i=n("851d"),o=n.n(i);for(var u in i)"default"!==u&&function(e){n.d(t,e,(function(){return i[e]}))}(u);t["default"]=o.a},"851d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={name:"",data:function(){return{labelStyle:{fontWeight:"600"},form:{type:-1},sexLabel:"",sexShow:!1,sexList:[{value:"1",label:"男"},{value:"2",label:"女"}],typeLabel:"",typeShow:!1,typeList:[{value:"0",label:"业主"},{value:"1",label:"成员"},{value:"2",label:"租户"}]}},onLoad:function(e){this.fetchData(e.id)},methods:{fetchData:function(e){var t=this;this.$api.user.detail(e).then((function(e){t.form={id:e.id,name:e.name,residentialName:e.residentialName,residentialId:e.residentialId,buildingName:e.buildingName,buildingId:e.buildingId,unitName:e.unitName,unitId:e.unitId,roomName:e.roomName,roomId:e.roomId,type:e.type,tel:e.tel||"",sex:e.sex,idCard:e.idCard||"",birthPlace:e.birthPlace||"",file:e.file||"",remark:e.remark||""},t.sexList.forEach((function(n){n.value==e.sex&&(t.sexLabel=n.label)})),t.typeList.forEach((function(n){n.value==e.type&&(t.typeLabel=n.label)}))}))},sexConfirm:function(e){this.sexLabel=e[0].label,this.form.sex=e[0].value},typeConfirm:function(e){this.typeLabel=e[0].label,this.form.type=e[0].value},confirm:function(){var e=this;this.$isEmpty(this.form.name)?this.$showToast("请输入姓名","error"):this.$isEmpty(this.form.sex)?this.$showToast("请选择性别","error"):-1!=this.form.type?this.$isEmpty(this.form.tel)?this.$showToast("请填写手机号码","error"):this.$verify.phone(this.form.tel)?this.$isEmpty(this.form.idCard)||this.$verify.idCard(this.form.idCard)?(console.log(this.form),this.$api.user.update(this.form).then((function(t){1==t.data?e.$dialog.showModal("操作成功",!1).then((function(t){e.$navigateBack()})):e.$u.toast(t.msg)}))):this.$showToast("身份证号码不正确","error"):this.$showToast("手机格式不正确","error"):this.$showToast("请选择住户类型","error")}}};t.default=i},"9c85":function(e,t,n){"use strict";n.r(t);var i=n("af9c"),o=n("3163");for(var u in o)"default"!==u&&function(e){n.d(t,e,(function(){return o[e]}))}(u);var r,a=n("f0c5"),s=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"53787150",null,!1,i["a"],r);t["default"]=s.exports},af9c:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return i}));var i={uToast:function(){return n.e("node-modules/uview-ui/components/u-toast/u-toast").then(n.bind(null,"ea70"))},uForm:function(){return n.e("node-modules/uview-ui/components/u-form/u-form").then(n.bind(null,"459a"))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,"5690"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-input/u-input")]).then(n.bind(null,"1c95"))},uSelect:function(){return n.e("node-modules/uview-ui/components/u-select/u-select").then(n.bind(null,"6ee1"))}},o=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.sexShow=!0},e.e1=function(t){e.typeShow=!0})},u=[]}},[["0cf3","common/runtime","common/vendor"]]]);