(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_managedata/saleInfo"],{352:function(e,t,n){"use strict";(function(e,t){var s=n(4);n(26);s(n(25));var i=s(n(353));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},353:function(e,t,n){"use strict";n.r(t);var s=n(354),i=n(356);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n(358),n(360);var r,a=n(34),u=Object(a["default"])(i["default"],s["render"],s["staticRenderFns"],!1,null,"6fe9e57c",null,!1,s["components"],r);u.options.__file="pages_managedata/saleInfo.vue",t["default"]=u.exports},354:function(e,t,n){"use strict";n.r(t);var s=n(355);n.d(t,"render",(function(){return s["render"]})),n.d(t,"staticRenderFns",(function(){return s["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return s["recyclableRender"]})),n.d(t,"components",(function(){return s["components"]}))},355:function(e,t,n){"use strict";var s;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return r})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return s}));var i=function(){var e=this,t=e.$createElement,n=(e._self._c,!e.userinfo.createTime||e.userinfo.createTime.slice(0,10));e.$mp.data=Object.assign({},{$root:{g0:n}})},o=!1,r=[];i._withStripped=!0},356:function(e,t,n){"use strict";n.r(t);var s=n(357),i=n.n(s);for(var o in s)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(o);t["default"]=i.a},357:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=n(232),i={data:function(){return{avatar:this.$store.state.imgpath+"/app/images/default.png",nickName:"",deptName:"",postNames:"",phonenumber:"",email:"",sex:"",isShow:!1,userId:"",userinfo:[],shenhe:!1,jinyong:!1}},onLoad:function(e){this.utils.isEmpty(e.userId)||(this.userId=e.userId,this.isShow=!0)},onShow:function(){this.isShow?this.getUserInfoByUserId(this.userId):this.getUserInfo()},computed:{imgPath:function(){return this.$store.state.imgpath}},methods:{submitshen:function(){1!=this.userinfo.isAudit?this.subsalesaudits():e.showToast({title:"用户已经通过审核，无需多次审核",icon:"none"})},submitjin:function(){0!=this.userinfo.status?this.changesalesStates():e.showToast({title:"用户已经解除禁用，无需多次解除",icon:"none"})},subsalesaudits:function(){this.userId;(0,s.subsalesaudit)(this.userId).then((function(t){console.log(t),200==t.code?(e.showToast({title:"用户通过审核，成为销售！",icon:"none"}),e.navigateBack({delta:1})):e.showToast({title:t.msg,icon:"none"})}))},changesalesStates:function(){this.userId;(0,s.changesalesState)(this.userId).then((function(t){console.log(t),200==t.code?(e.showToast({title:"用户解除禁用！",icon:"none"}),e.navigateBack({delta:1})):e.showToast({title:t.msg,icon:"none"})}))},bindUser:function(t){var n=this;if(n.userinfo=t.user,console.log(n.userinfo),n.nickName=t.user.nickName,n.deptName=t.user.dept.deptName,n.posts=t.post,n.phonenumber=t.user.phonenumber,n.email=t.user.email,0==t.user.sex?n.sex="男":1==t.user.sex?n.sex="女":2==t.user.sex&&(n.sex="未知"),null!=t.post&&t.post.length>0){var s=[];t.post.forEach((function(e,t){s.push(e)}),this),n.postNames=s.toString()}n.utils.isEmpty(t.user.avatar)||(n.avatar=e.getStorageSync("requestPath")+t.user.avatar)},getUserInfoByUserId:function(e){var t={userId:e},n=this;(0,s.getUserInfoByUserId)(t).then((function(e){n.bindUser(e)}),(function(e){}))},getUserInfo:function(){var e={},t=this;(0,s.getUserInfo)(e).then((function(e){t.bindUser(e)}),(function(e){}))},callPhone:function(t){e.makePhoneCall({phoneNumber:t})},editInfo:function(){e.navigateTo({url:"../editUser"})}}};t.default=i}).call(this,n(2)["default"])},358:function(e,t,n){"use strict";n.r(t);var s=n(359),i=n.n(s);for(var o in s)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(o);t["default"]=i.a},359:function(e,t,n){},360:function(e,t,n){"use strict";n.r(t);var s=n(361),i=n.n(s);for(var o in s)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(o);t["default"]=i.a},361:function(e,t,n){}},[[352,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../.sourcemap/mp-weixin/pages_managedata/saleInfo.js.map