(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40cb04fb"],{"21d2":function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return l})),i.d(t,"e",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"d",(function(){return c}));var r=i("b775");function a(){return Object(r["a"])({url:"/admin/store/retail/spread/manage/get",method:"get"})}function n(e){return Object(r["a"])({url:"/admin/store/retail/spread/manage/set",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/admin/store/retail/list",method:"get",params:e})}function o(e,t){return Object(r["a"])({url:"/admin/store/retail/spread/userlist",method:"post",params:e,data:t})}function s(e,t){return Object(r["a"])({url:"/admin/store/retail/spread/orderlist",method:"post",params:e,data:t})}function c(e){return Object(r["a"])({url:"/admin/store/retail/spread/clean/".concat(e),method:"get"})}},"2f2c":function(e,t,i){"use strict";i.d(t,"b",(function(){return u})),i.d(t,"c",(function(){return d})),i.d(t,"p",(function(){return m})),i.d(t,"d",(function(){return h})),i.d(t,"a",(function(){return p})),i.d(t,"g",(function(){return f})),i.d(t,"h",(function(){return v})),i.d(t,"j",(function(){return b})),i.d(t,"i",(function(){return g})),i.d(t,"e",(function(){return y})),i.d(t,"m",(function(){return _})),i.d(t,"o",(function(){return w})),i.d(t,"l",(function(){return k})),i.d(t,"n",(function(){return x})),i.d(t,"k",(function(){return F})),i.d(t,"f",(function(){return C}));var r=i("b775");function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function l(e){for(var t=1;t0&&e.checkPermi(["admin:retail:spread:clean"])?i("el-dropdown-item",{nativeOn:{click:function(i){return e.clearSpread(t.row)}}},[e._v("清除上级推广人")]):e._e()],1)],1)]}}])})],1),e._v(" "),i("div",{staticClass:"block"},[i("el-pagination",{attrs:{"page-sizes":[15,30,45,60],"page-size":e.userFrom.limit,"current-page":e.userFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:e.card_select_show,expression:"card_select_show"}],staticClass:"card_abs",style:{top:e.collapse?"570px":"270px"}},[[i("div",{staticClass:"cell_ht"},[i("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")]),e._v(" "),i("el-button",{attrs:{type:"text"},on:{click:function(t){return e.checkSave()}}},[e._v("保存")])],1),e._v(" "),i("el-checkbox-group",{on:{change:e.handleCheckedCitiesChange},model:{value:e.checkedCities,callback:function(t){e.checkedCities=t},expression:"checkedCities"}},e._l(e.columnData,(function(t){return i("el-checkbox",{key:t,staticClass:"check_cell",attrs:{label:t}},[e._v(e._s(t))])})),1)]],2),e._v(" "),i("el-dialog",{attrs:{title:"修改推广人",visible:e.extensionVisible,width:"500px","before-close":e.handleCloseExtension},on:{"update:visible":function(t){e.extensionVisible=t}}},[i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"formExtension",staticClass:"formExtension mt20",attrs:{model:e.formExtension,rules:e.ruleInline,"label-width":"120px"},nativeOn:{submit:function(e){e.preventDefault()}}},[i("el-form-item",{attrs:{label:"用户头像:",prop:"image"}},[i("div",{staticClass:"upLoadPicBox",on:{click:e.modalPicTap}},[e.formExtension.image?i("div",{staticClass:"pictrue"},[i("img",{attrs:{src:e.formExtension.image}})]):i("div",{staticClass:"upLoad"},[i("i",{staticClass:"el-icon-camera cameraIconfont"})])])])],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onSubExtension("formExtension")}}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"用户列表",visible:e.userVisible,width:"900px"},on:{"update:visible":function(t){e.userVisible=t}}},[e.userVisible?i("user-list",{on:{getTemplateRow:e.getTemplateRow}}):e._e(),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.userVisible=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){e.userVisible=!1}}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"设置",visible:e.dialogVisible,width:"500px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"dynamicValidateForm",staticClass:"demo-dynamic",attrs:{model:e.dynamicValidateForm,"label-width":"100px"}},["group"===e.batchName?i("el-form-item",{key:"1",attrs:{prop:"groupId",label:"用户分组",rules:[{required:!0,message:"请选择用户分组",trigger:"change"}]}},[i("el-select",{staticStyle:{width:"80%"},attrs:{placeholder:"请选择分组",filterable:""},model:{value:e.dynamicValidateForm.groupId,callback:function(t){e.$set(e.dynamicValidateForm,"groupId",t)},expression:"dynamicValidateForm.groupId"}},e._l(e.groupList,(function(e,t){return i("el-option",{key:t,attrs:{value:e.id,label:e.groupName}})})),1)],1):i("el-form-item",{attrs:{prop:"groupId",label:"用户标签",rules:[{required:!0,message:"请选择用户标签",trigger:"change"}]}},[i("el-select",{staticStyle:{width:"80%"},attrs:{placeholder:"请选择标签",multiple:"",filterable:""},model:{value:e.dynamicValidateForm.groupId,callback:function(t){e.$set(e.dynamicValidateForm,"groupId",t)},expression:"dynamicValidateForm.groupId"}},e._l(e.labelLists,(function(e,t){return i("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("dynamicValidateForm")}}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"编辑",visible:e.visible,width:"600px"},on:{"update:visible":function(t){e.visible=t}}},[e.visible?i("edit-from",{attrs:{uid:e.uid},on:{resetForm:e.resetForm}}):e._e()],1),e._v(" "),i("el-dialog",{attrs:{title:"积分余额",visible:e.VisiblePoint,width:"500px","close-on-click-modal":!1,"before-close":e.handlePointClose},on:{"update:visible":function(t){e.VisiblePoint=t}}},[i("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loadingPoint,expression:"loadingPoint"}],ref:"PointValidateForm",staticClass:"demo-dynamic",attrs:{model:e.PointValidateForm,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"修改余额",required:""}},[i("el-radio-group",{model:{value:e.PointValidateForm.moneyType,callback:function(t){e.$set(e.PointValidateForm,"moneyType",t)},expression:"PointValidateForm.moneyType"}},[i("el-radio",{attrs:{label:1}},[e._v("增加")]),e._v(" "),i("el-radio",{attrs:{label:2}},[e._v("减少")])],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"余额",required:""}},[i("el-input-number",{attrs:{type:"text",precision:2,step:.1,min:0,max:999999},model:{value:e.PointValidateForm.moneyValue,callback:function(t){e.$set(e.PointValidateForm,"moneyValue",t)},expression:"PointValidateForm.moneyValue"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"修改积分",required:""}},[i("el-radio-group",{model:{value:e.PointValidateForm.integralType,callback:function(t){e.$set(e.PointValidateForm,"integralType",t)},expression:"PointValidateForm.integralType"}},[i("el-radio",{attrs:{label:1}},[e._v("增加")]),e._v(" "),i("el-radio",{attrs:{label:2}},[e._v("减少")])],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"积分",required:""}},[i("el-input-number",{attrs:{type:"text","step-strictly":"",min:0,max:999999},model:{value:e.PointValidateForm.integralValue,callback:function(t){e.$set(e.PointValidateForm,"integralValue",t)},expression:"PointValidateForm.integralValue"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.handlePointClose}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary",loading:e.loadingBtn},on:{click:function(t){return e.submitPointForm("PointValidateForm")}}},[e._v("确 定")])],1)],1),e._v(" "),e.uid?i("el-dialog",{attrs:{title:"用户详情",visible:e.Visible,width:"1100px","before-close":e.Close},on:{"update:visible":function(t){e.Visible=t}}},[e.Visible?i("user-details",{ref:"userDetails",attrs:{uid:e.uid}}):e._e()],1):e._e(),e._v(" "),i("el-dialog",{attrs:{title:"设置",visible:e.levelVisible,width:"600px","before-close":e.Close},on:{"update:visible":function(t){e.levelVisible=t}}},[i("level-edit",{attrs:{levelInfo:e.levelInfo,levelList:e.levelList}})],1)],1)},a=[],n=i("c24f"),l=i("21d2"),o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"用户编号:"}},[i("el-input",{staticClass:"selWidth",attrs:{disabled:""},model:{value:e.ruleForm.id,callback:function(t){e.$set(e.ruleForm,"id",t)},expression:"ruleForm.id"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"用户地址:"}},[i("el-input",{staticClass:"selWidth",model:{value:e.ruleForm.addres,callback:function(t){e.$set(e.ruleForm,"addres",t)},expression:"ruleForm.addres"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"用户备注:"}},[i("el-input",{staticClass:"selWidth",attrs:{type:"textarea"},model:{value:e.ruleForm.mark,callback:function(t){e.$set(e.ruleForm,"mark",t)},expression:"ruleForm.mark"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"用户分组:"}},[i("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:""},model:{value:e.ruleForm.groupId,callback:function(t){e.$set(e.ruleForm,"groupId",t)},expression:"ruleForm.groupId"}},e._l(e.groupList,(function(e,t){return i("el-option",{key:t,attrs:{value:e.id,label:e.groupName}})})),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"用户标签:"}},[i("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:"",multiple:""},model:{value:e.labelData,callback:function(t){e.labelData=t},expression:"labelData"}},e._l(e.labelLists,(function(e,t){return i("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"推广员"}},[i("el-radio-group",{model:{value:e.ruleForm.isPromoter,callback:function(t){e.$set(e.ruleForm,"isPromoter",t)},expression:"ruleForm.isPromoter"}},[i("el-radio",{attrs:{label:!0}},[e._v("开启")]),e._v(" "),i("el-radio",{attrs:{label:!1}},[e._v("关闭")])],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"状态"}},[i("el-radio-group",{model:{value:e.ruleForm.status,callback:function(t){e.$set(e.ruleForm,"status",t)},expression:"ruleForm.status"}},[i("el-radio",{attrs:{label:!0}},[e._v("开启")]),e._v(" "),i("el-radio",{attrs:{label:!1}},[e._v("关闭")])],1)],1),e._v(" "),i("el-form-item",[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:user:update"],expression:"['admin:user:update']"}],attrs:{type:"primary"},on:{click:function(t){return e.submitForm("ruleForm")}}},[e._v("提交")]),e._v(" "),i("el-button",{on:{click:function(t){return e.resetForm("ruleForm")}}},[e._v("取消")])],1)],1)},s=[],c=i("61f7");function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */d=function(){return t};var e,t={},i=Object.prototype,r=i.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},n="function"==typeof Symbol?Symbol:{},l=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function c(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,i){return e[t]=i}}function m(e,t,i,r){var n=t&&t.prototype instanceof y?t:y,l=Object.create(n.prototype),o=new E(r||[]);return a(l,"_invoke",{value:I(e,i,o)}),l}function h(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var p="suspendedStart",f="suspendedYield",v="executing",b="completed",g={};function y(){}function _(){}function w(){}var k={};c(k,l,(function(){return this}));var x=Object.getPrototypeOf,F=x&&x(x(V([])));F&&F!==i&&r.call(F,l)&&(k=F);var C=w.prototype=y.prototype=Object.create(k);function L(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function i(a,n,l,o){var s=h(e[a],e,n);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==u(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,l,o)}),(function(e){i("throw",e,l,o)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,o)}))}o(s.arg)}var n;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){i(e,r,t,a)}))}return n=n?n.then(a,a):a()}})}function I(t,i,r){var a=p;return function(n,l){if(a===v)throw new Error("Generator is already running");if(a===b){if("throw"===n)throw l;return{value:e,done:!0}}for(r.method=n,r.arg=l;;){var o=r.delegate;if(o){var s=P(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var c=h(t,i,r);if("normal"===c.type){if(a=r.done?b:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(a=b,r.method="throw",r.arg=c.arg)}}}function P(t,i){var r=i.method,a=t.iterator[r];if(a===e)return i.delegate=null,"throw"===r&&t.iterator.return&&(i.method="return",i.arg=e,P(t,i),"throw"===i.method)||"return"!==r&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var n=h(a,t.iterator,i.arg);if("throw"===n.type)return i.method="throw",i.arg=n.arg,i.delegate=null,g;var l=n.arg;return l?l.done?(i[t.resultName]=l.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,g):l:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function V(t){if(t||""===t){var i=t[l];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,n=function i(){for(;++a=0;--n){var l=this.tryEntries[n],o=l.completion;if("root"===l.tryLoc)return a("end");if(l.tryLoc<=this.prev){var s=r.call(l,"catchLoc"),c=r.call(l,"finallyLoc");if(s&&c){if(this.prev=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),j(i),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var r=i.completion;if("throw"===r.type){var a=r.arg;j(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:V(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function m(e,t,i,r,a,n,l){try{var o=e[n](l),s=o.value}catch(c){return void i(c)}o.done?t(s):Promise.resolve(s).then(r,a)}function h(e){return function(){var t=this,i=arguments;return new Promise((function(r,a){var n=e.apply(t,i);function l(e){m(n,r,a,l,o,"next",e)}function o(e){m(n,r,a,l,o,"throw",e)}l(void 0)}))}}var p={id:null,mark:"",addres:"",groupId:"",level:"",isPromoter:!1,status:!1},f={name:"UserEdit",props:{uid:{type:Number,default:null}},data:function(){return{ruleForm:Object.assign({},p),groupData:[],labelData:[],labelLists:[],levelList:[],groupList:[],rules:{}}},mounted:function(){this.uid&&this.userInfo(),this.groupLists(),this.levelLists(),this.getTagList()},methods:{userInfo:function(){var e=this;Object(n["B"])({id:this.uid}).then(function(){var t=h(d().mark((function t(i){return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.ruleForm={id:i.uid,mark:i.mark,status:i.status,addres:i.addres,groupId:Number(i.groupId)||"",level:i.level||"",isPromoter:i.isPromoter,tagId:i.tagId||""},e.labelData=i.tagId?i.tagId.split(",").map(Number):[];case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},groupLists:function(){var e=this;Object(n["g"])({page:1,limit:9999}).then(function(){var t=h(d().mark((function t(i){return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.groupList=i.list;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getTagList:function(){var e=this;Object(n["u"])({page:1,limit:9999}).then((function(t){e.labelLists=t.list}))},levelLists:function(){var e=this;Object(n["n"])().then(function(){var t=h(d().mark((function t(i){return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.levelList=i.list;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},submitForm:Object(c["a"])((function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.ruleForm.tagId=t.labelData.join(","),Object(n["E"])({id:t.ruleForm.id},t.ruleForm).then(function(){var e=h(d().mark((function e(i){return d().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success("编辑成功"),t.$parent.$parent.visible=!1,t.$parent.$parent.getList();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}))})),resetForm:function(e){this.$refs[e].resetFields(),this.$emit("resetForm")}}},v=f,b=(i("e87a"),i("2877")),g=Object(b["a"])(v,o,s,!1,null,"4ef96270",null),y=g.exports,_=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e.psInfo?i("div",{staticClass:"acea-row row-middle border_bottom pb-24"},[i("div",{staticClass:"avatar mr20"},[i("img",{attrs:{src:e.psInfo.user.avatar}})]),e._v(" "),i("div",{staticClass:"dashboard-workplace-header-tip"},[i("p",{staticClass:"dashboard-workplace-header-tip-title",domProps:{textContent:e._s(e.psInfo.user.nickname||"-")}}),e._v(" "),i("div",{staticClass:"dashboard-workplace-header-tip-desc"},[i("span",{staticClass:"dashboard-workplace-header-tip-desc-sp pb-1"},[e._v("余额: "+e._s(e.psInfo.balance))]),e._v(" "),i("span",{staticClass:"dashboard-workplace-header-tip-desc-sp pb-1"},[e._v("总计订单: "+e._s(e.psInfo.allOrderCount))]),e._v(" "),i("span",{staticClass:"dashboard-workplace-header-tip-desc-sp pb-1"},[e._v("总消费金额: "+e._s(e.psInfo.allConsumeCount))]),e._v(" "),i("span",{staticClass:"dashboard-workplace-header-tip-desc-sp"},[e._v("积分: "+e._s(e.psInfo.integralCount))]),e._v(" "),i("span",{staticClass:"dashboard-workplace-header-tip-desc-sp"},[e._v("本月订单: "+e._s(e.psInfo.mothOrderCount))]),e._v(" "),i("span",{staticClass:"dashboard-workplace-header-tip-desc-sp"},[e._v("本月消费金额: "+e._s(e.psInfo.mothConsumeCount))])])])]):e._e(),e._v(" "),i("el-row",{staticClass:"ivu-mt mt20",attrs:{align:"middle",gutter:10}},[i("el-col",{attrs:{span:4}},[i("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{"default-active":"0"},on:{select:e.changeType}},e._l(e.list,(function(t,r){return i("el-menu-item",{key:r,attrs:{name:t.val,index:t.val}},[i("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.label))])])})),1)],1),e._v(" "),i("el-col",{attrs:{span:20}},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"tabNumWidth",attrs:{data:e.tableData.data,"max-height":"400"}},e._l(e.columns,(function(e,t){return i("el-table-column",{key:t,attrs:{prop:e.key,label:e.title,width:"item.minWidth","show-overflow-tooltip":!0}})})),1),e._v(" "),i("div",{staticClass:"block"},[i("el-pagination",{attrs:{"page-sizes":[6,12,18,24],"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)],1)],1)},w=[],k=i("b7be"),x={name:"UserDetails",props:{uid:{type:Number,default:null}},data:function(){return{loading:!1,columns:[],Visible:!1,list:[{val:"0",label:"消费记录"},{val:"1",label:"积分明细"},{val:"2",label:"签到记录"},{val:"3",label:"持有优惠券"},{val:"4",label:"余额变动"},{val:"5",label:"好友关系"}],tableData:{data:[],total:0},tableFrom:{page:1,limit:6,type:"0",userId:""},psInfo:null}},mounted:function(){this.uid&&(this.getHeader(),this.getInfo())},methods:{changeType:function(e){this.tableFrom.type=e,this.tableFrom.page=1,this.tableFrom.limit=6,"1"===e?this.integral():this.getInfo()},integral:function(){var e=this;this.loading=!0,Object(k["D"])({limit:this.tableFrom.limit,page:this.tableFrom.page},{uid:this.uid}).then((function(t){e.tableData.data=t.list,e.tableData.total=t.total,e.columns=[{title:"来源/用途",key:"title",minWidth:120},{title:"积分变化",key:"integral",minWidth:120},{title:"变化后积分",key:"balance",minWidth:120},{title:"日期",key:"updateTime",minWidth:120},{title:"备注",key:"mark",minWidth:120}],e.loading=!1})).catch((function(t){e.loading=!1}))},getInfo:function(){var e=this;this.tableFrom.userId=this.uid,this.loading=!0,Object(n["k"])(this.tableFrom).then((function(t){switch(e.tableData.data=t.list,e.tableData.total=t.total,e.tableFrom.type){case"0":e.columns=[{title:"订单ID",key:"orderId",minWidth:250},{title:"收货人",key:"realName",minWidth:90},{title:"商品数量",key:"totalNum",minWidth:80},{title:"商品总价",key:"totalPrice",minWidth:90},{title:"实付金额",key:"payPrice",minWidth:90},{title:"交易完成时间",key:"payTime",minWidth:160}];break;case"2":e.columns=[{title:"动作",key:"title",minWidth:120},{title:"获得积分",key:"number",minWidth:120},{title:"签到时间",key:"createTime",minWidth:120},{title:"备注",key:"title",minWidth:120}];break;case"3":e.columns=[{title:"优惠券名称",key:"name",minWidth:120},{title:"面值",key:"money",minWidth:120},{title:"有效期",key:"endTime",minWidth:120},{title:"最低消费额",key:"minPrice",minWidth:120},{title:"兑换时间",key:"updateTime",minWidth:120}];break;case"4":e.columns=[{title:"变动金额",key:"number",minWidth:120},{title:"变动后",key:"balance",minWidth:120},{title:"类型",key:"title",minWidth:120},{title:"创建时间",key:"add_time",minWidth:120},{title:"备注",key:"mark",minWidth:120}];break;default:e.columns=[{title:"ID",key:"uid",minWidth:120},{title:"昵称",key:"nickname",minWidth:120},{title:"等级",key:"level",minWidth:120},{title:"加入时间",key:"createTime",minWidth:120}]}e.loading=!1})).catch((function(){e.loading=!1}))},pageChange:function(e){this.tableFrom.page=e,"1"===this.tableFrom.type?this.integral():this.getInfo()},handleSizeChange:function(e){this.tableFrom.limit=e,"1"===this.tableFrom.type?this.integral():this.getInfo()},getHeader:function(){var e=this;Object(n["y"])({userId:this.uid}).then((function(t){e.psInfo=t}))}}},F=x,C=(i("e116"),Object(b["a"])(F,_,w,!1,null,"21e18b60",null)),L=C.exports,O=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,"label-width":"100px"}},[i("el-form-item",[i("el-alert",{attrs:{title:"请勿频繁更改,以免计算产生混乱!",type:"warning"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"用户等级","label-width":"100px"}},[i("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.currentSel},model:{value:e.ruleForm.levelId,callback:function(t){e.$set(e.ruleForm,"levelId",t)},expression:"ruleForm.levelId"}},e._l(e.levelList,(function(e){return i("el-option",{key:e.grade,attrs:{label:e.name,value:e.id,disabled:!e.isShow}})})),1)],1),e._v(" "),""!=e.grade&&e.grade=0;--n){var l=this.tryEntries[n],o=l.completion;if("root"===l.tryLoc)return a("end");if(l.tryLoc<=this.prev){var s=r.call(l,"catchLoc"),c=r.call(l,"finallyLoc");if(s&&c){if(this.prev=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),P(i),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var r=i.completion;if("throw"===r.type){var a=r.arg;P(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:j(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function G(e,t,i,r,a,n,l){try{var o=e[n](l),s=o.value}catch(c){return void i(c)}o.done?t(s):Promise.resolve(s).then(r,a)}function U(e){return function(){var t=this,i=arguments;return new Promise((function(r,a){var n=e.apply(t,i);function l(e){G(n,r,a,l,o,"next",e)}function o(e){G(n,r,a,l,o,"throw",e)}l(void 0)}))}}var H={name:"UserIndex",components:{editFrom:y,userDetails:L,userList:W,levelEdit:E},filters:{sexFilter:function(e){var t={0:"未知",1:"男",2:"女",3:"保密"};return t[e]}},data:function(){return{formExtension:{image:"",spreadUid:"",userId:""},ruleInline:{},extensionVisible:!1,userVisible:!1,levelInfo:"",pickerOptions:this.$timeOptions,loadingBtn:!1,PointValidateForm:{integralType:2,integralValue:0,moneyType:2,moneyValue:0,uid:""},loadingPoint:!1,VisiblePoint:!1,visible:!1,userIds:"",dialogVisible:!1,levelVisible:!1,levelData:[],groupData:[],labelData:[],selData:[],labelPosition:"right",collapse:!1,props:{children:"child",label:"name",value:"name",emitPath:!1},propsCity:{children:"child",label:"name",value:"name"},headeNum:[{type:"",name:"全部用户"},{type:"wechat",name:"微信公众号用户"},{type:"routine",name:"微信小程序用户"},{type:"h5",name:"H5用户"}],listLoading:!0,tableData:{data:[],total:0},loginType:"",userFrom:{labelId:"",userType:"",sex:"",isPromoter:"",country:"",payCount:"",accessType:0,dateLimit:"",keywords:"",province:"",city:"",page:1,limit:15,level:"",groupId:""},grid:{xl:8,lg:12,md:12,sm:24,xs:24},levelList:[],labelLists:[],groupList:[],selectedData:[],timeVal:[],addresData:[],dynamicValidateForm:{groupId:[]},loading:!1,groupIdFrom:[],selectionList:[],batchName:"",uid:0,Visible:!1,keyNum:0,address:[],multipleSelectionAll:[],idKey:"uid",card_select_show:!1,checkAll:!1,checkedCities:["ID","头像","姓名","用户等级","分组","推荐人","手机号","余额","积分"],columnData:["ID","头像","姓名","用户等级","分组","推荐人","手机号","余额","积分"],isIndeterminate:!0}},activated:function(){this.userFrom.keywords="",this.loginType="0",this.getList(1)},mounted:function(){this.getList(),this.groupLists(),this.levelLists(),this.getTagList(),this.getCityList()},methods:{checkPermi:z["a"],setPhone:function(e){var t=this;this.$prompt("修改手机号",{confirmButtonText:"确定",cancelButtonText:"取消",inputErrorMessage:"请输入修改手机号",inputType:"text",inputValue:e.phone,inputPlaceholder:"请输入手机号",closeOnClickModal:!1,inputValidator:function(e){if(!e)return"请填写手机号"}}).then((function(i){var r=i.value;Object(n["z"])({id:e.uid,phone:r}).then((function(){t.$message.success("编辑成功"),t.getList()}))})).catch((function(){t.$message.info("取消输入")}))},clearSpread:function(e){var t=this;this.$modalSure("解除【"+e.nickname+"】的上级推广人吗").then((function(){Object(l["d"])(e.uid).then((function(e){t.$message.success("清除成功"),t.getList()}))}))},onSubExtension:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;Object(n["A"])(t.formExtension).then((function(e){t.$message.success("设置成功"),t.extensionVisible=!1,t.getList()}))}))},getTemplateRow:function(e){this.formExtension.image=e.avatar,this.formExtension.spreadUid=e.uid},setExtension:function(e){this.formExtension={image:"",spreadUid:"",userId:e.uid},this.extensionVisible=!0},handleCloseExtension:function(){this.extensionVisible=!1},modalPicTap:function(){this.userVisible=!0},resetForm:function(){this.visible=!1},reset:function(e){this.userFrom={labelId:"",userType:"",sex:"",isPromoter:"",country:"",payCount:"",accessType:0,dateLimit:"",keywords:"",province:"",city:"",page:1,limit:15,level:"",groupId:""},this.levelData=[],this.groupData=[],this.labelData=[],this.timeVal=[],this.getList()},getCityList:function(){var e=U(B().mark((function e(){var t;return B().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,A["c"]();case 2:t=e.sent,this.addresData=t;case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),sendNews:function(){if(0===this.selectionList.length)return this.$message.warning("请先选择用户");this.$modalArticle((function(e){}),"send")},onSend:function(){if(0===this.selectionList.length)return this.$message.warning("请选择要设置的用户");var e=this;this.$modalCoupon("send",this.keyNum+=1,[],(function(t){e.formValidate.give_coupon_ids=[],e.couponData=[],t.map((function(t){e.formValidate.give_coupon_ids.push(t.coupon_id),e.couponData.push(t.title)})),e.selectionList=[]}),this.userIds,"user")},Close:function(){this.Visible=!1,this.levelVisible=!1},onDetails:function(e){this.uid=e,this.Visible=!0},onLevel:function(e,t){var i=new Object;this.levelList.forEach((function(e){e.id==t&&(i.gradeLevel=e.grade)})),i.uid=e,i.level=t,this.levelInfo=i,this.levelVisible=!0},editPoint:function(e){this.uid=e,this.VisiblePoint=!0},submitPointForm:Object(c["a"])((function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.PointValidateForm.uid=t.uid,t.loadingBtn=!0,Object(n["c"])(t.PointValidateForm).then((function(e){t.$message.success("设置成功"),t.loadingBtn=!1,t.handlePointClose(),t.getList()})).catch((function(){t.loadingBtn=!1}))}))})),handlePointClose:function(){this.VisiblePoint=!1,this.PointValidateForm={integralType:2,integralValue:0,moneyType:2,moneyValue:0,uid:""}},editUser:function(e){this.uid=e,this.visible=!0},submitForm:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.loading=!0,"group"===t.batchName?Object(n["h"])({groupId:t.dynamicValidateForm.groupId,id:t.userIds}).then((function(e){t.$message.success("设置成功"),t.loading=!1,t.handleClose(),t.getList()})).catch((function(){t.loading=!1})):Object(n["v"])({tagId:t.dynamicValidateForm.groupId.join(","),id:t.userIds}).then((function(e){t.$message.success("设置成功"),t.loading=!1,t.handleClose(),t.getList()})).catch((function(){t.loading=!1}))}))},setBatch:function(e,t){if(this.batchName=e,t?(this.userIds=t.uid,"group"===this.batchName?this.dynamicValidateForm.groupId=t.groupId?Number(t.groupId):"":this.dynamicValidateForm.groupId=t.tagId?t.tagId.split(",").map(Number):[]):this.dynamicValidateForm.groupId="",0===this.multipleSelectionAll.length&&!t)return this.$message.warning("请选择要设置的用户");this.dialogVisible=!0},handleClose:function(){this.dialogVisible=!1,this.$refs["dynamicValidateForm"].resetFields()},onSelectTab:function(e){var t=this;this.selectionList=e,setTimeout((function(){t.changePageCoreRecordData();var e=[];t.multipleSelectionAll.length&&(t.multipleSelectionAll.map((function(t){e.push(t.uid)})),t.userIds=e.join(","))}),50)},userSearchs:function(){this.userFrom.page=1,this.getList()},changeCountry:function(){"OTHER"!==this.userFrom.country&&this.userFrom.country||(this.selectedData=[],this.userFrom.province="",this.userFrom.city="",this.address=[])},handleChange:function(e){this.userFrom.province=e[0],this.userFrom.city=e[1]},onchangeTime:function(e){this.timeVal=e,this.userFrom.dateLimit=e?this.timeVal.join(","):""},groupLists:function(){var e=this;Object(n["g"])({page:1,limit:9999}).then(function(){var t=U(B().mark((function t(i){return B().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.groupList=i.list;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getTagList:function(){var e=this;Object(n["u"])({page:1,limit:9999}).then((function(t){e.labelLists=t.list}))},levelLists:function(){var e=this;Object(n["n"])().then(function(){var t=U(B().mark((function t(i){return B().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.levelList=i,localStorage.setItem("levelKey",JSON.stringify(i));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getList:function(e){var t=this;this.listLoading=!0,this.userFrom.page=e||this.userFrom.page,this.userFrom.userType=this.loginType,0==this.loginType&&(this.userFrom.userType=""),this.userFrom.level=this.levelData.join(","),this.userFrom.groupId=this.groupData.join(","),this.userFrom.labelId=this.labelData.join(","),Object(n["D"])(this.userFrom).then((function(e){t.tableData.data=e.list,t.tableData.total=e.total,t.$nextTick((function(){this.setSelectRow()})),t.listLoading=!1})).catch((function(){t.listLoading=!1})),this.checkedCities=this.$cache.local.has("user_stroge")?this.$cache.local.getJSON("user_stroge"):this.checkedCities,this.$set(this,"card_select_show",!1)},setSelectRow:function(){if(this.multipleSelectionAll&&!(this.multipleSelectionAll.length<=0)){var e=this.idKey,t=[];this.multipleSelectionAll.forEach((function(i){t.push(i[e])})),this.$refs.table.clearSelection();for(var i=0;i=0&&this.$refs.table.toggleRowSelection(this.tableData.data[i],!0)}},changePageCoreRecordData:function(){var e=this.idKey,t=this;if(this.multipleSelectionAll.length<=0)this.multipleSelectionAll=this.selectionList;else{var i=[];this.multipleSelectionAll.forEach((function(t){i.push(t[e])}));var r=[];this.selectionList.forEach((function(a){r.push(a[e]),i.indexOf(a[e])<0&&t.multipleSelectionAll.push(a)}));var a=[];this.tableData.data.forEach((function(t){r.indexOf(t[e])<0&&a.push(t[e])})),a.forEach((function(r){if(i.indexOf(r)>=0)for(var a=0;a0&&t