1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-22d2802e"],{"0b65":function(t,e,n){"use strict";e.a={shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,n=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,n))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]}},"4a09":function(t,e,n){"use strict";var r=n("cdf3");n.n(r).a},"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 m}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},c=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 m(t){return h.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(u,"请输入%s"),c(m,"%s格式不正确");var h=Object.keys(l).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)},c(t[e],l[e]),t}),{})},"6bf7":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"),l=n("0b65"),c=n("d708");function u(t,e,n,r,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){u(i,r,a,o,s,"next",t)}function s(t){u(i,r,a,o,s,"throw",t)}o(void 0)}))}}function h(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 g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d={name:"storeIntegral",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(s.a)(e,"yyyy-MM-dd")}}},data:function(){return{roterPre:c.a.roterPre,loading:!1,options:l.a,columns1:[{title:"ID",key:"id",width:80},{title:"商品图片",slot:"image",minWidth:90},{title:"商品标题",key:"title",minWidth:130},{title:"兑换积分",key:"integral",minWidth:100},{title:"兑换金额",key:"price",minWidth:100},{title:"限量",key:"quota_show",minWidth:130},{title:"限量剩余",key:"quota",minWidth:130},{title:"创建时间",key:"add_time",minWidth:130},{title:"排序",key:"sort",minWidth:50},{title:"状态",slot:"is_show",minWidth:100},{title:"操作",slot:"action",fixed:"right",width:200}],tableList:[],timeVal:[],grid:{xl:7,lg:10,md:12,sm:24,xs:24},tableFrom:{integral_time:"",is_show:"",store_name:"",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?h(n,!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(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:{add:function(){this.$router.push({path:this.roterPre+"/marketing/store_integral/create"})},addMore:function(){this.$router.push({path:this.roterPre+"/marketing/store_integral/add_store_integral"})},orderList:function(t){this.$router.push({path:this.roterPre+"/marketing/store_integral/order_list",query:{product_id:t.id}})},exports:function(){var t=this,e=this.tableFrom,n={start_status:e.start_status,status:e.status,store_name:e.store_name};Object(o.Db)(n).then((function(t){location.href=t.data[0]})).catch((function(e){t.$Message.error(e.msg)}))},edit:function(t){this.$router.push({path:this.roterPre+"/marketing/store_integral/create/"+t.id+"/0"})},copy:function(t){this.$router.push({path:this.roterPre+"/marketing/store_integral/create/"+t.id+"/1"})},del:function(t,e,n){var r=this,a={title:e,num:n,url:"marketing/integral/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){r.$Message.success(t.msg),r.tableList.splice(n,1),r.tableList.length||(r.tableFrom.page=1==r.tableFrom.page?1:r.tableFrom.page-1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.tableFrom.start_status=this.tableFrom.start_status||"",this.tableFrom.is_show=this.tableFrom.is_show||"",Object(o.gb)(this.tableFrom).then(function(){var e=m(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)})));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()},tableSearchs:function(){this.tableFrom.page=1,this.getList()},onchangeTime:function(t){this.timeVal=t,this.tableFrom.integral_time=this.timeVal[0]?this.timeVal.join("-"):""},onchangeIsShow:function(t){var e=this,n={id:t.id,is_show:t.is_show};Object(o.bb)(n).then(function(){var t=m(a.a.mark((function t(n){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(n.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))}}},f=(n("4a09"),n("2877")),p=Object(f.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[n("div",{staticClass:"new_card_pd"},[n("Form",{ref:"tableFrom",attrs:{inline:"",model:t.tableFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:"创建时间:","label-for":"user_time"}},[n("DatePicker",{staticClass:"mr20 input-add",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),n("FormItem",{attrs:{label:"上架状态:"}},[n("Select",{staticClass:"input-add",attrs:{placeholder:"请选择",clearable:""},model:{value:t.tableFrom.is_show,callback:function(e){t.$set(t.tableFrom,"is_show",e)},expression:"tableFrom.is_show"}},[n("Option",{attrs:{value:"1"}},[t._v("上架")]),n("Option",{attrs:{value:"0"}},[t._v("下架")])],1)],1),n("FormItem",{attrs:{label:"商品搜索:","label-for":"store_name"}},[n("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入商品标题,ID"},model:{value:t.tableFrom.store_name,callback:function(e){t.$set(t.tableFrom,"store_name",e)},expression:"tableFrom.store_name"}}),n("Button",{attrs:{type:"primary"},on:{click:function(e){return t.tableSearchs()}}},[t._v("查询")])],1)],1)],1)]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Button",{directives:[{name:"auth",rawName:"v-auth",value:["marketing-store_seckill-create"],expression:"['marketing-store_seckill-create']"}],staticClass:"mr10",attrs:{type:"primary"},on:{click:t.add}},[t._v("添加积分商品")]),n("Table",{staticClass:"ivu-mt",attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return t.index,[n("viewer",[n("div",{staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])])]}},{key:"stop_time",fn:function(e){var r=e.row;return e.index,[n("span",[t._v(" "+t._s(t._f("formatDate")(r.stop_time)))])]}},{key:"is_show",fn:function(e){var r=e.row;return e.index,[n("i-switch",{attrs:{value:r.is_show,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.is_show,callback:function(e){t.$set(r,"is_show",e)},expression:"row.is_show"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("上架")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("下架")])])]}},{key:"action",fn:function(e){var r=e.row,a=e.index;return[n("a",{on:{click:function(e){return t.orderList(r)}}},[t._v("兑换记录")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.edit(r)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.copy(r)}}},[t._v("复制")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(r,"删除积分商品",a)}}},[t._v("删除")])]}}])}),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,"14305491",null);e.default=p.exports},cdf3:function(t,e,n){}}]);
|