chunk-306f2c14.f9c67439.js 54 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-306f2c14","chunk-6f53f1d6"],{"09d8":function(e,t,a){"use strict";a.d(t,"k",(function(){return n})),a.d(t,"i",(function(){return i})),a.d(t,"c",(function(){return o})),a.d(t,"e",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"h",(function(){return c})),a.d(t,"g",(function(){return m})),a.d(t,"j",(function(){return u})),a.d(t,"f",(function(){return d})),a.d(t,"b",(function(){return f})),a.d(t,"a",(function(){return h})),a.d(t,"l",(function(){return p}));var r=a("b775");function n(e){return Object(r["a"])({url:"/orders/update_address",method:"get",params:e})}function i(e){return Object(r["a"])({url:"/orders/show_address",method:"get",params:e})}function o(e){return Object(r["a"])({url:"/orders/add_address",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/orders/submit_order",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/order/shelvedorder",method:"post",data:e})}function c(e){return Object(r["a"])({url:"/orders/get_crown",method:"get",params:e})}function m(e){return Object(r["a"])({url:"/orders/GetUserId",method:"get",params:e})}function u(e){return Object(r["a"])({url:"/orders/UpAddress",method:"get",params:e})}function d(e){return Object(r["a"])({url:"/discernAdress",method:"get",params:e})}function f(e){return Object(r["a"])({url:"/user/UpdateEnrollInfo",method:"get",params:e})}function h(e){return Object(r["a"])({url:"/pay/Refund",method:"get",params:e})}function p(e){return Object(r["a"])({url:"/enroll/uploadGiftExpress",method:"post",data:e})}},"44f1":function(e,t,a){"use strict";a.d(t,"d",(function(){return r})),a.d(t,"e",(function(){return n})),a.d(t,"f",(function(){return i})),a.d(t,"a",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"b",(function(){return l})),a.d(t,"h",(function(){return c})),a.d(t,"g",(function(){return m}));a("c5f6"),a("a481"),a("ac6a");function r(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 n(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 o(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 l(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 m(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 n})),a.d(t,"b",(function(){return i})),a.d(t,"d",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"h",(function(){return l})),a.d(t,"g",(function(){return c})),a.d(t,"f",(function(){return m})),a.d(t,"a",(function(){return u})),a.d(t,"e",(function(){return d}));var r=a("b775");function n(e){return Object(r["a"])({url:"/user/getuserdetails",method:"get",params:e})}function i(e){return Object(r["a"])({url:"/user/GetCrownInfo",method:"get",params:e})}function o(e){return Object(r["a"])({url:"/user/GetNextInfo",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/user/GetLastInfo",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/user/SearchUser",method:"get",params:e})}function c(e){return Object(r["a"])({url:"/user/SearchTeamUser",method:"get",params:e})}function m(e){return Object(r["a"])({url:"/GetUserInfos",method:"get",params:e})}function u(e){return Object(r["a"])({url:"/user/GetCreNum",method:"get",params:e})}function d(e){return Object(r["a"])({url:"/user/GetNowHistory",method:"get",params:e})}},a0ad:function(e,t,a){},ce38:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",[a("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),a("el-form",{attrs:{"label-width":"85px"}},[a("div",{staticClass:"form"},[a("div",{staticClass:"form_item"},[a("div",{staticClass:"step-title"},[e._v("客户基本信息")]),e._v(" "),a("el-select",{staticStyle:{width:"130px"},attrs:{placeholder:"所属客服"},on:{change:e.changeWeara},model:{value:e.warea_id,callback:function(t){e.warea_id=t},expression:"warea_id"}},e._l(e.warList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.admin_name,value:e.id}})})),1),e._v(" "),a("el-input",{staticStyle:{width:"180px"},attrs:{type:"text",placeholder:"输入昵称、手机号查询客户信息",maxlength:"11",clearable:""},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch(e.i=1)}},model:{value:e.search_name,callback:function(t){e.search_name=t},expression:"search_name"}}),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleSearch(e.i=1)}}},[e._v("\n 查询\n ")]),e._v(" "),a("el-form-item",{attrs:{label:"客户昵称:",required:""}},[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.getOtherInfo(e.form.apply_user_id)}}},[e._v(e._s(e.form.apply_user_nickname))])],1),e._v(" "),a("el-form-item",{attrs:{label:"团队老大:",required:""}},[e.form.apply_crown_nickname?a("div",[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.getOtherInfo(e.form.apply_crown_id)}}},[e._v(e._s(e.form.apply_crown_nickname))])],1):e._e()]),e._v(" "),a("el-form-item",{attrs:{label:"所在服务:",required:""}},[e._v("\n "+e._s(e.form.warea_name)+"\n ")])],1),e._v(" "),a("div",{staticClass:"form_item"},[a("div",{staticClass:"step-title"},[e._v("顾客基本信息")]),e._v(" "),a("el-input",{staticStyle:{width:"380px"},attrs:{type:"textarea",placeholder:e.placeholder,rows:5,"show-word-limit":"",clearable:""},model:{value:e.message,callback:function(t){e.message=t},expression:"message"}}),a("br"),e._v(" "),a("div",{staticStyle:{width:"380px",display:"flex","justify-content":"flex-end",margin:"10px 0 20px 0"}},[a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(t){e.message=""}}},[e._v("清 除")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.text}},[e._v("识 别")])],1),e._v(" "),a("el-form-item",{attrs:{label:"姓名:",required:""}},[a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入顾客姓名"},model:{value:e.form.customer_name,callback:function(t){e.$set(e.form,"customer_name",t)},expression:"form.customer_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号:",required:""}},[a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入顾客手机号","show-word-limit":""},model:{value:e.form.customer_phone,callback:function(t){e.$set(e.form,"customer_phone",t)},expression:"form.customer_phone"}},[a("el-select",{staticStyle:{width:"105px"},attrs:{slot:"prepend"},on:{change:e.getPhoneReg},slot:"prepend",model:{value:e.form.area_code,callback:function(t){e.$set(e.form,"area_code",t)},expression:"form.area_code"}},e._l(e.areaCodeList,(function(e){return a("el-option",{key:e.code,attrs:{label:e.name,value:e.code}})})),1)],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"省市区:",required:""}},[a("el-cascader",{staticStyle:{width:"300px"},attrs:{options:e.provinces,placeholder:"请选择收货地区"},model:{value:e.areaAll,callback:function(t){e.areaAll=t},expression:"areaAll"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"详细地址:",required:""}},[a("el-input",{staticStyle:{width:"300px"},attrs:{type:"textarea",placeholder:"请输入详细地址",rows:4,maxlength:"50","show-word-limit":""},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}})],1)],1),e._v(" "),a("div",{staticClass:"form_item"},[a("div",{staticClass:"step-title"},[e._v("调货信息")]),e._v(" "),a("el-form-item",{attrs:{label:"穿着时间:",required:""}},[a("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"请输入",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}}),e._v(" "),a("el-select",{staticStyle:{width:"100px !important"},model:{value:e.week,callback:function(t){e.week=t},expression:"week"}},e._l(e.destroy,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"调换货物:",required:""}},[a("div",{staticStyle:{width:"300px"}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.visible.station=!0,e.visible.style=1,e.styForm={},e.getnumPaget(),e.getLabel()}}},[e._v("添加调换货物")])],1),e._v(" "),a("div",{staticStyle:{display:"flex","align-items":"center"}},e._l(e.styleList,(function(t,r){return a("div",{key:r,staticClass:"styleBox"},[a("div",{staticClass:"boxflex"},[a("div",{staticClass:"dingLeft"},[e._v("\n 调换货物"+e._s(r+1)+"\n ")]),e._v(" "),a("div",{staticClass:"ding"},[a("i",{staticClass:"el-icon-edit",on:{click:function(a){e.visible.style=0,e.editStyle(t,r)}}}),e._v(" "),a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.del(r)}}}),e._v(" "),a("i",{staticClass:"el-icon-document-copy",on:{click:function(t){return e.copy(r)}}})])]),e._v(" "),a("div",[e._v("\n 标识:"+e._s(t.label)+"\n ")]),e._v(" "),a("div",[e._v("\n 问题款式:"+e._s(t.good_name)+"\n ")]),e._v(" "),a("div",[e._v("\n 问题尺码:"+e._s(t.good_size)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换款式:"+e._s(t.real_good_name)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换尺码:"+e._s(t.real_good_size)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换数量:"+e._s(t.total)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换原因:"+e._s(t.problem_attr+"/"+t.problem)+"\n ")]),e._v(" "),a("div",{staticStyle:{height:"30px"}},[t.ImgList&&t.ImgList.length>0?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleStorePreviewt(t.ImgList)}}},[e._v("查看图片")]):e._e()],1)])})),0)])],1)]),e._v(" "),a("div",{staticStyle:{}},[a("el-input",{staticStyle:{width:"400px"},attrs:{type:"textarea",placeholder:"请输入备注",rows:2,maxlength:"50","show-word-limit":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}}),e._v(" "),a("el-button",{staticStyle:{"margin-left":"20px"},on:{click:e.back}},[e._v("取消")]),e._v(" "),a("el-button",{directives:[{name:"throttle",rawName:"v-throttle",value:2e3,expression:"2000"}],attrs:{type:"primary"},on:{click:e.checkout}},[e._v("提交")])],1)])],1),e._v(" "),a("el-dialog",{attrs:{title:e.visible.style?"添加调换货物":"修改调换货物",visible:e.visible.station,"destroy-on-close":!0,"close-on-click-modal":!1,"show-close":!0,width:"700px","append-to-body":""},on:{"update:visible":function(t){return e.$set(e.visible,"station",t)}}},[a("el-dialog",{attrs:{title:"添加标识",visible:e.visible.imLable,width:"400px","destroy-on-close":!0,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.visible,"imLable",t)}}},[a("el-form",{attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"标识: ",required:""}},[a("el-input",{attrs:{type:"text"},model:{value:e.visible.label,callback:function(t){e.$set(e.visible,"label",t)},expression:"visible.label"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.submitAddUnit}},[e._v("添加")])],1)],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"查看商品库存",visible:e.visible.shopping,width:"620px","destroy-on-close":!0,"append-to-body":"","before-close":e.closeAddStyle},on:{"update:visible":function(t){return e.$set(e.visible,"shopping",t)}}},[a("div",{staticStyle:{"margin-bottom":"20px"}},[a("el-select",{staticStyle:{width:"230px"},attrs:{placeholder:"请选择商品名称查询",clearable:""},on:{change:e.searchName},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}},e._l(e.styStyle,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),e._v(" "),a("div",{staticStyle:{"margin-top":"20px"}},[a("el-table",{attrs:{data:e.numData.slice((e.numPage.currentPage-1)*e.numPage.pageSize,e.numPage.currentPage*e.numPage.pageSize),border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"good_name",label:"商品名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.good_name))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"size",label:"尺码信息",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.size))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"storage",label:"库存数量",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.storage))])]}}])})],1),e._v(" "),a("div",{staticStyle:{"margin-top":"20px"}},[a("el-pagination",{attrs:{"current-page":e.numPage.currentPage,"page-sizes":[5,10,15,20],"page-size":e.numPage.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:parseInt(e.numPage.total)},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)]),e._v(" "),a("el-form",{attrs:{model:e.styForm,"label-width":"100px"}},[a("el-button",{staticStyle:{margin:"0 0 20px 20px"},attrs:{type:"primary"},on:{click:function(t){e.visible.shopping=!0}}},[e._v("查看商品库存")]),e._v(" "),a("el-form-item",{attrs:{label:"标识:",required:""}},[a("el-select",{staticStyle:{width:"220px"},attrs:{placeholder:"请选择标识"},model:{value:e.styForm.label,callback:function(t){e.$set(e.styForm,"label",t)},expression:"styForm.label"}},e._l(e.labelList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})})),1),e._v(" "),a("i",{directives:[{name:"permit",rawName:"v-permit",value:1,expression:"1"}],staticClass:"el-icon-circle-plus-outline icon",attrs:{"roles-permit":e.roles},on:{click:function(t){e.visible.imLable=!0}}})],1),e._v(" "),a("el-form-item",{attrs:{label:"问题款式:",required:""}},[a("el-cascader",{ref:"cascaderAddr",staticStyle:{width:"220px"},attrs:{options:e.styleDatas,placeholder:"请选择问题款式",filterable:""},model:{value:e.styForm.styleAll,callback:function(t){e.$set(e.styForm,"styleAll",t)},expression:"styForm.styleAll"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"同款调货:",required:""},on:{change:e.getsame}},[a("el-radio-group",{model:{value:e.styForm.same,callback:function(t){e.$set(e.styForm,"same",t)},expression:"styForm.same"}},[a("el-radio",{attrs:{label:1}},[e._v("是")]),e._v(" "),a("el-radio",{attrs:{label:0}},[e._v("否")])],1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:0===e.styForm.same,expression:"styForm.same === 0"}],attrs:{label:"调换款式:",required:""}},[a("el-cascader",{ref:"cascaderAddr",staticStyle:{width:"220px"},attrs:{options:e.styleDatas,placeholder:"请选择调换款式",filterable:""},model:{value:e.styForm.huanstyleAll,callback:function(t){e.$set(e.styForm,"huanstyleAll",t)},expression:"styForm.huanstyleAll"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"调换数量:",required:""}},[a("el-input",{staticStyle:{width:"220px"},attrs:{onkeyup:"value=value.replace(/[^\\d]/g,'')",placeholder:"请输入调换数量"},model:{value:e.styForm.total,callback:function(t){e.$set(e.styForm,"total",t)},expression:"styForm.total"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"调换原因:",required:""}},[a("el-cascader",{ref:"cascaderAddr",staticStyle:{width:"220px"},attrs:{options:e.problemList,props:{expandTrigger:"hover"},placeholder:"请输入调换原因",filterable:""},on:{change:e.handleChange},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.node,n=t.data;return[0===n.value?a("div",{directives:[{name:"permit",rawName:"v-permit",value:0,expression:"0"}],staticStyle:{"text-align":"center"},attrs:{"roles-permit":e.roles}},[a("i",{staticClass:"el-icon-circle-plus-outline"}),e._v("  新增\n ")]):a("div",[a("span",[e._v(e._s(n.label))]),e._v(" "),r.isLeaf?e._e():a("span",[e._v(" ("+e._s(n.children.length-1)+") ")])])]}}]),model:{value:e.styForm.problemArr,callback:function(t){e.$set(e.styForm,"problemArr",t)},expression:"styForm.problemArr"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"质量问题"===e.styForm.problem_attr,expression:"styForm.problem_attr === '质量问题'"}],attrs:{label:"上传图片:",required:""}},[a("el-upload",{attrs:{action:"","list-type":"picture-card",multiple:!0,"http-request":e.httpRequestUpload,"file-list":e.storeImgList,"on-preview":e.handleStorePreview,"on-remove":e.handleStoreDelete,accept:".png, .jpg, .jpeg"}},[a("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),a("el-form-item",[a("el-button",{on:{click:function(t){e.visible.station=!1,e.storeImgList=[]}}},[e._v("\n 取消\n ")]),e._v(" "),a("el-button",{directives:[{name:"throttle",rawName:"v-throttle",value:2e3,expression:"2000"}],attrs:{type:"primary"},on:{click:e.handleSubmitAdd}},[e._v("\n 确定\n ")])],1)],1)],1),e._v(" "),a("transition",{attrs:{name:"el-fade-in"}},[e.showSearch?a("div",{staticClass:"top"},[a("div",{staticClass:"top_del"},[a("i",{staticClass:"el-icon-close",on:{click:function(t){e.showSearch=!1}}})]),e._v(" "),a("div",{staticClass:"listBox"},e._l(e.searchList,(function(t,r){return a("div",{key:r,staticClass:"showList"},[a("div",{staticClass:"showList_item"},[a("el-tooltip",{attrs:{"popper-class":"tooltip",placement:"left"}},[a("div",{staticStyle:{padding:"5px 20px 5px 20px"},style:{color:3===t.level?"#EFA637":2===t.level?"#6CBE40":"#20D2C2",width:"100%"},on:{click:function(a){return e.getshowName(t)}}},[a("div",{staticClass:"flexTitle"},[a("div",[a("i",{staticClass:"el-icon-s-custom"}),e._v(e._s(t.title))]),e._v(" "),a("div",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.warea&&t.warea.admin_name))])])]),e._v(" "),a("div",{staticClass:"tooltip-content",attrs:{slot:"content"},slot:"content"},[a("div",{staticStyle:{display:"flex","align-items":"center"}},[a("el-image",{staticStyle:{width:"120px",height:"120px"},attrs:{src:t.headimgurl,fit:"fill"}}),e._v(" "),a("div",{staticStyle:{"margin-left":"20px"}},[a("p",[e._v("客户昵称:"+e._s(t.nickname))]),e._v(" "),a("p",[e._v("备注昵称:"+e._s(t.remark_name?t.remark_name:"无"))]),e._v(" "),a("p",[e._v("联系方式:"+e._s(t.mobile))]),e._v(" "),a("p",[e._v("客户类别:\n "),a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.levelStatus(t.level).color}},[e._v("\n "+e._s(e.levelStatus(t.level).name)+"\n ")])],1),e._v(" "),a("p",[e._v("所在服务:"+e._s(t.warea&&t.warea.admin_name+t.warea.admin_name))])])],1)])])],1)])})),0)]):e._e()]),e._v(" "),a("transition",{attrs:{name:"el-fade-in"}},[e.showcustomer?a("div",{staticClass:"top"},[a("div",{staticClass:"top_del"},[a("i",{staticClass:"el-icon-close",on:{click:function(t){e.showcustomer=!1,e.clearCustomer()}}}),e._v(" "),a("div",{staticStyle:{"margin-left":"20px","font-size":"17px"}},[e._v(e._s(e.showGood?"调换货物信息":"顾客信息"))])]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.showGood,expression:"showGood"}],staticClass:"GoodBox"},[a("div",{staticStyle:{margin:"20px 0 10px 0"}},[a("i",{staticClass:"el-icon-arrow-left",on:{click:function(t){e.showGood=!1}}},[e._v("返回")])]),e._v(" "),e._l(e.goodDetailList,(function(t,r){return a("div",{key:r,staticClass:"GoodBox_item"},[a("div",[e._v("\n 问题款式:"+e._s(t.good_name)+"\n ")]),e._v(" "),a("div",[e._v("\n 问题尺码:"+e._s(t.good_size)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换款式:"+e._s(t.real_change_good)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换尺码:"+e._s(t.real_change_size)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换数量:"+e._s(t.total)+"\n ")]),e._v(" "),a("div",[e._v("\n 调换原因:"+e._s(t.problem_attr+"/"+t.problem_info)+"\n ")]),e._v(" "),a("div",[e._v("\n 登记时间:"+e._s(t.created_at)+"\n ")])])}))],2),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.showGood,expression:"!showGood"}],staticClass:"listBox"},e._l(e.customerList,(function(t,r){return a("div",{key:r,staticClass:"showList"},[a("div",{staticClass:"showList_item"},[a("i",{staticClass:"el-icon-s-custom",staticStyle:{padding:"5px 20px 5px 20px",color:"#1890FF",width:"100%"},on:{click:function(a){return e.customerDetail(t)}}},[e._v("\n "+e._s(t.customer_name)),a("p",{directives:[{name:"show",rawName:"v-show",value:t.is_agent,expression:"item.is_agent"}],staticClass:"label"},[e._v("客户")])])])])})),0)]):e._e()]),e._v(" "),e.visible.add_img?a("el-image-viewer",{staticStyle:{"z-index":"2200 !important"},attrs:{"on-close":function(){e.visible.add_img=!1},"url-list":e.visible.add_img_url}}):e._e(),e._v(" "),a("el-drawer",{attrs:{title:e.memberInfo.realname+" - "+e.levelStatus(e.memberInfo.level).name,visible:e.visibleMemberInfo,direction:"rtl",size:e.isH?"80%":"600px"},on:{"update:visible":function(t){e.visibleMemberInfo=t}}},[a("MemberInfo",{attrs:{info:e.memberInfo,"team-type":!0,"show-num":"root"===e.role_name||""},on:{getOtherInfo:e.changeOtherInfo}})],1)],1)},n=[],i=(a("4f7f"),a("5df3"),a("1c4c"),a("6762"),a("2fdb"),a("386d"),a("c5f6"),a("ac6a"),a("4917"),a("c7eb")),o=(a("96cf"),a("1da1")),s=(a("7f7f"),a("20d6"),a("5530")),l=a("de33"),c=a("09d8"),m=a("02c6"),u=a("2e8e"),d=a("f72b"),f=a("ed08"),h=a("44f1"),p=a("2f62"),_=a("69a42"),v=a.n(_),g={name:"Returnsadd",components:{MemberInfo:d["default"],"el-image-viewer":function(){return Promise.all([a.e("chunk-elementUI"),a.e("chunk-3784bb01")]).then(a.bind(null,"08a9"))}},data:function(){var e=this.$route.meta.buttonAuthList?this.$route.meta.buttonAuthList:[];return{customerList:[],showcustomer:!1,showGood:!1,goodDetailList:[],placeholder:"请粘贴或输入整段地址,点击“识别”自动拆分姓名、电话和地址。姓名、手机号放前面,例如:张三,15100001111,河南省郑州市金水区某路和某路交叉口某小区某号楼",message:"",roles:e,provinces:m["a"],isMatch:/^[1][3-9]\d{9}$/,areaCodeList:[{name:"中国大陆",code:86,reg:/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,phoneReg:/^[1][3-9]\d{9}$/},{name:"中国澳门",code:853,reg:/^[1|5|7][0-9]{6}[0-9A-Z]$/,phoneReg:/^[6]\d{7}$/},{name:"中国台湾",code:886,reg:/^[a-zA-Z][0-9]{9}$/,phoneReg:/^[0]{1}[9]{1}\d{8}$/},{name:"中国香港",code:852,reg:/^[A-Z]{1,2}[0-9]{6,10}[0-9A-Z]$/,phoneReg:/^([6|9|5])\d{7}$/}],styleDatas:[],form:{apply_user_id:"",apply_user_nickname:"",apply_crown_id:"",apply_crown_nickname:"",warea_name:"",customer_name:"",customer_phone:"",province:"",city:"",area:"",address:"",wear_time:"",total:"",remark:"",area_code:86,problemList:[]},loadingFull:!1,time:1,week:"月",areaAll:[],addStyle:{good_name:"",size:"",storage:""},styForm:{good_name:"",good_size:"",problem_attr:"",problem:"",total:"",real_good_name:"",real_good_size:"",styleAll:"",huanstyleAll:"",problemArr:"",problemLabel:"",ImgList:[],same:"",label:""},memberInfo:{realname:"",level:""},destroy:[{id:"天",name:"天"},{id:"月",name:"月"},{id:"年",name:"年"}],isH:!1,visibleMemberInfo:!1,role_name:this.$store.state.user.role_name,i:"",input:!1,showSearch:!1,search_name:"",warList:[],warea_id:"",search_named:"",search:"",searchList:[],storeImgList:[],styleList:[],numData:[],numPage:{currentPage:1,pageSize:5,total:0},labelList:[],styStyle:[],problemList:[],numDataList:[],visible:{store:!1,add_img:!1,add_img_url:"",style:1,sumit:1,station:!1,improblem:!1,problem:"",label:"",imLable:!1,shopping:!1,i:""}}},computed:Object(s["a"])({},Object(p["c"])(["user"])),created:function(){this.getnumPaget(),Object(f["e"])()||(this.isH=!0),this.getproblemt(),this.getWarList(),this.provinces=Object(u["b"])(m["a"])},methods:{changeWeara:function(e){var t=this.warList.findIndex((function(t){return t.id===e}));this.form.warea_name=this.warList[t].name},getWarList:function(){var e=Object(o["a"])(Object(i["a"])().mark((function e(){var t,a,r,n,o=this;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(l["K"])();case 3:t=e.sent,a=t.code,200===a&&(r=t.data,this.warList=r,"政委"!==this.user.role_name&&"政委主管"!==this.user.role_name||(n=this.warList.findIndex((function(e){return e.admin_id===o.user.id})),this.warea_id=this.warList[n].id,this.form.warea_name=this.warList[n].name)),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(){return e.apply(this,arguments)}return t}(),customerDetail:function(e){this.form.customer_name=e.customer_name,this.form.customer_phone=e.customer_phone,this.form.province=e.province,this.form.city=e.city,this.form.area=e.area,this.form.address=e.address,this.areaAll=[e.province,e.city,e.area],this.goodDetailList=e.applydetail,this.showGood=!0},clearCustomer:function(){this.showcustomer=!1,this.customerList=[],this.showGood=!1,this.goodDetailList=[]},clear:function(){this.form={},this.message="",this.search_name="",this.time=1,this.week="月",this.areaAll=[],this.styleList=[]},getPhoneReg:function(e){var t=this.areaCodeList.findIndex((function(t){return t.code===e}));this.isMatch=this.areaCodeList[t].phoneReg},checkout:function(){var e=this;if(console.log(this.form),!this.form.customer_name)return console.log("customer_name",this.form.customer_name),void this.$message.error("请补全信息:顾客姓名");if(!this.form.customer_phone)return console.log("customer_phone",this.form.customer_phone),void this.$message.error("请补全信息:顾客手机号");if(this.isMatch&&!this.form.customer_phone.match(this.isMatch))return console.log("area_code",this.form.area_code),this.$message.error("顾客手机号与所属与区号不一致"),!1;var t={customer_name:this.form.customer_name,customer_phone:this.form.customer_phone},a=this;Object(l["h"])(t).then((function(t){200===t.code?1===t.data.status?e.$confirm("检测到七天内登记过该顾客,请前往调货列表进行核对","提示",{confirmButtonText:"不了,继续提交",cancelButtonText:"好的",type:"warning"}).then((function(){a.submit()})).catch((function(){})):a.submit():e.$message.error(t.message||"校验失败")}))},getsame:function(){1===this.styForm.same&&(this.styForm.huanstyleAll="")},handleStorePreviewt:function(e){console.log(e);var t=[];e.forEach((function(e){t.push(e.url)})),this.visible.add_img=!0,this.visible.add_img_url=t},getproblemt:function(){var e=this;Object(l["x"])().then((function(t){if(200===t.code){var a=t.data,r=function e(t){t.push({label:"新增",value:0}),t.forEach((function(t){t.children&&e(t.children)}))};r(a),e.problemList=a}else e.$message.error(t.message||"获取失败")}))},handleChange:function(e){var t=this;if(e){var a=this.$refs["cascaderAddr"].getCheckedNodes();this.styForm.problemLabel=a[0].pathLabels,this.styForm.problem_attr=this.styForm.problemLabel[0],this.styForm.problem=this.styForm.problemLabel[1],"质量问题"!==this.styForm.problem_attr&&(this.storeImgList=[]),0!==e[0]&&0!==e[1]||this.$prompt("请输入新的类别","提示",{inputPattern:/.+/,inputErrorMessage:"类别不能为空"}).then((function(a){var r=a.value;Object(l["b"])({problem_id:e[0]?e[0]:0,problem:r}).then((function(){t.styForm.problemArr="",t.$message.success("添加成功"),t.getproblemt()}))})).catch((function(){t.styForm.problemArr="",document.getElementsByClassName("el-cascader")[1].click(),t.$message.info("取消添加")}))}},text:function(){var e=this;this.message.length<1&&this.$message.error("请输入需要识别的内容");var t=v.a.parse(this.message)[0],a=this.provinces.findIndex((function(e){return e.label===t.province}));if(console.log(111,t,a),""===t.area||-1===a){console.log(t);var r={city:t.city,details:t.details};""===r.details||""===r.city?this.$message.error("识别失败,请手动填写"):Object(c["f"])(r).then((function(a){if(200===a.code){if(!a.data.area)return void e.$message.error("识别失败,请手动填写");e.form.customer_name=t.name,e.form.customer_phone=t.mobile,e.form.province=t.province,e.form.city=t.city,e.form.area=a.data.area,e.form.address=t.details,e.areaAll=[a.data.province,a.data.city,a.data.area]}else e.$message.error("识别失败,请手动填写")}))}else this.form.customer_name=t.name,this.form.customer_phone=t.mobile,this.form.province=t.province,this.form.city=t.city,this.form.area=t.area,this.form.address=t.details,this.areaAll=[t.province,t.city,t.area]},submit:function(){var e=this;this.loadingFull=!0,Object(l["A"])({search_name:this.form.customer_phone}).then((function(t){t.data.length>0?e.form.is_agent=1:e.form.is_agent=0;var a=JSON.parse(JSON.stringify(e.styleList));return a.forEach((function(e){e.ImgList&&(e.ImgList=e.ImgList.map((function(e){return e.url})))})),e.form.wear_time=e.time+e.week,e.form.total=a.reduce((function(e,t){return e+Number(t.total)}),0),e.form.problemList=a,e.form.province=e.areaAll[0],e.form.city=e.areaAll[1],e.form.area=e.areaAll[2],console.log("form",e.form),e.areaAll.length<1?(console.log("areaAll",e.areaAll),e.$message.error("请补全信息:省市区域、县"),e.loadingFull=!1,!1):e.form.address?e.form.apply_user_nickname?e.form.apply_crown_nickname?e.form.warea_name?e.form.wear_time?e.form.problemList.length<1?(console.log("problemList",e.form.problemList),e.$message.error("请补全信息:货物信息"),e.loadingFull=!1,!1):e.form.total?e.form.apply_user_id?e.form.apply_crown_id?void Object(l["k"])(e.form).then((function(t){200===t.code?(e.$message.success("提交成功"),e.loadingFull=!1,e.clear(),e.$router.push({name:"ReturnsAgentChange"})):(e.loadingFull=!1,e.$message.error("提交失败"))})).catch((function(){e.loadingFull=!1})):(console.log("apply_crown_id",e.form.apply_crown_id),e.$message.error("请补全信息:批发商id"),e.loadingFull=!1,!1):(console.log("apply_user_id",e.form.apply_user_id),e.$message.error("请补全信息:客户id"),e.loadingFull=!1,!1):(console.log("total",e.form.total),e.$message.error("请补全信息:货物信息总数量"),e.loadingFull=!1,!1):(console.log("wear_time",e.form.wear_time),e.$message.error("请补全信息:穿着时间"),e.loadingFull=!1,!1):(console.log("warea_name",e.form.warea_name),e.$message.error("请补全信息:所在服务"),e.loadingFull=!1,!1):(console.log("apply_crown_nickname",e.form.apply_crown_nickname),e.$message.error("请补全信息:团队老大"),e.loadingFull=!1,!1):(console.log("apply_user_nickname",e.form.apply_user_nickname),e.$message.error("请补全信息:客户昵称"),e.loadingFull=!1,!1):(console.log("address",e.form.address),e.$message.error("请补全信息:详细地址"),e.loadingFull=!1,!1)}))},closeAddStyle:function(){this.visible.shopping=!1,this.getnumPage()},back:function(){this.clear(),this.$router.go(-1)},searchName:function(){var e=this;this.search?(this.numData=this.numDataList.filter((function(t){return t.all.includes(e.search)})),this.numPage.total=this.numData.length):this.getnumPage()},getSTY:function(){var e=[];this.numDataList.forEach((function(t){e.push(t.good_name)})),this.styStyle=Array.from(new Set(e))},addaddStyleSubmit:function(){var e=this;if(!this.addStyle.good_name||!this.addStyle.size||!this.addStyle.storage)return this.$message.error("请补全信息!"),!1;Object(l["c"])(this.addStyle).then((function(t){200===t.code?(e.$message.success("添加成功"),e.getnumPaget()):e.$message.error(t.message||"添加失败")}))},handleEdit:function(e){var t=this;if(!e.storage)return this.$message.error("请补全信息!"),!1;Object(l["F"])({id:e.id,storage:e.storage}).then((function(e){200===e.code?(t.$message.success("编辑成功"),t.numData.forEach((function(e,t,a){e.edit=!1}))):t.$message.error(e.message||"编辑失败")}))},eachRe:function(e){var t=this,a=[];return e.map((function(e){var r={};r.label=e.good_name,r.value=e.good_name,e.get_good&&(r.children=t.eachRed(e.get_good)),a.push(r)})),a},eachRed:function(e){var t=[];return e.map((function(e){var a={};a.label=e.size,a.value=e.size,t.push(a)})),t},getnumPaget:function(){var e=this;Object(l["v"])().then((function(t){if(200===t.code){var a=e.eachRe(t.data);e.styleDatas=a}else e.$message.error(t.message||"获取失败")})),Object(l["B"])().then((function(t){200===t.code?(t.data.list.forEach((function(e,t,a){e.all=e.good_name+e.size,e.edit=!1})),e.numData=t.data.list,e.numDataList=t.data.list,e.numPage.total=e.numData.length,e.getSTY()):e.$message.error(t.message||"获取失败")}))},getLabel:function(){var e=this;Object(l["w"])().then((function(t){200===t.code?e.labelList=t.data:e.$message.error(t.message||"获取失败")}))},getnumPage:function(){var e=this;Object(l["B"])().then((function(t){200===t.code?(t.data.list.forEach((function(e,t,a){e.all=e.good_name+e.size,e.edit=!1})),e.numData=t.data.list,e.numPage.total=e.numData.length):e.$message.error(t.message||"获取失败")}))},handleSizeChange:function(e){this.numPage.pageSize=e},handleCurrentChange:function(e){this.numPage.currentPage=e},handleSubmitAdd:function(){var e=this;this.storeImgList&&(this.styForm.ImgList=this.storeImgList),1===this.styForm.same&&(this.styForm.huanstyleAll=this.styForm.styleAll),console.log(this.styForm);var t=this.styForm,a=t.total,r=t.styleAll,n=t.huanstyleAll,i=t.problemArr,o=t.ImgList,s=t.problem,c=t.problem_attr,m=t.label,u=t.same;if(!this.styForm.label)return this.$message.error("请选择标识!"),!1;if(!this.styForm.styleAll)return this.$message.error("请选择问题款式!"),!1;if(""===this.styForm.same)return this.$message.error("请选择是否同款调货!"),!1;if(!this.styForm.huanstyleAll)return this.$message.error("请选择调换款式!"),!1;if(!this.styForm.total)return this.$message.error("请输入调换数量!"),!1;if(!this.styForm.problemArr)return this.$message.error("请选择调换原因!"),!1;var d=n[0],f=n[1],h=r[0],p=r[1],_={good_name:h,good_size:p,total:a,real_good_name:d,real_good_size:f,problemArr:i,ImgList:o,problem_attr:c,problem:s,label:m,same:u};if("质量问题"===_.problem_attr&&this.storeImgList.length<1)return this.$message.error("请上传图片"),!1;var v={real_change_good:d,real_change_size:f,total:a};this.loadingFull=!0,Object(l["g"])(v).then((function(t){e.loadingFull=!1,200===t.code?(1===e.visible.style?e.styleList.push(_):e.styleList[e.visible.i]=_,e.visible.station=!1,e.styForm={},e.storeImgList=[]):e.$message.error(t.message||"库存不足")})).catch((function(){e.loadingFull=!1}))},editStyle:function(e,t){e.styleAll=[e.good_name,e.good_size],e.huanstyleAll=[e.real_good_name,e.real_good_size],console.log(e),this.styForm=JSON.parse(JSON.stringify(e)),this.storeImgList=JSON.parse(JSON.stringify(e.ImgList)),this.visible.i=t,this.visible.station=!0},submitAddUnit:function(){var e=this;if(!this.visible.label)return this.$message.error("请输入标识"),!1;Object(l["a"])({label:this.visible.label}).then((function(t){200===t.code?(e.$message.success("添加成功"),e.visible.imLable=!1,e.visible.label="",e.getLabel()):e.$message.error(t.message||"添加失败")})).catch((function(){e.$message.error("添加失败")}))},del:function(e){var t=this;this.$confirm("确定要删除吗 ?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.styleList.splice(e,1)})).catch((function(){}))},copy:function(e){var t=this;this.$confirm("确定要复制吗 ?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.styleList.push(t.styleList[e]),t.$message.success("复制成功")})).catch((function(){}))},handleStorePreview:function(e){this.visible.add_img=!0,this.visible.add_img_url=[e.url]},handleStoreDelete:function(e){this.storeImgList=this.storeImgList.filter((function(t){return t.uid!==e.uid}))},httpRequestUpload:function(e){var t=this,a=e.file;this.loadingFull=!0;var r=new FormData;r.append("file",a),Object(l["L"])(r).then((function(e){200===e.code?(t.storeImgList.push({name:a.name,uid:a.uid,url:e.data}),t.loadingFull=!1):t.loadingFull=!1}))},handleSeeMemberInfo:function(e){this.memberInfo=e,this.visibleMemberInfo=!0},changeOtherInfo:function(e){var t=this;this.getOtherInfo(e,(function(e){t.getSendList()}))},getOtherInfo:function(){var e=Object(o["a"])(Object(i["a"])().mark((function e(t,a){var r,n,o,s;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 this.loadingFull=!0,e.prev=4,e.next=7,Object(l["J"])({id:t});case 7:r=e.sent,n=r.code,o=r.message,200===n?(s=r.data,this.handleSeeMemberInfo(s),a&&a(s)):this.$message.error(o),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}(),handleSearch:function(){var e=this;this.clearCustomer(),this.searchList=[],this.search_name?(this.loadingFull=!0,Object(l["A"])({search_name:this.search_name,warea_id:this.warea_id}).then((function(t){if(e.loadingFull=!1,200===t.code){if(0===t.data.length)return e.$message.error("未查询到客户,请重新输入"),!1;t.data.forEach((function(e,t,a){e.title=e.nickname.length>12?e.nickname.slice(0,12):e.nickname})),e.showSearch=!0,e.searchList=t.data}else e.$message.error(t.message||"获取失败")})).catch((function(t){e.loadingFull=!1,console.log(t)}))):this.$message.error("请输入查询内容")},getshowName:function(e){var t=this;this.loadingFull=!0;var a=this;a.form.apply_user_nickname=e.nickname,a.form.apply_user_id=e.id,Object(l["s"])({id:e.id}).then((function(e){t.loadingFull=!1,200===e.code?(a.form.apply_crown_nickname=e.data.nickname,a.form.apply_crown_id=e.data.id,a.form.warea_name=e.data.warea_name):a.$message.error(e.message)})).catch((function(e){console.log(e),t.loadingFull=!1})),Object(l["t"])({user_id:e.id}).then((function(e){t.loadingFull=!1,200===e.code?e.data.length>0&&(t.showSearch=!1,t.customerList=e.data,t.showcustomer=!0):a.$message.error(e.message)})).catch((function(e){console.log(e),t.loadingFull=!1}))},levelStatus:function(e){return Object(h["c"])(e)},handleAdd:function(){this.$router.push({name:"returns_add"})}}},b=g,y=(a("f878c"),a("2877")),w=Object(y["a"])(b,r,n,!1,null,"35f0be5e",null);t["default"]=w.exports},f72b:function(e,t,a){"use strict";a.r(t);var r=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 r=t.row;return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.showLink(r.id)}}},[e._v(e._s(r.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 r=t.row;return[a("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.levelStatus(r.level).color}},[e._v("\n "+e._s(e.levelStatus(r.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)},n=[],i=a("c7eb"),o=(a("96cf"),a("1da1")),s=(a("456d"),a("7f7f"),a("ac6a"),a("44f1")),l=a("8975"),c=a("8e44"),m=a("ed08"),u=a("313e"),d={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(m["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,r=e.data.now;r.name=r.nickname,r.blue=!0,e.data.history.length>0&&a.forEach((function(e){e.name=e.nickname,e.blue=!0}));var n=[{name:t.info.nickname,num:1,collapsed:!1,children:[{name:"分享人",collapsed:!1,num:2,children:[r]},{name:"历史分享人",collapsed:!1,children:a,num:3}]}];t.nowHistory=n}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=u.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+"'/>",r=t.name?t.name:t.nickname,n=t.realname||"无",i=t.mobile||"无",o=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>客户昵称:"+r+"<br/>真实姓名:"+n+"<br/>联系方式:"+i+"<br/>客户类别:"+o+"</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=u.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 r in e)e[r].num===t?e[r].collapsed=!0:a.closeNode(e[r].children,t)},openNode:function(e,t){var a=this;for(var r in e)e[r].num===t?e[r].collapsed=!1:a.openNode(e[r].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 r=[],n=[];Object.keys(t.data[0]).forEach((function(e){r.push(e),n.push(e)}));var i=t.data.map((function(e){return n.map((function(t){return e[t]}))}));a.export_json_to_excel({header:r,data:i,filename:"".concat(Object(l["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(o["a"])(Object(i["a"])().mark((function e(t){var a,r,n,o;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,r=a.code,n=a.message,200===r?(o=a.data,this.teamInfo=o,this.visible.team=!0):this.$message.error(n),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}()}},f=d,h=a("2877"),p=Object(h["a"])(f,r,n,!1,null,null,null);t["default"]=p.exports},f878c:function(e,t,a){"use strict";a("a0ad")}}]);