(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-092cfe28"],{ca504:function(t,e,r){"use strict";r("d980")},d980:function(t,e,r){},fcec: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 mr20",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.isShow,callback:function(e){t.$set(t.tableFrom,"isShow",e)},expression:"tableFrom.isShow"}},[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-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/groupBuy/creatGroup"}}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:combination:save"],expression:"['admin:combination:save']"}],staticClass:"mr10",attrs:{size:"mini",type:"primary"}},[t._v("添加拼团商品")])],1),t._v(" "),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:export:excel:combiantion"],expression:"['admin:export:excel:combiantion']"}],staticClass:"mr10",attrs:{size:"mini"},on:{click:t.exportList}},[t._v("导出")])],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":"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"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-popover",{attrs:{trigger:"hover",placement:"right","open-delay":800}},[r("div",{staticClass:"text_overflow",attrs:{slot:"reference"},slot:"reference"},[t._v(t._s(e.row.title))]),t._v(" "),r("div",{staticClass:"pup_card"},[t._v(t._s(e.row.title))])])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"原价",prop:"otPrice","min-width":"100",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"拼团价",prop:"price","min-width":"100",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"拼团人数",prop:"countPeople","min-width":"100",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"参与人数",prop:"countPeopleAll","min-width":"100",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"成团数量",prop:"countPeoplePink","min-width":"100",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"限量","min-width":"100",prop:"quotaShow",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"限量剩余",prop:"remainingQuota","min-width":"100",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"stopTime",label:"结束时间","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(t._f("formatDate")(e.row.stopTime)))])]}}])}),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:combination:update:status"])?r("el-switch",{attrs:{"active-value":!0,"inactive-value":!1,"active-text":"开启","inactive-text":"关闭"},on:{change:function(r){return t.onchangeIsShow(e.row)}},model:{value:e.row.isShow,callback:function(r){t.$set(e.row,"isShow",r)},expression:"scope.row.isShow"}}):r("span",[t._v(t._s(e.row.isShow?"开启":"关闭"))])]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"操作","min-width":"130",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("router-link",{attrs:{to:{path:e.row.isShow?"/marketing/groupBuy/creatGroup/"+e.row.id+"/info":"/marketing/groupBuy/creatGroup/"+e.row.id}}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:combination:info"],expression:"['admin:combination:info']"}],attrs:{type:"text",size:"small"}},[t._v(t._s(e.row.isShow?"详情":"编辑"))])],1),t._v(" "),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["admin:combination:delete"],expression:"['admin:combination:delete']"}],staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(r){return t.handleDelete(e.row.id,e.$index)}}},[t._v("删除")])]}}])})],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)},o=[],i=r("b7be"),a=r("ed08"),l=r("e350");function c(t){return c="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},c(t)}function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=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 b?e:b,a=Object.create(i.prototype),l=new N(n||[]);return o(a,"_invoke",{value:P(t,r,l)}),a}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",y={};function b(){}function w(){}function _(){}var x={};h(x,a,(function(){return this}));var L=Object.getPrototypeOf,S=L&&L(L(D([])));S&&S!==r&&n.call(S,a)&&(x=S);var k=_.prototype=b.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function r(o,i,a,l){var s=p(t[o],t,i);if("throw"!==s.type){var u=s.arg,h=u.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,l)}),(function(t){r("throw",t,a,l)})):e.resolve(h).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,l)}))}l(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=m;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var l=n.delegate;if(l){var c=j(l,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?g:d,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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(O,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},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 o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function u(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(s){return void r(s)}l.done?e(c):Promise.resolve(c).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,l,"next",t)}function l(t){u(i,n,o,a,l,"throw",t)}a(void 0)}))}}var f={name:"index",filters:{formatDate:function(t){if(0!==t){var e=new Date(t);return Object(a["c"])(e,"yyyy-MM-dd hh:mm")}}},data:function(){return{tableFrom:{page:1,limit:20,keywords:"",isShow:""},listLoading:!0,tableData:{data:[],total:0}}},mounted:function(){this.getList()},methods:{checkPermi:l["a"],exportList:function(){Object(i["C"])({keywords:this.tableFrom.keywords,isShow:this.tableFrom.isShow}).then((function(t){window.open(t.fileName)}))},handleDelete:function(t,e){var r=this;this.$modalSure().then((function(){Object(i["j"])({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()}))}))},onchangeIsShow:function(t){var e=this;Object(i["n"])({id:t.id,isShow:t.isShow}).then(h(s().mark((function t(){return s().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.isShow=!t.isShow}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(i["l"])(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()}}},p=f,m=(r("ca504"),r("2877")),d=Object(m["a"])(p,n,o,!1,null,"d06177cc",null);e["default"]=d.exports}}]);