(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/recommend/createin"],{"0247":function(e,n,t){"use strict";var o=t("3d92"),u=t.n(o);u.a},"3d92":function(e,n,t){},"3d94":function(e,n,t){"use strict";t.r(n);var o=t("beb5"),u=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=u.a},b7ed:function(e,n,t){"use strict";(function(e,n){var o=t("4ea4");t("2ab2");o(t("66fd"));var u=o(t("d88e"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(u.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},beb5:function(e,n,t){"use strict";(function(e,o){var u=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=u(t("448a")),a=t("66f6"),r={data:function(){return{form:{name:null,phone:null,sex:"male",remark:null,estate_id:"",estate_name:"",saler_id:null,saler_name:null},customer_id:null,submitButtonDisabled:!0,rules:{name:[{required:!0,message:"姓名不得为空",trigger:["change","blur"]}],phone:[{required:!0,message:"手机号不得为空",trigger:["change","blur"]},{len:11,message:"手机号格式不正确",trigger:["change","blur"]}],estate_name:[{required:!0,message:"意向项目不能为空",trigger:["change"]}]},propertySelectShow:!1,propertySelectList:[],estateList:[],areaTypeObj:{},userInfo2:{},curEstateName:"",salerSelectShow:!1,salerSelectList:[],submitModalShow:!1,modalShow:!1,modalContent:""}},onLoad:function(e){var n=this,t=n.getOpenerEventChannel();t.on&&t.on("data",(function(e){e.info.name&&(n.form.name=e.info.name),e.info.phone&&(n.form.phone=e.info.phone),e.info.sex&&(n.form.sex=e.info.sex),e.info.demand&&(n.form.remark=e.info.demand),e.info.estate_id&&(n.form.estate_id=e.info.estate_id),e.info.estate_name&&(n.form.estate_name=e.info.estate_name)}))},created:function(){var n=this;this.userInfo2=e.getStorageSync("MD_userInfo2");var t=e.getStorageSync("MD_dict");this.areaTypeObj=(0,a.arrToObj)(t.area_type),e.api.estate.apiestatelist({page_size:100,is_inner:1}).then((function(e){var t=e.list||[],o=[];n.estateList=(0,i.default)(t),t.forEach((function(e){o.push({value:e.estate_id,label:e.estate_name})})),n.propertySelectList=[].concat(o)}))},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{getEstateList:function(){var n=this;e.api.estate.apiestatelist({page_size:100,is_inner:1,estate_name:this.curEstateName}).then((function(e){var t=e.list||[];n.estateList=(0,i.default)(t)}))},listItemHandle:function(e){this.form.estate_id=e.estate_id,this.form.estate_name=e.estate_name},propertySelectConfirm:function(e){var n=this;e.map((function(e,t){n.form.estate_id=e.value,n.form.estate_name=e.label}))},submitHandle:function(){var n=this,t=this;this.$refs.uForm.validate((function(o){o?e.api.estate.apireportadd({is_inner:1,phone_type:1,name:t.form.name,phone:t.form.phone.replace(/\s+/g,""),sex:t.form.sex,remark:t.form.remark,estate_id:t.form.estate_id,estate_name:t.form.estate_name}).then((function(t){e.$msgConfirm("报备成功,是否前往报备列表?",(function(){e.navigateTo({url:"/pages/agent/recommend/list"})}),(function(){n.form={name:null,phone:null,sex:"male",remark:null,estate_id:null,estate_name:null}}))})):console.log("验证失败")}))},getPhoneNumber:function(e){var n=this;if("getPhoneNumber:fail user deny"==e.detail.errMsg)return n.$refs.uToast.show({title:"您可以在个人设置中再次绑定",type:"warning"}),void setTimeout((function(){n.reLunchUser()}),1500);console.log(e.detail.errMsg),console.log(e.detail.iv),console.log(e.detail.encryptedData);var t=e.detail.iv,u=e.detail.encryptedData;o.login({success:function(e){e.code?n.setUserPhoneNumber(u,t,e.code):(this.$refs.uToast.show({title:e.errMsg,type:"warning"}),console.log("登录失败!"+e.errMsg))}})},hideKeyboard:function(){e.hideKeyboard()},getFormatDate:function(e){if(void 0==e||""==e)return"";var n=e;return parseInt(e)<10&&(n="0"+e),n}}};n.default=r}).call(this,t("543d")["default"],t("bc2e")["default"])},d88e:function(e,n,t){"use strict";t.r(n);var o=t("e8fb"),u=t("3d94");for(var i in u)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(i);t("0247");var a=t("f0c5"),r=Object(a["a"])(u["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=r.exports},e8fb:function(e,n,t){"use strict";t.d(n,"b",(function(){return u})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return o}));var o={uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"e893"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"a81d"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(t.bind(null,"830c"))},uRadioGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-radio-group/u-radio-group")]).then(t.bind(null,"f0c0"))},uRadio:function(){return t.e("uni_modules/vk-uview-ui/components/u-radio/u-radio").then(t.bind(null,"79d4"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"9db7"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"51b1b"))},uSelect:function(){return t.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(t.bind(null,"17bf"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"85bf"))},uToast:function(){return t.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(t.bind(null,"9568"))},uPopup:function(){return t.e("uni_modules/vk-uview-ui/components/u-popup/u-popup").then(t.bind(null,"7401"))},uTag:function(){return t.e("uni_modules/vk-uview-ui/components/u-tag/u-tag").then(t.bind(null,"e7ff"))}},u=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.propertySelectShow=!0},e.e1=function(n){e.propertySelectShow=!1},e.e2=function(n){e.propertySelectShow=!1})},i=[]}},[["b7ed","common/runtime","common/vendor"]]]);