chunk-50015035.1a0e2cb0.js 11 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-50015035"],{1184:function(t,e,r){"use strict";r.d(e,"d",(function(){return a})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return s})),r.d(e,"f",(function(){return c})),r.d(e,"g",(function(){return l})),r.d(e,"e",(function(){return u}));var n=r("b6bd");function a(t){return Object(n.a)({url:"lottery/list",method:"get",params:t})}function o(t){return Object(n.a)({url:"lottery/add",method:"post",data:t})}function i(t,e){return Object(n.a)({url:"lottery/edit/".concat(t),method:"put",data:e})}function s(t){return Object(n.a)({url:"lottery/factor_info/".concat(t),method:"get"})}function c(t){return Object(n.a)({url:"lottery/set_status/".concat(t.id,"/").concat(t.status),method:"post"})}function l(t){return Object(n.a)({url:"lottery/record/list",method:"get",params:t})}function u(t){return Object(n.a)({url:"lottery/record/deliver",method:"post",data:t})}},"207a":function(t,e,r){"use strict";r.r(e);var n=r("a34a"),a=r.n(n),o=r("2f62"),i=r("1184"),s=r("61f7"),c=r("d708");function l(t,e,r,n,a,o,i){try{var s=t[o](i),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,a)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(t){l(o,n,a,i,s,"next",t)}function s(t){l(o,n,a,i,s,"throw",t)}i(void 0)}))}}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var m={name:"storeBargain",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{roterPre:c.a.roterPre,loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"活动名称",key:"name",minWidth:90},{title:"活动类型",key:"lottery_type",minWidth:130},{title:"参与次数",key:"lottery_all",minWidth:100},{title:"抽奖人数",key:"lottery_people",minWidth:100},{title:"中奖人数",key:"lottery_win",minWidth:100},{title:"活动状态",key:"lottery_status",minWidth:100},{title:"上架状态",slot:"status",minWidth:100},{title:"活动时间",slot:"time",minWidth:100},{title:"操作",slot:"action",minWidth:130}],tableList:[],tableFrom:{start_status:"",status:"",store_name:"",export:0,page:1,factor:"",limit:15},total:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(r,!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Object(o.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),created:function(){this.getList()},methods:{add:function(){this.$router.push({path:"".concat(this.roterPre,"/marketing/lottery/create")})},edit:function(t){this.$router.push({name:"".concat(this.roterPre,"/marketing_create"),query:{id:t.id}})},copy:function(t){this.$router.push({name:"".concat(this.roterPre,"marketing_create"),query:{id:t.id,copy:1}})},del:function(t,e,r){var n=this,a={title:e,num:r,url:"lottery/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){n.$Message.success(t.msg),n.tableList.splice(r,1)})).catch((function(t){n.$Message.error(t.msg)}))},getRecording:function(t){this.$router.push({path:"".concat(this.roterPre,"/marketing/lottery/recording_list/").concat(t.id),query:{id:t.id}})},getList:function(){var t=this;this.loading=!0,this.tableFrom.start_status=this.tableFrom.start_status||"",this.tableFrom.status=this.tableFrom.status||"",Object(i.d)(this.tableFrom).then(function(){var e=u(a.a.mark((function e(r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tableList=n.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()},onchangeIsShow:function(t){var e=this,r={id:t.id,status:t.status};Object(i.f)(r).then(function(){var t=u(a.a.mark((function t(r){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg),e.getList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg),e.getList()}))}}},p=(r("ca37"),r("2877")),h=Object(p.a)(m,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("PageHeader",{staticClass:"product_tabs",attrs:{title:"九宫格抽奖列表","hidden-breadcrumb":""}})],1),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",[r("FormItem",{attrs:{label:"活动类型:",clearable:""}},[r("Select",{staticClass:"width20",attrs:{placeholder:"请选择活动类型",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.tableFrom.factor,callback:function(e){t.$set(t.tableFrom,"factor",e)},expression:"tableFrom.factor"}},[r("Option",{attrs:{value:"1"}},[t._v("积分")]),r("Option",{attrs:{value:"2"}},[t._v("余额")]),r("Option",{attrs:{value:"3"}},[t._v("下单支付成功")]),r("Option",{attrs:{value:"4"}},[t._v("订单评价")]),r("Option",{attrs:{value:"5"}},[t._v("关注公众号")])],1)],1)],1),r("Col",[r("FormItem",{attrs:{label:"活动状态:",clearable:""}},[r("Select",{staticClass:"width20",attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.tableFrom.start_status,callback:function(e){t.$set(t.tableFrom,"start_status",e)},expression:"tableFrom.start_status"}},[r("Option",{attrs:{value:"0"}},[t._v("未开始")]),r("Option",{attrs:{value:"1"}},[t._v("进行中")]),r("Option",{attrs:{value:"-1"}},[t._v("已结束")])],1)],1)],1),r("Col",[r("FormItem",{attrs:{label:"上架状态:"}},[r("Select",{staticClass:"width20",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("下架")])],1)],1)],1),r("Col",[r("FormItem",{attrs:{label:"抽奖搜索:","label-for":"store_name"}},[r("Input",{staticClass:"width20",attrs:{search:"","enter-button":"",placeholder:"请输入抽奖名称,ID"},on:{"on-search":t.userSearchs},model:{value:t.tableFrom.store_name,callback:function(e){t.$set(t.tableFrom,"store_name",e)},expression:"tableFrom.store_name"}})],1)],1)],1),r("Row",{staticClass:"mb20",attrs:{type:"flex"}},[r("Button",{directives:[{name:"auth",rawName:"v-auth",value:["marketing-store_bargain-create"],expression:"['marketing-store_bargain-create']"}],staticClass:"mr10",attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加抽奖")])],1)],1),r("Table",{attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"is_fail",fn:function(t){var e=t.row;return t.index,[1===e.is_fail?r("Icon",{attrs:{type:"md-checkmark",color:"#0092DC",size:"14"}}):r("Icon",{attrs:{type:"md-close",color:"#ed5565",size:"14"}})]}},{key:"image",fn:function(t){var e=t.row;return t.index,[r("viewer",[r("div",{staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])])]}},{key:"bargain_min_price",fn:function(e){var n=e.row;return e.index,[r("span",[t._v(t._s(n.bargain_min_price)+"~"+t._s(n.bargain_max_price))])]}},{key:"status",fn:function(e){var n=e.row;return e.index,[r("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("上架")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("下架")])])]}},{key:"time",fn:function(e){var n=e.row;return e.index,[r("div",[t._v("起:"+t._s(n.start_time||"--"))]),r("div",[t._v("止:"+t._s(n.end_time||"--"))])]}},{key:"action",fn:function(e){var n=e.row,a=e.index;return[r("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除抽奖",a)}}},[t._v("删除")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.copy(n)}}},[t._v("复制")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.getRecording(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)],1)}),[],!1,null,"e98fc33a",null);e.default=h.exports},"61f7":function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(r,!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(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 n in r)if(new RegExp("(".concat(n,")")).test(e)){var a=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:s(a))}return e}function s(t){return("00"+t).substr(t.length)}r.d(e,"a",(function(){return i})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return d}));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 d(t){return f.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}l(u,"请输入%s"),l(d,"%s格式不正确");var f=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]:{},i="range"===e?{min:t[0],max:t[1]}:o({},e,t);return a({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},i,{},n)},l(t[e],c[e]),t}),{})},a97e:function(t,e,r){},ca37:function(t,e,r){"use strict";var n=r("a97e");r.n(n).a}}]);