chunk-4c622f53.f6eb266e.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c622f53"],{"2c3e":function(t,e,a){var n=a("da84"),r=a("83ab"),i=a("9f7f").MISSED_STICKY,o=a("c6b6"),s=a("edd0"),c=a("69f3").get,l=RegExp.prototype,u=n.TypeError;r&&i&&s(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!c(this).sticky;throw u("Incompatible receiver, RegExp required")}}})},"4d63":function(t,e,a){var n=a("83ab"),r=a("da84"),i=a("e330"),o=a("94ca"),s=a("7156"),c=a("9112"),l=a("241c").f,u=a("3a9b"),d=a("44e7"),p=a("577e"),f=a("90d8"),v=a("9f7f"),m=a("aeb0"),h=a("cb2d"),g=a("d039"),_=a("1a2d"),b=a("69f3").enforce,y=a("2626"),w=a("b622"),x=a("fce3"),k=a("107c"),F=w("match"),C=r.RegExp,O=C.prototype,E=r.SyntaxError,R=i(O.exec),$=i("".charAt),D=i("".replace),S=i("".indexOf),j=i("".slice),I=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,W=/a/g,L=new C(M)!==M,P=v.MISSED_STICKY,T=v.UNSUPPORTED_Y,z=n&&(!L||P||x||k||g((function(){return W[F]=!1,C(M)!=M||C(W)==W||"/a/i"!=C(M,"i")}))),A=function(t){for(var e,a=t.length,n=0,r="",i=!1;n<=a;n++)e=$(t,n),"\\"!==e?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),r+=e):r+="[\\s\\S]":r+=e+$(t,++n);return r},N=function(t){for(var e,a=t.length,n=0,r="",i=[],o={},s=!1,c=!1,l=0,u="";n<=a;n++){if(e=$(t,n),"\\"===e)e+=$(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:R(I,j(t,n+1))&&(n+=2,c=!0),r+=e,l++;continue;case">"===e&&c:if(""===u||_(o,u))throw new E("Invalid capture group name");o[u]=!0,i[i.length]=[u,l],c=!1,u="";continue}c?u+=e:r+=e}return[r,i]};if(o("RegExp",z)){for(var Y=function(t,e){var a,n,r,i,o,l,v=u(O,this),m=d(t),h=void 0===e,g=[],_=t;if(!v&&m&&h&&t.constructor===Y)return t;if((m||u(O,t))&&(t=t.source,h&&(e=f(_))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),_=t,x&&"dotAll"in M&&(n=!!e&&S(e,"s")>-1,n&&(e=D(e,/s/g,""))),a=e,P&&"sticky"in M&&(r=!!e&&S(e,"y")>-1,r&&T&&(e=D(e,/y/g,""))),k&&(i=N(t),t=i[0],g=i[1]),o=s(C(t,e),v?this:O,Y),(n||r||g.length)&&(l=b(o),n&&(l.dotAll=!0,l.raw=Y(A(t),a)),r&&(l.sticky=!0),g.length&&(l.groups=g)),t!==_)try{c(o,"source",""===_?"(?:)":_)}catch(y){}return o},q=l(C),U=0;q.length>U;)m(Y,C,q[U++]);O.constructor=Y,Y.prototype=O,h(r,"RegExp",Y,{constructor:!0})}y("RegExp")},"61f7":function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return u}));var n=a("fc11"),r=a("f3f3");a("ac1f"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),a("25f0"),a("498a"),a("d3b7"),a("b64b"),a("99af");function i(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in a)if(new RegExp("(".concat(n,")")).test(e)){var r=a[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?r:o(r))}return e}function o(t){return("00"+t).substr(t.length)}var s={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};var c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r["a"])({required:!0,message:t,type:"string"},e)}function u(t){return d.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(l,"请输入%s"),c(u,"%s格式不正确");var d=Object.keys(s).reduce((function(t,e){return t[e]=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(n["a"])({},e,t);return Object(r["a"])(Object(r["a"])({message:a.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),i)},c(t[e],s[e]),t}),{})},c408:function(t,e,a){"use strict";var n=a("f8d4"),r=a.n(n);r.a},c607:function(t,e,a){var n=a("da84"),r=a("83ab"),i=a("fce3"),o=a("c6b6"),s=a("edd0"),c=a("69f3").get,l=RegExp.prototype,u=n.TypeError;r&&i&&s(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!c(this).dotAll;throw u("Incompatible receiver, RegExp required")}}})},edd0:function(t,e,a){var n=a("13d2"),r=a("9bf2");t.exports=function(t,e,a){return a.get&&n(a.get,e,{getter:!0}),a.set&&n(a.set,e,{setter:!0}),r.f(t,e,a)}},f8d4:function(t,e,a){},fd8e:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"i-layout-page-header"},[a("div",{staticClass:"i-layout-page-header"},[a("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Form",{ref:"tableFrom",attrs:{model:t.tableFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("Row",{attrs:{type:"flex",gutter:24}},[a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"是否有效:","label-for":"status"}},[a("Select",{attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[a("Option",{attrs:{value:"1"}},[t._v("正常")]),a("Option",{attrs:{value:"0"}},[t._v("未开启")])],1)],1)],1),a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"类型:","label-for":"status"}},[a("Select",{attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.receive_type,callback:function(e){t.receive_type=e},expression:"receive_type"}},[a("Option",{attrs:{value:"all"}},[t._v("全部")]),a("Option",{attrs:{value:"1"}},[t._v("手动领取")]),a("Option",{attrs:{value:"2"}},[t._v("新人券")]),a("Option",{attrs:{value:"3"}},[t._v("赠送券")]),a("Option",{attrs:{value:"4"}},[t._v("会员券")]),a("Option",{attrs:{value:"5"}},[t._v("购买券")])],1)],1)],1),a("Col",t._b({},"Col",t.grid,!1),[a("FormItem",{attrs:{label:"优惠券名称:","label-for":"coupon_title"}},[a("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入优惠券名称"},on:{"on-search":t.userSearchs},model:{value:t.tableFrom.coupon_title,callback:function(e){t.$set(t.tableFrom,"coupon_title",e)},expression:"tableFrom.coupon_title"}})],1)],1)],1),a("Row",{attrs:{type:"flex"}},[a("Col",t._b({},"Col",t.grid,!1),[a("Button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-marketing-store_coupon-add"],expression:"['admin-marketing-store_coupon-add']"}],attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加优惠券")])],1)],1)],1),a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"count",fn:function(e){var n=e.row;return[n.is_permanent?a("span",[t._v("不限量")]):a("div",[a("span",{staticClass:"fa"},[t._v("发布:"+t._s(n.total_count))]),a("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(n.remain_count))])])]}},{key:"type",fn:function(e){var n=e.row;return[1===n.type?a("span",[t._v("品类券")]):2===n.type?a("span",[t._v("商品券")]):3===n.type?a("span",[t._v("会员券")]):a("span",[t._v("通用券")])]}},{key:"receive_type",fn:function(e){var n=e.row;return[1===n.receive_type?a("span",[t._v("手动领取")]):2===n.receive_type?a("span",[t._v("新人券")]):3===n.receive_type?a("span",[t._v("赠送券")]):4===n.receive_type?a("span",[t._v("会员券")]):a("span",[t._v("虚拟购买")])]}},{key:"start_time",fn:function(e){var n=e.row;return[n.start_time?a("div",[t._v(t._s(t._f("formatDate")(n.start_time))+" - "+t._s(t._f("formatDate")(n.end_time)))]):a("span",[t._v("不限时")])]}},{key:"start_use_time",fn:function(e){var n=e.row;return[n.start_use_time?a("div",[t._v("\n "+t._s(t._f("formatDate")(n.start_use_time))+" -\n "+t._s(t._f("formatDate")(n.end_use_time))+"\n ")]):a("div",[t._v(t._s(n.coupon_time)+"天")])]}},{key:"status",fn:function(e){var n=e.row;return[a("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.openChange(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(e){var n=e.row,r=e.index;return[a("a",{on:{click:function(e){return t.receive(n)}}},[t._v("领取记录")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.copy(n)}}},[t._v("复制")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.couponDel(n,"删除发布的优惠券",r)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,current:t.tableFrom.page,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.pageChange}})],1)],1),a("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"领取记录","mask-closable":!1,width:"700"},model:{value:t.modals2,callback:function(e){t.modals2=e},expression:"modals2"}},[a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns2,data:t.receiveList,loading:t.loading2,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;t.index;return[a("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total2,"show-elevator":"","show-total":"","page-size":t.receiveFrom.limit},on:{"on-change":t.receivePageChange}})],1)],1)],1)},r=[],i=a("c964"),o=a("f3f3"),s=(a("a434"),a("96cf"),a("2f62")),c=a("b7be"),l=a("61f7"),u={name:"storeCouponIssue",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(l["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,columns1:[{title:"ID",key:"id",width:80},{title:"优惠券名称",key:"coupon_title",minWidth:150},{title:"优惠券类型",slot:"type",minWidth:80},{title:"面值",key:"coupon_price",minWidth:100},{title:"领取方式",slot:"receive_type",minWidth:100},{title:"领取日期",slot:"start_time",minWidth:250},{title:"使用时间",slot:"start_use_time",minWidth:250},{title:"发布数量",slot:"count",minWidth:90},{title:"是否开启",slot:"status",minWidth:90},{title:"操作",slot:"action",fixed:"right",minWidth:200}],tableFrom:{status:"",coupon_title:"",receive_type:"",page:1,limit:15},receive_type:"",tableList:[],total:0,FromData:null,receiveList:[],loading2:!1,columns2:[{title:"ID",key:"uid",minWidth:150},{title:"用户名",key:"nickname",minWidth:150},{title:"用户头像",slot:"avatar",minWidth:100},{title:"领取时间",key:"add_time",minWidth:140}],total2:0,receiveFrom:{page:1,limit:15},rows:{}}},activated:function(){this.getList()},computed:Object(o["a"])(Object(o["a"])({},Object(s["e"])("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:90},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{couponInvalid:function(t,e,a){this.delfromData={title:e,num:a,url:"marketing/coupon/status/".concat(t.id),method:"PUT",ids:""},this.$refs.modelSure.modals=!0},receive:function(t){this.modals2=!0,this.rows=t,this.getReceivelist(t)},getReceivelist:function(t){var e=this;this.loading2=!0,Object(c["hb"])(t.id).then(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(a){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=a.data,e.receiveList=n.list,e.total2=a.data.count,e.loading2=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading2=!1,e.$Message.error(t.msg)}))},receivePageChange:function(t){this.receiveFrom.page=t,this.getReceivelist(this.rows)},couponDel:function(t,e,a){var n=this,r={title:e,num:a,url:"marketing/coupon/released/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){n.$Message.success(t.msg),n.tableList.splice(a,1)})).catch((function(t){n.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.tableFrom.receive_type="all"===this.receive_type?"":this.receive_type,this.tableFrom.status=this.tableFrom.status||"",Object(c["gb"])(this.tableFrom).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(a){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=a.data,t.tableList=n.list,t.total=a.data.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.tableFrom.page=t,this.getList()},userSearchs:function(){this.tableFrom.page=1,this.getList()},add:function(){this.$router.push({path:"/admin/marketing/store_coupon_issue/create"})},copy:function(t){this.$router.push({path:"/admin/marketing/store_coupon_issue/create/".concat(t.id)})},openChange:function(t){var e=this;Object(c["t"])(t).then((function(){return e.getList()}))}}},d=u,p=(a("c408"),a("2877")),f=Object(p["a"])(d,n,r,!1,null,"2f4de818",null);e["default"]=f.exports}}]);