You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
39 KiB
1 lines
39 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f234100e"],{"0436":function(t,e,r){"use strict";var n=r("2f62");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c={name:"publicSearchFrom",props:{fromList:{type:Array},searchFrom:{type:Object},treeData:{type:Object},isExist:{type:Object}},data:function(){return{date:"全部",withdrawalTxt:"提现状态",paymentTxt:"提现方式"}},computed:a(a({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){},methods:{changeTree:function(){}}},l=(r("475b"),r("2877")),u=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",[e("Form",{ref:"orderData",staticClass:"tabform",attrs:{"label-width":t.labelWidth,"label-position":t.labelPosition}},[t._l(t.fromList,(function(r,n){return e("Row",{key:n,attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{xl:8,lg:8,md:8,sm:24,xs:24}},[e("FormItem",{attrs:{label:r.title+":"}},[e("RadioGroup",{attrs:{type:"button"},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}},t._l(r.fromTxt,(function(n,o){return e("Radio",{key:o,attrs:{label:n.text}},[t._v(t._s(n.text)+t._s(r.num))])})),1)],1)],1),r.custom?e("Col",[e("FormItem",{staticClass:"tab_data"},[e("DatePicker",{staticClass:"width20",attrs:{editable:!1,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"}})],1)],1):t._e()],1)})),t.isExist.existOne?e("Row",{attrs:{gutter:24,type:"flex"}},[e("Col",{staticClass:"mr",attrs:{span:"10"}},[e("FormItem",{attrs:{label:t.searchFrom.title+":",prop:"real_name","label-for":"real_name"}},[e("Input",{attrs:{search:"","enter-button":"",placeholder:t.searchFrom.place,"element-id":"name"}})],1)],1),e("Col",[e("Button",{staticClass:"mr"},[t._v("导出")]),e("span",{staticClass:"Refresh"},[t._v("刷新")]),e("Icon",{attrs:{type:"ios-refresh"}})],1)],1):t._e(),t.isExist.existTwo?e("Row",{staticClass:"withdrawal",attrs:{gutter:24,type:"flex"}},[e("Col",{staticClass:"item",attrs:{span:"2.5"}},[e("TreeSelect",{directives:[{name:"width",rawName:"v-width",value:160,expression:"160"}],attrs:{data:t.treeData.withdrawal},on:{"on-change":t.changeTree},model:{value:t.withdrawalTxt,callback:function(e){t.withdrawalTxt=e},expression:"withdrawalTxt"}})],1),e("Col",{staticClass:"item",attrs:{span:"2.5"}},[e("TreeSelect",{directives:[{name:"width",rawName:"v-width",value:160,expression:"160"}],attrs:{data:t.treeData.payment},on:{"on-change":t.changeTree},model:{value:t.paymentTxt,callback:function(e){t.paymentTxt=e},expression:"paymentTxt"}})],1),e("Col",{staticClass:"item",attrs:{span:"6"}},[e("Input",{attrs:{search:"","enter-button":"",placeholder:"微信名称、姓名、支付宝账号、银行卡号","element-id":"name"}})],1)],1):t._e()],2)],1)}),[],!1,null,"ad82d0da",null);e.a=u.exports},1698:function(t,e,r){"use strict";r.d(e,"g",(function(){return o})),r.d(e,"f",(function(){return i})),r.d(e,"e",(function(){return a})),r.d(e,"h",(function(){return s})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return l})),r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return f}));var n=r("b6bd");function o(t){return Object(n.a)({url:"agent/level",method:"get",params:t})}function i(t,e){return Object(n.a)({url:e,method:"get",params:t})}function a(t,e){return Object(n.a)({url:e,method:"get",params:t})}function s(t){return Object(n.a)({url:t,method:"PUT"})}function c(t){return Object(n.a)({url:t,method:"PUT"})}function l(t){return Object(n.a)({url:"agent/level_task",method:"get",params:t})}function u(t,e){return Object(n.a)({url:e,method:"get",params:t})}function f(t,e){return Object(n.a)({url:e,method:"get",params:t})}},"1cde":function(t,e,r){},3061:function(t,e,r){"use strict";r.r(e);var n=r("a584"),o=r("0436"),i=r("2f62"),a=r("2e83"),s=r("1698"),c=r("bbbc"),l=r("0b65");function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),s=new V(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var m="suspendedStart",p="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function x(){}var _={};l(_,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(I([])));j&&j!==r&&n.call(j,a)&&(_=j);var k=x.prototype=b.prototype=Object.create(_);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,s){var c=d(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=m;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=C(s,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,s,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v={name:"promotersList",data:function(){return{modals:!1,options:l.a,fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}],fromTxt2:[{text:"全部",val:0},{text:"一级推广人",val:1},{text:"二级推广人",val:2}]},formValidate:{limit:15,page:1,nickname:"",data:"",type:"",order_id:"",uid:0},loading:!1,tabList:[],total:0,timeVal:[],columns4:[],listTitle:""}},computed:m(m({},Object(i.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:100},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{onCancel:function(){this.formValidate={limit:15,page:1,nickname:"",data:"",type:"",order_id:"",uid:0},this.timeVal=[]},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):""},getList:function(t,e){var n=this;this.listTitle=e,this.rowsList=t,this.loading=!0;var o="";o="man"===this.listTitle?"agent/stair":"agent/stair/order",this.formValidate.uid=t.uid,Object(c.f)(o,this.formValidate).then(function(){var t,e=(t=f().mark((function t(e){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=e.data,n.tabList=o.list,n.total=o.count,"man"===n.listTitle?n.columns4=[{title:"UID",minWidth:80,key:"uid"},{title:"头像",key:"avatar",minWidth:80,render:function(t,e){return t("viewer",[t("div",{style:{width:"36px",height:"36px",borderRadius:"4px",cursor:"pointer"}},[t("img",{attrs:{src:e.row.avatar?e.row.avatar:r("7153")},style:{width:"100%",height:"100%"}})])])}},{title:"用户信息",key:"nickname",minWidth:120},{title:"是否推广员",key:"promoter_name",minWidth:100},{title:"推广人数",key:"spread_count",sortable:!0,minWidth:90},{title:"订单数",key:"order_count",sortable:!0,minWidth:90},{title:"关注时间",key:"add_time",sortable:!0,minWidth:130}]:n.columns4=[{title:"订单ID",key:"order_id"},{title:"用户信息",key:"user_info"},{title:"时间",key:"_add_time"},{title:"返佣金额",key:"brokerage_price",render:function(t,e){return t("viewer",[t("span",e.row.brokerage_price||0)])}}],n.loading=!1;case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){h(i,n,o,a,s,"next",t)}function s(t){h(i,n,o,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()).catch((function(t){n.loading=!1,n.tabList=[],n.$Message.error(t.msg)}))},pageChange:function(){this.formValidate.page=1,this.getList(this.rowsList,this.listTitle)},userSearchs:function(){this.formValidate.page=1,this.getList(this.rowsList,this.listTitle)}}},y=r("2877"),g=Object(y.a)(v,(function(){var t=this,e=t._self._c;return e("div",[e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"man"===t.listTitle?"统计推广人列表":"推广订单","mask-closable":!1,width:"900"},on:{"on-cancel":t.onCancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[e("div",{staticClass:"table_box"},[e("Form",{ref:"formValidate",staticClass:"tabform",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"时间选择:"}},[e("DatePicker",{staticClass:"input-add",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),e("FormItem",{attrs:{label:"用户类型:"}},[e("Select",{staticClass:"input-add",model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},t._l(t.fromList.fromTxt2,(function(r,n){return e("Option",{key:n,attrs:{value:r.val}},[t._v(t._s(r.text))])})),1)],1),e("FormItem",{attrs:{label:"搜索:"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入请姓名、电话、UID"},model:{value:t.formValidate.nickname,callback:function(e){t.$set(t.formValidate,"nickname",e)},expression:"formValidate.nickname"}})],1),"man"!==t.listTitle?e("FormItem",{attrs:{label:"订单号:"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入请订单号"},model:{value:t.formValidate.order_id,callback:function(e){t.$set(t.formValidate,"order_id",e)},expression:"formValidate.order_id"}})],1):t._e(),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.userSearchs()}}},[t._v("查询")])],1)],1),e("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","max-height":"400","no-filtered-data-text":"暂无筛选结果"}}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"1a72cadc",null).exports,b=r("8c03");function w(t){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */x=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),s=new V(n||[]);return o(a,"_invoke",{value:P(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var h="suspendedStart",d="suspendedYield",m="executing",p="completed",v={};function y(){}function g(){}function b(){}var _={};l(_,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(I([])));j&&j!==r&&n.call(j,a)&&(_=j);var k=b.prototype=y.prototype=Object.create(_);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==w(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(u).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=h;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=C(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(w(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,s,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function _(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function O(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_(i,n,o,a,s,"next",t)}function s(t){_(i,n,o,a,s,"throw",t)}a(void 0)}))}}function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function k(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?j(Object(r),!0).forEach((function(e){L(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function L(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var S={name:"agentManage",components:{cardsData:n.a,searchFrom:o.a,promotersList:g,customerInfo:b.default},data:function(){return{customerShow:!1,promoterShow:!1,modals:!1,spinShow:!1,grid:{xl:7,lg:10,md:12,sm:24,xs:24},options:l.a,formValidate:{nickname:"",data:"",page:1,limit:15},date:"all",total:0,cardLists:[],loading:!1,tableList:[],timeVal:[],columns:[{title:"ID",key:"uid",sortable:!0,width:80},{title:"头像",key:"headimgurl",minWidth:60,render:function(t,e){return t("viewer",[t("div",{style:{width:"36px",height:"36px",borderRadius:"4px",cursor:"pointer"}},[t("img",{attrs:{src:e.row.headimgurl?e.row.headimgurl:r("7153")},style:{width:"100%",height:"100%"}})])])}},{title:"用户信息",slot:"nickname",minWidth:120},{title:"推广用户数量",key:"spread_count",minWidth:125},{title:"订单数量",key:"order_count",minWidth:90},{title:"订单金额",key:"order_price",minWidth:120},{title:"分销等级",slot:"agentLevel",minWidth:120},{title:"账户佣金",key:"brokerage_money",minWidth:120},{title:"已提现金额",key:"extract_count_price",minWidth:120},{title:"提现次数",key:"extract_count_num",minWidth:100},{title:"未提现金额",key:"new_money",minWidth:105},{title:"上级推广人",key:"spread_name",minWidth:105},{title:"操作",slot:"right",minWidth:130}],code_src:"",code_xcx:"",code_h5:"",formInline:{uid:0,spread_uid:0,image:""}}},computed:k(k({},Object(i.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList(),this.getStatistics()},methods:{putSend:function(t){var e=this;this.$refs[t].validate((function(r){if(r){if(!e.formInline.spread_uid)return e.$Message.error("请上传用户");Object(c.b)(e.formInline).then((function(r){e.promoterShow=!1,e.$Message.success(r.msg),e.getList(),e.$refs[t].resetFields()})).catch((function(t){e.$Message.error(t.msg)}))}}))},exports:function(){var t=O(x().mark((function t(){var e,r,n,o,i,s,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],r=[],n=[],o="",(i=JSON.parse(JSON.stringify(this.formValidate))).page=1,s=0;case 5:if(!(s<i.page+1)){t.next=22;break}return t.next=8,this.getExcelData(i);case 8:if(c=t.sent,o||(o=c.filename),r.length||(r=c.filekey),e.length||(e=c.header),!c.export.length){t.next=17;break}n=n.concat(c.export),i.page++,t.next=19;break;case 17:return Object(a.a)(e,r,o,n),t.abrupt("return");case 19:s++,t.next=5;break;case 22:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),getExcelData:function(t){return new Promise((function(e,r){Object(c.h)(t).then((function(t){return e(t.data)}))}))},changeMenu:function(t,e,r){var n=this;switch(e){case"1":this.promoters(t,"order");break;case"2":this.spreadQR(t);break;case"3":this.$modalForm(Object(s.e)({uid:t.uid},"/agent/get_level_form")).then((function(){return n.getList()}))}},customer:function(){this.customerShow=!0},imageObject:function(t){this.customerShow=!1,this.formInline.spread_uid=t.uid,this.formInline.image=t.image},del:function(t,e,r){var n=this,o={title:e,num:r,url:"agent/stair/delete_spread/".concat(t.uid),method:"PUT",ids:""};this.$modalSure(o).then((function(t){n.$Message.success(t.msg),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},edit:function(t){this.promoterShow=!0,this.formInline.uid=t.uid},cancel:function(t){this.promoterShow=!1,this.$refs[t].resetFields()},promoters:function(t,e){this.$refs.promotersLists.modals=!0,this.$refs.promotersLists.getList(t,e)},getStatistics:function(){var t=this,e={nickname:this.formValidate.nickname,data:this.formValidate.data};Object(c.g)(e).then(function(){var e=O(x().mark((function e(r){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=r.data).res.forEach((function(t){return t.col=4})),t.cardLists=n.res;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.formValidate.page=1,t[0]||(this.formValidate.data=""),this.getList(),this.getStatistics()},selectChange:function(t){this.formValidate.page=1,this.formValidate.data=t,this.timeVal=[],this.getList(),this.getStatistics()},getList:function(){var t=this;this.loading=!0,Object(c.a)(this.formValidate).then(function(){var e=O(x().mark((function e(r){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tableList=n.list,t.total=r.data.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()},userSearchs:function(){this.formValidate.page=1,this.getList(),this.getStatistics()},spreadQR:function(t){this.code_xcx="",this.modals=!0,this.rows=t},getWeChat:function(){var t=this;this.spinShow=!0;var e={uid:this.rows.uid,action:"wechant_code"};Object(c.c)(e).then(function(){var e=O(x().mark((function e(r){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.code_src=n.code_src,t.spinShow=!1;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},getXcx:function(){var t=this;this.spinShow=!0,this.code_xcx="";var e={uid:this.rows.uid};Object(c.e)(e).then(function(){var e=O(x().mark((function e(r){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.code_xcx=n.code_src,t.spinShow=!1;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},getH5:function(){var t=this;this.spinShow=!0;var e={uid:this.rows.uid};Object(c.d)(e).then(function(){var e=O(x().mark((function e(r){var n;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.code_h5=n.code_src,t.spinShow=!1;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))}}},P=(r("e687"),Object(y.a)(S,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"时间选择:"}},[e("DatePicker",{staticClass:"input-add",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),e("FormItem",{attrs:{label:"搜索:","label-for":"status"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入用户信息、电话、ID"},model:{value:t.formValidate.nickname,callback:function(e){t.$set(t.formValidate,"nickname",e)},expression:"formValidate.nickname"}}),e("Button",{staticClass:"mr14",attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")]),e("Button",{directives:[{name:"auth",rawName:"v-auth",value:["export-userAgent"],expression:"['export-userAgent']"}],staticClass:"export",on:{click:t.exports}},[t._v("导出")])],1)],1)],1)]),t.cardLists.length>=0?e("cards-data",{attrs:{cardLists:t.cardLists}}):t._e(),e("Card",{attrs:{bordered:!1,"dis-hover":""}},[e("Table",{ref:"selection",staticClass:"ivu-mt",attrs:{columns:t.columns,data:t.tableList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"nickname",fn:function(r){var n=r.row;return[e("div",{staticClass:"name"},[e("div",{staticClass:"item"},[t._v("昵称:"+t._s(n.nickname))]),e("div",{staticClass:"item"},[t._v("姓名:"+t._s(n.real_name))]),e("div",{staticClass:"item"},[t._v("电话:"+t._s(n.phone))])])]}},{key:"agentLevel",fn:function(r){var n=r.row;return[e("div",[t._v(t._s(n.agentLevel?n.agentLevel.name:"--"))])]}},{key:"right",fn:function(r){var n=r.row,o=r.index;return[e("a",{on:{click:function(e){return t.promoters(n,"man")}}},[t._v("推广人")]),e("Divider",{attrs:{type:"vertical"}}),[e("Dropdown",{on:{"on-click":function(e){return t.changeMenu(n,e,o)}}},[e("a",{attrs:{href:"javascript:void(0)"}},[t._v("\n 更多\n "),e("Icon",{attrs:{type:"ios-arrow-down"}})],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"1"}},[t._v("推广订单")]),e("DropdownItem",{attrs:{name:"2"}},[t._v("推广方式")]),e("DropdownItem",{attrs:{name:"3"}},[t._v("赠送分销等级")])],1)],1)]]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("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),e("promoters-list",{ref:"promotersLists"}),e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"推广二维码","mask-closable":!1,width:"600"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[e("div",{staticClass:"acea-row row-around"},[e("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[t.code_xcx?e("div",{staticClass:"QRpic"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.code_xcx,expression:"code_xcx"}]})]):t._e(),e("span",{staticClass:"QRpic_sp2 mt10",on:{click:t.getXcx}},[t._v("小程序推广二维码")])])]),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):t._e()],1),e("Modal",{staticClass:"order_box",attrs:{scrollable:"",title:"修改推广人",closable:!1},model:{value:t.promoterShow,callback:function(e){t.promoterShow=e},expression:"promoterShow"}},[e("Form",{ref:"formInline",attrs:{model:t.formInline,"label-width":100},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"用户头像:",prop:"image"}},[e("div",{staticClass:"picBox",on:{click:t.customer}},[t.formInline.image?e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formInline.image,expression:"formInline.image"}]})]):e("div",{staticClass:"upLoad acea-row row-center-wrapper"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])])],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.putSend("formInline")}}},[t._v("提交")]),e("Button",{on:{click:function(e){return t.cancel("formInline")}}},[t._v("取消")])],1)],1),e("Modal",{attrs:{scrollable:"",title:"请选择商城用户",closable:!1,width:"50%"},model:{value:t.customerShow,callback:function(e){t.customerShow=e},expression:"customerShow"}},[e("customerInfo",{on:{imageObject:t.imageObject}})],1)],1)}),[],!1,null,"f31b1cd2",null));e.default=P.exports},4402:function(t,e,r){},"475b":function(t,e,r){"use strict";r("9e7e")},"607d":function(t,e,r){"use strict";r("1cde")},"9e7e":function(t,e,r){},a584:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=o(o(o({name:"cards",data:function(){return{}},props:{cardLists:Array}},"data",(function(){return{}})),"methods",{}),"created",(function(){})),a=(r("607d"),r("2877")),s=Object(a.a)(i,(function(){var t=this,e=t._self._c;return e("div",[e("Row",{staticClass:"ivu-mt",attrs:{type:"flex",align:"middle",gutter:16}},t._l(t.cardLists,(function(r,n){return e("Col",{key:n,staticClass:"ivu-mb",attrs:{xs:24,sm:24,md:24,lg:12,xl:8,xxl:{span:r.col}}},[e("Card",{staticClass:"card_cent",attrs:{shadow:"",padding:0}},[e("div",{staticClass:"card_box"},[e("div",{staticClass:"card_box_cir",class:{one:n%5==0,two:n%5==1,three:n%5==2,four:n%5==3,five:n%5==4}},[e("div",{staticClass:"card_box_cir1",class:{one1:n%5==0,two1:n%5==1,three1:n%5==2,four1:n%5==3,five1:n%5==4}},[r.type?e("span",{staticClass:"iconfont",class:r.className}):e("Icon",{attrs:{type:r.className}})],1)]),e("div",{staticClass:"card_box_txt"},[e("span",{staticClass:"sp1",domProps:{textContent:t._s(r.count||0)}}),e("span",{staticClass:"sp2",domProps:{textContent:t._s(r.name)}})])])])],1)})),1)],1)}),[],!1,null,"4e72687f",null);e.a=s.exports},bbbc:function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"g",(function(){return i})),r.d(e,"f",(function(){return a})),r.d(e,"c",(function(){return s})),r.d(e,"e",(function(){return c})),r.d(e,"d",(function(){return l})),r.d(e,"h",(function(){return u})),r.d(e,"b",(function(){return f}));var n=r("b6bd");function o(t){return Object(n.a)({url:"agent/index",method:"get",params:t})}function i(t){return Object(n.a)({url:"agent/statistics",method:"get",params:t})}function a(t,e){return Object(n.a)({url:t,method:"get",params:e})}function s(t){return Object(n.a)({url:"agent/look_code",method:"get",params:t})}function c(t){return Object(n.a)({url:"agent/look_xcx_code",method:"get",params:t})}function l(t){return Object(n.a)({url:"agent/look_h5_code",method:"get",params:t})}function u(t){return Object(n.a)({url:"export/userAgent",method:"get",params:t})}function f(t){return Object(n.a)({url:"agent/spread",method:"PUT",data:t})}},e687:function(t,e,r){"use strict";r("4402")}}]); |