mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-13 03:32:48 +00:00
1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a7edae6a"],{"2ec3":function(t,e,r){},"31b4":function(t,e,r){"use strict";var n=r("f3f3"),o=r("9860"),a=(o=r.n(o),r("6b6c")),i=r("2f62");o={name:"edit",components:{formCreate:o.a.$form()},computed:Object(n.a)({},Object(i.d)("userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},update:{type:Boolean,default:!0}},data:function(){return{modals:!1,type:0,loading:!1,config:{global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.Message.error(t.msg)}}}}}}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e=this;this.loading||(this.loading=!0,Object(a.a)({url:this.FromData.action,method:this.FromData.method,data:t}).then((function(t){e.update&&e.$parent.getList(),e.$Message.success(t.msg),e.modals=!1,setTimeout((function(){e.$emit("submitFail"),e.loading=!1}),1e3)})).catch((function(t){e.loading=!1,e.$Message.error(t.msg)})))},cancel:function(){this.type=0}}},r("9646"),n=r("2877"),i=Object(n.a)(o,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return t.FromData?e("div",[e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:t.FromData.title,"z-index":1,width:"700"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[["/marketing/coupon/save.html"===t.FromData.action?e("div",{staticClass:"radio acea-row row-middle"},[e("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),e("Radio-group",{on:{"on-change":t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("Radio",{attrs:{label:0}},[t._v("通用券")]),e("Radio",{attrs:{label:1}},[t._v("品类券")]),e("Radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],e("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(t.FromData.rules),handleIcon:"false"},on:{submit:t.onSubmit}})],2)],1):t._e()}),[],!1,null,"5cc97a38",null);e.a=i.exports},"43aa":function(t,e,r){"use strict";var n=r("a02c");r.n(n).a},"5b9e":function(t,e,r){"use strict";r.r(e),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("0122"),o=r("c964"),a=r("f3f3"),i=(r("d81d"),r("a15b"),r("2f62")),s=r("b562"),c=r("c42b"),l=r("31b4"),u=r("a8e0");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 t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.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(e){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a,i,s,c;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new L(n||[]);return o(e,"_invoke",{value:(a=t,i=r,s=n,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return O()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=h(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,s),r)){if(r===f)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",r=h(a,i,s),"normal"===r.type){if(c=s.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(c="completed",s.method="throw",s.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function m(){}function v(){}a={};var g=(l(a,i,(function(){return this})),Object.getPrototypeOf),y=(g=g&&g(g(k([]))),g&&g!==e&&r.call(g,i)&&(a=g),v.prototype=p.prototype=Object.create(a));function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var a;o(this,"_invoke",{value:function(o,i){function s(){return new e((function(a,s){!function o(a,i,s,c){var l;a=h(t[a],t,i);if("throw"!==a.type)return(i=(l=a.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){o("next",t,s,c)}),(function(t){o("throw",t,s,c)})):e.resolve(i).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,c)}));c(a.arg)}(o,i,a,s)}))}return a=a?a.then(s,s):s()}})}function x(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){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e,n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:m.prototype=v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new w(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(y),l(y,c,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}var i=(a=a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc?null:a)?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,_(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}c={name:"user",components:{newsCategory:c.a,editFrom:l.a,sendFrom:u.a},data:function(){return{tagidList:[],isShowSend:!0,maxCols:4,scrollerHeight:"600",contentTop:"130",contentWidth:"98%",modal13:!1,timeVal:[],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"}]},formValidate:{limit:15,page:1,nickname:"",data:"",tagid_list:"",sex:"",groupid:0,subscribe:"",export:2},loading:!1,tabList:[],total:0,value2:"",grid:{xl:8,lg:8,md:8,sm:24,xs:24},columns4:[{type:"selection",min:60,align:"center"},{title:"ID",key:"uid"},{title:"微信用户名称",key:"nickname"},{title:"头像",slot:"headimgurl"},{title:"性别",slot:"sex"},{title:"地区",slot:"country"},{title:"是否关注公众号",slot:"subscribe"},{title:"用户分组",key:"groupid"},{title:"用户标签",key:"tagid_list"},{title:"操作",slot:"createModalFrame",fixed:"right",width:100}],tagList:[],groupList:[],FromData:null,selectionList:[],user_ids:""}},computed:Object(a.a)(Object(a.a)({},Object(i.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getListTag(),this.getList()},methods:{changeMenu:function(t,e){var r=this;switch(e){case"1":this.editGroup("app/wechat/user_group/".concat(t.openid,"/edit"));break;case"2":this.editGroup("app/wechat/user_tag/".concat(t.openid,"/edit"));break;default:var n={title:"同步该用户标签",url:"app/wechat/syn_tag/".concat(t.openid),method:"PUT",ids:""};this.$modalSure(n).then((function(t){r.$Message.success(t.msg),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))}},editGroup:function(t){var e=this;Object(s.d)(t).then(function(){var t=Object(o.a)(d().mark((function t(r){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.FromData=r.data,e.$refs.edits.modals=!0;case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},submitFail:function(){this.getList()},submitModel:function(){this.getList()},onSend:function(){0===this.selectionList.length?this.$Message.warning("请选择要发送优惠券的用户"):(this.$refs.sends.modals=!0,this.$refs.sends.getList())},onSendPic:function(){0===this.selectionList.length?this.$Message.warning("请选择要发送图文消息的用户"):this.modal13=!0},onSelectTab:function(t){this.selectionList=t;var e=[];this.selectionList.map((function(t){e.push(t.uid)})),this.user_ids=e.join(",")},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal.join("-"),this.getList()},selectChange:function(t){this.formValidate.data=t,this.timeVal=[],this.getList()},getListTag:function(){var t=this,e={id:"",name:"全部"};Object(s.l)().then(function(){var r=Object(o.a)(d().mark((function r(n){var o;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=n.data,t.tagList=o.tagList,t.groupList=o.groupList,t.groupList.unshift(e);case 4:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,this.formValidate.sex=this.formValidate.sex||"",this.formValidate.subscribe=this.formValidate.subscribe||"",this.formValidate.tagid_list=this.tagidList.join(","),Object(s.y)(this.formValidate).then(function(){var e=Object(o.a)(d().mark((function e(r){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tabList=n.list,t.total=n.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.getList()}}},r("43aa"),l=r("2877"),u=Object(l.a)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header header-title"},[r("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"table_box"},[r("Form",{ref:"formValidate",staticClass:"tabform",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[r("Col",{staticClass:"ivu-text-left",attrs:{span:"24"}},[r("FormItem",{attrs:{label:t.fromList.title+":"}},[r("RadioGroup",{staticClass:"mr15",attrs:{type:"button"},on:{"on-change":function(e){return t.selectChange(t.formValidate.data)}},model:{value:t.formValidate.data,callback:function(e){t.$set(t.formValidate,"data",e)},expression:"formValidate.data"}},t._l(t.fromList.fromTxt,(function(e,n){return r("Radio",{key:n,attrs:{label:e.val}},[t._v("\n "+t._s(e.text)+"\n ")])})),1),r("DatePicker",{staticStyle:{width:"200px"},attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.onchangeTime}})],1)],1),r("Col",{staticClass:"ivu-text-left",attrs:{span:"24"}},[r("FormItem",{attrs:{label:"用户分组:"}},[r("RadioGroup",{attrs:{type:"button"},model:{value:t.formValidate.groupid,callback:function(e){t.$set(t.formValidate,"groupid",e)},expression:"formValidate.groupid"}},t._l(t.groupList,(function(e,n){return r("Radio",{key:n,attrs:{label:e.id}},[t._v(t._s(e.name))])})),1)],1)],1),r("Col",{staticClass:"ivu-text-left",attrs:{span:"24"}},[r("FormItem",{attrs:{label:"用户标签:"}},[r("TagSelect",{model:{value:t.tagidList,callback:function(e){t.tagidList=e},expression:"tagidList"}},t._l(t.tagList,(function(e,n){return r("TagSelectOption",{key:n,attrs:{name:e.id}},[t._v(t._s(e.name))])})),1)],1)],1),r("Col",{staticClass:"ivu-text-left",attrs:{span:"24"}},[r("Col",{attrs:{xl:7,lg:12,md:12,sm:24,xs:24}},[r("FormItem",{attrs:{label:"用户名称:"}},[r("Input",{staticClass:"perW90",attrs:{placeholder:"请输入用户名称"},model:{value:t.formValidate.nickname,callback:function(e){t.$set(t.formValidate,"nickname",e)},expression:"formValidate.nickname"}})],1)],1),r("Col",{staticClass:"sex_box",attrs:{xl:7,lg:12,md:12,sm:24,xs:24}},[r("FormItem",{attrs:{label:"性别:"}},[r("Select",{staticStyle:{width:"90%"},attrs:{clearable:""},model:{value:t.formValidate.sex,callback:function(e){t.$set(t.formValidate,"sex",e)},expression:"formValidate.sex"}},[r("Option",{attrs:{value:"1"}},[t._v("男")]),r("Option",{attrs:{value:"2"}},[t._v("女")]),r("Option",{attrs:{value:"0"}},[t._v("保密")])],1)],1)],1),r("Col",{staticClass:"subscribe_box",attrs:{xl:7,lg:12,md:12,sm:24,xs:24}},[r("FormItem",{attrs:{label:"是否关注公众号:"}},[r("Select",{staticStyle:{width:"90%"},attrs:{clearable:""},model:{value:t.formValidate.subscribe,callback:function(e){t.$set(t.formValidate,"subscribe",e)},expression:"formValidate.subscribe"}},[r("Option",{attrs:{value:"1"}},[t._v("是")]),r("Option",{attrs:{value:"0"}},[t._v("否")])],1)],1)],1),r("Col",{staticClass:"btn_box",attrs:{xl:3,lg:3,md:3,sm:24,xs:24}},[r("FormItem",[r("Button",{staticClass:"userSearch",attrs:{type:"primary",icon:"ios-search",label:"default"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1)],1),r("Divider",{attrs:{dashed:""}}),r("Col",{attrs:{span:"24"}},[r("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.onSend}},[t._v("发送优惠券")]),r("Button",{staticClass:"greens mr20",attrs:{size:"default"},on:{click:t.onSendPic}},[r("Icon",{attrs:{type:"md-list"}}),t._v("\n 发送图文消息\n ")],1)],1)],1)],1)],1),r("Table",{ref:"selection",staticClass:"mt25",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},on:{"on-selection-change":t.onSelectTab},scopedSlots:t._u([{key:"headimgurl",fn:function(t){var e=t.row;return t.index,[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.headimgurl,expression:"row.headimgurl"}]})])]}},{key:"sex",fn:function(e){return e=e.row,[r("span",{directives:[{name:"show",rawName:"v-show",value:1===e.sex,expression:"row.sex === 1"}]},[t._v("男")]),r("span",{directives:[{name:"show",rawName:"v-show",value:2===e.sex,expression:"row.sex === 2"}]},[t._v("女")]),r("span",{directives:[{name:"show",rawName:"v-show",value:0===e.sex,expression:"row.sex === 0"}]},[t._v("保密")])]}},{key:"country",fn:function(e){return e=e.row,[r("span",[t._v(t._s(e.country+e.province+e.city))])]}},{key:"subscribe",fn:function(e){return e=e.row,[r("span",{directives:[{name:"show",rawName:"v-show",value:1===e.subscribe,expression:"row.subscribe === 1"}]},[t._v("关注")]),r("span",{directives:[{name:"show",rawName:"v-show",value:0===e.subscribe,expression:"row.subscribe === 0"}]},[t._v("未关注")])]}},{key:"createModalFrame",fn:function(e){var n=e.row;return[[r("Dropdown",{on:{"on-click":function(e){return t.changeMenu(n,e)}}},[r("a",{attrs:{href:"javascript:void(0)"}},[t._v("操作\n "),r("Icon",{attrs:{type:"ios-arrow-down"}})],1),r("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[r("DropdownItem",{directives:[{name:"show",rawName:"v-show",value:n.subscribe,expression:"row.subscribe"}],attrs:{name:"1"}},[t._v("修改分组")]),r("DropdownItem",{directives:[{name:"show",rawName:"v-show",value:n.subscribe,expression:"row.subscribe"}],attrs:{name:"2"}},[t._v("修改标签")]),r("DropdownItem",{directives:[{name:"show",rawName:"v-show",value:n.subscribe,expression:"row.subscribe"}],attrs:{name:"3"}},[t._v("同步标签")]),r("DropdownItem",{directives:[{name:"show",rawName:"v-show",value:!n.subscribe,expression:"!row.subscribe"}]},[t._v("无法操作")])],1)],1)]]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),r("edit-from",{ref:"edits",attrs:{FromData:t.FromData},on:{submitFail:t.submitFail}}),r("send-from",{ref:"sends",attrs:{userIds:t.user_ids}}),r("Modal",{staticClass:"modelBox",attrs:{scrollable:"",title:"发送消息","z-index":100,width:"1200",height:"800","footer-hide":""},model:{value:t.modal13,callback:function(e){t.modal13=e},expression:"modal13"}},[t.modal13?r("news-category",{attrs:{isShowSend:t.isShowSend,userIds:t.user_ids,scrollerHeight:t.scrollerHeight,contentTop:t.contentTop,contentWidth:t.contentWidth,maxCols:t.maxCols}}):t._e()],1)],1)}),[],!1,null,"59cfdd0a",null),e.default=u.exports},9646:function(t,e,r){"use strict";var n=r("2ec3");r.n(n).a},a02c:function(t,e,r){},a8e0:function(t,e,r){"use strict";r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("0122"),o=r("c964"),a=r("c24f");function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var a,i,s,c;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new L(n||[]);return o(e,"_invoke",{value:(a=t,i=r,s=n,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return O()}for(s.method=t,s.arg=e;;){var r=s.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=h(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,s),r)){if(r===f)continue;return r}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",r=h(a,i,s),"normal"===r.type){if(c=s.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:s.done}}"throw"===r.type&&(c="completed",s.method="throw",s.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var f={};function p(){}function m(){}function v(){}a={};var g=(u(a,s,(function(){return this})),Object.getPrototypeOf),y=(g=g&&g(g(k([]))),g&&g!==e&&r.call(g,s)&&(a=g),v.prototype=p.prototype=Object.create(a));function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var a;o(this,"_invoke",{value:function(o,i){function s(){return new e((function(a,s){!function o(a,i,s,c){var l;a=h(t[a],t,i);if("throw"!==a.type)return(i=(l=a.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){o("next",t,s,c)}),(function(t){o("throw",t,s,c)})):e.resolve(i).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,c)}));c(a.arg)}(o,i,a,s)}))}return a=a?a.then(s,s):s()}})}function x(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){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e,n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:m.prototype=v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new w(d(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(y),u(y,l,"Generator"),u(y,s,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}var i=(a=a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc?null:a)?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,_(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var s={name:"send",props:{userIds:{type:String,default:""}},data:function(){return{modals:!1,loading:!1,couponList:[],columns:[{title:"优惠券名称",key:"title",align:"center",minWidth:100},{title:"优惠券面值",key:"coupon_price",align:"center",minWidth:80},{title:"优惠券最低消费",key:"use_min_price",align:"center",minWidth:150},{title:"优惠券有效期限",slot:"coupon_time",align:"center",minWidth:120},{title:"操作",slot:"action",align:"center",width:120}],page:{page:1,limit:15,coupon_title:"",receive_type:3},total:0}},methods:{getList:function(t){var e=this;this.loading=!0,Object(a.c)(this.page).then(function(){var t=Object(o.a)(i().mark((function t(r){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:200===r.status?(n=r.data,e.couponList=n.list,e.total=n.count,e.loading=!1):(e.loading=!1,e.$Message.error(r.msg));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},userSearchs:function(){this.getList()},pageChange:function(t){this.page.page=t,this.getList()},sendGrant:function(t,e,r){var n=this;e={title:e,num:r,url:"marketing/coupon/user/grant",method:"post",ids:{id:t.id,uid:this.userIds}};this.$modalSure(e).then((function(t){n.$Message.success(t.msg)})).catch((function(t){n.$Message.error(t.msg)}))}}};r("f6cb"),r=r("2877"),r=Object(r.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Modal",{attrs:{"z-index":100,scrollable:"","footer-hide":"",closable:"",title:"发送优惠券","mask-closable":!1,width:"900"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[r("div",{staticClass:"acea-row"},[r("span",{staticClass:"sp"},[t._v("优惠券名称:")]),r("Input",{staticStyle:{width:"60%"},attrs:{search:"","enter-button":"",placeholder:"请输入优惠券名称"},on:{"on-search":t.userSearchs},model:{value:t.page.coupon_title,callback:function(e){t.$set(t.page,"coupon_title",e)},expression:"page.coupon_title"}})],1),r("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.couponList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"coupon_time",fn:function(e){var n=e.row;return e.index,[n.coupon_time?r("div",[t._v(t._s(n.coupon_time))]):r("div",[t._v(t._s(n.use_time))])]}},{key:"action",fn:function(e){var n=e.row,o=e.index;return[r("a",{on:{click:function(e){return t.sendGrant(n,"发送优惠券",o)}}},[t._v("发送")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.page.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"2933294c",null);e.a=r.exports},a91d:function(t,e,r){},f6cb:function(t,e,r){"use strict";var n=r("a91d");r.n(n).a}}]); |