(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-05094ad6","chunk-2d0bddd6"],{"08ea":function(l,e,a){"use strict";a.r(e);var u=a("61f7"),t=a("c24f"),v={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")}}},b=(a("6f18"),a("2877")),r=Object(b.a)(v,(function(){var l=this,e=l._self._c;return e("div",{staticClass:"label-wrapper"},[e("div",{staticClass:"list-box"},[l._l(l.labelList,(function(a,u){return l.isUser?e("div",{key:u,staticClass:"label-box"},[e("div",{staticClass:"title"},[l._v(l._s(a.name))]),e("div",{staticClass:"list"},l._l(a.label,(function(a,u){return e("div",{key:u,staticClass:"label-item",class:{on:a.disabled},on:{click:function(e){return l.selectLabel(a)}}},[l._v(l._s(a.label_name))])})),0)]):l._e()})),l.isUser?l._e():e("div",[l._v("暂无标签")])],2),e("div",{staticClass:"footer"},[e("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:l.subBtn}},[l._v("确定")]),e("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:l.cancel}},[l._v("取消")])],1)])}),[],!1,null,"8d17409a",null).exports,n=a("0f0e"),i=a("2f62"),s={name:"table-expand",filters:{formatDate:function(l){if(0!==l){var e=new Date(1e3*l);return Object(u.a)(e,"yyyy-MM-dd hh:mm")}}},props:{row:Object}},o=(a("a4e6"),Object(b.a)(s,(function(){var l=this,e=l._self._c;return e("div",{staticClass:"tdinfo"},[e("Row",{staticClass:"expand-row"},[e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("首次访问:")]),e("span",{staticClass:"expand-value"},[l._v(" "+l._s(l._f("formatDate")(l.row.add_time)))])]),e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("近次访问:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l._f("formatDate")(l.row.last_time)))])]),e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("身份证号:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l.row.card_id))])]),e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("真实姓名:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l.row.real_name))])])],1),e("Row",{staticClass:"expand-row"},[e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("标签:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l.row.labels))])]),e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("生日:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l.row.birthday))])]),e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("地址:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l.row.addres))])])],1),e("Row",{staticClass:"expand-row"},[e("Col",{attrs:{span:"6"}},[e("span",{staticClass:"expand-key"},[l._v("备注:")]),e("span",{staticClass:"expand-value"},[l._v(l._s(l.row.mark))])])],1)],1)}),[],!1,null,"23b919ca",null).exports),c=a("bbbc"),h=a("31b4"),d=a("a8e0"),p=a("a716"),m=a("c42b"),f=a("2e8e"),y=a("8c03");function g(l){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}function _(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_=function(){return e};var l,e={},a=Object.prototype,u=a.hasOwnProperty,t=Object.defineProperty||function(l,e,a){l[e]=a.value},v="function"==typeof Symbol?Symbol:{},b=v.iterator||"@@iterator",r=v.asyncIterator||"@@asyncIterator",n=v.toStringTag||"@@toStringTag";function i(l,e,a){return Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),l[e]}try{i({},"")}catch(l){i=function(l,e,a){return l[e]=a}}function s(l,e,a,u){var v=e&&e.prototype instanceof f?e:f,b=Object.create(v.prototype),r=new I(u||[]);return t(b,"_invoke",{value:D(l,a,r)}),b}function o(l,e,a){try{return{type:"normal",arg:l.call(e,a)}}catch(l){return{type:"throw",arg:l}}}e.wrap=s;var c="suspendedStart",h="suspendedYield",d="executing",p="completed",m={};function f(){}function y(){}function w(){}var x={};i(x,b,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(M([])));L&&L!==a&&u.call(L,b)&&(x=L);var F=w.prototype=f.prototype=Object.create(x);function C(l){["next","throw","return"].forEach((function(e){i(l,e,(function(l){return this._invoke(e,l)}))}))}function O(l,e){function a(t,v,b,r){var n=o(l[t],l,v);if("throw"!==n.type){var i=n.arg,s=i.value;return s&&"object"==g(s)&&u.call(s,"__await")?e.resolve(s.__await).then((function(l){a("next",l,b,r)}),(function(l){a("throw",l,b,r)})):e.resolve(s).then((function(l){i.value=l,b(i)}),(function(l){return a("throw",l,b,r)}))}r(n.arg)}var v;t(this,"_invoke",{value:function(l,u){function t(){return new e((function(e,t){a(l,u,e,t)}))}return v=v?v.then(t,t):t()}})}function D(e,a,u){var t=c;return function(v,b){if(t===d)throw Error("Generator is already running");if(t===p){if("throw"===v)throw b;return{value:l,done:!0}}for(u.method=v,u.arg=b;;){var r=u.delegate;if(r){var n=S(r,u);if(n){if(n===m)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(t===c)throw t=p,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);t=d;var i=o(e,a,u);if("normal"===i.type){if(t=u.done?p:h,i.arg===m)continue;return{value:i.arg,done:u.done}}"throw"===i.type&&(t=p,u.method="throw",u.arg=i.arg)}}}function S(e,a){var u=a.method,t=e.iterator[u];if(t===l)return a.delegate=null,"throw"===u&&e.iterator.return&&(a.method="return",a.arg=l,S(e,a),"throw"===a.method)||"return"!==u&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+u+"' method")),m;var v=o(t,e.iterator,a.arg);if("throw"===v.type)return a.method="throw",a.arg=v.arg,a.delegate=null,m;var b=v.arg;return b?b.done?(a[e.resultName]=b.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=l),a.delegate=null,m):b:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,m)}function j(l){var e={tryLoc:l[0]};1 in l&&(e.catchLoc=l[1]),2 in l&&(e.finallyLoc=l[2],e.afterLoc=l[3]),this.tryEntries.push(e)}function $(l){var e=l.completion||{};e.type="normal",delete e.arg,l.completion=e}function I(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(j,this),this.reset(!0)}function M(e){if(e||""===e){var a=e[b];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var t=-1,v=function a(){for(;++t=0;--v){var b=this.tryEntries[v],r=b.completion;if("root"===b.tryLoc)return t("end");if(b.tryLoc<=this.prev){var n=u.call(b,"catchLoc"),i=u.call(b,"finallyLoc");if(n&&i){if(this.prev=0;--a){var t=this.tryEntries[a];if(t.tryLoc<=this.prev&&u.call(t,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===l)return this.complete(a.completion,a.afterLoc),$(a),m}},catch:function(l){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===l){var u=a.completion;if("throw"===u.type){var t=u.arg;$(a)}return t}}throw Error("illegal catch attempt")},delegateYield:function(e,a,u){return this.delegate={iterator:M(e),resultName:a,nextLoc:u},"next"===this.method&&(this.arg=l),m}},e}function w(l,e,a,u,t,v,b){try{var r=l[v](b),n=r.value}catch(l){return void a(l)}r.done?e(n):Promise.resolve(n).then(u,t)}function x(l){return function(){var e=this,a=arguments;return new Promise((function(u,t){var v=l.apply(e,a);function b(l){w(v,u,t,b,r,"next",l)}function r(l){w(v,u,t,b,r,"throw",l)}b(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 L(l){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{})}function c(l){return h.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,l)}s(o,"请输入%s"),s(c,"%s格式不正确");var h=Object.keys(i).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(v({message:a.replace(":".concat(e),"range"===e?"".concat(l[0],"-").concat(l[1]):l),type:"string"},t),u)},s(l[e],i[e]),l}),{})},"6f18":function(l,e,a){"use strict";a("fbcf")},a4e6:function(l,e,a){"use strict";a("1e99")},a8e0:function(l,e,a){"use strict";var u=a("c24f");function t(l){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}function v(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return e};var l,e={},a=Object.prototype,u=a.hasOwnProperty,b=Object.defineProperty||function(l,e,a){l[e]=a.value},r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function o(l,e,a){return Object.defineProperty(l,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),l[e]}try{o({},"")}catch(l){o=function(l,e,a){return l[e]=a}}function c(l,e,a,u){var t=e&&e.prototype instanceof g?e:g,v=Object.create(t.prototype),r=new I(u||[]);return b(v,"_invoke",{value:D(l,a,r)}),v}function h(l,e,a){try{return{type:"normal",arg:l.call(e,a)}}catch(l){return{type:"throw",arg:l}}}e.wrap=c;var d="suspendedStart",p="suspendedYield",m="executing",f="completed",y={};function g(){}function _(){}function w(){}var x={};o(x,n,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(M([])));L&&L!==a&&u.call(L,n)&&(x=L);var F=w.prototype=g.prototype=Object.create(x);function C(l){["next","throw","return"].forEach((function(e){o(l,e,(function(l){return this._invoke(e,l)}))}))}function O(l,e){function a(v,b,r,n){var i=h(l[v],l,b);if("throw"!==i.type){var s=i.arg,o=s.value;return o&&"object"==t(o)&&u.call(o,"__await")?e.resolve(o.__await).then((function(l){a("next",l,r,n)}),(function(l){a("throw",l,r,n)})):e.resolve(o).then((function(l){s.value=l,r(s)}),(function(l){return a("throw",l,r,n)}))}n(i.arg)}var v;b(this,"_invoke",{value:function(l,u){function t(){return new e((function(e,t){a(l,u,e,t)}))}return v=v?v.then(t,t):t()}})}function D(e,a,u){var t=d;return function(v,b){if(t===m)throw Error("Generator is already running");if(t===f){if("throw"===v)throw b;return{value:l,done:!0}}for(u.method=v,u.arg=b;;){var r=u.delegate;if(r){var n=S(r,u);if(n){if(n===y)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(t===d)throw t=f,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);t=m;var i=h(e,a,u);if("normal"===i.type){if(t=u.done?f:p,i.arg===y)continue;return{value:i.arg,done:u.done}}"throw"===i.type&&(t=f,u.method="throw",u.arg=i.arg)}}}function S(e,a){var u=a.method,t=e.iterator[u];if(t===l)return a.delegate=null,"throw"===u&&e.iterator.return&&(a.method="return",a.arg=l,S(e,a),"throw"===a.method)||"return"!==u&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+u+"' method")),y;var v=h(t,e.iterator,a.arg);if("throw"===v.type)return a.method="throw",a.arg=v.arg,a.delegate=null,y;var b=v.arg;return b?b.done?(a[e.resultName]=b.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=l),a.delegate=null,y):b:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,y)}function j(l){var e={tryLoc:l[0]};1 in l&&(e.catchLoc=l[1]),2 in l&&(e.finallyLoc=l[2],e.afterLoc=l[3]),this.tryEntries.push(e)}function $(l){var e=l.completion||{};e.type="normal",delete e.arg,l.completion=e}function I(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(j,this),this.reset(!0)}function M(e){if(e||""===e){var a=e[n];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var v=-1,b=function a(){for(;++v=0;--v){var b=this.tryEntries[v],r=b.completion;if("root"===b.tryLoc)return t("end");if(b.tryLoc<=this.prev){var n=u.call(b,"catchLoc"),i=u.call(b,"finallyLoc");if(n&&i){if(this.prev=0;--a){var t=this.tryEntries[a];if(t.tryLoc<=this.prev&&u.call(t,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===l)return this.complete(a.completion,a.afterLoc),$(a),y}},catch:function(l){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===l){var u=a.completion;if("throw"===u.type){var t=u.arg;$(a)}return t}}throw Error("illegal catch attempt")},delegateYield:function(e,a,u){return this.delegate={iterator:M(e),resultName:a,nextLoc:u},"next"===this.method&&(this.arg=l),y}},e}function b(l,e,a,u,t,v,b){try{var r=l[v](b),n=r.value}catch(l){return void a(l)}r.done?e(n):Promise.resolve(n).then(u,t)}var r={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(u.d)(this.page).then(function(){var l,a=(l=v().mark((function l(a){var u;return v().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,t){var v=l.apply(e,a);function r(l){b(v,u,t,r,n,"next",l)}function n(l){b(v,u,t,r,n,"throw",l)}r(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,t={title:e,info:"发送优惠券后将无法撤回,请谨慎操作!",num:a,url:"marketing/coupon/user/grant",method:"post",ids:{id:l.id,all:this.isAll}};0==this.isAll?t.ids.uid=this.userIds:1==this.isAll&&(t.ids.uid=this.userIds,t.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(t).then((function(l){u.$Message.success(l.msg)})).catch((function(l){u.$Message.error(l.msg)}))}}},n=(a("3fe8"),a("2877")),i=Object(n.a)(r,(function(){var l=this,e=l._self._c;return e("div",[e("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"}},[e("div",{staticClass:"acea-row"},[e("span",{staticClass:"sp"},[l._v("优惠券名称:")]),e("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),e("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(a){var u=a.row;return[1==u.coupon_type?e("span",[l._v(l._s(u.coupon_price)+"元")]):l._e(),2==u.coupon_type?e("span",[l._v(l._s(parseFloat(u.coupon_price)/10)+"折("+l._s(u.coupon_price.toString().split(".")[0])+"%)")]):l._e()]}},{key:"action",fn:function(a){var u=a.row,t=a.index;return[e("a",{on:{click:function(e){return l.sendGrant(u,"发送优惠券",t)}}},[l._v("发送")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:l.total,"show-elevator":"","show-total":"","page-size":l.page.limit},on:{"on-change":l.pageChange}})],1)],1)],1)}),[],!1,null,"ea8d1cf8",null);e.a=i.exports},bbbc:function(l,e,a){"use strict";a.d(e,"a",(function(){return t})),a.d(e,"g",(function(){return v})),a.d(e,"f",(function(){return b})),a.d(e,"c",(function(){return r})),a.d(e,"e",(function(){return n})),a.d(e,"d",(function(){return i})),a.d(e,"h",(function(){return s})),a.d(e,"b",(function(){return o}));var u=a("b6bd");function t(l){return Object(u.a)({url:"agent/index",method:"get",params:l})}function v(l){return Object(u.a)({url:"agent/statistics",method:"get",params:l})}function b(l,e){return Object(u.a)({url:l,method:"get",params:e})}function r(l){return Object(u.a)({url:"agent/look_code",method:"get",params:l})}function n(l){return Object(u.a)({url:"agent/look_xcx_code",method:"get",params:l})}function i(l){return Object(u.a)({url:"agent/look_h5_code",method:"get",params:l})}function s(l){return Object(u.a)({url:"export/userAgent",method:"get",params:l})}function o(l){return Object(u.a)({url:"agent/spread",method:"PUT",data:l})}},c0f0:function(l,e,a){},c262:function(l,e,a){"use strict";a("c54c")},c54c:function(l,e,a){},fbcf:function(l,e,a){}}]);