list.js 10 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/recommend/list"],{"6f7b":function(e,t,n){"use strict";n.r(t);var r=n("f13e"),o=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a},a384:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var r={wmWatermark:function(){return n.e("components/wm-watermark/wm-watermark").then(n.bind(null,"1800"))},uNavbar:function(){return n.e("uni_modules/vk-uview-ui/components/u-navbar/u-navbar").then(n.bind(null,"a639"))},HMFilterDropdown:function(){return n.e("uni_modules/HM-filterDropdown/components/HM-filterDropdown/HM-filterDropdown").then(n.bind(null,"2a63"))},uEmpty:function(){return n.e("uni_modules/vk-uview-ui/components/u-empty/u-empty").then(n.bind(null,"2654"))},uIcon:function(){return n.e("uni_modules/vk-uview-ui/components/u-icon/u-icon").then(n.bind(null,"ba35"))},uTag:function(){return n.e("uni_modules/vk-uview-ui/components/u-tag/u-tag").then(n.bind(null,"8002"))},uPopup:function(){return n.e("uni_modules/vk-uview-ui/components/u-popup/u-popup").then(n.bind(null,"c565"))},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,"6943"))},uDivider:function(){return n.e("uni_modules/vk-uview-ui/components/u-divider/u-divider").then(n.bind(null,"d07e"))},uButton:function(){return n.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(n.bind(null,"ce9e"))},uLoadmore:function(){return n.e("uni_modules/vk-uview-ui/components/u-loadmore/u-loadmore").then(n.bind(null,"3582"))}},o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.__map(e.customerList,(function(t,n){var r=e.__get_orig(t),o=1==t.report_state?Number(t.report_step):null;return{$orig:r,m0:o}})));e._isMounted||(e.e0=function(t){e.searchPopupShow=!0},e.e1=function(t){e.searchPopupShow=!1}),e.$mp.data=Object.assign({},{$root:{l0:n}})},a=[]},c50e:function(e,t,n){},d225:function(e,t,n){"use strict";var r=n("c50e"),o=n.n(r);o.a},d637:function(e,t,n){"use strict";n.r(t);var r=n("a384"),o=n("6f7b");for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n("d225");var u,i=n("f0c5"),c=Object(i["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],u);t["default"]=c.exports},e016:function(e,t,n){"use strict";(function(e){n("3690");r(n("66fd"));var t=r(n("d637"));function r(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},f13e:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("89b9"));function o(e){return e&&e.__esModule?e:{default:e}}function a(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return f(e)||m(e)||s(e)||l()}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function m(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function f(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d,h=function(){n.e("components/wm-watermark/wm-watermark").then(function(){return resolve(n("1800"))}.bind(null,n)).catch(n.oe)},v={components:{wmWatermark:h},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:"3天内",value:72},{name:"7天内",value:168},{name:"半个月内",value:360},{name:"一个月内",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){var n=this;d=this;var r=wx.getSystemInfoSync(),o=Number(r.statusBarHeight),a=wx.getMenuButtonBoundingClientRect(),u=(a.height,a.top,o+a.height+2*(a.top-o)),i=parseInt(750*u/r.windowWidth);i=10*Math.ceil(i/10),d.menuTop=i,void 0!==t.filterStepStatus&&(d.filterStepStatus=parseInt(t.filterStepStatus),this.filterDropdownValue=[[],[],[],[d.filterStepStatus],[]]),e.api.estate.apiestatelist({page_size:100}).then((function(e){var t=e.list||[];t.length>0&&(d.filterData[1]["submenu"]=t.map((function(e,t){return{name:e.estate_name,value:e.estate_id}})),d.filterData[1]["submenu"].unshift({value:999,name:"全部"}))})),e.api.estate.apireportgroupcount({page_size:100}).then((function(e){var t=e.report_state_count||[],r=e.report_step_count||[],o=c(n.filterData);t.forEach((function(e,n){1==e.report_state&&(o[2].submenu[1].name="有效(".concat(t[n].total,")")),2==e.report_state&&(o[2].submenu[2].name="审核中(".concat(t[n].total,")")),3==e.report_state&&(o[2].submenu[3].name="无效(".concat(t[n].total,")"))})),r.forEach((function(e,t){1==e.report_step&&(o[3].submenu[1].name="未到访(".concat(r[t].total,")")),2==e.report_step&&(o[3].submenu[2].name="已到访(".concat(r[t].total,")")),3==e.report_step&&(o[3].submenu[3].name="已认购(".concat(r[t].total,")")),4==e.report_step&&(o[3].submenu[4].name="已签约(".concat(r[t].total,")")),5==e.report_step&&(o[3].submenu[5].name="已结佣(".concat(r[t].total,")"))})),n.filterData=c(o)})),this.getDataList(),this.userInfo2=e.getStorageSync("MD_userInfo2"),this.curRoles=e.getStorageSync("MD_userInfo2")?e.getStorageSync("MD_userInfo2").roles:""},onReachBottom:function(){"nomore"!=d.loadmore.status&&(d.loadmore.currnetPage++,this.getDataList())},onPullDownRefresh:function(){},methods:{dial:function(t){e.makePhoneCall({phoneNumber:t})},listItemHandle:function(t){2==t.report_state?1==this.curRoles||5==this.curRoles||7==this.curRoles?e.$msgConfirm("当前客户报备审核中,是否前往审核?",(function(){e.navigateTo({url:"/pages/agent/recommend/check?id=".concat(t.id,"&name=").concat(t.name,"-").concat(t.phone)})})):e.$msgConfirm("当前客户报备审核中~"):e.navigateTo({url:"/pages/agent/recommend/detail?id="+t.id})},copyTextHandle:function(t){(0,r.default)({content:"项目:".concat(t.estate_name,"\n客户姓氏:").concat(t.name).concat("male"==t.sex?"先生":"女士","\n客户联系方式:").concat(t.phone,"\n经纪人姓氏:").concat(t.create_user.nickname,"\n经纪人联系方式:").concat(t.create_user.phone,"\n预计到访时间:尽快"),success:function(t){e.showToast({title:t,icon:"none"})},error:function(t){e.showToast({title:t,icon:"none",duration:3e3})}})},getDataList:function(t){var n=this,r=this,o=u({},this.searchFormData);if(r.filterHours>0){var a=+new Date;o.start_at=parseInt((a-36e5*r.filterHours)/1e3),o.end_at=parseInt(a/1e3)}r.filterVerifyStatus<999&&(o.report_state=r.filterVerifyStatus),r.filterStepStatus<999&&(o.report_step=r.filterStepStatus),r.filterPropertyId<999&&(o.estate_id=r.filterPropertyId),r.orderMethod>0&&(1===r.orderMethod&&(o.order_by=JSON.stringify([{field:"create_at",sort:"desc"}])),2===r.orderMethod&&(o.order_by=JSON.stringify([{field:"create_at",sort:"asc"}]))),e.api.estate.apireportlist(u({page:r.loadmore.currnetPage},o)).then((function(o){n.curTotal=o.total||0;var a=o.list||[];a.length<10&&(r.loadmore.status="nomore"),1===o.current_page?(0===a.length&&e.$msg("无搜索结果","none"),r.customerList=c(a)):r.customerList=r.customerList.concat(a),t&&t()}))},customBack:function(){e.reLaunch({url:"/pages/index/index"})},pageTo:function(t,n){e.navigateTo({url:t,events:{update:function(e){}},success:function(e){e.eventChannel.emit("data",n)}})},searchHandle:function(){var e=this;this.loadmore.currnetPage=1,this.getDataList((function(){e.searchPopupShow=!1}))},confirmFilter:function(e){null!==e["value"][0][0]&&(d.filterHours=e["value"][0][0]),null!==e["value"][1][0]&&(d.filterPropertyId=e["value"][1][0]),null!==e["value"][2][0]&&(d.filterVerifyStatus=e["value"][2][0]),null!==e["value"][3][0]&&(d.filterStepStatus=e["value"][3][0]),null!==e["value"][4][0]&&(d.orderMethod=e["value"][4][0]),d.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 o=t.getDate();o=o>9?o:"0"+o;var a=t.getHours();a=a>9?a:"0"+a;var u=t.getMinutes();u=u>9?u:"0"+u;var i=t.getSeconds();return i=i>9?i:"0"+i,"".concat(n,"-").concat(r,"-").concat(o," ").concat(a,":").concat(u,":").concat(i)}}};t.default=v}).call(this,n("543d")["default"])}},[["e016","common/runtime","common/vendor"]]]);