(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76a81aa2"],{"7d8d":function(t,e,r){"use strict";r("aa7e")},aa7e:function(t,e,r){},e89b: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",{staticClass:"divBox"},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"container"},[r("el-form",{attrs:{inline:""}},[r("el-form-item",{attrs:{label:"是否显示:"}},[r("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[r("el-option",{attrs:{label:"关闭",value:0}}),t._v(" "),r("el-option",{attrs:{label:"开启",value:1}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"配置名称:"}},[r("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.timeId,callback:function(e){t.$set(t.tableFrom,"timeId",e)},expression:"tableFrom.timeId"}},t._l(t.seckillTime,(function(t){return r("el-option",{key:t.id,attrs:{label:t.name+" - "+t.time,value:t.id}})})),1)],1),t._v(" "),r("el-form-item",{attrs:{label:"商品搜索:"}},[r("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品ID/名称",clearable:""},model:{value:t.tableFrom.keywords,callback:function(e){t.$set(t.tableFrom,"keywords",e)},expression:"tableFrom.keywords"}},[r("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1),t._v(" "),r("router-link",{attrs:{to:{path:"/marketing/seckill/creatSeckill/creat"}}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:seckill:save"],expression:"['admin:seckill:save']"}],staticClass:"mr10",attrs:{size:"small",type:"primary"}},[t._v("添加秒杀商品")])],1)],1),t._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","header-cell-style":{fontWeight:"bold"}}},[r("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"50"}}),t._v(" "),r("el-table-column",{attrs:{label:"配置","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",[t._v(t._s(e.row.storeSeckillManagerResponse?e.row.storeSeckillManagerResponse.name:"-"))]),t._v(" "),r("div",[t._v(t._s(e.row.startTime+" - "+e.row.stopTime))])]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"name",label:"秒杀时段","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",[t._v("\n "+t._s(e.row.storeSeckillManagerResponse?e.row.storeSeckillManagerResponse.time.split(",").join(" - "):"-")+"\n ")])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"商品图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[r("div",{staticClass:"demo-image__preview"},[r("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"商品标题",prop:"title","min-width":"300","show-overflow-tooltip":!0}}),t._v(" "),r("el-table-column",{attrs:{label:"原价",prop:"otPrice","min-width":"100"}}),t._v(" "),r("el-table-column",{attrs:{label:"秒杀价","min-width":"100",prop:"price"}}),t._v(" "),r("el-table-column",{attrs:{label:"限量",prop:"quotaShow","min-width":"80"}}),t._v(" "),r("el-table-column",{attrs:{label:"限量剩余","min-width":"80",prop:"quota"}}),t._v(" "),r("el-table-column",{attrs:{label:"秒杀状态","min-width":"100",prop:"statusName"}}),t._v(" "),r("el-table-column",{attrs:{label:"创建时间",prop:"createTime","min-width":"150"}}),t._v(" "),r("el-table-column",{attrs:{label:"状态","min-width":"80",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.checkPermi(["admin:seckill:update:status"])?r("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},on:{change:function(r){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(r){t.$set(e.row,"status",r)},expression:"scope.row.status"}}):r("span",[t._v(t._s(e.row.status?"开启":"关闭"))])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"操作","min-width":"120",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("router-link",{attrs:{to:{path:"/marketing/seckill/creatSeckill/updeta/"+e.row.productId+"/"+e.row.id}}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:seckill:info"],expression:"['admin:seckill:info']"}],attrs:{type:"text",size:"small"}},[t._v("编辑")])],1),t._v(" "),2!==e.row.killStatus?r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:seckill:delete"],expression:"['admin:seckill:delete']"}],staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(r){return t.handleDelete(e.row.id,e.$index)}}},[t._v("删除")]):t._e()]}}])})],1),t._v(" "),r("div",{staticClass:"block mb20"},[r("el-pagination",{attrs:{"page-sizes":[10,20,30,40],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},a=[],i=r("b7be"),o=r("02df"),l=r("e350");function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),l=new N(n||[]);return a(o,"_invoke",{value:j(t,r,l)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var m="suspendedStart",d="suspendedYield",v="executing",g="completed",b={};function y(){}function w(){}function _(){}var k={};h(k,o,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(I([])));L&&L!==r&&n.call(L,o)&&(k=L);var S=_.prototype=y.prototype=Object.create(k);function F(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,o,l){var c=p(t[a],t,i);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==s(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,o,l)}),(function(t){r("throw",t,o,l)})):e.resolve(h).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return i=i?i.then(a,a):a()}})}function j(e,r,n){var a=m;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===g){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var l=n.delegate;if(l){var s=O(l,n);if(s){if(s===b)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var c=p(e,r,n);if("normal"===c.type){if(a=n.done?g:d,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=g,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function u(t,e,r,n,a,i,o){try{var l=t[i](o),s=l.value}catch(c){return void r(c)}l.done?e(s):Promise.resolve(s).then(n,a)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){u(i,n,a,o,l,"next",t)}function l(t){u(i,n,a,o,l,"throw",t)}o(void 0)}))}}var f={name:"SeckillList",data:function(){return{listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,timeId:"",status:"",keywords:""},seckillTime:[]}},mounted:function(){var t=this;Object(o["a"])().then((function(e){t.seckillTime=e.list})),this.tableFrom.timeId=Number(this.$route.params.timeId)||"",this.getList()},methods:{checkPermi:l["a"],handleDelete:function(t,e){var r=this;this.$modalSure().then((function(){Object(i["L"])({id:t}).then((function(){r.$message.success("删除成功"),1===r.tableData.data.length&&r.tableFrom.page>1&&(r.tableFrom.page=r.tableFrom.page-1),r.getList()}))}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(i["N"])(this.tableFrom).then((function(t){e.tableData.data=t.list,e.tableData.total=t.total,e.listLoading=!1})).catch((function(t){e.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},onchangeIsShow:function(t){var e=this;Object(i["P"])({id:t.id,status:t.status}).then(h(c().mark((function t(){return c().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success("修改成功"),e.getList();case 2:case"end":return t.stop()}}),t)})))).catch((function(){t.status=!t.status}))}}},p=f,m=(r("7d8d"),r("2877")),d=Object(m["a"])(p,n,a,!1,null,"3362a189",null);e["default"]=d.exports}}]);