chunk-9a4bce9c.c1346115.js 7.4 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-9a4bce9c"],{"61f7":function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var a=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:s(a))}return e}function s(t){return("00"+t).substr(t.length)}n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return p}));var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},l=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){return a({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function p(t){return m.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 m=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:i({},e,t);return a({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o,{},r)},l(t[e],c[e]),t}),{})},aeba:function(t,e,n){"use strict";n.r(e);var r=n("a34a"),a=n.n(r),i=n("2f62"),o=n("b7be"),s=n("61f7");function c(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p={name:"storeCouponUser",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(s.a)(e,"yyyy-MM-dd hh:mm")}}},data:function(){return{columns1:[{title:"ID",key:"id",width:80},{title:"优惠券名称",key:"coupon_title",minWidth:150},{title:"领取人",key:"nickname",minWidth:130},{title:"面值",slot:"coupon_price",minWidth:100},{title:"最低消费额",key:"use_min_price",minWidth:120},{title:"开始使用时间",slot:"start_time",minWidth:150},{title:"结束使用时间",slot:"end_time",minWidth:150},{title:"获取方式",key:"type",minWidth:150},{title:"是否可用",slot:"is_fail",minWidth:120},{title:"状态",key:"status",minWidth:170}],tableList:[],grid:{xl:7,lg:7,md:12,sm:24,xs:24},tableFrom:{status:"",coupon_title:"",nickname:"",page:1,limit:15},total:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(n,!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{getList:function(){var t=this;this.loading=!0,this.tableFrom.status=this.tableFrom.status||"",Object(o.Fb)(this.tableFrom).then(function(){var e,n=(e=a.a.mark((function e(n){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList=r.list,t.total=n.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(t){c(i,r,a,o,s,"next",t)}function s(t){c(i,r,a,o,s,"throw",t)}o(void 0)}))});return function(t){return n.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},orderSearch:function(){this.tableFrom.page=1,this.getList()},userSearchs:function(){this.tableFrom.page=1,this.getList()}}},m=n("2877"),f=Object(m.a)(p,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{staticClass:"mt15 ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[n("div",{staticClass:"new_card_pd"},[n("Form",{ref:"tableFrom",attrs:{model:t.tableFrom,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:"是否有效:"}},[n("Select",{staticClass:"input-add",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"}},[n("Option",{attrs:{value:"1"}},[t._v("已使用")]),n("Option",{attrs:{value:"0"}},[t._v("未使用")]),n("Option",{attrs:{value:"2"}},[t._v("已过期")])],1)],1),n("FormItem",{attrs:{label:"领取人:","label-for":"nickname"}},[n("Input",{staticClass:"input-add",attrs:{placeholder:"请输入领取人",clearable:""},model:{value:t.tableFrom.nickname,callback:function(e){t.$set(t.tableFrom,"nickname",e)},expression:"tableFrom.nickname"}})],1),n("FormItem",{attrs:{label:"优惠券搜索:","label-for":"coupon_title"}},[n("Input",{staticClass:"input-add mr14",attrs:{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"}}),n("Button",{attrs:{type:"primary"},on:{click:function(e){return t.orderSearch()}}},[t._v("查询")])],1)],1)],1)]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Table",{attrs:{columns:t.columns1,data:t.tableList},scopedSlots:t._u([{key:"coupon_price",fn:function(e){var r=e.row;return[1==r.coupon_type?n("span",[t._v(t._s(r.coupon_price)+"元")]):t._e(),2==r.coupon_type?n("span",[t._v(t._s(parseFloat(r.coupon_price)/10)+"折("+t._s(r.coupon_price.toString().split(".")[0])+"%)")]):t._e()]}},{key:"is_fail",fn:function(t){var e=t.row;return t.index,[0===e.is_fail?n("Icon",{attrs:{type:"md-checkmark",color:"#0092DC",size:"14"}}):n("Icon",{attrs:{type:"md-close",color:"#ed5565",size:"14"}})]}},{key:"start_time",fn:function(e){var r=e.row;return e.index,[n("span",[t._v(" "+t._s(t._f("formatDate")(r.start_time)))])]}},{key:"end_time",fn:function(e){var r=e.row;return e.index,[n("span",[t._v(" "+t._s(t._f("formatDate")(r.end_time)))])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("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)],1)}),[],!1,null,"0d5f8534",null);e.default=f.exports}}]);