(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-8dd3898a","chunk-2d0bddd6"],{"08ea":function(l,e,a){"use strict";a.r(e);var u=a("a34a"),v=a.n(u),b=a("61f7"),t=a("c24f"),i={name:"userLabel",props:{uid:{type:String|Number|Object,default:""}},data:function(){return{isUser:!1,labelList:[],activeIds:[],info:{},oid:""}},watch:{uid:{handler:function(l,e){l!=e&&this.getList()},deep:!0}},mounted:function(){this.getList()},methods:{getList:function(){var l=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(t.l)(e).then((function(e){e.data.map((function(e){l.isUser=!0,e.label.map((function(e){e.disabled&&l.activeIds.push(e.id)}))})),l.labelList=e.data}))},selectLabel:function(l){if(l.disabled){var e=this.activeIds.indexOf(l.id);this.activeIds.splice(e,1),l.disabled=!1}else this.activeIds.push(l.id),l.disabled=!0},subBtn:function(){var l=this,e=[];this.labelList.map((function(l){l.label.map((function(l){0==l.disabled&&e.push(l.id)}))}));var a=this.info;a.label_id=this.activeIds,(0==this.oid?Object(t.G)(a):Object(t.F)(this.oid,{label_ids:this.activeIds,un_label_ids:e})).then((function(e){l.activeIds=[],l.labelList=[],l.$Message.success(e.msg),l.$emit("close",l.oid)})).catch((function(e){l.$Message.error(e.msg)}))},cancel:function(){this.activeIds=[],this.labelList=[],this.$emit("close")}}},s=(a("5a72"),a("2877")),r=Object(s.a)(i,(function(){var l=this,e=l.$createElement,a=l._self._c||e;return a("div",{staticClass:"label-wrapper"},[a("div",{staticClass:"list-box"},[l._l(l.labelList,(function(e,u){return l.isUser?a("div",{key:u,staticClass:"label-box"},[a("div",{staticClass:"title"},[l._v(l._s(e.name))]),a("div",{staticClass:"list"},l._l(e.label,(function(e,u){return a("div",{key:u,staticClass:"label-item",class:{on:e.disabled},on:{click:function(a){return l.selectLabel(e)}}},[l._v(l._s(e.label_name))])})),0)]):l._e()})),l.isUser?l._e():a("div",[l._v("暂无标签")])],2),a("div",{staticClass:"footer"},[a("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:l.subBtn}},[l._v("确定")]),a("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:l.cancel}},[l._v("取消")])],1)])}),[],!1,null,"c0ac8256",null).exports,n=a("0f0e"),c=a("2f62"),o={name:"table-expand",filters:{formatDate:function(l){if(0!==l){var e=new Date(1e3*l);return Object(b.a)(e,"yyyy-MM-dd hh:mm")}}},props:{row:Object}},d=(a("dc65"),Object(s.a)(o,(function(){var l=this,e=l.$createElement,a=l._self._c||e;return a("div",{staticClass:"tdinfo"},[a("Row",{staticClass:"expand-row"},[a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("首次访问:")]),a("span",{staticClass:"expand-value"},[l._v(" "+l._s(l._f("formatDate")(l.row.add_time)))])]),a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("近次访问:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l._f("formatDate")(l.row.last_time)))])]),a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("身份证号:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l.row.card_id))])]),a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("真实姓名:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l.row.real_name))])])],1),a("Row",{staticClass:"expand-row"},[a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("标签:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l.row.labels))])]),a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("生日:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l.row.birthday))])]),a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("地址:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l.row.addres))])])],1),a("Row",{staticClass:"expand-row"},[a("Col",{attrs:{span:"6"}},[a("span",{staticClass:"expand-key"},[l._v("备注:")]),a("span",{staticClass:"expand-value"},[l._v(l._s(l.row.mark))])])],1)],1)}),[],!1,null,"1e6ad336",null).exports),h=a("bbbc"),m=a("31b4"),p=a("a8e0"),f=a("a716"),_=a("c42b"),g=a("2e8e"),y=a("8c03");function w(l,e,a,u,v,b,t){try{var i=l[b](t),s=i.value}catch(l){return void a(l)}i.done?e(s):Promise.resolve(s).then(u,v)}function x(l){return function(){var e=this,a=arguments;return new Promise((function(u,v){var b=l.apply(e,a);function t(l){w(b,u,v,t,i,"next",l)}function i(l){w(b,u,v,t,i,"throw",l)}t(void 0)}))}}function k(l,e){var a=Object.keys(l);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(l);e&&(u=u.filter((function(e){return Object.getOwnPropertyDescriptor(l,e).enumerable}))),a.push.apply(a,u)}return a}function F(l,e,a){return e in l?Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[e]=a,l}var C={name:"user_list",filters:{formatDate:function(l){if(0!==l){var e=new Date(1e3*l);return Object(b.a)(e,"yyyy-MM-dd hh:mm")}}},components:{expandRow:d,editFrom:m.a,sendFrom:p.a,userDetails:f.a,newsCategory:_.a,customerInfo:y.default,userLabel:r,labelList:n.a},data:function(){return{dataLabel:[],labelListShow:!1,labelShow:!1,customerShow:!1,promoterShow:!1,labelActive:{uid:0},formInline:{uid:0,spread_uid:0,image:""},options:{shortcuts:[{text:"今天",value:function(){var l=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,l]}},{text:"昨天",value:function(){var l=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),l.setTime(l.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,l]}},{text:"最近7天",value:function(){var l=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,l]}},{text:"最近30天",value:function(){var l=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,l]}},{text:"上月",value:function(){var l=new Date,e=new Date,a=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),l.setTime(l.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,a))),[e,l]}},{text:"本月",value:function(){var l=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,l]}},{text:"本年",value:function(){var l=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,l]}}]},collapse:!1,headeType:"-1",headeNum:[{type:"-1",name:"全部"},{type:"wechat",name:"微信公众号"},{type:"routine",name:"微信小程序"},{type:"h5",name:"H5"},{type:"pc",name:"PC"},{type:"app",name:"APP"}],address:[],addresData:g.a,isShowSend:!0,modal13:!1,maxCols:4,scrollerHeight:"600",contentTop:"130",contentWidth:"98%",grid2:{xl:18,lg:16,md:12,sm:24,xs:24},loading:!1,total:0,userFrom:{label_id:"",user_type:"",status:"",sex:"",is_promoter:"",country:"",isMember:"",pay_count:"",user_time_type:"",user_time:"",nickname:"",province:"",city:"",page:1,limit:15,level:"",group_id:"",field_key:""},field_key:"",level:"",group_id:"",label_id:"",user_time_type:"",pay_count:"",userLists:[],FromData:null,selectionList:[],user_ids:"",selectedData:[],timeVal:[],array_ids:[],groupList:[],levelList:[],labelFrom:{page:1,limit:""},labelLists:[],display:"none",checkBox:!1,selectionCopy:[],isCheckBox:!1,isAll:0,userId:0,checkUidList:[],batchModal:!1,menuActive:1,batchLabel:[],batchData:{group_id:0,label_id:[],level_id:0,money_status:0,money:0,integration_status:0,integration:0,days_status:1,day:0,spread_uid:""},spread_name:""}},watch:{selectionList:function(l){var e=l.map((function(l){return l.uid}));this.array_ids=e,this.user_ids=e.join()},userLists:{deep:!0,handler:function(l){var e=this;l.forEach((function(l){e.selectionList.forEach((function(e){e.uid===l.uid&&(l.checkBox=!0)}))}));var a=this.userLists.filter((function(l){return l.checkBox}));this.userLists.length?this.checkBox=this.userLists.length===a.length:this.checkBox=!1}}},computed:function(l){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{})}function c(l){return o.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,l)}r(n,"请输入%s"),r(c,"%s格式不正确");var o=Object.keys(s).reduce((function(l,e){return l[e]=function(l){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t="range"===e?{min:l[0],max:l[1]}:b({},e,l);return v({message:a.replace(":".concat(e),"range"===e?"".concat(l[0],"-").concat(l[1]):l),type:"string"},t,{},u)},r(l[e],s[e]),l}),{})},8420:function(l,e,a){},9399:function(l,e,a){},a8e0:function(l,e,a){"use strict";var u=a("a34a"),v=a.n(u),b=a("c24f");function t(l,e,a,u,v,b,t){try{var i=l[b](t),s=i.value}catch(l){return void a(l)}i.done?e(s):Promise.resolve(s).then(u,v)}var i={name:"send",props:{userIds:{type:String,default:""},isAll:{type:Number|String,default:0},where:{type:Object,default:function(){return{}}}},created:function(){},data:function(){return{modals:!1,loading:!1,couponList:[],columns:[{title:"优惠券名称",key:"title",align:"center",minWidth:100},{title:"优惠券面值",slot:"coupon_price",align:"center",minWidth:80},{title:"优惠券最低消费",key:"use_min_price",align:"center",minWidth:150},{title:"优惠券有效期限",key:"coupon_time",align:"center",minWidth:120},{title:"操作",slot:"action",align:"center",width:120}],page:{page:1,limit:15,coupon_title:"",type:"send"},total:0}},methods:{getList:function(l){var e=this;this.loading=!0,Object(b.d)(this.page).then(function(){var l,a=(l=v.a.mark((function l(a){var u;return v.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:200===a.status?(u=a.data,e.couponList=u.list,e.total=u.count,e.loading=!1):(e.loading=!1,e.$Message.error(a.msg));case 1:case"end":return l.stop()}}),l)})),function(){var e=this,a=arguments;return new Promise((function(u,v){var b=l.apply(e,a);function i(l){t(b,u,v,i,s,"next",l)}function s(l){t(b,u,v,i,s,"throw",l)}i(void 0)}))});return function(l){return a.apply(this,arguments)}}()).catch((function(l){e.loading=!1,e.$Message.error(l.msg)}))},userSearchs:function(){this.getList()},pageChange:function(l){this.page.page=l,this.getList()},sendGrant:function(l,e,a){var u=this,v={title:e,info:"发送优惠券后将无法撤回,请谨慎操作!",num:a,url:"marketing/coupon/user/grant",method:"post",ids:{id:l.id,all:this.isAll}};0==this.isAll?v.ids.uid=this.userIds:1==this.isAll&&(v.ids.uid=this.userIds,v.ids.where={city:this.where.city,country:this.where.country,field_key:this.where.field_key,group_id:this.where.group_id,isMember:this.where.isMember,is_promoter:this.where.is_promoter,label_id:this.where.label_id,level:this.where.level,nickname:this.where.nickname,pay_count:this.where.pay_count,province:this.where.province,sex:this.where.sex,status:this.where.status,user_time:this.where.user_time,user_time_type:this.where.user_time_type,user_type:this.where.user_type}),this.$modalSure(v).then((function(l){u.$Message.success(l.msg)})).catch((function(l){u.$Message.error(l.msg)}))}}},s=(a("4a6b"),a("2877")),r=Object(s.a)(i,(function(){var l=this,e=l.$createElement,a=l._self._c||e;return a("div",[a("Modal",{attrs:{"z-index":100,scrollable:"","footer-hide":"",closable:"",title:"发送优惠券","mask-closable":!1,width:"900"},model:{value:l.modals,callback:function(e){l.modals=e},expression:"modals"}},[a("div",{staticClass:"acea-row"},[a("span",{staticClass:"sp"},[l._v("优惠券名称:")]),a("Input",{staticStyle:{width:"60%"},attrs:{search:"","enter-button":"",placeholder:"请输入优惠券名称"},on:{"on-search":l.userSearchs},model:{value:l.page.coupon_title,callback:function(e){l.$set(l.page,"coupon_title",e)},expression:"page.coupon_title"}})],1),a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:l.columns,data:l.couponList,loading:l.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:l._u([{key:"coupon_price",fn:function(e){var u=e.row;return[1==u.coupon_type?a("span",[l._v(l._s(u.coupon_price)+"元")]):l._e(),2==u.coupon_type?a("span",[l._v(l._s(parseFloat(u.coupon_price)/10)+"折("+l._s(u.coupon_price.toString().split(".")[0])+"%)")]):l._e()]}},{key:"action",fn:function(e){var u=e.row,v=e.index;return[a("a",{on:{click:function(e){return l.sendGrant(u,"发送优惠券",v)}}},[l._v("发送")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:l.total,"show-elevator":"","show-total":"","page-size":l.page.limit},on:{"on-change":l.pageChange}})],1)],1)],1)}),[],!1,null,"230f98fc",null);e.a=r.exports},bbbc:function(l,e,a){"use strict";a.d(e,"a",(function(){return v})),a.d(e,"g",(function(){return b})),a.d(e,"f",(function(){return t})),a.d(e,"c",(function(){return i})),a.d(e,"e",(function(){return s})),a.d(e,"d",(function(){return r})),a.d(e,"h",(function(){return n})),a.d(e,"b",(function(){return c}));var u=a("b6bd");function v(l){return Object(u.a)({url:"agent/index",method:"get",params:l})}function b(l){return Object(u.a)({url:"agent/statistics",method:"get",params:l})}function t(l,e){return Object(u.a)({url:l,method:"get",params:e})}function i(l){return Object(u.a)({url:"agent/look_code",method:"get",params:l})}function s(l){return Object(u.a)({url:"agent/look_xcx_code",method:"get",params:l})}function r(l){return Object(u.a)({url:"agent/look_h5_code",method:"get",params:l})}function n(l){return Object(u.a)({url:"export/userAgent",method:"get",params:l})}function c(l){return Object(u.a)({url:"agent/spread",method:"PUT",data:l})}},dc65:function(l,e,a){"use strict";var u=a("3480");a.n(u).a},e76a:function(l,e,a){},fbe9:function(l,e,a){"use strict";var u=a("9399");a.n(u).a}}]);