| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15e60f2f"],{"2c3e":function(t,e,n){var i=n("da84"),a=n("83ab"),r=n("9f7f").MISSED_STICKY,o=n("c6b6"),s=n("edd0"),c=n("69f3").get,u=RegExp.prototype,l=i.TypeError;a&&r&&s(u,"sticky",{configurable:!0,get:function(){if(this!==u){if("RegExp"===o(this))return!!c(this).sticky;throw l("Incompatible receiver, RegExp required")}}})},"4d63":function(t,e,n){var i=n("83ab"),a=n("da84"),r=n("e330"),o=n("94ca"),s=n("7156"),c=n("9112"),u=n("241c").f,l=n("3a9b"),d=n("44e7"),f=n("577e"),m=n("90d8"),g=n("9f7f"),h=n("aeb0"),v=n("cb2d"),p=n("d039"),b=n("1a2d"),w=n("69f3").enforce,x=n("2626"),_=n("b622"),y=n("fce3"),k=n("107c"),C=_("match"),j=a.RegExp,O=j.prototype,R=a.SyntaxError,E=r(O.exec),D=r("".charAt),M=r("".replace),I=r("".indexOf),$=r("".slice),S=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,W=/a/g,L=/a/g,V=new j(W)!==W,P=g.MISSED_STICKY,z=g.UNSUPPORTED_Y,q=i&&(!V||P||y||k||p((function(){return L[C]=!1,j(W)!=W||j(L)==L||"/a/i"!=j(W,"i")}))),A=function(t){for(var e,n=t.length,i=0,a="",r=!1;i<=n;i++)e=D(t,i),"\\"!==e?r||"."!==e?("["===e?r=!0:"]"===e&&(r=!1),a+=e):a+="[\\s\\S]":a+=e+D(t,++i);return a},N=function(t){for(var e,n=t.length,i=0,a="",r=[],o={},s=!1,c=!1,u=0,l="";i<=n;i++){if(e=D(t,i),"\\"===e)e+=D(t,++i);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:E(S,$(t,i+1))&&(i+=2,c=!0),a+=e,u++;continue;case">"===e&&c:if(""===l||b(o,l))throw new R("Invalid capture group name");o[l]=!0,r[r.length]=[l,u],c=!1,l="";continue}c?l+=e:a+=e}return[a,r]};if(o("RegExp",q)){for(var T=function(t,e){var n,i,a,r,o,u,g=l(O,this),h=d(t),v=void 0===e,p=[],b=t;if(!g&&h&&v&&t.constructor===T)return t;if((h||l(O,t))&&(t=t.source,v&&(e=m(b))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),b=t,y&&"dotAll"in W&&(i=!!e&&I(e,"s")>-1,i&&(e=M(e,/s/g,""))),n=e,P&&"sticky"in W&&(a=!!e&&I(e,"y")>-1,a&&z&&(e=M(e,/y/g,""))),k&&(r=N(t),t=r[0],p=r[1]),o=s(j(t,e),g?this:O,T),(i||a||p.length)&&(u=w(o),i&&(u.dotAll=!0,u.raw=T(A(t),n)),a&&(u.sticky=!0),p.length&&(u.groups=p)),t!==b)try{c(o,"source",""===b?"(?:)":b)}catch(x){}return o},U=u(j),F=0;U.length>F;)h(T,j,U[F++]);O.constructor=T,T.prototype=O,v(a,"RegExp",T,{constructor:!0})}x("RegExp")},"61f7":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return l}));var i=n("fc11"),a=n("f3f3");n("ac1f"),n("00b4"),n("5319"),n("4d63"),n("c607"),n("2c3e"),n("25f0"),n("498a"),n("d3b7"),n("b64b"),n("99af");function r(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var i in n)if(new RegExp("(".concat(i,")")).test(e)){var a=n[i]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:o(a))}return e}function o(t){return("00"+t).substr(t.length)}var s={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};var c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a["a"])({required:!0,message:t,type:"string"},e)}function l(t){return d.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(u,"请输入%s"),c(l,"%s格式不正确");var d=Object.keys(s).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(i["a"])({},e,t);return Object(a["a"])(Object(a["a"])({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),r)},c(t[e],s[e]),t}),{})},"7ac0":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"i-layout-page-header"},[n("div",{staticClass:"i-layout-page-header"},[n("span",{staticClass:"ivu-page-header-title mr20",domProps:{textContent:t._s(t.$route.meta.title)}})])]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{attrs:{type:"flex",gutter:24,align:"middle"}},[n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"搜索:","label-for":"status"}},[n("Input",{staticStyle:{width:"300px"},attrs:{search:"","enter-button":"",placeholder:"请输入姓名、UID"},on:{"on-search":t.userSearchs},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1)],1)],1)],1)],1),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{staticClass:"ivu-mt box-wrapper"},[n("Col",{ref:"rightBox",attrs:{xs:24,sm:24}},[n("Row",{attrs:{type:"flex"}},[n("Col",t._b({},"Col",t.grid,!1),[n("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd("0")}}},[t._v("添加事业部")])],1)],1),n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.userLists,loading:t.loading,"highlight-row":"","no-formValidate-text":"暂无数据","no-filtered-formValidate-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatars",fn:function(t){var e=t.row;t.index;return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}},{key:"nickname",fn:function(e){var i=e.row;e.index;return[n("div",{staticClass:"acea-row"},[n("Icon",{directives:[{name:"show",rawName:"v-show",value:"男"===i.sex,expression:"row.sex === '男'"}],staticClass:"mr5",attrs:{type:"md-male",color:"#2db7f5",size:"15"}}),n("Icon",{directives:[{name:"show",rawName:"v-show",value:"女"===i.sex,expression:"row.sex === '女'"}],staticClass:"mr5",attrs:{type:"md-female",color:"#ed4014",size:"15"}}),n("div",{domProps:{textContent:t._s(i.nickname)}})],1)]}},{key:"status",fn:function(e){var i=e.row;e.index;return[n("i-switch",{attrs:{value:i.division_status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(i)}},model:{value:i.division_status,callback:function(e){t.$set(i,"division_status",e)},expression:"row.division_status"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"division_end_time",fn:function(e){var i=e.row;e.index;return[n("span",[t._v(" "+t._s(i.division_end_time))])]}},{key:"division_percent",fn:function(e){var i=e.row;e.index;return[n("span",[t._v(" "+t._s(i.division_percent)+"%")])]}},{key:"action",fn:function(e){var i=e.row,a=e.index;return[n("a",{on:{click:function(e){return t.jump(i.uid)}}},[t._v("查看代理商")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.groupAdd(i.uid)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(i,"删除员工",a)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1),n("Modal",{staticClass:"order_box",attrs:{scrollable:"",title:"代理商列表",width:"800","footer-hide":""},model:{value:t.staffModal,callback:function(e){t.staffModal=e},expression:"staffModal"}},[n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns2,data:t.clerkLists,loading:t.loading,"highlight-row":"","no-formValidate-text":"暂无数据","no-filtered-formValidate-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatars",fn:function(t){var e=t.row;t.index;return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}},{key:"nickname",fn:function(e){var i=e.row;e.index;return[n("div",{staticClass:"acea-row"},[n("Icon",{directives:[{name:"show",rawName:"v-show",value:"男"===i.sex,expression:"row.sex === '男'"}],staticClass:"mr5",attrs:{type:"md-male",color:"#2db7f5",size:"15"}}),n("Icon",{directives:[{name:"show",rawName:"v-show",value:"女"===i.sex,expression:"row.sex === '女'"}],staticClass:"mr5",attrs:{type:"md-female",color:"#ed4014",size:"15"}}),n("div",{domProps:{textContent:t._s(i.nickname)}})],1)]}},{key:"agent_end_time",fn:function(e){var i=e.row;e.index;return[n("span",[t._v(" "+t._s(t._f("formatDate")(i.agent_end_time)))])]}},{key:"division_percent",fn:function(e){var i=e.row;e.index;return[n("span",[t._v(" "+t._s(i.division_percent)+"%")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total2,current:t.clerkReqData.page,"show-elevator":"","show-total":"","page-size":t.clerkReqData.limit},on:{"on-change":t.clerkPageChange}})],1)],1)],1)},a=[],r=n("c964"),o=n("f3f3"),s=(n("a434"),n("96cf"),n("2f62")),c=n("bbbc"),u=n("61f7"),l={name:"agent_extra",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},total:0,total2:0,userLists:[],formInline:{uid:0,proportion:0,image:""},columns2:[{title:"用户UID",key:"uid",width:80},{title:"头像",slot:"avatars",minWidth:60},{title:"姓名",slot:"nickname",minWidth:150},{title:"邀请码",key:"division_invite",minWidth:150},{title:"分销比例",slot:"division_percent",minWidth:100},{title:"用户数量",key:"user_count",minWidth:100},{title:"订单数量",key:"order_count",minWidth:100}],columns:[{title:"用户UID",key:"uid",width:80},{title:"头像",slot:"avatars",minWidth:60},{title:"姓名",slot:"nickname",minWidth:150},{title:"邀请码",key:"division_invite",minWidth:150},{title:"分销比例",slot:"division_percent",minWidth:100},{title:"代理商数量",key:"agent_count",minWidth:100},{title:"订单数量",key:"order_count",minWidth:100},{title:"截止时间",slot:"division_end_time",minWidth:100},{title:"状态",slot:"status",minWidth:100},{title:"操作",slot:"action",fixed:"right",minWidth:120}],FromData:null,loading:!1,current:0,formValidate:{page:1,limit:15,keyword:""},staffModal:!1,clerkReqData:{uid:0,page:1,limit:15},clerkLists:[]}},filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(u["a"])(e,"yyyy-MM-dd hh:mm")}}},computed:Object(o["a"])(Object(o["a"])({},Object(s["e"])("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getList()},methods:{userSearchs:function(){this.formValidate.page=1,this.getList()},jump:function(t){this.clerkReqData.uid=t,this.getClerkList()},getClerkList:function(){var t=this;this.clerkReqData.division_type=2,Object(c["d"])(this.clerkReqData).then((function(e){t.clerkLists=e.data.list,t.total2=e.data.count,t.staffModal=!0}))},getList:function(){var t=this;this.loading=!0,this.formValidate.division_type=1,Object(c["l"])(this.formValidate).then(function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=n.data,t.userLists=i.list,t.total=i.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},clerkPageChange:function(){this.clerkReqData.page=index,this.getClerkList()},groupAdd:function(t){var e=this;this.$modalForm(Object(c["k"])(t)).then((function(t){e.getList()})).catch((function(t){}))},onchangeIsShow:function(t){var e=this,n={id:t.uid,status:t.division_status};Object(c["g"])(n).then(function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$Message.success(n.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},edit:function(t){},del:function(t,e,n){var i=this,a={title:e,method:"DELETE",uid:t.uid,url:"agent/division/del/1/".concat(t.uid)};this.$modalSure(a).then((function(t){i.$Message.success(t.msg),i.userLists.splice(n,1)})).catch((function(t){i.$Message.error(t.msg)}))}}},d=l,f=(n("adc3"),n("2877")),m=Object(f["a"])(d,i,a,!1,null,"3a347950",null);e["default"]=m.exports},adc3:function(t,e,n){"use strict";var i=n("f9d7"),a=n.n(i);a.a},bbbc:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"n",(function(){return o})),n.d(e,"m",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"j",(function(){return u})),n.d(e,"i",(function(){return l})),n.d(e,"o",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"f",(function(){return m})),n.d(e,"a",(function(){return g})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return v})),n.d(e,"d",(function(){return p})),n.d(e,"g",(function(){return b}));n("99af");var i=n("6b6c");function a(t){return Object(i["a"])({url:"agent/index",method:"get",params:t})}function r(t){return Object(i["a"])({url:"agent/spread",method:"PUT",data:t})}function o(t){return Object(i["a"])({url:"agent/statistics",method:"get",params:t})}function s(t,e){return Object(i["a"])({url:t,method:"get",params:e})}function c(t){return Object(i["a"])({url:"agent/look_code",method:"get",params:t})}function u(t){return Object(i["a"])({url:"agent/look_xcx_code",method:"get",params:t})}function l(t){return Object(i["a"])({url:"agent/look_h5_code",method:"get",params:t})}function d(t){return Object(i["a"])({url:"export/userAgent",method:"get",params:t})}function f(t){return Object(i["a"])({url:"agent/division/list",method:"get",params:t})}function m(t){return Object(i["a"])({url:"agent/division/agent_apply/list",method:"get",params:t})}function g(t){return Object(i["a"])({url:"agent/division/agent/create/".concat(t),method:"get"})}function h(t,e){return Object(i["a"])({url:"agent/division/examine_apply/".concat(t,"/").concat(e),method:"get"})}function v(t){return Object(i["a"])({url:"agent/division/create/".concat(t),method:"get"})}function p(t){return Object(i["a"])({url:"agent/division/down_list",method:"get",params:t})}function b(t){return Object(i["a"])({url:"agent/division/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}},c607:function(t,e,n){var i=n("da84"),a=n("83ab"),r=n("fce3"),o=n("c6b6"),s=n("edd0"),c=n("69f3").get,u=RegExp.prototype,l=i.TypeError;a&&r&&s(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===o(this))return!!c(this).dotAll;throw l("Incompatible receiver, RegExp required")}}})},edd0:function(t,e,n){var i=n("13d2"),a=n("9bf2");t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),a.f(t,e,n)}},f9d7:function(t,e,n){}}]);
|