estate.js 8.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/recommend/estate"],{5047:function(e,t,n){"use strict";(function(e,r){var u=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n("448a")),a=u(n("9523")),i=u(n("ceee"));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s,f={components:{wmWatermark:function(){n.e("components/wm-watermark/wm-watermark").then(function(){return resolve(n("66e2"))}.bind(null,n)).catch(n.oe)}},data:function(){return{searchKeyword:null,searchPopupShow:!1,searchFormData:{name:"",phone:""},menuTop:110,filterData:[{name:"日期范围",type:"hierarchy",submenu:[{name:"全部",value:0},{name:"24小时内",value:24},{name:"7天内",value:168},{name:"30天内",value:720}]},{name:"管理楼盘",type:"hierarchy",submenu:[{name:"全部",value:999}]},{name:"客户状态",type:"hierarchy",submenu:[{name:"全部状态",value:999},{name:"有效",value:1},{name:"审核中",value:2},{name:"无效",value:3}]},{name:"客户进度",type:"hierarchy",submenu:[{name:"全部进度",value:999},{name:"未到访",value:1},{name:"已到访",value:2},{name:"已认购",value:3},{name:"已签约",value:4},{name:"已结佣",value:5}]},{name:"排序",type:"hierarchy",submenu:[{name:"时间近到远",value:1},{name:"时间远到近",value:2}]}],filterHours:0,filterPropertyId:999,filterVerifyStatus:999,filterStepStatus:999,orderMethod:0,filterDropdownValue:{},customerList:[],stepList:["审核中","未到访","已到访","已认购","已签约","已结佣"],loadmore:{status:"loadmore",loadingText:"努力加载中",defaultText:"轻轻上拉 查看更多",nomoreText:"实在没有了",currnetPage:1},curRoles:"",userInfo2:{},curTotal:0}},onLoad:function(t){s=this;var n=e.getSystemInfoSync(),u=Number(n.statusBarHeight),o=e.getMenuButtonBoundingClientRect(),a=(o.height,o.top,u+o.height+2*(o.top-u)),i=parseInt(750*a/n.windowWidth);i=10*Math.ceil(i/10),s.menuTop=i,void 0!==t.filterStepStatus&&(s.filterStepStatus=parseInt(t.filterStepStatus),this.filterDropdownValue=[[],[],[],[s.filterStepStatus],[]]),this.getDataList(),this.userInfo2=r.getStorageSync("MD_userInfo2"),this.curRoles=r.getStorageSync("MD_userInfo2")?r.getStorageSync("MD_userInfo2").roles:"";var c=this.userInfo2.estate_govern||[];c.length>0&&(s.filterData[1]["submenu"]=c.map((function(e,t){return{name:e.estate_name,value:e.estate_id}})))},onReachBottom:function(){"nomore"!=s.loadmore.status&&(s.loadmore.currnetPage++,this.getDataList())},onPullDownRefresh:function(){},methods:{dial:function(e){r.makePhoneCall({phoneNumber:e})},listItemHandle:function(e){2==e.report_state?r.$msgConfirm("当前客户报备审核中,是否前往审核?",(function(){r.navigateTo({url:"/pages/agent/recommend/check?id=".concat(e.id,"&name=").concat(e.name,"-").concat(e.phone,"&eid=").concat(e.estate_id)})})):r.navigateTo({url:"/pages/agent/recommend/detailGovern?id="+e.id})},copyTextHandle:function(e){(0,i.default)({content:"项目:".concat(e.estate_name,"\n客户姓氏:").concat(e.name).concat("male"==e.sex?"先生":"女士","\n客户联系方式:").concat(e.phone,"\n经纪人姓氏:").concat(e.create_user.nickname,"\n经纪人联系方式:").concat(e.create_user.phone,"\n预计到访时间:尽快"),success:function(e){r.showToast({title:e,icon:"none"})},error:function(e){r.showToast({title:e,icon:"none",duration:3e3})}})},getDataList:function(e){var t=this,n=this,u=l({},this.searchFormData);if(n.filterHours>0){var a=+new Date;u.start_at=parseInt((a-36e5*n.filterHours)/1e3),u.end_at=parseInt(a/1e3)}n.filterVerifyStatus<999&&(u.report_state=n.filterVerifyStatus),n.filterStepStatus<999&&(u.report_step=n.filterStepStatus),n.filterPropertyId<999&&(u.estate_id=n.filterPropertyId),n.orderMethod>0&&(1===n.orderMethod&&(u.order_by=JSON.stringify([{field:"create_at",sort:"desc"}])),2===n.orderMethod&&(u.order_by=JSON.stringify([{field:"create_at",sort:"asc"}]))),r.api.estate.apigovernlist(l({page:n.loadmore.currnetPage},u)).then((function(u){t.curTotal=u.total||0;var a=u.list||[];a.length<10&&(n.loadmore.status="nomore"),1===u.current_page?(0===a.length&&r.$msg("无搜索结果","none"),n.customerList=(0,o.default)(a)):n.customerList=n.customerList.concat(a),e&&e()}))},customBack:function(){r.reLaunch({url:"/pages/index/index"})},pageTo:function(e,t){r.navigateTo({url:e,events:{update:function(e){}},success:function(e){e.eventChannel.emit("data",t)}})},searchHandle:function(){var e=this;this.loadmore.currnetPage=1,this.getDataList((function(){e.searchPopupShow=!1}))},confirmFilter:function(e){null!==e["value"][0][0]&&(s.filterHours=e["value"][0][0]),null!==e["value"][1][0]&&(s.filterPropertyId=e["value"][1][0]),null!==e["value"][2][0]&&(s.filterVerifyStatus=e["value"][2][0]),null!==e["value"][3][0]&&(s.filterStepStatus=e["value"][3][0]),null!==e["value"][4][0]&&(s.orderMethod=e["value"][4][0]),s.loadmore.currnetPage=1,this.getDataList()},getTime:function(e){var t=e?new Date(e):new Date,n=t.getFullYear(),r=t.getMonth()+1;r=r>9?r:"0"+r;var u=t.getDate();u=u>9?u:"0"+u;var o=t.getHours();o=o>9?o:"0"+o;var a=t.getMinutes();a=a>9?a:"0"+a;var i=t.getSeconds();return i=i>9?i:"0"+i,"".concat(n,"-").concat(r,"-").concat(u," ").concat(o,":").concat(a,":").concat(i)}}};t.default=f}).call(this,n("bc2e")["default"],n("543d")["default"])},"59ad":function(e,t,n){},"8bfb":function(e,t,n){"use strict";n.r(t);var r=n("b260"),u=n("e340");for(var o in u)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(o);n("c3e9");var a=n("f0c5"),i=Object(a["a"])(u["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=i.exports},b260:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return r}));var r={wmWatermark:function(){return n.e("components/wm-watermark/wm-watermark").then(n.bind(null,"66e2"))},uNavbar:function(){return n.e("uni_modules/vk-uview-ui/components/u-navbar/u-navbar").then(n.bind(null,"d79d"))},HMFilterDropdown:function(){return n.e("uni_modules/HM-filterDropdown/components/HM-filterDropdown/HM-filterDropdown").then(n.bind(null,"f7cc"))},uEmpty:function(){return n.e("uni_modules/vk-uview-ui/components/u-empty/u-empty").then(n.bind(null,"e69b"))},uIcon:function(){return n.e("uni_modules/vk-uview-ui/components/u-icon/u-icon").then(n.bind(null,"7fce"))},uTag:function(){return n.e("uni_modules/vk-uview-ui/components/u-tag/u-tag").then(n.bind(null,"ab84"))},uPopup:function(){return n.e("uni_modules/vk-uview-ui/components/u-popup/u-popup").then(n.bind(null,"22ad"))},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,"f017"))},uDivider:function(){return n.e("uni_modules/vk-uview-ui/components/u-divider/u-divider").then(n.bind(null,"e7dc"))},uButton:function(){return n.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(n.bind(null,"479c"))},uLoadmore:function(){return n.e("uni_modules/vk-uview-ui/components/u-loadmore/u-loadmore").then(n.bind(null,"0807"))}},u=function(){var e=this,t=e.$createElement,n=(e._self._c,e.customerList.length),r=e.__map(e.customerList,(function(t,n){var r=e.__get_orig(t),u=1==t.report_state?Number(t.report_step):null;return{$orig:r,m0:u}})),u=e.customerList.length;e._isMounted||(e.e0=function(t){e.searchPopupShow=!0},e.e1=function(t){e.searchPopupShow=!1}),e.$mp.data=Object.assign({},{$root:{g0:n,l0:r,g1:u}})},o=[]},b3ef:function(e,t,n){"use strict";(function(e,t){var r=n("4ea4");n("b159");r(n("66fd"));var u=r(n("8bfb"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(u.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},c3e9:function(e,t,n){"use strict";var r=n("59ad"),u=n.n(r);u.a},e340:function(e,t,n){"use strict";n.r(t);var r=n("5047"),u=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);t["default"]=u.a}},[["b3ef","common/runtime","common/vendor"]]]);