mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-01-02 17:28:16 +00:00
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f3d7a5a2"],{"10c7":function(t,e,a){"use strict";var r=a("d0f1"),n=a.n(r);n.a},"3b2b":function(t,e,a){var r=a("7726"),n=a("5dbc"),i=a("86cc").f,o=a("9093").f,s=a("aae3"),c=a("0bfb"),l=r.RegExp,u=l,p=l.prototype,d=/a/g,v=/a/g,m=new l(d)!==d;if(a("9e1e")&&(!m||a("79e5")((function(){return v[a("2b4c")("match")]=!1,l(d)!=d||l(v)==v||"/a/i"!=l(d,"i")})))){l=function(t,e){var a=this instanceof l,r=s(t),i=void 0===e;return!a&&r&&t.constructor===l&&i?t:n(m?new u(r&&!i?t.source:t,e):u((r=t instanceof l)?t.source:t,r&&i?c.call(t):e),a?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,a("2aba")(r,"RegExp",l)}a("7a56")("RegExp")},"61f7":function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return u})),a.d(e,"b",(function(){return p}));a("8e6e"),a("ac6a"),a("456d");var r=a("ade3");a("6b54"),a("3b2b"),a("a481");function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function i(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(Object(a),!0).forEach((function(e){Object(r["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function o(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 r in a)if(new RegExp("(".concat(r,")")).test(e)){var n=a[r]+"";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最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};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格式不正确");var d=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var a=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(r["a"])({},e,t);return i(i({message:a.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),n)},l(t[e],c[e]),t}),{})},d0f1:function(t,e,a){},fd8e:function(t,e,a){"use strict";a.r(e);var r=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 r=e.row;return[r.is_permanent?a("span",[t._v("不限量")]):a("div",[a("span",{staticClass:"fa"},[t._v("发布:"+t._s(r.total_count))]),a("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(r.remain_count))])])]}},{key:"type",fn:function(e){var r=e.row;return[1===r.type?a("span",[t._v("品类券")]):2===r.type?a("span",[t._v("商品券")]):3===r.type?a("span",[t._v("会员券")]):a("span",[t._v("通用券")])]}},{key:"receive_type",fn:function(e){var r=e.row;return[1===r.receive_type?a("span",[t._v("手动领取")]):2===r.receive_type?a("span",[t._v("新人券")]):3===r.receive_type?a("span",[t._v("赠送券")]):4===r.receive_type?a("span",[t._v("会员券")]):a("span",[t._v("虚拟购买")])]}},{key:"start_time",fn:function(e){var r=e.row;return[r.start_time?a("div",[t._v("\n "+t._s(t._f("formatDate")(r.start_time))+" - "+t._s(t._f("formatDate")(r.end_time))+"\n ")]):a("span",[t._v("不限时")])]}},{key:"start_use_time",fn:function(e){var r=e.row;return[r.start_use_time?a("div",[t._v("\n "+t._s(t._f("formatDate")(r.start_use_time))+" -\n "+t._s(t._f("formatDate")(r.end_use_time))+"\n ")]):a("div",[t._v(t._s(r.coupon_time)+"天")])]}},{key:"status",fn:function(e){var r=e.row;return[a("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.openChange(r)}},model:{value:r.status,callback:function(e){t.$set(r,"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 r=e.row,n=e.index;return[a("a",{on:{click:function(e){return t.receive(r)}}},[t._v("领取记录")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.copy(r)}}},[t._v("复制")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.couponDel(r,"删除发布的优惠券",n)}}},[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)},n=[],i=(a("8e6e"),a("ac6a"),a("456d"),a("96cf"),a("1da1")),o=a("ade3"),s=a("2f62"),c=a("b7be"),l=a("61f7");function u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function p(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?u(Object(a),!0).forEach((function(e){Object(o["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,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:"优惠券名称",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: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,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["Y"])(t.id).then(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(a){var r;return regeneratorRuntime.wrap((function(t){while(1)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 r=this,n={title:e,num:a,url:"marketing/coupon/released/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){r.$Message.success(t.msg),r.tableList.splice(a,1)})).catch((function(t){r.$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["X"])(this.tableFrom).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(a){var r;return regeneratorRuntime.wrap((function(e){while(1)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)}))},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()}))}}},v=d,m=(a("10c7"),a("2877")),f=Object(m["a"])(v,r,n,!1,null,"d277f322",null);e["default"]=f.exports}}]); |