chunk-7c34e901.deadacab.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7c34e901"],{"2c3e":function(e,t,a){"use strict";var n=a("83ab"),r=a("9f7f").MISSED_STICKY,i=a("c6b6"),o=a("edd0"),s=a("69f3").get,l=RegExp.prototype,c=TypeError;n&&r&&o(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===i(this))return!!s(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},"4d63":function(e,t,a){"use strict";var n=a("83ab"),r=a("da84"),i=a("e330"),o=a("94ca"),s=a("7156"),l=a("9112"),c=a("241c").f,u=a("3a9b"),d=a("44e7"),p=a("577e"),m=a("90d8"),f=a("9f7f"),b=a("aeb0"),v=a("cb2d"),h=a("d039"),g=a("1a2d"),_=a("69f3").enforce,w=a("2626"),y=a("b622"),k=a("fce3"),x=a("107c"),S=y("match"),F=r.RegExp,$=F.prototype,E=r.SyntaxError,O=i($.exec),j=i("".charAt),R=i("".replace),C=i("".indexOf),D=i("".slice),L=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,I=/a/g,M=(a=new F(N)!==N,f.MISSED_STICKY),P=f.UNSUPPORTED_Y;y=n&&(!a||M||k||x||h((function(){return I[S]=!1,F(N)!==N||F(I)===I||"/a/i"!==String(F(N,"i"))})));if(o("RegExp",y)){for(var T=function(e,t){var a,n,r=u($,this),i=d(e),o=void 0===t,c=[],f=e;if(!r&&i&&o&&e.constructor===T)return e;if((i||u($,e))&&(e=e.source,o)&&(t=m(f)),e=void 0===e?"":p(e),t=void 0===t?"":p(t),f=e,i=t=k&&"dotAll"in N&&(a=!!t&&-1<C(t,"s"))?R(t,/s/g,""):t,M&&"sticky"in N&&(n=!!t&&-1<C(t,"y"))&&P&&(t=R(t,/y/g,"")),x&&(e=(o=function(e){for(var t,a=e.length,n=0,r="",i=[],o={},s=!1,l=!1,c=0,u="";n<=a;n++){if("\\"===(t=j(e,n)))t+=j(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:O(L,D(e,n+1))&&(n+=2,l=!0),r+=t,c++;continue;case">"===t&&l:if(""===u||g(o,u))throw new E("Invalid capture group name");o[u]=!0,l=!(i[i.length]=[u,c]),u="";continue}l?u+=t:r+=t}return[r,i]}(e))[0],c=o[1]),o=s(F(e,t),r?this:$,T),(a||n||c.length)&&(t=_(o),a&&(t.dotAll=!0,t.raw=T(function(e){for(var t,a=e.length,n=0,r="",i=!1;n<=a;n++)"\\"===(t=j(e,n))?r+=t+j(e,++n):i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),r+=t):r+="[\\s\\S]";return r}(e),i)),n&&(t.sticky=!0),c.length)&&(t.groups=c),e!==f)try{l(o,"source",""===f?"(?:)":f)}catch(e){}return o},A=c(F),Y=0;A.length>Y;)b(T,F,A[Y++]);($.constructor=T).prototype=$,v(r,"RegExp",T,{constructor:!0})}w("RegExp")},"61f7":function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"c",(function(){return l})),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("ac1f"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),a("25f0"),a("498a"),a("d3b7"),a("13d5"),a("b64b"),a("99af");var o={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function s(e,t){e.message=function(e){return t.replace("%s",e||"")}}function l(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)}s(l,"请输入%s"),s(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)},s(e[t],o[t]),e}),{})},"6ac1":function(e,t,a){},c607:function(e,t,a){"use strict";var n=a("83ab"),r=a("fce3"),i=a("c6b6"),o=a("edd0"),s=a("69f3").get,l=RegExp.prototype,c=TypeError;n&&r&&o(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===i(this))return!!s(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},e0bc:function(e,t,a){"use strict";a("6ac1")},fd8e:function(e,t,a){"use strict";a.r(t);var n=a("c7eb"),r=a("1da1"),i=a("5530"),o=(a("a434"),a("14d9"),a("2f62")),s=a("b7be"),l=a("61f7");i={name:"marketing_storeCouponIssue",filters:{formatDate:function(e){if(0!==e)return e=new Date(1e3*e),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,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(s.hb)(e.id,this.receiveFrom).then(function(){var e=Object(r.a)(Object(n.a)().mark((function e(a){var r;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=a.data,t.receiveList=r.list,t.total2=a.data.count,t.loading2=!1;case 4:case"end":return e.stop()}}),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(s.gb)(this.tableFrom).then(function(){var t=Object(r.a)(Object(n.a)().mark((function t(a){var r;return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=a.data,e.tableList=r.list,e.total=a.data.count,e.loading=!1;case 4: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.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(s.t)(e).then((function(){return t.getList()}))}}},a("e0bc"),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:"请输入优惠券名称"},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:"新用户自动发放"}}),t("el-option",{attrs:{value:"3",label:"后台赠送"}}),t("el-option",{attrs:{value:"4",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?t("span",[e._v("手动领取")]):2===a.row.receive_type?t("span",[e._v("新人券")]):3===a.row.receive_type?t("span",[e._v("赠送券")]):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"},[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,"a71d6c1a",null);t.default=a.exports}}]);