1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-372d5bce","chunk-6f53f1d6"],{"3f33":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),[a("el-tabs",{on:{"tab-click":e.handleTagToggle},model:{value:e.listQuery.cert,callback:function(t){e.$set(e.listQuery,"cert",t)},expression:"listQuery.cert"}},[a("el-tab-pane",{attrs:{label:"全部",name:"all"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"未认证",name:"0"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"分享人待审核",name:"1"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"上级批发商待审核",name:"2"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"等待用户确认",name:"3"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"分享人驳回",name:"4"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"上级批发商驳回",name:"5"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"批发商驳回",name:"7"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"已授权",name:"6"}})],1)],e._v(" "),a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item filter-input",attrs:{placeholder:"昵称/身份证号/手机号/姓名",clearable:""},on:{clear:function(t){e.listQuery.page_index=1,e.getList()}},nativeOn:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.listQuery.page_index=1,e.getList()}},model:{value:e.listQuery.search_name,callback:function(t){e.$set(e.listQuery,"search_name",t)},expression:"listQuery.search_name"}}),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){e.listQuery.page_index=1,e.getList()}}},[e._v("\n 搜索\n ")])],1),e._v(" "),a("el-table",{staticClass:"tableBorder",attrs:{data:e.table,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"nickname",align:"center",label:"昵称"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.getOtherInfo(n.id)}}},[e._v(e._s(n.nickname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"realname",align:"center",label:"真实姓名",width:"130"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mobile",align:"center",label:"手机号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"level",align:"center",label:"客户类别",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.levelStatus(n.level).color}},[e._v("\n "+e._s(e.levelStatus(n.level).name)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"recom",label:"分享人",align:"center",width:"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",{staticClass:"buttonText",on:{click:function(t){return e.getOtherInfo(n.recom.id)}}},[e._v(e._s(n.recom&&n.recom.nickname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"agent",label:"上级批发商",align:"center",width:"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",{staticClass:"buttonText",on:{click:function(t){return e.getOtherInfo(n.agent.id)}}},[e._v(e._s(n.agent&&n.agent.nickname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"agent",label:"批发商",align:"center",width:"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",{staticClass:"buttonText",on:{click:function(t){return e.getOtherInfo(n.crown.id)}}},[e._v(e._s(n.crown&&n.crown.nickname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",align:"center",label:"申请时间",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{prop:"status",align:"center",label:"认证状态",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("\n "+e._s("7"===e.listQuery.cert?"批发商驳回":e.certStatus(a))+"\n ")]}}])}),e._v(" "),"4"===e.listQuery.cert?a("el-table-column",{attrs:{prop:"usercert",align:"center",label:"驳回原因"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("\n "+e._s(a.usercert&&a.usercert.recom_audit_desc?a.usercert.recom_audit_desc:"未填写驳回原因")+"\n ")]}}],null,!1,2355430816)}):e._e(),e._v(" "),"5"===e.listQuery.cert?a("el-table-column",{attrs:{prop:"usercert",align:"center",label:"驳回原因"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("\n "+e._s(a.usercert&&a.usercert.agent_audit_desc?a.usercert.agent_audit_desc:"未填写驳回原因")+"\n ")]}}],null,!1,2116006400)}):e._e(),e._v(" "),"all"===e.listQuery.cert||"1"===e.listQuery.cert||"2"===e.listQuery.cert||"4"===e.listQuery.cert||"5"===e.listQuery.cert||"7"===e.listQuery.cert?a("el-table-column",{attrs:{label:"操作",align:"center",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return["all"===e.listQuery.cert&&4!==n.cert_status||"1"===e.listQuery.cert||"2"===e.listQuery.cert?a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:0,expression:"0"}],attrs:{"roles-permit":e.roles,type:"text",disabled:1!==n.cert_status},on:{click:function(t){return e.handleToExamine(n,1)}}},[e._v("\n 分享人审核\n ")]):e._e(),e._v(" "),"4"===e.listQuery.cert||4===n.cert_status&&"all"===e.listQuery.cert?a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:2,expression:"2"}],staticStyle:{"margin-left":"0"},attrs:{"roles-permit":e.roles,type:"text"},on:{click:function(t){return e.handleToExamine(n,3)}}},[e._v("\n 再次审核\n ")]):e._e(),e._v(" "),"all"===e.listQuery.cert&&5!==n.cert_status||"1"===e.listQuery.cert||"2"===e.listQuery.cert?a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:1,expression:"1"}],staticStyle:{"margin-left":"0"},attrs:{"roles-permit":e.roles,type:"text",disabled:2!==n.cert_status},on:{click:function(t){return e.handleToExamine(n,2)}}},[e._v("\n 上级批发商审核\n ")]):e._e(),e._v(" "),"5"===e.listQuery.cert||5===n.cert_status&&"all"===e.listQuery.cert?a("el-button",{directives:[{name:"permit",rawName:"v-permit",value:3,expression:"3"}],staticStyle:{"margin-left":"0"},attrs:{"roles-permit":e.roles,type:"text"},on:{click:function(t){return e.handleToExamine(n,4)}}},[e._v("\n 再次审核\n ")]):e._e(),e._v(" "),"7"===e.listQuery.cert?a("el-button",{staticStyle:{"margin-left":"0"},attrs:{type:"text"},on:{click:function(t){return e.undo(n)}}},[e._v("\n 撤销驳回\n ")]):e._e()]}}],null,!1,80956171)}):e._e()],1),e._v(" "),a("pagination",{attrs:{total:e.tableTotal,limit:e.listQuery.page_size,page:e.listQuery.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}}),e._v(" "),a("el-dialog",{attrs:{title:e.setVisibleExamineType(),visible:e.visible.examine,"close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.visible,"examine",t)}}},[a("el-form",{ref:"authForm",attrs:{model:e.authForm,rules:e.authRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"类别认证:",prop:"status"}},[a("el-radio-group",{model:{value:e.authForm.status,callback:function(t){e.$set(e.authForm,"status",t)},expression:"authForm.status"}},[a("el-radio",{attrs:{label:1}},[e._v("通过")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("驳回")])],1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1===e.authForm.status&&(1===e.visible.type||3===e.visible.type),expression:"authForm.status === 1 && (visible.type === 1 || visible.type === 3)"}],attrs:{label:"确认类别:",prop:"level"}},[a("el-radio-group",{model:{value:e.authForm.level,callback:function(t){e.$set(e.authForm,"level",t)},expression:"authForm.level"}},[a("el-radio",{attrs:{label:3}},[e._v("批发商")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("经销商")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("销售员")])],1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2===e.authForm.status,expression:"authForm.status === 2"}],attrs:{label:"备注:",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:"认证备注"},model:{value:e.authForm.remark,callback:function(t){e.$set(e.authForm,"remark",t)},expression:"authForm.remark"}}),e._v(" "),a("i",{staticClass:"el-icon-warning"},[e._v("驳回时备注必填")])],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{size:"mini"},on:{click:e.handleDiaAuthClose}},[e._v("\n 取消\n ")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleSubmitAuth}},[e._v("\n 确认\n ")])],1)],1)],1),e._v(" "),a("el-drawer",{attrs:{title:e.memberInfo.realname+" - "+e.levelStatus(e.memberInfo.level).name,visible:e.visible.memberInfo,direction:"rtl",size:e.isH?"80%":"600px"},on:{"update:visible":function(t){return e.$set(e.visible,"memberInfo",t)}}},[a("MemberInfo",{attrs:{info:e.memberInfo,"team-type":!1},on:{getOtherInfo:e.getOtherInfo}})],1)],2)},r=[],i=a("c7eb"),l=(a("96cf"),a("1da1")),s=(a("7f7f"),a("b775"));function o(e){return Object(s["a"])({url:"/user/getnocertuserlist",method:"get",params:e})}function c(e){return Object(s["a"])({url:"/user/certuserstatus",method:"post",data:e})}function u(e){return Object(s["a"])({url:"/user/againcertrecomstatus",method:"post",data:e})}function m(e){return Object(s["a"])({url:"/user/againcertagentstatus",method:"post",data:e})}function f(e){return Object(s["a"])({url:"/user/restoreCompanyRejected ",method:"post",data:e})}var d=a("8e44"),v=a("44f1"),h=a("f72b"),p=a("ed08"),b={components:{MemberInfo:h["default"]},data:function(){var e=this,t=function(t,a,n){2===e.authForm.status&&""===a?n(new Error("驳回时请填写驳回原因")):n()},a=function(t,a,n){1===e.authForm.status&&""===a?n(new Error("请确认客户类别")):n()},n=this.$route.meta.buttonAuthList?this.$route.meta.buttonAuthList:[];return{roles:n,listQuery:{cert:"all",search_name:"",page_index:1,page_size:20},isH:!1,table:[],tableTotal:0,authForm:{level:"",status:"",remark:"",type:"",id:""},authRules:{level:[{validator:a,trigger:"blur"}],status:[{required:!0,message:"请确认认证状态",trigger:"change"}],remark:[{validator:t,trigger:"blur"}]},visible:{examine:!1,type:1,memberInfo:!1},memberInfo:{},loadingFull:!1}},watch:{"listQuery.cert":function(){this.listQuery.page_index=1}},created:function(){Object(p["e"])()||(this.isH=!0),this.getList()},methods:{handleTagToggle:function(e){this.listQuery.cert=e.name,this.getList()},getList:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){var t,a,n,r,l,s;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,e.prev=1,e.next=4,o(this.listQuery);case 4:t=e.sent,a=t.message,n=t.code,200===n?(r=t.data,l=r.list,s=r.total,this.tableTotal=s,this.table=l):this.$message.error(a),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](1),console.log("获取客户授权失败:".concat(e.t0));case 12:this.loadingFull=!1;case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}(),changePagination:function(e){var t=e.page,a=e.limit;this.listQuery.page_size=a,this.listQuery.page_index=t,this.getList()},certStatus:function(e){var t=e.cert_status;return Object(v["a"])(t)},handleDiaAuthClose:function(){this.$refs.authForm.resetFields(),this.visible.examine=!1},handleToExamine:function(e,t){var a=e.id,n=e.level;this.authForm.level=n,this.authForm.type=t,this.authForm.id=a,this.visible.type=t,this.visible.examine=!0},handleSubmitAuth:function(){var e=this;this.$refs.authForm.validate((function(t){if(!t)return!1;var a=e.authForm,n=a.level,r=a.status,i=a.type,l=a.id,s=a.remark;3===e.visible.type?e.recomAgainExamine({id:l,type:r,level:n,desc:"1"===String(r)?"":s}):4===e.visible.type?e.agentAgainExamine({id:l,type:r,desc:"1"===String(r)?"":s}):1===r?e.setExamine({level:n,status:r,remark:"",type:i,id:l}):e.setExamine(e.authForm)}))},setExamine:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var a,n,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c(t);case 2:a=e.sent;try{n=a.message,r=a.code,200===r?(this.$message.success(n),this.handleDiaAuthClose(),this.authForm={level:"",status:"",remark:"",type:"",id:""},this.getList()):this.$message.error(n)}catch(i){console.log("客户审核失败:".concat(i))}case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),levelStatus:function(e){return Object(v["c"])(e)},handleSeeMemberInfo:function(e){this.memberInfo=e,this.visible.memberInfo=!0},getOtherInfo:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var a,n,r,l;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(111,t),t){e.next=4;break}return this.$message.error("获取用户id失败"),e.abrupt("return",!1);case 4:return this.loadingFull=!0,e.prev=5,e.next=8,Object(d["i"])({id:t});case 8:a=e.sent,n=a.code,r=a.message,200===n?(l=a.data,this.handleSeeMemberInfo(l)):this.$message.error(r),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](5),console.log("获取分享人或上级批发商信息失败:".concat(e.t0));case 16:this.loadingFull=!1;case 17:case"end":return e.stop()}}),e,this,[[5,13]])})));function t(t){return e.apply(this,arguments)}return t}(),recomAgainExamine:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var a,n,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(t);case 3:a=e.sent,n=a.code,r=a.message,200===n?(this.$message.success(r),this.handleDiaAuthClose(),this.getList()):this.$message.error(r),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log("分享人再次审核失败: ".concat(e.t0));case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}(),agentAgainExamine:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var a,n,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,m(t);case 3:a=e.sent,n=a.code,r=a.message,200===n?(this.$message.success(r),this.handleDiaAuthClose(),this.getList()):this.$message.error(r),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log("上级批发商再次审核失败: ".concat(e.t0));case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}(),undo:function(e){var t=this;this.$confirm("确定要撤销驳回?","撤销提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){t.restoreCompanyRejected(e.id)}))},restoreCompanyRejected:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var a,n,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f({id:t});case 3:a=e.sent,n=a.code,r=a.message,200===n?(this.$message.success(r),this.getList()):this.$message.error(r),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log("批发商撤销驳回失败: ".concat(e.t0));case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(t){return e.apply(this,arguments)}return t}(),setVisibleExamineType:function(){var e,t=this.visible.type;switch(t){case 1:case"1":e="分享人审核";break;case 2:case"2":e="上级批发商审核";break;case 3:case"3":e="分享人再次审核";break;case 4:case"4":e="上级批发商再次审核";break;case 7:case"7":e="批发商撤销审核";break}return e}}},_=b,g=a("2877"),y=Object(g["a"])(_,n,r,!1,null,null,null);t["default"]=y.exports},"44f1":function(e,t,a){"use strict";a.d(t,"d",(function(){return n})),a.d(t,"e",(function(){return r})),a.d(t,"f",(function(){return i})),a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return s})),a.d(t,"b",(function(){return o})),a.d(t,"h",(function(){return c})),a.d(t,"g",(function(){return u}));a("c5f6"),a("a481"),a("ac6a");function n(e){switch(+e){case-2:return{name:"已取消",color:"#F56C6C"};case-1:return{name:"待收款确认",color:"#4da5a5"};case 0:return{name:"待订单审核",color:"#f97547"};case 1:return{name:"待财务审核",color:"#13c19f"};case 2:return{name:"待发货审核",color:"#ffaa1d"};case 3:return{name:"待收货",color:"#409EFF"};case 4:return{name:"已完成",color:"#74a2e6"};case 5:return{name:"已驳回(客服)",color:"#67C23A"};case 6:return{name:"已驳回(财务)",color:"#67C23A"};case 7:return{name:"已驳回(物流)",color:"#67C23A"};default:return{name:"未知订单状态",color:"#909399"}}}function r(e){switch(+e){case-1:return{name:"已删除",color:"#4da5a5"};case 0:return{name:"订单未审核",color:"#f97547"};case 1:return{name:"财务未审核",color:"#13c19f"};case 2:return{name:"未发货审核",color:"#ffaa1d"};case 3:return{name:"待收货",color:"#409EFF"};case 4:return{name:"已完成",color:"#74a2e6"}}}function i(e){switch(+e){case 0:return{name:"未付款",color:"#f96b6b"};case 1:return{name:"部分付款",color:"#f96b6b"};case 2:return{name:"已付款",color:"#415161"};case 3:return{name:"待退款",color:"#f96b6b"};default:return{name:"未知支付状态",color:"#909399"}}}function l(e){var t;switch(e){case 0:t="销售未实名认证";break;case 1:t="等待分享人审核";break;case 2:t="等待上级批发商审核";break;case 3:t="等待用户确认";break;case 4:t="分享人审核驳回";break;case 5:t="上级批发商审核驳回";break;case 6:t="授权成功";break;default:t=e}return t}function s(e){if(!e&&0!==e)return{name:"类别待定",color:"#909399"};var t;switch(e){case 3:t={name:"批发商",color:"#f0a637"};break;case 2:t={name:"经销商",color:"#67c23a"};break;case 1:t={name:"销售员",color:"#1fd3c2"};break;default:t={name:"公司",color:"#409eff"}}return t}function o(e,t){if(!e)return 0;var a=t?e:parseFloat(e);return String(a).replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g,"$1,")}function c(e){if("0"===e)return 0;var t=Number(100*e).toFixed()+"%";return t}function u(e){switch(+e){case 0:return{name:"未审核",color:"#f96b6b"};case 1:return{name:"已通过",color:"#13c19f"};case 2:return{name:"已驳回",color:"#f30"};default:return{name:"已删除",color:"#999"}}}},"8e44":function(e,t,a){"use strict";a.d(t,"i",(function(){return r})),a.d(t,"b",(function(){return i})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return s})),a.d(t,"h",(function(){return o})),a.d(t,"g",(function(){return c})),a.d(t,"f",(function(){return u})),a.d(t,"a",(function(){return m})),a.d(t,"e",(function(){return f}));var n=a("b775");function r(e){return Object(n["a"])({url:"/user/getuserdetails",method:"get",params:e})}function i(e){return Object(n["a"])({url:"/user/GetCrownInfo",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/user/GetNextInfo",method:"get",params:e})}function s(e){return Object(n["a"])({url:"/user/GetLastInfo",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/user/SearchUser",method:"get",params:e})}function c(e){return Object(n["a"])({url:"/user/SearchTeamUser",method:"get",params:e})}function u(e){return Object(n["a"])({url:"/GetUserInfos",method:"get",params:e})}function m(e){return Object(n["a"])({url:"/user/GetCreNum",method:"get",params:e})}function f(e){return Object(n["a"])({url:"/user/GetNowHistory",method:"get",params:e})}},f72b:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{padding:"0 20px"}},[a("el-tabs",{on:{"tab-click":e.handleToggle},model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("el-tab-pane",{attrs:{label:"基本信息",name:"1"}},[a("p",[e._v("客户信息:")]),e._v(" "),a("el-form",{attrs:{"label-width":"120px"}},[a("div",{staticStyle:{display:"flex"}},[a("div",[e.isH?e._e():a("div",[a("el-image",{staticStyle:{"margin-left":"46px",width:"100px",height:"100px"},attrs:{src:e.info.headimgurl,"preview-src-list":[e.info.headimgurl],"z-index":2300}})],1),e._v(" "),a("el-form-item",{attrs:{label:"客户昵称:"}},[e._v(e._s(e.info.nickname))]),e._v(" "),a("el-form-item",{attrs:{label:"真实姓名:"}},[e._v(e._s(e.info.realname))]),e._v(" "),a("el-form-item",{attrs:{label:"身份证号:"}},[e._v("\n "+e._s(e.info.cre_num?e.info.cre_num:"暂无")+"\n "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.info.warea&&e.info.warea.id&&e.info.cre_num,expression:"info.warea && info.warea.id && info.cre_num"}],attrs:{type:"text",size:"mini",plain:""},on:{click:function(t){return e.getCrnum(e.info.id)}}},[e._v("查看")])],1),e._v(" "),a("el-form-item",{attrs:{label:"联系电话:"}},[e._v(e._s(e.info.mobile))]),e._v(" "),a("el-form-item",{attrs:{label:"客户类别:"}},[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.levelStatus(e.info.level).color}},[e._v("\n "+e._s(e.levelStatus(e.info.level).name)+"\n ")])],1),e._v(" "),a("el-form-item",{attrs:{label:"授权码:"}},[e._v(e._s(e.info.auth_code?e.info.auth_code:"暂无"))]),e._v(" "),a("el-form-item",{attrs:{label:"认证状态:"}},[e._v(e._s(e.certStatus(e.info.cert_status)))]),e._v(" "),a("el-form-item",{attrs:{label:"账户状态:"}},[a("el-tag",{attrs:{type:1===e.info.delete?"danger":0===e.info.status?"success":"warning",size:"mini"}},[e._v("\n "+e._s(1===e.info.delete?"已删除":0===e.info.status?"正常":"已禁用")+"\n ")])],1),e._v(" "),a("el-form-item",{attrs:{label:"注册时间:"}},[e._v(e._s(e.info.created_at))]),e._v(" "),e.info.deleted_at?a("el-form-item",{attrs:{label:"删除时间:"}},[e._v(e._s(e.info.deleted_at))]):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"授权开始时间:"}},[e._v(e._s(e.info.auth_startime?e.info.auth_startime:"暂无"))]),e._v(" "),a("el-form-item",{attrs:{label:"授权结束时间:"}},[e._v(e._s(e.info.auth_endtime?e.info.auth_endtime:"暂无"))]),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2===e.info.level,expression:"info.level === 2"}],attrs:{label:"类别变更时间:"}},[e._v("\n "+e._s(e.info.change_info&&e.info.change_info.created_at+"("+e.info.change_info.remark+")")+"\n ")])],1),e._v(" "),e.isH?a("div",[a("el-image",{staticStyle:{"margin-left":"46px",width:"150px",height:"150px"},attrs:{src:e.info.headimgurl,"preview-src-list":[e.info.headimgurl],"z-index":2300}})],1):e._e()])]),e._v(" "),e.info.recom?a("div",[a("p",[e._v("分享人信息:")]),e._v(" "),a("el-form",{attrs:{"label-width":"120px"}},[a("el-form-item",{attrs:{label:"昵称:"}},[e.info.recom?a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.showLink(e.info.recom.id)}}},[e._v(e._s(e.info.recom.nickname))]):e._e()],1),e._v(" "),a("el-form-item",{attrs:{label:"联系方式:"}},[e._v("\n "+e._s(e.info.recom.mobile?e.info.recom.mobile:"暂无分享人联系方式")+"\n ")])],1),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.echart,expression:"!echart"}],staticStyle:{"margin-left":"40px"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.showYaoqing(e.info)}}},[e._v("查看邀请关系图")]),e._v(" "),e.echart?a("div",{ref:"main",staticStyle:{height:"300px",overflow:"hide","background-color":"#F7F7F7"},attrs:{id:"main"}}):e._e()],1):e._e(),e._v(" "),e.info.agent?a("div",[a("p",[e._v("上级批发商信息:")]),e._v(" "),a("el-form",{attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"昵称:"}},[e.info.agent?a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.showLink(e.info.agent.id)}}},[e._v(e._s(e.info.agent.nickname))]):e._e()],1),e._v(" "),a("el-form-item",{attrs:{label:"联系方式:"}},[e._v("\n "+e._s(e.info.agent.mobile?e.info.agent.mobile:"暂无上级批发商联系方式")+"\n ")])],1)],1):e._e(),e._v(" "),e.info.warea?a("div",[a("p",[e._v("服务信息:")]),e._v(" "),a("el-form",{attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"所在服务:"}},[e.info.warea?a("span",[e._v(e._s(e.info.warea.admin_name))]):e._e()]),e._v(" "),a("el-form-item",{attrs:{label:"客服名称:"}},[e._v("\n "+e._s(e.info.warea.commissar?e.info.warea.commissar:"暂无客服信息")+"\n ")])],1)],1):e._e(),e._v(" "),e.info.crown?a("div",[a("p",[e._v("批发商信息:")]),e._v(" "),a("el-form",{attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"批发商名称:"}},[e._v("\n "+e._s(e.info.crown.nickname)+"\n ")]),e._v(" "),a("el-form-item",{attrs:{label:"批发商手机号:"}},[e._v("\n "+e._s(e.info.crown.mobile)+"\n ")])],1)],1):e._e()],1),e._v(" "),e.teamType?a("el-tab-pane",{attrs:{label:"团队信息-("+(e.info.childAgentCount&&e.info.childAgentCount||0)+")人",name:"2"}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.info.child_agent&&e.info.child_agent.length>0,expression:"info.child_agent && info.child_agent.length > 0"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary",loading:e.loading},on:{click:e.excelUpload}},[e._v("导出")]),e._v(" "),e.info.child_agent&&e.info.child_agent.length>0?a("el-table",{staticClass:"tableBorder",attrs:{data:e.info.child_agent,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"nickname",label:"昵称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.showLink(n.id)}}},[e._v(e._s(n.nickname))])]}}],null,!1,784077042)}),e._v(" "),a("el-table-column",{attrs:{prop:"mobile",label:"手机号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"level",label:"客户类别",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.levelStatus(n.level).color}},[e._v("\n "+e._s(e.levelStatus(n.level).name)+"\n ")])]}}],null,!1,2609219690)})],1):a("p",[e._v("销售暂无团队")])],1):e._e(),e._v(" "),e.showNum?[3!==+e.info.level?a("el-tab-pane",{attrs:{label:"升级后团队人数-("+(e.info.up_team&&e.info.up_team.num||0)+")人",name:"3"}},[e._v("\n "+e._s(e.info.up_team&&e.info.up_team.num||0)+" 人\n ")]):e._e()]:e._e()],2),e._v(" "),a("el-dialog",{attrs:{title:"团队销售信息",visible:e.visible.team,modal:!1},on:{"update:visible":function(t){return e.$set(e.visible,"team",t)}}},[a("el-form",{attrs:{"label-width":"120px"}},[a("el-row",[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"销售昵称:"}},[e._v(e._s(e.teamInfo.nickname))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"真实姓名:"}},[e._v(e._s(e.teamInfo.realname))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"身份证号:"}},[e._v(e._s(e.teamInfo.cre_num?e.teamInfo.cre_num:"暂无"))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"联系电话:"}},[e._v(e._s(e.teamInfo.mobile))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"客户类别:"}},[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.levelStatus(e.teamInfo.level).color}},[e._v("\n "+e._s(e.levelStatus(e.teamInfo.level).name)+"\n ")])],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"注册时间:"}},[e._v(e._s(e.teamInfo.created_at))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"邀请码:"}},[e._v(e._s(e.teamInfo.recom_code?e.teamInfo.recom_code:"暂无"))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"账户状态:"}},[a("el-tag",{attrs:{type:1===e.teamInfo.delete?"danger":0===e.teamInfo.status?"success":"warning",size:"mini"}},[e._v("\n "+e._s(1===e.teamInfo.delete?"已删除":0===e.teamInfo.status?"正常":"已禁用")+"\n ")])],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"认证状态:"}},[e._v(e._s(e.certStatus(e.teamInfo.cert_status)))])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"授权码:"}},[e._v(e._s(e.teamInfo.auth_code?e.teamInfo.auth_code:"暂无"))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"授权开始时间:"}},[e._v(e._s(e.teamInfo.auth_startime?e.teamInfo.auth_startime:"暂无"))])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"授权结束时间:"}},[e._v(e._s(e.teamInfo.auth_endtime?e.teamInfo.auth_endtime:"暂无"))])],1)],1)],1)],1)],1)},r=[],i=a("c7eb"),l=(a("96cf"),a("1da1")),s=(a("456d"),a("7f7f"),a("ac6a"),a("44f1")),o=a("8975"),c=a("8e44"),u=a("ed08"),m=a("313e"),f={props:{info:{type:Object,default:function(){return{nickname:"",realname:"",cre_num:"",mobile:"",level:"",status:"",cert_status:"",created_at:"",recom:{nickname:""},agent:{nickname:"",mobile:""},recom_code:"",child_agent:[]}}},showNum:{type:Boolean,default:!1},teamType:{type:Boolean,default:!0}},data:function(){return{echart:!1,type:"1",isH:!1,loading:!1,visible:{team:!1},teamInfo:{},nowHistory:[]}},watch:{info:function(e,t){this.echart=!1,this.type="1",this.getHistory()}},created:function(){this.getHistory(),Object(u["e"])()&&(this.isH=!0)},methods:{getHistory:function(){var e=this,t=this;Object(c["e"])({id:t.info.id}).then((function(e){if(200===e.code){var a=e.data.history,n=e.data.now;n.name=n.nickname,n.blue=!0,e.data.history.length>0&&a.forEach((function(e){e.name=e.nickname,e.blue=!0}));var r=[{name:t.info.nickname,num:1,collapsed:!1,children:[{name:"分享人",collapsed:!1,num:2,children:[n]},{name:"历史分享人",collapsed:!1,children:a,num:3}]}];t.nowHistory=r}else t.$message.error("获取失败")})).catch((function(t){e.$message.error("获取失败")}))},getCrnum:function(e){var t=this;Object(c["a"])({id:e}).then((function(e){200===e.code?(t.info.cre_num=e.data.cre_num,t.info.warea.id=!1):t.$message.error("获取失败")})).catch((function(e){t.$message.error("获取失败")}))},showYaoqing:function(){var e=this;this.echart=!0,this.$nextTick((function(){e.drewTree(e.nowHistory)}))},getName:function(e){if(e)return e.slice(0,9)},drewTree:function(e){var t=this,a=m.init(document.getElementById("main"));a.setOption({tooltip:{trigger:"item",triggerOn:"mousemove",title:"客户信息",formatter:function(e){if(e.data.blue){var t=e.data,a="<img style='width:90px;height:90px;margin-right:10px' src='"+t.headimgurl+"'/>",n=t.name?t.name:t.nickname,r=t.realname||"无",i=t.mobile||"无",l=3===t.level?'<span style="color:#EFA637">批发商':2===t.level?'<span style="color:#6CBE40">经销商':1===t.level?'<span style="color:#20D2C2">销售员':"待定";return'<div style="display:flex;align-items: center;">'+a+"<div>客户昵称:"+n+"<br/>真实姓名:"+r+"<br/>联系方式:"+i+"<br/>客户类别:"+l+"</span></div></div>"}}},series:[{type:"tree",data:e,initialTreeDepth:1,top:"1%",left:"7%",bottom:"1%",right:"20%",symbolSize:7,label:{normal:{position:"top",verticalAlign:"middle",align:"left",fontSize:13,backgroundColor:"transparent",formatter:function(e){if(e.data.blue)return"{a|"+t.getName(e.name)+"}"},rich:{a:{color:"#1890ff",fontSize:14,padding:5,lineHeight:10}}}},leaves:{label:{normal:{position:"right",verticalAlign:"middle",align:"left"}}},expandAndCollapse:!0,animationDuration:0,animationDurationUpdate:0}]}),a.on("click",this.clickFun)},clickFun:function(e){var t=this;if(e.data.id)t.echart=!1,t.showLink(e.data.id);else{var a=m.init(document.getElementById("main"));!1===e.data.collapsed?t.closeNode(t.nowHistory,e.data.num):t.openNode(t.nowHistory,e.data.num),a.clear(),t.drewTree(t.nowHistory)}},closeNode:function(e,t){var a=this;for(var n in e)e[n].num===t?e[n].collapsed=!0:a.closeNode(e[n].children,t)},openNode:function(e,t){var a=this;for(var n in e)e[n].num===t?e[n].collapsed=!1:a.openNode(e[n].children,t)},excelUpload:function(){var e=this;this.loading=!0,Object(c["f"])({id:this.info.id}).then((function(t){console.log(t),200===t.code?Promise.all([a.e("chunk-5bdd67a2"),a.e("chunk-2c21b5a5")]).then(a.bind(null,"4bf8d")).then((function(a){var n=[],r=[];Object.keys(t.data[0]).forEach((function(e){n.push(e),r.push(e)}));var i=t.data.map((function(e){return r.map((function(t){return e[t]}))}));a.export_json_to_excel({header:n,data:i,filename:"".concat(Object(o["formatter"])(new Date,"yyyy-MM-dd")).concat(e.info.nickname,"团队信息"),autoWidth:!0,bookType:"xlsx"}),e.loading=!1})):(e.loading=!1,e.$message.error("下载失败"))})).catch((function(t){e.loading=!1,e.$message.error("下载失败")}))},levelStatus:function(e){return Object(s["c"])(e)},certStatus:function(e){return Object(s["a"])(e)},showLink:function(e){this.$emit("getOtherInfo",e)},handleToggle:function(e){this.type=e.name},getOtherInfo:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(t){var a,n,r,l;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return this.$message.error("获取用户id失败"),e.abrupt("return",!1);case 3:return e.prev=3,e.next=6,Object(c["i"])({id:t});case 6:a=e.sent,n=a.code,r=a.message,200===n?(l=a.data,this.teamInfo=l,this.visible.team=!0):this.$message.error(r),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](3),console.log("获取分享人或上级批发商信息失败:".concat(e.t0));case 14:case"end":return e.stop()}}),e,this,[[3,11]])})));function t(t){return e.apply(this,arguments)}return t}()}},d=f,v=a("2877"),h=Object(v["a"])(d,n,r,!1,null,null,null);t["default"]=h.exports}}]);
|