CRMEB/crmeb/public/admin/js/chunk-b3a3397e.d75aa7c0.js
2022-12-19 18:40:49 +08:00

1 line
13 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b3a3397e"],{"053c":function(t,e,a){"use strict";var n=a("d1ed");a.n(n).a},"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"),m=a("9f7f"),v=a("aeb0"),g=a("cb2d"),h=a("d039"),b=a("1a2d"),_=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),D=i("".charAt),S=i("".replace),$=i("".indexOf),j=i("".slice),I=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,W=/a/g,L=(a=new C(M)!==M,m.MISSED_STICKY),P=m.UNSUPPORTED_Y;w=n&&(!a||L||x||k||h((function(){return W[F]=!1,C(M)!=M||C(W)==W||"/a/i"!=C(M,"i")})));if(o("RegExp",w)){function T(t,e){var a,n,r=u(O,this),i=d(t),o=void 0===e,l=[],m=t;if(!r&&i&&o&&t.constructor===T)return t;if((i||u(O,t))&&(t=t.source,o&&(e=f(m))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),m=t,i=e=x&&"dotAll"in M&&(a=!!e&&-1<$(e,"s"))?S(e,/s/g,""):e,L&&"sticky"in M&&(n=!!e&&-1<$(e,"y"))&&P&&(e=S(e,/y/g,"")),k&&(t=(o=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=D(t,n)))e+=D(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||b(o,u))throw new E("Invalid capture group name");o[u]=!0,c=!(i[i.length]=[u,l]),u="";continue}c?u+=e:r+=e}return[r,i]}(t))[0],l=o[1]),o=s(C(t,e),r?this:O,T),(a||n||l.length)&&(e=_(o),a&&(e.dotAll=!0,e.raw=T(function(t){for(var e,a=t.length,n=0,r="",i=!1;n<=a;n++)"\\"===(e=D(t,n))?r+=e+D(t,++n):i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),r+=e):r+="[\\s\\S]";return r}(t),i)),n&&(e.sticky=!0),l.length&&(e.groups=l)),t!==m)try{c(o,"source",""===m?"(?:)":m)}catch(t){}return o}for(var z=l(C),A=0;z.length>A;)v(T,C,z[A++]);(O.constructor=T).prototype=O,g(r,"RegExp",T,{constructor:!0})}y("RegExp")},"61f7":function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"c",(function(){return c})),a.d(e,"b",(function(){return l}));var n=a("fc11"),r=a("f3f3");function i(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a,n,r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(a in r)new RegExp("(".concat(a,")")).test(e)&&(n=r[a]+"",e=e.replace(RegExp.$1,1===RegExp.$1.length?n:("00"+n).substr(n.length)));return e}a("ac1f"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),a("25f0"),a("498a"),a("d3b7"),a("b64b"),a("99af");var o={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function s(t,e){t.message=function(t){return e.replace("%s",t||"")}}function c(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)({required:!0,message:t,type:"string"},e)}function l(t){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}s(c,"请输入%s"),s(l,"%s格式不正确");var u=Object.keys(o).reduce((function(t,e){return t[e]=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=2<arguments.length&&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)},s(t[e],o[e]),t}),{})},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")}}})},d1ed:function(t,e,a){},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)}},fd8e:function(t,e,a){"use strict";a.r(e);var n=a("c964"),r=a("f3f3"),i=(a("a434"),a("96cf"),a("2f62")),o=a("b7be"),s=a("61f7");r={name:"storeCouponIssue",filters:{formatDate:function(t){if(0!==t)return t=new Date(1e3*t),Object(s.a)(t,"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(r.a)(Object(r.a)({},Object(i.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(o.hb)(t.id).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(a){var n;return regeneratorRuntime.wrap((function(t){for(;;)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;e={title:e,num:a,url:"marketing/coupon/released/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).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(o.gb)(this.tableFrom).then(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(a){var n;return regeneratorRuntime.wrap((function(e){for(;;)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(o.t)(t).then((function(){return e.getList()}))}}},a("053c"),i=a("2877"),a=Object(i.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[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){return e=e.row,[e.is_permanent?a("span",[t._v("不限量")]):a("div",[a("span",{staticClass:"fa"},[t._v("发布:"+t._s(e.total_count))]),a("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(e.remain_count))])])]}},{key:"type",fn:function(e){return e=e.row,[1===e.type?a("span",[t._v("品类券")]):2===e.type?a("span",[t._v("商品券")]):3===e.type?a("span",[t._v("会员券")]):a("span",[t._v("通用券")])]}},{key:"receive_type",fn:function(e){return e=e.row,[1===e.receive_type?a("span",[t._v("手动领取")]):2===e.receive_type?a("span",[t._v("新人券")]):3===e.receive_type?a("span",[t._v("赠送券")]):4===e.receive_type?a("span",[t._v("会员券")]):a("span",[t._v("虚拟购买")])]}},{key:"start_time",fn:function(e){return e=e.row,[e.start_time?a("div",[t._v(t._s(t._f("formatDate")(e.start_time))+" - "+t._s(t._f("formatDate")(e.end_time)))]):a("span",[t._v("不限时")])]}},{key:"start_use_time",fn:function(e){return e=e.row,[e.start_use_time?a("div",[t._v("\n "+t._s(t._f("formatDate")(e.start_use_time))+" -\n "+t._s(t._f("formatDate")(e.end_use_time))+"\n ")]):a("div",[t._v(t._s(e.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;return t.index,[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)}),[],!1,null,"1e0bf709",null);e.default=a.exports}}]);