chunk-528f08e1.4e73f2d8.js 14 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-528f08e1"],{2673:function(e,t,a){},"2c3e":function(e,t,a){var n=a("83ab"),r=a("9f7f").MISSED_STICKY,i=a("c6b6"),o=a("edd0"),l=a("69f3").get,s=RegExp.prototype,c=TypeError;n&&r&&o(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!l(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},"4d63":function(e,t,a){var n=a("83ab"),r=a("cfe9"),i=a("e330"),o=a("94ca"),l=a("7156"),s=a("9112"),c=a("7c73"),u=a("241c").f,d=a("3a9b"),m=a("44e7"),f=a("577e"),p=a("90d8"),b=a("9f7f"),v=a("aeb0"),h=a("cb2d"),g=a("d039"),_=a("1a2d"),w=a("69f3").enforce,y=a("2626"),k=a("b622"),x=a("fce3"),S=a("107c"),F=k("match"),$=r.RegExp,E=$.prototype,O=r.SyntaxError,j=i(E.exec),R=i("".charAt),C=i("".replace),D=i("".indexOf),L=i("".slice),N=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,M=/a/g,P=(a=new $(I)!==I,b.MISSED_STICKY),T=b.UNSUPPORTED_Y;k=n&&(!a||P||x||S||g((function(){return M[F]=!1,$(I)!==I||$(M)===M||"/a/i"!==String($(I,"i"))})));if(o("RegExp",k)){for(var A=function(e,t){var a,n,r=d(E,this),i=m(e),o=void 0===t,u=[],b=e;if(!r&&i&&o&&e.constructor===A)return e;if((i||d(E,e))&&(e=e.source,o)&&(t=p(b)),e=void 0===e?"":f(e),t=void 0===t?"":f(t),b=e,i=t=x&&"dotAll"in I&&(a=!!t&&-1<D(t,"s"))?C(t,/s/g,""):t,P&&"sticky"in I&&(n=!!t&&-1<D(t,"y"))&&T&&(t=C(t,/y/g,"")),S&&(e=(o=(e=>{for(var t,a=e.length,n=0,r="",i=[],o=c(null),l=!1,s=!1,u=0,d="";n<=a;n++){if("\\"===(t=R(e,n)))t+=R(e,++n);else if("]"===t)l=!1;else if(!l)switch(!0){case"["===t:l=!0;break;case"("===t:if(r+=t,"?:"===L(e,n+1,n+3))continue;j(N,L(e,n+1))&&(n+=2,s=!0),u++;continue;case">"===t&&s:if(""===d||_(o,d))throw new O("Invalid capture group name");o[d]=!0,s=!(i[i.length]=[d,u]),d="";continue}s?d+=t:r+=t}return[r,i]})(e))[0],u=o[1]),o=l($(e,t),r?this:E,A),(a||n||u.length)&&(t=w(o),a&&(t.dotAll=!0,t.raw=A((e=>{for(var t,a=e.length,n=0,r="",i=!1;n<=a;n++)"\\"===(t=R(e,n))?r+=t+R(e,++n):i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),r+=t):r+="[\\s\\S]";return r})(e),i)),n&&(t.sticky=!0),u.length)&&(t.groups=u),e!==b)try{s(o,"source",""===b?"(?:)":b)}catch(e){}return o},Y=u($),q=0;Y.length>q;)v(A,$,Y[q++]);(E.constructor=A).prototype=E,h(r,"RegExp",A,{constructor:!0})}y("RegExp")},"61f7":function(e,t,a){a.d(t,"a",(function(){return i})),a.d(t,"c",(function(){return s})),a.d(t,"b",(function(){return c}));var n=a("ade3"),r=a("5530");function i(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var a,n,r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(a in r)new RegExp("(".concat(a,")")).test(t)&&(n=r[a]+"",t=t.replace(RegExp.$1,1===RegExp.$1.length?n:("00"+n).substr(n.length)));return t}a("99af"),a("13d5"),a("e9f5"),a("9485"),a("b64b"),a("d3b7"),a("4d63"),a("c607"),a("ac1f"),a("2c3e"),a("00b4"),a("25f0"),a("5319"),a("498a");var o={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function l(e,t){e.message=function(e){return t.replace("%s",e||"")}}function s(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)({required:!0,message:e,type:"string"},t)}function c(e){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,e)}l(s,"请输入%s"),l(c,"%s格式不正确");var u=Object.keys(o).reduce((function(e,t){return e[t]=function(e){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o="range"===t?{min:e[0],max:e[1]}:Object(n.a)({},t,e);return Object(r.a)(Object(r.a)({message:a.replace(":".concat(t),"range"===t?"".concat(e[0],"-").concat(e[1]):e),type:"string"},o),i)},l(e[t],o[t]),e}),{})},c600:function(e,t,a){a("2673")},c607:function(e,t,a){var n=a("83ab"),r=a("fce3"),i=a("c6b6"),o=a("edd0"),l=a("69f3").get,s=RegExp.prototype,c=TypeError;n&&r&&o(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!l(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},fd8e:function(e,t,a){a.r(t);var n=a("c14f"),r=a("1da1"),i=a("5530"),o=(a("14d9"),a("a434"),a("2f62")),l=a("b7be"),s=a("61f7");i={name:"marketing_storeCouponIssue",filters:{formatDate:function(e){if(0!==e)return e=new Date(1e3*e),Object(s.a)(e,"yyyy-MM-dd hh:mm")}},data:function(){return{modals2:!1,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,tableFrom:{status:"",coupon_type:"",coupon_title:"",receive_type:"",page:1,limit:15},receive_type:"",tableList:[],total:0,FromData:null,receiveList:[],loading2:!1,total2:0,receiveFrom:{page:1,limit:15},rows:{}}},activated:function(){this.getList()},computed:Object(i.a)(Object(i.a)({},Object(o.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"90px"},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{couponInvalid:function(e,t,a){this.delfromData={title:t,num:a,url:"marketing/coupon/status/".concat(e.id),method:"PUT",ids:""},this.$refs.modelSure.modals=!0},receive:function(e){this.modals2=!0,this.rows=e,this.getReceivelist(e)},getReceivelist:function(e){var t=this;this.loading2=!0,Object(l.kb)(e.id,this.receiveFrom).then((()=>{var e=Object(r.a)(Object(n.a)().m((function e(a){var r;return Object(n.a)().w((function(e){for(;;)switch(e.n){case 0:r=a.data,t.receiveList=r.list,t.total2=a.data.count,t.loading2=!1;case 1:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}})()).catch((function(e){t.loading2=!1,t.$message.error(e.msg)}))},receivePageChange:function(e){this.receiveFrom.page=e,this.getReceivelist(this.rows)},couponDel:function(e,t,a){var n=this;t={title:t,num:a,url:"marketing/coupon/released/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(t).then((function(e){n.$message.success(e.msg),n.tableList.splice(a,1),n.total--})).catch((function(e){n.$message.error(e.msg)}))},getList:function(){var e=this;this.loading=!0,this.tableFrom.receive_type="all"===this.receive_type?"":this.receive_type,this.tableFrom.status=this.tableFrom.status||"",Object(l.jb)(this.tableFrom).then((()=>{var t=Object(r.a)(Object(n.a)().m((function t(a){var r;return Object(n.a)().w((function(t){for(;;)switch(t.n){case 0:r=a.data,e.tableList=r.list,e.total=a.data.count,e.loading=!1;case 1:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}})()).catch((function(t){e.loading=!1,e.$message.error(t.msg)}))},userSearchs:function(){this.tableFrom.page=1,this.getList()},add:function(){this.$router.push({path:this.$routeProStr+"/marketing/store_coupon_issue/create"})},copy:function(e){this.$router.push({path:this.$routeProStr+"/marketing/store_coupon_issue/create/".concat(e.id)})},edit:function(e){this.$router.push({path:this.$routeProStr+"/marketing/store_coupon_issue/create/".concat(e.id,"/1")})},openChange:function(e){var t=this;Object(l.u)(e).then((function(){return t.getList()}))}}},a("c600"),o=a("2877"),a=Object(o.a)(i,(function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[t("div",{staticClass:"padding-add"},[t("el-form",{ref:"tableFrom",attrs:{model:e.tableFrom,"label-width":e.labelWidth,"label-position":e.labelPosition,inline:""},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{label:"优惠券名称:","label-for":"coupon_title"}},[t("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入优惠券名称",maxlength:"18","show-word-limit":""},model:{value:e.tableFrom.coupon_title,callback:function(t){e.$set(e.tableFrom,"coupon_title",t)},expression:"tableFrom.coupon_title"}})],1),t("el-form-item",{attrs:{label:"优惠券类型:","label-for":"coupon_type"}},[t("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:e.userSearchs},model:{value:e.tableFrom.coupon_type,callback:function(t){e.$set(e.tableFrom,"coupon_type",t)},expression:"tableFrom.coupon_type"}},[t("el-option",{attrs:{value:"0",label:"通用券"}}),t("el-option",{attrs:{value:"1",label:"品类券"}}),t("el-option",{attrs:{value:"2",label:"商品券"}})],1)],1),t("el-form-item",{attrs:{label:"是否有效:","label-for":"status"}},[t("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:e.userSearchs},model:{value:e.tableFrom.status,callback:function(t){e.$set(e.tableFrom,"status",t)},expression:"tableFrom.status"}},[t("el-option",{attrs:{value:"1",label:"正常"}}),t("el-option",{attrs:{value:"0",label:"未开启"}})],1)],1),t("el-form-item",{attrs:{label:"发放方式:","label-for":"status"}},[t("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:e.userSearchs},model:{value:e.receive_type,callback:function(t){e.receive_type=t},expression:"receive_type"}},[t("el-option",{attrs:{value:"all",label:"全部"}}),t("el-option",{attrs:{value:"1",label:"用户领取"}}),t("el-option",{attrs:{value:"2",label:"系统赠送"}})],1)],1),t("el-form-item",[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:e.userSearchs}},[e._v("查询")])],1)],1)],1)]),t("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[t("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-marketing-store_coupon-add"],expression:"['admin-marketing-store_coupon-add']"},{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary",icon:"md-add"},on:{click:e.add}},[e._v("添加优惠券")]),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",staticClass:"mt14",attrs:{data:e.tableList,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[t("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.id))])]}}])}),t("el-table-column",{attrs:{label:"优惠券名称","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.coupon_title))])]}}])}),t("el-table-column",{attrs:{label:"优惠券类型","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[1===a.row.type?t("span",[e._v("品类券")]):2===a.row.type?t("span",[e._v("商品券")]):3===a.row.type?t("span",[e._v("会员券")]):t("span",[e._v("通用券")])]}}])}),t("el-table-column",{attrs:{label:"面值","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.coupon_price))])]}}])}),t("el-table-column",{attrs:{label:"领取方式","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[1===a.row.receive_type||4===a.row.receive_type?t("span",[e._v("用户领取")]):t("span",[e._v("系统赠送")])]}}])}),t("el-table-column",{attrs:{label:"领取日期","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.start_time?t("div",[e._v("\n "+e._s(e._f("formatDate")(a.row.start_time))+" - "+e._s(e._f("formatDate")(a.row.end_time))+"\n ")]):t("span",[e._v("不限时")])]}}])}),t("el-table-column",{attrs:{label:"使用时间","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.start_use_time?t("div",[e._v("\n "+e._s(e._f("formatDate")(a.row.start_use_time))+" -\n "+e._s(e._f("formatDate")(a.row.end_use_time))+"\n ")]):t("div",[e._v(e._s(a.row.coupon_time)+"天")])]}}])}),t("el-table-column",{attrs:{label:"发布数量","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.is_permanent?t("span",[e._v("不限量")]):t("div",[t("span",{staticClass:"fa"},[e._v("发布:"+e._s(a.row.total_count))]),t("span",{staticClass:"sheng ml10"},[e._v("剩余:"+e._s(a.row.remain_count))])])]}}])}),t("el-table-column",{attrs:{label:"是否开启","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:a.row.status,size:"large"},on:{change:function(t){return e.openChange(a.row)}},model:{value:a.row.status,callback:function(t){e.$set(a.row,"status",t)},expression:"scope.row.status"}})]}}])}),t("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(t){return e.receive(a.row)}}},[e._v("领取记录")]),t("el-divider",{attrs:{direction:"vertical"}}),t("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(t){return e.edit(a.row)}}},[e._v("编辑")]),t("el-divider",{attrs:{direction:"vertical"}}),t("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(t){return e.copy(a.row)}}},[e._v("复制")]),t("el-divider",{attrs:{direction:"vertical"}}),t("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(t){return e.couponDel(a.row,"删除发布的优惠券",a.$index)}}},[e._v("删除")])]}}])})],1),t("div",{staticClass:"acea-row row-right page"},[e.total?t("pagination",{attrs:{total:e.total,page:e.tableFrom.page,limit:e.tableFrom.limit},on:{"update:page":function(t){return e.$set(e.tableFrom,"page",t)},"update:limit":function(t){return e.$set(e.tableFrom,"limit",t)},pagination:e.getList}}):e._e()],1)],1),t("el-dialog",{attrs:{visible:e.modals2,title:"领取记录","close-on-click-modal":!1,width:"720px"},on:{"update:visible":function(t){e.modals2=t}}},[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading2,expression:"loading2"}],ref:"table",attrs:{data:e.receiveList,"highlight-current-row":"",height:"500","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[t("el-table-column",{attrs:{label:"ID","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.uid))])]}}])}),t("el-table-column",{attrs:{label:"用户名","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.nickname))])]}}])}),t("el-table-column",{attrs:{label:"用户头像","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(e){return[t("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.row.avatar,expression:"scope.row.avatar"}]})])]}}])}),t("el-table-column",{attrs:{label:"领取时间","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.add_time))])]}}])})],1)],1)],1)}),[],!1,null,"a36c6aa0",null);t.default=a.exports}}]);