1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-065b0228","chunk-6f53f1d6"],{"44f1":function(e,t,a){"use strict";a.d(t,"d",(function(){return n})),a.d(t,"e",(function(){return i})),a.d(t,"f",(function(){return r})),a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return s})),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 i(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 r(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 o(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 s(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"}}}},7296: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:"content"},[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),a("div",{staticClass:"search_box"},[a("el-input",{staticClass:"input-with-select",staticStyle:{width:"250px"},attrs:{placeholder:"客户昵称/手机号",clearable:""},on:{clear:e.handleSearch},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch(t)}},model:{value:e.listQuery.search_name,callback:function(t){e.$set(e.listQuery,"search_name",t)},expression:"listQuery.search_name"}}),e._v(" "),a("el-input",{staticClass:"input-with-select",staticStyle:{width:"250px"},attrs:{placeholder:"上级批发商昵称/手机号",clearable:""},on:{clear:e.handleSearch},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch(t)}},model:{value:e.listQuery.agent_name,callback:function(t){e.$set(e.listQuery,"agent_name",t)},expression:"listQuery.agent_name"}}),e._v(" "),a("el-date-picker",{attrs:{type:"datetime",placeholder:"开始时间","value-format":"yyyy-MM-dd HH:mm:ss","default-time":"00:00:00"},model:{value:e.listQuery.start_time,callback:function(t){e.$set(e.listQuery,"start_time",t)},expression:"listQuery.start_time"}}),e._v(" "),a("el-date-picker",{attrs:{type:"datetime",disabled:!e.listQuery.start_time,placeholder:"结束时间","value-format":"yyyy-MM-dd HH:mm:ss","default-time":"23:59:59"},model:{value:e.listQuery.end_time,callback:function(t){e.$set(e.listQuery,"end_time",t)},expression:"listQuery.end_time"}}),e._v(" "),a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleSearch}},[e._v("搜索")])],1),e._v(" "),a("div",{staticClass:"table_box"},[a("el-table",{staticClass:"tableBorder",attrs:{data:e.tableList,"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.getOtherInfo(n.user&&n.user.id)}}},[e._v(e._s(n.user&&n.user.nickname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"mobile",label:"客户手机号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v("\n "+e._s(a.user&&a.user.mobile)+"\n ")]}}])}),e._v(" "),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.getOtherInfo(n.agent&&n.agent.id)}}},[e._v(e._s(n.agent&&n.agent.nickname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",align:"center",label:"进货日期"}}),e._v(" "),a("el-table-column",{attrs:{prop:"account",align:"center",label:"金额","render-header":e.renderHeader}}),e._v(" "),a("el-table-column",{attrs:{prop:"num",align:"center",label:"数量","render-header":e.renderHeader}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.handleDetail(n)}}},[e._v("\n 详情\n ")])]}}])})],1)],1),e._v(" "),a("div",{staticClass:"pop"},[a("el-drawer",{attrs:{title:e.memberInfo.realname+" - "+e.levelStatus(e.memberInfo.level).name,visible:e.visible.memberInfo,direction:"rtl"},on:{"update:visible":function(t){return e.$set(e.visible,"memberInfo",t)}}},[a("MemberInfo",{attrs:{info:e.memberInfo,"team-type":!0},on:{getOtherInfo:e.changeOtherInfo}})],1),e._v(" "),a("el-dialog",{attrs:{title:"详情",visible:e.DetailVisible,width:"40%"},on:{"update:visible":function(t){e.DetailVisible=t}}},[e.agentInfo&&e.agentInfo.nickname?a("div",{staticClass:"top"},[a("div",{staticClass:"apply_info"},[a("div",[a("div",{staticStyle:{"font-size":"16px","margin-bottom":"10px"}},[e._v("昵称:"+e._s(e.agentInfo.nickname))]),e._v(" "),a("span",{staticStyle:{"font-size":"16px"}},[e._v("手机号:"+e._s(e.agentInfo.mobile))])])])]):e._e(),e._v(" "),e.sale_data.length>0?a("div",{staticClass:"upgrade_box"},[a("div",{staticClass:"upgrade_title"},[e._v("进货的款式及数量")]),e._v(" "),a("div",{staticClass:"model_box"},[a("div",{staticClass:"model_title"},[a("div",[e._v("款式")]),e._v(" "),a("div",[e._v("数量")]),e._v(" "),a("div",[e._v("进货金额")])]),e._v(" "),e._l(e.sale_data,(function(t,n){return a("div",{key:n,staticClass:"model_item"},[a("div",[e._v(e._s(t.main_attr))]),e._v(" "),a("div",[e._v(e._s(t.num))]),e._v(" "),0===t.num?a("div",[e._v("¥0")]):a("div",[e._v("¥"+e._s(t.num*t.price))])])}))],2),e._v(" "),a("div",{staticClass:"model_all"},[a("span",[e._v("共"+e._s(e.sale_data.reduce((function(e,t){return e+Number(t.num)}),0))+"套,")]),e._v(" "),a("span",{staticStyle:{color:"#333"}},[e._v("合计:")]),e._v(" "),a("span",{staticStyle:{color:"#FB231F"}},[e._v("¥"+e._s(e.sale_data.reduce((function(e,t){return e+t.num*t.price}),0)))])])]):e._e(),e._v(" "),e.amount_img.length>0?a("div",{staticClass:"upgrade_box"},[a("div",{staticClass:"upgrade_title"},[e._v("进货的收款凭证")]),e._v(" "),a("div",{staticClass:"col_show"},[a("div",{staticClass:"col_con"},[e.amount_img.length>0&&e.amount_img[0].money>0?a("div",[a("div",{staticClass:"col_item"},[a("div",[e._v("转账凭证")]),e._v(" "),a("div",{staticClass:"col_money"},[e._v("¥"+e._s(e.amount_img[0].money))])]),e._v(" "),e.amount_img[0].imgList.length>0?a("div",{staticClass:"img_box"},e._l(e.amount_img[0].imgList,(function(t,n){return a("div",{key:n},[a("div",{staticClass:"img_con"},[a("el-image",{staticClass:"col_img",attrs:{src:t,"preview-src-list":e.amount_img[0].imgList,"z-index":1e4}})],1)])})),0):e._e()]):e._e(),e._v(" "),e.amount_img.length>0&&e.amount_img[1].money>0?a("div",[a("div",{staticClass:"col_item"},[a("div",[e._v("现金凭证")]),e._v(" "),a("div",{staticClass:"col_money"},[e._v("¥"+e._s(e.amount_img[1].money))])]),e._v(" "),e.amount_img[1].imgList.length>0?a("div",{staticClass:"img_box"},e._l(e.amount_img[1].imgList,(function(t,n){return a("div",{key:n},[a("div",{staticClass:"img_con"},[a("el-image",{staticClass:"col_img",attrs:{src:t,"preview-src-list":e.amount_img[1].imgList,"z-index":1e4}})],1)])})),0):e._e()]):e._e()]),e._v(" "),a("div",{staticClass:"model_all"},[a("span",{staticStyle:{color:"#333"}},[e._v("合计:")]),e._v(" "),a("span",{staticStyle:{color:"#FB231F"}},[e._v("¥"+e._s(e.amount_img.reduce((function(e,t){return e+Number(t.money)}),0)))])])])]):e._e()])],1),e._v(" "),a("div",{staticClass:"batch-container"},[a("pagination",{staticStyle:{"margin-top":"0"},attrs:{total:e.tableTotal,limit:e.listQuery.page_size,page:e.listQuery.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}})],1)])},i=[],r=a("c7eb"),l=(a("96cf"),a("1da1")),o=a("8e44"),s=a("44f1"),c=a("f72b"),u=a("b775");function m(e){return Object(u["a"])({url:"/outGoods/getOutGoodsList",method:"get",params:e})}var f={components:{MemberInfo:c["default"]},data:function(){return{listQuery:{page_index:1,page_size:15,agent_name:"",search_name:"",start_time:"",end_time:""},tableList:[],memberInfo:{realname:"",level:""},visible:{member:!1,memberInfo:!1},DetailVisible:!1,agentInfo:{nickname:"",mobile:""},amount_img:"",sale_data:"",loadingFull:!1,tableTotal:0,account:"",num:""}},created:function(){this.getList()},methods:{renderHeader:function(e,t){var a=t.column,n=(t.$index,a.label),i=0;switch(n){case"金额":i=this.account;break;case"数量":i=this.num;break;default:break}return e("span",{domProps:{innerHTML:i>0?"".concat(a.label,"<span>(").concat(i,")</span>"):"".concat(a.label)}})},handleSearch:function(){this.listQuery.page_index=1,this.getList()},levelStatus:function(e){return Object(s["c"])(e)},getList:function(){var e=this;this.loadingFull=!0,m(this.listQuery).then((function(t){if(200===t.code){var a=t.data,n=a.total,i=a.list;e.tableList=i.list,e.tableTotal=n,e.account=i.account,e.num=i.num}else e.$message.error(t.msg||"获取出货列表失败");e.loadingFull=!1})).catch((function(){e.loadingFull=!1}))},handleDetail:function(e){this.DetailVisible=!0;var t=e.user,a=e.amount_img,n=e.sale_data;t&&(this.agentInfo={nickname:t.nickname,mobile:t.mobile}),this.amount_img=a?JSON.parse(a):[],this.sale_data=n?JSON.parse(n):[],console.log(e,"row")},getOtherInfo:function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(t,a){var n,i,l,s;return Object(r["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 this.loadingFull=!0,e.prev=4,e.next=7,Object(o["i"])({id:t});case 7:n=e.sent,i=n.code,l=n.message,200===i?(s=n.data,this.handleSeeMemberInfo(s),a&&a(s)):this.$message.error(l),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](4),console.log("获取分享人或上级批发商信息失败:".concat(e.t0));case 15:this.loadingFull=!1;case 16:case"end":return e.stop()}}),e,this,[[4,12]])})));function t(t,a){return e.apply(this,arguments)}return t}(),handleSeeMemberInfo:function(e){this.memberInfo=e,this.visible.memberInfo=!0},changeOtherInfo:function(e){var t=this;this.getOtherInfo(e,(function(e){t.getList()}))},changePagination:function(e){var t=e.page,a=e.limit;this.listQuery.page_size=a,this.listQuery.page_index=t,this.getList()}}},d=f,_=(a("b635"),a("2877")),v=Object(_["a"])(d,n,i,!1,null,"e305fa30",null);t["default"]=v.exports},"8e44":function(e,t,a){"use strict";a.d(t,"i",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return o})),a.d(t,"h",(function(){return s})),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 i(e){return Object(n["a"])({url:"/user/getuserdetails",method:"get",params:e})}function r(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 o(e){return Object(n["a"])({url:"/user/GetLastInfo",method:"get",params:e})}function s(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})}},b635:function(e,t,a){"use strict";a("dc24")},dc24:function(e,t,a){},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)},i=[],r=a("c7eb"),l=(a("96cf"),a("1da1")),o=(a("456d"),a("7f7f"),a("ac6a"),a("44f1")),s=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 i=[{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=i}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,i=t.realname||"无",r=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/>真实姓名:"+i+"<br/>联系方式:"+r+"<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=[],i=[];Object.keys(t.data[0]).forEach((function(e){n.push(e),i.push(e)}));var r=t.data.map((function(e){return i.map((function(t){return e[t]}))}));a.export_json_to_excel({header:n,data:r,filename:"".concat(Object(s["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(o["c"])(e)},certStatus:function(e){return Object(o["a"])(e)},showLink:function(e){this.$emit("getOtherInfo",e)},handleToggle:function(e){this.type=e.name},getOtherInfo:function(){var e=Object(l["a"])(Object(r["a"])().mark((function e(t){var a,n,i,l;return Object(r["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,i=a.message,200===n?(l=a.data,this.teamInfo=l,this.visible.team=!0):this.$message.error(i),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,_=a("2877"),v=Object(_["a"])(d,n,i,!1,null,null,null);t["default"]=v.exports}}]);
|