1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/recommend/create"],{"32ab":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));var o={uForm:function(){return n.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(n.bind(null,"e893"))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,"a81d"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(n.bind(null,"830c"))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/vk-uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"f0c0"))},uRadio:function(){return n.e("uni_modules/vk-uview-ui/components/u-radio/u-radio").then(n.bind(null,"79d4"))},uGap:function(){return n.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(n.bind(null,"9db7"))},uButton:function(){return n.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(n.bind(null,"51b1b"))},uSelect:function(){return n.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(n.bind(null,"17bf"))},uModal:function(){return n.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(n.bind(null,"85bf"))},uToast:function(){return n.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(n.bind(null,"9568"))},uPopup:function(){return n.e("uni_modules/vk-uview-ui/components/u-popup/u-popup").then(n.bind(null,"7401"))},uTag:function(){return n.e("uni_modules/vk-uview-ui/components/u-tag/u-tag").then(n.bind(null,"e7ff"))}},r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.__map(e.estateList,(function(t,n){var o=e.__get_orig(t),r=e.eIds.indexOf(t.id);return{$orig:o,g0:r}})));e._isMounted||(e.e0=function(t){e.propertySelectShow=!0}),e.$mp.data=Object.assign({},{$root:{l0:n}})},i=[]},"49c2":function(e,t,n){"use strict";n.r(t);var o=n("afc4"),r=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=r.a},"68db":function(e,t,n){"use strict";n.r(t);var o=n("32ab"),r=n("49c2");for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("c4cf");var u=n("f0c5"),a=Object(u["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=a.exports},"753a":function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("2ab2");o(n("66fd"));var r=o(n("68db"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},afc4:function(e,t,n){"use strict";(function(e,o){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("9523")),u=r(n("448a")),a=n("66f6");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={data:function(){return{form:{name:null,phone:null,sex:"male",remark:null,phone_type:"1",saler_id:null,saler_name:null},eIds:[],eArr:[],phoneBefore3:"",phoneAfter4:"",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 t=this,n=t.getOpenerEventChannel();n.on&&n.on("data",(function(e){e.info&&e.info.estate_id&&e.info.estate_name&&(t.form.estate_name=e.info.estate_name,t.eIds=[e.info.estate_id],t.eArr=[{estate_id:e.info.estate_id,estate_name:e.info.estate_name}]),e.info&&e.info.name&&(t.form.name=e.info.name,t.form.phone=e.info.phone,t.form.sex=e.info.sex,t.form.remark=e.info.demand)}))},created:function(){var t=this;this.userInfo2=e.getStorageSync("MD_userInfo2");var n=e.getStorageSync("MD_dict");this.areaTypeObj=(0,a.arrToObj)(n.area_type),e.api.estate.apiestatelist({page_size:100,report_open:1,is_pub:1}).then((function(e){var n=e.list||[];t.estateList=(0,u.default)(n)}))},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{phoneHandle:function(){var e=this.form.phone;e=e.replace(/ /g,""),this.form.phone=e,this.form=l({},this.form)},getEstateList:function(){var t=this;e.api.estate.apiestatelist({page_size:100,report_open:1,is_pub:1,estate_name:this.curEstateName}).then((function(e){var n=e.list||[];t.estateList=(0,u.default)(n)}))},listItemHandle:function(e){var t=(0,u.default)(this.eIds),n=(0,u.default)(this.eArr),o=t.indexOf(e.estate_id);o>-1?(t.splice(o,1),n.splice(o,1)):(t.push(e.estate_id),n.push(e)),this.eIds=(0,u.default)(t),this.eArr=(0,u.default)(n)},clearListHandle:function(){this.propertySelectShow=!1,this.eIds=[],this.eArr=[],this.form.estate_name=""},saveListHandle:function(){var t="",n=this.eArr.map((function(e){return"2"==e.phone_type&&(t=e.estate_name),e.estate_name}));this.form.estate_name=n.join(","),1===this.eArr.length&&"2"==this.eArr[0].phone_type?this.form.phone_type="2":this.form.phone_type="1",t&&this.eArr.length>1?e.$msg("".concat(t,"是前三后四报备项目,请单独报备")):this.propertySelectShow=!1},submitHandle:function(){var t=this,n=this;this.$refs.uForm.validate((function(o){if(o){var r={phone_type:n.form.phone_type||"1",name:n.form.name,phone:n.form.phone.replace(/\s+/g,""),sex:n.form.sex,remark:n.form.remark};if("2"==r.phone_type){if(!n.phoneBefore3||!n.phoneAfter4)return void n.$refs.uToast.show({title:"请输入报备手机号的前三后四",type:"warning"});r.phone="".concat(n.phoneBefore3,"****").concat(n.phoneAfter4)}t.eArr.forEach((function(n,o){var i=l({},r);i.estate_id=n.estate_id,i.estate_name=n.estate_name,e.api.estate.apireportadd(i).then((function(n){o===t.eArr.length-1&&e.$msgConfirm("报备成功,是否前往报备列表?",(function(){e.navigateTo({url:"/pages/agent/recommend/list"})}),(function(){t.form={name:null,phone:null,sex:"male",remark:null}}))}))}))}else console.log("验证失败")}))},getPhoneNumber:function(e){var t=this;if("getPhoneNumber:fail user deny"==e.detail.errMsg)return t.$refs.uToast.show({title:"您可以在个人设置中再次绑定",type:"warning"}),void setTimeout((function(){t.reLunchUser()}),1500);console.log(e.detail.errMsg),console.log(e.detail.iv),console.log(e.detail.encryptedData);var n=e.detail.iv,r=e.detail.encryptedData;o.login({success:function(e){e.code?t.setUserPhoneNumber(r,n,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 t=e;return parseInt(e)<10&&(t="0"+e),t}}};t.default=c}).call(this,n("543d")["default"],n("bc2e")["default"])},c4cf:function(e,t,n){"use strict";var o=n("f208"),r=n.n(o);r.a},f208:function(e,t,n){}},[["753a","common/runtime","common/vendor"]]]);
|