CRMEB/crmeb/public/admin/js/chunk-21cebf80.35f5823e.js
2021-11-10 11:57:11 +08:00

1 line
12 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21cebf80"],{"3b2b":function(t,e,r){var a=r("7726"),n=r("5dbc"),i=r("86cc").f,o=r("9093").f,s=r("aae3"),c=r("0bfb"),l=a.RegExp,u=l,p=l.prototype,d=/a/g,m=/a/g,v=new l(d)!==d;if(r("9e1e")&&(!v||r("79e5")((function(){return m[r("2b4c")("match")]=!1,l(d)!=d||l(m)==m||"/a/i"!=l(d,"i")})))){l=function(t,e){var r=this instanceof l,a=s(t),i=void 0===e;return!r&&a&&t.constructor===l&&i?t:n(v?new u(a&&!i?t.source:t,e):u((a=t instanceof l)?t.source:t,a&&i?c.call(t):e),r?this:p,l)};for(var f=function(t){t in l||i(l,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},h=o(u),g=0;h.length>g;)f(h[g++]);p.constructor=l,l.prototype=p,r("2aba")(a,"RegExp",l)}r("7a56")("RegExp")},"4dab":function(t,e,r){},5023:function(t,e,r){"use strict";var a=r("4dab"),n=r.n(a);n.a},"61f7":function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return p}));r("8e6e"),r("ac6a"),r("456d");var a=r("bd86");r("6b54"),r("3b2b"),r("a481");function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){Object(a["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var a in r)if(new RegExp("(".concat(a,")")).test(e)){var n=r[a]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?n:s(n))}return e}function s(t){return("00"+t).substr(t.length)}var c={min:"%s最å°<C3A5>长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$sæ ¼å¼<C3A5>错误"};var l=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i({required:!0,message:t,type:"string"},e)}function p(t){return d.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}l(u,"请输入%s"),l(p,"%sæ ¼å¼<C3A5>ä¸<C3A4>正确");var d=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(a["a"])({},e,t);return i(i({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),n)},l(t[e],c[e]),t}),{})},fd8e:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("div",{staticClass:"i-layout-page-header"},[r("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Form",{ref:"tableFrom",attrs:{model:t.tableFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:˜¯å<C2AF>¦æœ‰æ•ˆï¼š","label-for":"status"}},[r("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"}},[r("Option",{attrs:{value:"1"}},[t._v("正常")]),r("Option",{attrs:{value:"0"}},[t._v("未开å<E282AC>¯")])],1)],1)],1),r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"类型:","label-for":"status"}},[r("Select",{attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.receive_type,callback:function(e){t.receive_type=e},expression:"receive_type"}},[r("Option",{attrs:{value:"all"}},[t._v("全部")]),r("Option",{attrs:{value:"1"}},[t._v("æ‰åЍ领å<E280A0>")]),r("Option",{attrs:{value:"2"}},[t._v("新人券")]),r("Option",{attrs:{value:"3"}},[t._v("èµ é€<C3A9>券")]),r("Option",{attrs:{value:"4"}},[t._v("会员券")]),r("Option",{attrs:{value:"5"}},[t._v("购买券")])],1)],1)],1),r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"优惠券å<C2B8><C3A5>称:","label-for":"coupon_title"}},[r("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入优惠券å<C2B8><C3A5>ç§°"},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),r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("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),r("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"æšæ— æ•°æ<C2B0>®","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"count",fn:function(e){var a=e.row;return[a.is_permanent?r("span",[t._v(¸<C3A4>é™<C3A9>é‡<C3A9>")]):r("div",[r("span",{staticClass:"fa"},[t._v(<>布:"+t._s(a.total_count))]),r("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(a.remain_count))])])]}},{key:"type",fn:function(e){var a=e.row;return[1===a.type?r("span",[t._v("å“<C3A5>类券")]):2===a.type?r("span",[t._v("商å“<C3A5>券")]):r("span",[t._v("通用券")])]}},{key:"receive_type",fn:function(e){var a=e.row;return[1===a.receive_type?r("span",[t._v("æ‰åЍ领å<E280A0>")]):2===a.receive_type?r("span",[t._v("新人券")]):3===a.receive_type?r("span",[t._v("èµ é€<C3A9>券")]):r("span",[t._v("虚拟购买")])]}},{key:"start_time",fn:function(e){var a=e.row;return[a.start_time?r("div",[t._v("\n "+t._s(t._f("formatDate")(a.start_time))+" - "+t._s(t._f("formatDate")(a.end_time))+"\n ")]):r("span",[t._v(¸<C3A4>é™<C3A9>æ—¶")])]}},{key:"start_use_time",fn:function(e){var a=e.row;return[a.start_use_time?r("div",[t._v("\n "+t._s(t._f("formatDate")(a.start_use_time))+" -\n "+t._s(t._f("formatDate")(a.end_use_time))+"\n ")]):r("div",[t._v(t._s(a.coupon_time)+"天")])]}},{key:"status",fn:function(e){var a=e.row;return[r("i-switch",{attrs:{value:a.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.openChange(a)}},model:{value:a.status,callback:function(e){t.$set(a,"status",e)},expression:"row.status"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("å¼€å<E282AC>¯")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(e){var a=e.row,n=e.index;return[r("a",{on:{click:function(e){return t.receive(a)}}},[t._v("领å<E280A0>记录")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.copy(a)}}},[t._v("å¤<C3A5>制")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.couponDel(a,ˆ é™¤å<C2A4>布的优惠券",n)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("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),r("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"领å<E280A0>记录","mask-closable":!1,width:"700"},model:{value:t.modals2,callback:function(e){t.modals2=e},expression:"modals2"}},[r("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns2,data:t.receiveList,loading:t.loading2,"highlight-row":"","no-userFrom-text":"æšæ— æ•°æ<C2B0>®","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;t.index;return[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total2,"show-elevator":"","show-total":"","page-size":t.receiveFrom.limit},on:{"on-change":t.receivePageChange}})],1)],1)],1)},n=[],i=(r("8e6e"),r("ac6a"),r("456d"),r("96cf"),r("3b8d")),o=r("bd86"),s=r("2f62"),c=r("b7be"),l=r("61f7");function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d={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:"优惠券å<C2B8><C3A5>ç§°",key:"coupon_title",minWidth:150},{title:"优惠券类型",slot:"type",minWidth:80},{title:<>¢å€¼",key:"coupon_price",minWidth:100},{title:"领å<E280A0>æ¹å¼<C3A5>",slot:"receive_type",minWidth:100},{title:"领å<E280A0>日期",slot:"start_time",minWidth:250},{title:"使用时间",slot:"start_use_time",minWidth:250},{title:<>布数é‡<C3A9>",slot:"count",minWidth:90},{title:˜¯å<C2AF>¦å¼€å<E282AC>¯",slot:"status",minWidth:90},{title:"æ“<C3A6>作",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:"用户å<C2B7><C3A5>",key:"nickname",minWidth:150},{title:"用户头åƒ<C3A5>",slot:"avatar",minWidth:100},{title:"领å<E280A0>æ—¶é—´",key:"add_time",minWidth:140}],total2:0,receiveFrom:{page:1,limit:15},rows:{}}},created:function(){this.getList()},computed:p(p({},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,r){this.delfromData={title:e,num:r,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["T"])(t.id).then(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(r){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=r.data,e.receiveList=a.list,e.total2=r.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,r){var a=this,n={title:e,num:r,url:"marketing/coupon/released/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){a.$Message.success(t.msg),a.tableList.splice(r,1)})).catch((function(t){a.$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["S"])(this.tableFrom).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=r.data,t.tableList=a.list,t.total=r.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()}))}}},m=d,v=(r("5023"),r("2877")),f=Object(v["a"])(m,a,n,!1,null,"21b8ac8b",null);e["default"]=f.exports}}]);