|
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine/reception/addreception"],{183:function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return a})),t.d(n,"a",(function(){return o}));try{o={uSelect:function(){return t.e("uview-ui/components/u-select/u-select").then(t.bind(null,582))},uModal:function(){return t.e("uview-ui/components/u-modal/u-modal").then(t.bind(null,587))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,n=e.$createElement;e._self._c},a=[];i._withStripped=!0},335:function(e,n,t){"use strict";(function(e){t(3);o(t(2));var n=o(t(336));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t(0)["createPage"])},336:function(e,n,t){"use strict";t.r(n);var o=t(183),i=t(70);for(var a in i)"default"!==a&&function(e){t.d(n,e,(function(){return i[e]}))}(a);t(337);var s,c=t(1),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"5767a4e1",null,!1,o["a"],s);r.options.__file="pages/mine/reception/addreception.vue",n["default"]=r.exports},337:function(e,n,t){"use strict";var o=t(72),i=t.n(o);i.a},70:function(e,n,t){"use strict";t.r(n);var o=t(71),i=t.n(o);for(var a in o)"default"!==a&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},71:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;getApp();var o=t(4),i={data:function(){return{Showhiddenunits:!1,list:[{label:"自然到访",value:"自然到访"},{label:"渠道推荐",value:"渠道推荐"}],parames:{name:"",sex:1,phone:"",source:null,sourceName:null,howMany:1,agentId:null,projectId:"",replaceReception:0},shifoinfo:0,freeList:[],Showhid:!1,text:null,show:!1,content:"东临碣石,以观沧海",confirmtext:"1",canceltext:"2",daitiReceptionobj:{}}},onShow:function(){this.parames.projectId=e.getStorageSync("buildingID").id,this.init(),this.getFreeList()},methods:{confirmA:function(){null!=this.daitiReceptionobj.assign?(this.parames.agentId=this.daitiReceptionobj.assign.accountId,this.baochunfun()):e.showToast({icon:"none",title:"【"+this.daitiReceptionobj.owner.name+"】正在接待中"})},confirmB:function(){this.parames.agentId=this.daitiReceptionobj.replacement.accountId,this.parames.replaceReception=1,this.baochunfun()},save:function(){if(0!=this.parames.name.length)if(console.log(this.parames.phone.length),this.parames.phone&&this.parames.phone.length<11)e.showToast({icon:"none",title:"手机号码不能小于11位"});else if(this.parames.phone&&this.parames.phone.length>11)e.showToast({icon:"none",title:"手机号码不能大于11位"});else{var n=this;this.$u.post("customer/daitiReception",{phone:n.parames.phone,projectId:n.parames.projectId,agentId:n.parames.agentId}).then((function(e){0==e.unchecked?n.baochunfun():0==e.zs?(n.parames.agentId=e.assign.accountId,n.baochunfun()):(console.log("zo"),null==e.assign&&null==e.replacement?n.baochunfun():null==e.assign?(n.daitiReceptionobj=e,n.content="此客户的顾问为【"+e.owner.name+"】,确认让【"+e.replacement.name+"】代接待吗?",n.confirmtext=e.replacement.name+"代接代",n.canceltext=e.owner.name+"接待",n.show=!0):(n.daitiReceptionobj=e,console.log(n.daitiReceptionobj),n.content="此客户的顾问为【"+e.owner.name+"】,确认让【"+e.replacement.name+"】代接待吗?",n.confirmtext=e.replacement.name+"代接代",n.canceltext=e.assign.name+"接待",n.show=!0))}))}else e.showToast({icon:"none",title:"客户姓名不能为空"})},baochunfun:function(){var n=e.getStorageSync("weapp_session_userInfo_data"),t=n.dataCode;0==this.parames.phone.length&&(this.parames.phone=null),e.showLoading({title:"保存中",mask:!0}),6==t?this.$u.post("/customer/gwAdd",this.parames).then((function(n){e.hideLoading(),e.showToast({icon:"none",title:"保存成功"}),e.navigateBack()})):this.$u.post("/customer/add",this.parames).then((function(n){e.hideLoading(),e.showToast({icon:"none",title:"保存成功"}),e.navigateBack()}))},changeSex:function(e){this.parames.sex=e},changeHowMany:function(e){this.parames.howMany=e},clickShowhid:function(){0==this.freeList.length?e.showToast({icon:"none",title:"当前无可用排班顾问",duration:2e3}):this.Showhid=!0},cancel1:function(){this.Showhid=!1},confirm1:function(e){this.text=e[0].label,this.parames.agentId=e[0].value,this.Showhid=!1},Buildingselection:function(){this.Showhiddenunits=!0},cancel:function(){this.Showhiddenunits=!1},confirm:function(e){this.parames.sourceName=e[0].value,this.Showhiddenunits=!1},init:function(){var n=this;e.request({url:o.service.getSelfAssignedByHouseId+"?houseId="+this.parames.projectId,method:"GET",header:{"content-type":"application/json",Authorization:"Bearer "+e.getStorageSync("weapp_session_login_data").token},success:function(e){1e4==e.data.code&&(n.shifoinfo=e.data.data.selfAssigned)}})},getFreeList:function(){var e=this;this.$u.get("/zkAgentPool/freeList?itemId="+this.parames.projectId).then((function(n){e.freeList=n,e.freeList.forEach((function(e){0==e.onLine?e.label=e.name+"(离线)":1==e.onLine?e.label=e.name+"(在线)":e.label=e.name+"(无设备)",e.value=e.agentId}))}))}}};n.default=i}).call(this,t(0)["default"])},72:function(e,n,t){}},[[335,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/reception/addreception.js.map
|