mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-01-06 04:18:11 +00:00
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ddc2b2fc"],{1184:function(t,e,r){"use strict";r.d(e,"d",(function(){return a})),r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return s})),r.d(e,"g",(function(){return c})),r.d(e,"f",(function(){return l})),r.d(e,"e",(function(){return u}));var n=r("6b6c");function a(t){return Object(n["a"])({url:"marketing/lottery/list",method:"get",params:t})}function i(t){return Object(n["a"])({url:"marketing/lottery/detail/".concat(t),method:"get"})}function o(t){return Object(n["a"])({url:"marketing/lottery/add",method:"post",data:t})}function s(t,e){return Object(n["a"])({url:"marketing/lottery/edit/".concat(t),method:"put",data:e})}function c(t){return Object(n["a"])({url:"marketing/lottery/set_status/".concat(t.id,"/").concat(t.status),method:"post"})}function l(t,e){return Object(n["a"])({url:"marketing/lottery/record/list/".concat(e),method:"get",params:t})}function u(t){return Object(n["a"])({url:"marketing/lottery/record/deliver",method:"post",data:t})}},"207a":function(t,e,r){"use strict";r.r(e);var n=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",[r("FormItem",{attrs:{label:"活动类型:",clearable:""}},[r("Select",{staticStyle:{width:"200px"},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:"3"}},[t._v("订单支付")]),r("Option",{attrs:{value:"4"}},[t._v("订单评价")])],1)],1)],1),r("Col",[r("FormItem",{attrs:{label:"活动状态:",clearable:""}},[r("Select",{staticStyle:{width:"200px"},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",{staticStyle:{width:"200px"},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",{staticStyle:{width:"200px"},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;t.index;return[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;t.index;return[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;e.index;return[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;e.index;return[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;e.index;return[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)},a=[],i=(r("8e6e"),r("ac6a"),r("456d"),r("96cf"),r("3b8d")),o=r("bd86"),s=r("2f62"),c=r("1184"),l=r("61f7");function u(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 d(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 m={name:"storeBargain",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{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",fixed:"right",minWidth:130}],tableList:[],tableFrom:{start_status:"",status:"",store_name:"",export:0,page:1,factor:"",limit:15},total:0}},computed:d(d({},Object(s["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:"/admin/marketing/lottery/create"})},edit:function(t){this.$router.push({name:"marketing_create",query:{id:t.id}})},copy:function(t){this.$router.push({name:"marketing_create",query:{id:t.id,copy:1}})},del:function(t,e,r){var n=this,a={title:e,num:r,url:"marketing/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:"/admin/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(c["d"])(this.tableFrom).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)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(c["g"])(r).then(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)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()}))}}},f=m,p=(r("6126"),r("2877")),g=Object(p["a"])(f,n,a,!1,null,"222f6913",null);e["default"]=g.exports},"3b2b":function(t,e,r){var n=r("7726"),a=r("5dbc"),i=r("86cc").f,o=r("9093").f,s=r("aae3"),c=r("0bfb"),l=n.RegExp,u=l,d=l.prototype,m=/a/g,f=/a/g,p=new l(m)!==m;if(r("9e1e")&&(!p||r("79e5")((function(){return f[r("2b4c")("match")]=!1,l(m)!=m||l(f)==f||"/a/i"!=l(m,"i")})))){l=function(t,e){var r=this instanceof l,n=s(t),i=void 0===e;return!r&&n&&t.constructor===l&&i?t:a(p?new u(n&&!i?t.source:t,e):u((n=t instanceof l)?t.source:t,n&&i?c.call(t):e),r?this:d,l)};for(var g=function(t){t in l||i(l,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},b=o(u),h=0;b.length>h;)g(b[h++]);d.constructor=l,l.prototype=d,r("2aba")(n,"RegExp",l)}r("7a56")("RegExp")},6126:function(t,e,r){"use strict";var n=r("d4ce"),a=r.n(n);a.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 d}));r("8e6e"),r("ac6a"),r("456d");var n=r("bd86");r("6b54"),r("3b2b"),r("a481");function a(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 i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(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 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)}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 d(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(d,"%s格式不正确");var m=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(n["a"])({},e,t);return i(i({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),a)},l(t[e],c[e]),t}),{})},d4ce:function(t,e,r){}}]); |