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
17 KiB
1 lines
17 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6647948f"],{1947:function(t,e,r){},"232f":function(t,e,r){"use strict";var n=r("c24f"),a={name:"userLabel",props:{uid:{type:String|Number|Object,default:""}},data:function(){return{isUser:!1,labelList:[],activeIds:[],info:{},oid:""}},watch:{uid:{handler:function(t,e){t!=e&&this.getList()},deep:!0}},mounted:function(){this.getList()},methods:{getList:function(){var t=this,e=0;this.uid instanceof Object?(this.info=this.uid,e=!this.uid.all&&this.uid.uids.length>1||this.uid.all?0:this.uid.uids[0]):e=this.uid,this.oid=e,Object(n.l)(e).then((function(e){e.data.map((function(e){t.isUser=!0,e.label.map((function(e){e.disabled&&t.activeIds.push(e.id)}))})),t.labelList=e.data}))},selectLabel:function(t){if(t.disabled){var e=this.activeIds.indexOf(t.id);this.activeIds.splice(e,1),t.disabled=!1}else this.activeIds.push(t.id),t.disabled=!0},subBtn:function(){var t=this,e=[];this.labelList.map((function(t){t.label.map((function(t){0==t.disabled&&e.push(t.id)}))}));var r=this.info;r.label_id=this.activeIds,(0==this.oid?Object(n.G)(r):Object(n.F)(this.oid,{label_ids:this.activeIds,un_label_ids:e})).then((function(e){t.activeIds=[],t.labelList=[],t.$Message.success(e.msg),t.$emit("close",t.oid)})).catch((function(e){t.$Message.error(e.msg)}))},cancel:function(){this.activeIds=[],this.labelList=[],this.$emit("close")}}},i=(r("6f18"),r("2877")),o=Object(i.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"label-wrapper"},[e("div",{staticClass:"list-box"},[t._l(t.labelList,(function(r,n){return t.isUser?e("div",{key:n,staticClass:"label-box"},[e("div",{staticClass:"title"},[t._v(t._s(r.name))]),e("div",{staticClass:"list"},t._l(r.label,(function(r,n){return e("div",{key:n,staticClass:"label-item",class:{on:r.disabled},on:{click:function(e){return t.selectLabel(r)}}},[t._v(t._s(r.label_name))])})),0)]):t._e()})),t.isUser?t._e():e("div",[t._v("暂无标签")])],2),e("div",{staticClass:"footer"},[e("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),e("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"8d17409a",null);e.a=o.exports},"6f18":function(t,e,r){"use strict";r("fbcf")},"77d9":function(t,e,r){"use strict";r("1947")},a387:function(t,e,r){"use strict";r.r(e),r("232f");var n=r("c24f"),a=r("2f62"),i=r("a716");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 s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),s=new V(n||[]);return a(o,"_invoke",{value:P(t,r,s)}),o}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 p="suspendedStart",m="suspendedYield",v="executing",g="completed",b={};function y(){}function w(){}function _(){}var D={};f(D,l,(function(){return this}));var L=Object.getPrototypeOf,O=L&&L(L(C([])));O&&O!==r&&n.call(O,l)&&(D=O);var x=_.prototype=y.prototype=Object.create(D);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(a,i,s,l){var c=d(t[a],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,l)}),(function(t){r("throw",t,s,l)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return i=i?i.then(a,a):a()}})}function P(e,r,n){var a=p;return function(i,o){if(a===v)throw Error("Generator is already running");if(a===g){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var l=T(s,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var c=d(e,r,n);if("normal"===c.type){if(a=n.done?g:m,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=g,n.method="throw",n.arg=c.arg)}}}function T(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}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 M(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 C(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(o(e)+" is not iterable")}return w.prototype=_,a(x,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,u,"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,_):(t.__proto__=_,f(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},j(k.prototype),f(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new k(h(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},j(x),f(x,u,"Generator"),f(x,l,(function(){return this})),f(x,"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=C,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(M),!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 a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),M(r),b}},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 a=n.arg;M(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,a)}function c(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 u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(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 h={name:"card",data:function(){return{userDetails:i.a,userId:0,treeSelect:[],groupList:[],payList:[{val:"free",label:"免费"},{val:"weixin",label:"微信"},{val:"alipay",label:"支付宝"}],thead:[{title:"订单号",key:"order_id",minWidth:100},{title:"用户名",minWidth:50,ellipsis:!0,render:function(t,e){return t("span",e.row.user.nickname)}},{title:"上级推广人",minWidth:50,ellipsis:!0,render:function(t,e){return t("span",e.row.spread_uid_nickname)}},{title:"手机号码",minWidth:80,render:function(t,e){return t("span",e.row.user.phone||"--")}},{title:"会员类型",key:"member_type",minWidth:40},{title:"有效期限(天)",key:"vip_day",minWidth:50},{title:"支付金额(元)",key:"pay_price",minWidth:50},{title:"支付方式",key:"pay_type",minWidth:30},{title:"购买时间",key:"pay_time",minWidth:90},{title:"到期时间",minWidth:90,render:function(t,e){return t("span",e.row.overdue_time)}}],labelLists:[],tbody:[],loading:!1,total:0,formValidate:{name:"",sname:"",member_type:"",pay_type:"",add_time:""},options:{shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,r=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,r))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]},timeVal:[],tablePage:{page:1,limit:15}}},computed:u(u({},Object(a.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.sletab(),this.getMemberRecord(),this.groupLists()},methods:{sletab:function(){var t=this;Object(n.D)().then((function(e){t.treeSelect=e.data}))},selChange:function(){this.tablePage.page=1,this.getMemberRecord()},userSearchs:function(){this.tablePage.page=1,this.getMemberRecord()},groupLists:function(){var t=this;this.loading=!0,Object(n.U)(this.labelFrom).then(function(){var e,r=(e=s().mark((function e(r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.labelLists=n.list;case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(t){l(i,n,a,o,s,"next",t)}function s(t){l(i,n,a,o,s,"throw",t)}o(void 0)}))});return function(t){return r.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},paySearchs:function(){this.tablePage.page=1,this.getMemberRecord()},onchangeTime:function(t){this.timeVal=t,this.formValidate.add_time=this.timeVal[0]?this.timeVal.join("-"):"",this.tablePage.page=1,this.getMemberRecord()},getMemberRecord:function(){var t=this;this.loading=!0;var e={page:this.tablePage.page,limit:this.tablePage.limit,member_type:this.formValidate.member_type,pay_type:this.formValidate.pay_type,add_time:this.formValidate.add_time,name:this.formValidate.name,sname:this.formValidate.sname};Object(n.z)(e).then((function(e){t.loading=!1;var r=e.data,n=r.list,a=r.count;t.tbody=n,t.total=a})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},changeMenu:function(t,e,r){this.userId=t.uid;var n=[];switch(n.push(t.uid),e){case"1":this.$refs.userDetails.modals=!0,this.$refs.userDetails.activeName="info",this.$refs.userDetails.getDetails(t.uid);break;default:this.del(t,"解除【 "+t.nickname+" 】的上级推广人",r,"tuiguang")}},pageChange:function(t){this.tablePage.page=t,this.getMemberRecord()}}},d=(r("77d9"),r("2877")),p=Object(d.a)(h,(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",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("Select",{staticClass:"input-add",attrs:{clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.member_type,callback:function(e){t.$set(t.formValidate,"member_type",e)},expression:"formValidate.member_type"}},t._l(t.treeSelect,(function(r){return e("Option",{key:r.value,attrs:{value:r.value}},[t._v(t._s(r.label))])})),1)],1),e("FormItem",{attrs:{label:"支付方式:"}},[e("Select",{staticClass:"input-add",attrs:{clearable:""},on:{"on-change":t.paySearchs},model:{value:t.formValidate.pay_type,callback:function(e){t.$set(t.formValidate,"pay_type",e)},expression:"formValidate.pay_type"}},t._l(t.payList,(function(r){return e("Option",{key:r.val,attrs:{value:r.val}},[t._v(t._s(r.label))])})),1)],1),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("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入用户名称搜索","element-id":"name"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1),e("FormItem",{attrs:{label:"推广人:"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入推广人姓名手机号搜索","element-id":"sname"},model:{value:t.formValidate.sname,callback:function(e){t.$set(t.formValidate,"sname",e)},expression:"formValidate.sname"}}),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.selChange()}}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Table",{ref:"table",attrs:{columns:t.thead,data:t.tbody,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,current:t.tablePage.page,"page-size":t.tablePage.limit,"show-elevator":"","show-total":""},on:{"on-change":t.pageChange}})],1),e("user-details",{ref:"userDetails",attrs:{"group-list":t.groupList}})],1)],1)}),[],!1,null,"314c3241",null);e.default=p.exports},fbcf:function(t,e,r){}}]); |