CRMEB/crmeb/public/admin/system_static/js/chunk-45048bb2.349817bf.js
2024-03-26 15:55:13 +08:00

1 line
14 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-45048bb2"],{"2c3e":function(t,e,a){"use strict";var n=a("83ab"),r=a("9f7f").MISSED_STICKY,o=a("c6b6"),i=a("edd0"),s=a("69f3").get,l=RegExp.prototype,c=TypeError;n&&r&&i(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!s(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},"339c":function(t,e,a){},"4d63":function(t,e,a){"use strict";var n=a("83ab"),r=a("da84"),o=a("e330"),i=a("94ca"),s=a("7156"),l=a("9112"),c=a("7c73"),u=a("241c").f,d=a("3a9b"),p=a("44e7"),f=a("577e"),m=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=o(E.exec),R=o("".charAt),C=o("".replace),D=o("".indexOf),L=o("".slice),I=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,P=/a/g,T=(a=new $(M)!==M,b.MISSED_STICKY),N=b.UNSUPPORTED_Y;k=n&&(!a||T||x||S||g((function(){return P[F]=!1,$(M)!==M||$(P)===P||"/a/i"!==String($(M,"i"))})));if(i("RegExp",k)){for(var A=function(t,e){var a,n,r=d(E,this),o=p(t),i=void 0===e,u=[],b=t;if(!r&&o&&i&&t.constructor===A)return t;if((o||d(E,t))&&(t=t.source,i)&&(e=m(b)),t=void 0===t?"":f(t),e=void 0===e?"":f(e),b=t,o=e=x&&"dotAll"in M&&(a=!!e&&-1<D(e,"s"))?C(e,/s/g,""):e,T&&"sticky"in M&&(n=!!e&&-1<D(e,"y"))&&N&&(e=C(e,/y/g,"")),S&&(t=(i=function(t){for(var e,a=t.length,n=0,r="",o=[],i=c(null),s=!1,l=!1,u=0,d="";n<=a;n++){if("\\"===(e=R(t,n)))e+=R(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:j(I,L(t,n+1))&&(n+=2,l=!0),r+=e,u++;continue;case">"===e&&l:if(""===d||_(i,d))throw new O("Invalid capture group name");i[d]=!0,l=!(o[o.length]=[d,u]),d="";continue}l?d+=e:r+=e}return[r,o]}(t))[0],u=i[1]),i=s($(t,e),r?this:E,A),(a||n||u.length)&&(e=w(i),a&&(e.dotAll=!0,e.raw=A(function(t){for(var e,a=t.length,n=0,r="",o=!1;n<=a;n++)"\\"===(e=R(t,n))?r+=e+R(t,++n):o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),r+=e):r+="[\\s\\S]";return r}(t),o)),n&&(e.sticky=!0),u.length)&&(e.groups=u),t!==b)try{l(i,"source",""===b?"(?:)":b)}catch(t){}return i},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(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return c}));var n=a("ade3"),r=a("5530");function o(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("13d5"),a("b64b"),a("99af");var i={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 l(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)({required:!0,message:t,type:"string"},e)}function c(t){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}s(l,"请输入%s"),s(c,"%s格式不正确");var u=Object.keys(i).reduce((function(t,e){return t[e]=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i="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"},i),o)},s(t[e],i[e]),t}),{})},c607:function(t,e,a){"use strict";var n=a("83ab"),r=a("fce3"),o=a("c6b6"),i=a("edd0"),s=a("69f3").get,l=RegExp.prototype,c=TypeError;n&&r&&i(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===o(this))return!!s(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},d165:function(t,e,a){"use strict";a("339c")},fd8e:function(t,e,a){"use strict";a.r(e);var n=a("c7eb"),r=a("1da1"),o=a("5530"),i=(a("a434"),a("14d9"),a("2f62")),s=a("b7be"),l=a("61f7");o={name:"marketing_storeCouponIssue",filters:{formatDate:function(t){if(0!==t)return t=new Date(1e3*t),Object(l.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,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(o.a)(Object(o.a)({},Object(i.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"90px"},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(s.hb)(t.id,this.receiveFrom).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.receiveList=r.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),n.total--})).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(s.gb)(this.tableFrom).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.tableList=r.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)}))},userSearchs:function(){this.tableFrom.page=1,this.getList()},add:function(){this.$router.push({path:this.$routeProStr+"/marketing/store_coupon_issue/create"})},copy:function(t){this.$router.push({path:this.$routeProStr+"/marketing/store_coupon_issue/create/".concat(t.id)})},edit:function(t){this.$router.push({path:this.$routeProStr+"/marketing/store_coupon_issue/create/".concat(t.id,"/1")})},openChange:function(t){var e=this;Object(s.t)(t).then((function(){return e.getList()}))}}},a("d165"),i=a("2877"),a=Object(i.a)(o,(function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[e("div",{staticClass:"padding-add"},[e("el-form",{ref:"tableFrom",attrs:{model:t.tableFrom,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"优惠券名称:","label-for":"coupon_title"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入优惠券名称"},model:{value:t.tableFrom.coupon_title,callback:function(e){t.$set(t.tableFrom,"coupon_title",e)},expression:"tableFrom.coupon_title"}})],1),e("el-form-item",{attrs:{label:"优惠券类型:","label-for":"coupon_type"}},[e("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.tableFrom.coupon_type,callback:function(e){t.$set(t.tableFrom,"coupon_type",e)},expression:"tableFrom.coupon_type"}},[e("el-option",{attrs:{value:"0",label:"通用券"}}),e("el-option",{attrs:{value:"1",label:"品类券"}}),e("el-option",{attrs:{value:"2",label:"商品券"}})],1)],1),e("el-form-item",{attrs:{label:"是否有效:","label-for":"status"}},[e("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[e("el-option",{attrs:{value:"1",label:"正常"}}),e("el-option",{attrs:{value:"0",label:"未开启"}})],1)],1),e("el-form-item",{attrs:{label:"发放方式:","label-for":"status"}},[e("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.receive_type,callback:function(e){t.receive_type=e},expression:"receive_type"}},[e("el-option",{attrs:{value:"all",label:"全部"}}),e("el-option",{attrs:{value:"1",label:"手动领取"}}),e("el-option",{attrs:{value:"2",label:"新用户自动发放"}}),e("el-option",{attrs:{value:"3",label:"后台赠送"}}),e("el-option",{attrs:{value:"4",label:"付费会员专享"}})],1)],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),e("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[e("el-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("添加优惠券")]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticClass:"mt14",attrs:{data:t.tableList,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"优惠券名称","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.coupon_title))])]}}])}),e("el-table-column",{attrs:{label:"优惠券类型","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[1===a.row.type?e("span",[t._v("品类券")]):2===a.row.type?e("span",[t._v("商品券")]):3===a.row.type?e("span",[t._v("会员券")]):e("span",[t._v("通用券")])]}}])}),e("el-table-column",{attrs:{label:"面值","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.coupon_price))])]}}])}),e("el-table-column",{attrs:{label:"领取方式","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){return[1===a.row.receive_type?e("span",[t._v("手动领取")]):2===a.row.receive_type?e("span",[t._v("新人券")]):3===a.row.receive_type?e("span",[t._v("赠送券")]):4===a.row.receive_type?e("span",[t._v("会员券")]):e("span",[t._v("虚拟购买")])]}}])}),e("el-table-column",{attrs:{label:"领取日期","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.row.start_time?e("div",[t._v("\n "+t._s(t._f("formatDate")(a.row.start_time))+" - "+t._s(t._f("formatDate")(a.row.end_time))+"\n ")]):e("span",[t._v("不限时")])]}}])}),e("el-table-column",{attrs:{label:"使用时间","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.row.start_use_time?e("div",[t._v("\n "+t._s(t._f("formatDate")(a.row.start_use_time))+" -\n "+t._s(t._f("formatDate")(a.row.end_use_time))+"\n ")]):e("div",[t._v(t._s(a.row.coupon_time)+"天")])]}}])}),e("el-table-column",{attrs:{label:"发布数量","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.row.is_permanent?e("span",[t._v("不限量")]):e("div",[e("span",{staticClass:"fa"},[t._v("发布:"+t._s(a.row.total_count))]),e("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(a.row.remain_count))])])]}}])}),e("el-table-column",{attrs:{label:"是否开启","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:a.row.status,size:"large"},on:{change:function(e){return t.openChange(a.row)}},model:{value:a.row.status,callback:function(e){t.$set(a.row,"status",e)},expression:"scope.row.status"}})]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("a",{on:{click:function(e){return t.receive(a.row)}}},[t._v("领取记录")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.edit(a.row)}}},[t._v("编辑")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.copy(a.row)}}},[t._v("复制")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.couponDel(a.row,"删除发布的优惠券",a.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.tableFrom.page,limit:t.tableFrom.limit},on:{"update:page":function(e){return t.$set(t.tableFrom,"page",e)},"update:limit":function(e){return t.$set(t.tableFrom,"limit",e)},pagination:t.getList}}):t._e()],1)],1),e("el-dialog",{attrs:{visible:t.modals2,title:"领取记录","close-on-click-modal":!1,width:"720px"},on:{"update:visible":function(e){t.modals2=e}}},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading2,expression:"loading2"}],ref:"table",attrs:{data:t.receiveList,"highlight-current-row":"",height:"500","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"ID","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.uid))])]}}])}),e("el-table-column",{attrs:{label:"用户名","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.nickname))])]}}])}),e("el-table-column",{attrs:{label:"用户头像","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.avatar,expression:"scope.row.avatar"}]})])]}}])}),e("el-table-column",{attrs:{label:"领取时间","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.add_time))])]}}])})],1)],1)],1)}),[],!1,null,"10e4ff7b",null);e.default=a.exports}}]);