(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77c6c838"],{"11a4":function(t,e,r){},"1b10":function(t,e,r){"use strict";r("11a4")},"1ee1":function(t,e,r){"use strict";r("8c41")},"8c41":function(t,e,r){},f23d:function(t,e,r){"use strict";r.r(e);var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox"},[r("div",{staticClass:"container_box"},[r("el-card",{staticClass:"box-card mb20"},[r("div",{staticClass:"acea-row row-center row-middle"},[r("div",{staticClass:"pointer",on:{click:function(e){return t.back()}}},[r("i",{staticClass:"el-icon-arrow-left"}),t._v(" "),r("span",{staticClass:"pl10"},[t._v("返回")])]),t._v(" "),r("div",{staticClass:"f-s-18 f-w-500 ml32 add_title"},[t._v("添加秒杀商品")])])]),t._v(" "),r("el-card",{staticClass:"box-card box-body"},[r("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[t.$route.params.activityId?t._e():r("el-tab-pane",{attrs:{label:"基础设置",name:"first"}}),t._v(" "),r("el-tab-pane",{attrs:{label:"添加商品",name:"second"}})],1),t._v(" "),r("el-form",{ref:"form",staticClass:"demo-ruleForm",attrs:{model:t.form,rules:t.rules,"label-width":"120px",size:"small"}},["first"==t.activeName&&"1"!==!t.$route.params.isActivity?[r("el-form-item",{attrs:{label:"选择活动:",prop:"id"}},[t.isCopy?r("span",[t._v(t._s(t.form.productList.activityName))]):r("el-select",{directives:[{name:"selectLoadMore",rawName:"v-selectLoadMore",value:t.selectLoadMore,expression:"selectLoadMore"}],staticClass:"selWidth",attrs:{clearable:"",filterable:"",loading:t.loading,remote:"",disabled:t.isCopy,"remote-method":t.remoteMethod,placeholder:"请选择活动"},model:{value:t.form.id,callback:function(e){t.$set(t.form,"id",e)},expression:"form.id"}},t._l(t.activityList,(function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.id,disabled:Number(t.status)>1}})})),1)],1)]:t._e(),t._v(" "),"second"==t.activeName?[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"acea-row mb20"},[r("el-button",{attrs:{disabled:!t.isEdit&&t.isCopy,size:"small",type:"primary"},on:{click:function(e){return t.addGoods()}}},[t._v("添加商品")]),t._v(" "),r("el-dropdown",{staticClass:"ml10 mr10",attrs:{size:"small","split-button":""}},[t._v("\n 批量设置\n "),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{attrs:{disabled:t.isShowCheck},nativeOn:{click:function(e){return t.setPrice(2)}}},[t._v("限量")]),t._v(" "),r("el-dropdown-item",{attrs:{disabled:t.isShowCheck},nativeOn:{click:function(e){return t.setPrice(1)}}},[t._v("活动价")])],1)],1),t._v(" "),r("el-button",{attrs:{size:"small",disabled:t.isShowCheck},on:{click:t.batchDel}},[t._v("批量删除")])],1)]),t._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"tableList",staticStyle:{width:"100%"},attrs:{"row-key":"id",data:t.proData,size:"small","default-expand-all":"","tree-props":{children:"children"}}},[r("el-table-column",{attrs:{width:"30"}}),t._v(" "),r("el-table-column",{attrs:{width:"50"},scopedSlots:t._u([{key:"header",fn:function(e){return[r("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}})]}},{key:"default",fn:function(e){return e.row.sku?void 0:[r("el-checkbox",{attrs:{value:e.row.checked},on:{change:function(r){return t.handleCheckOneChange(r,e.row)}}})]}}],null,!0)}),t._v(" "),r("el-table-column",{attrs:{"min-width":"300",label:"商品信息"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("div",{staticClass:"acea-row"},[r("div",{staticClass:"demo-image__preview mr10"},[r("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:e.row.image,"preview-src-list":[e.row.image]}})],1),t._v(" "),r("div",{staticClass:"row_title line2"},[t._v(t._s(e.row.name))])])]}}],null,!1,1876274800)}),t._v(" "),r("el-table-column",{attrs:{prop:"categoryName",label:"商品分类","min-width":"80"}}),t._v(" "),r("el-table-column",{attrs:{prop:"price",label:"售价",width:"120"}}),t._v(" "),r("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"80"}}),t._v(" "),r("el-table-column",{attrs:{prop:"quota",label:"限量",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return e.row.sku?[r("el-input-number",{staticClass:"input_width",attrs:{type:"number",precision:0,min:0,max:e.row.stock,controls:!1},model:{value:e.row.quota,callback:function(r){t.$set(e.row,"quota",r)},expression:"scope.row.quota"}})]:void 0}}],null,!0)}),t._v(" "),r("el-table-column",{attrs:{prop:"activityPrice",label:"活动价格",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return e.row.sku?[r("el-input-number",{staticClass:"input_width",attrs:{type:"number",precision:2,min:.01,max:99999,controls:!1},model:{value:e.row.activityPrice,callback:function(r){t.$set(e.row,"activityPrice",r)},expression:"scope.row.activityPrice"}})]:void 0}}],null,!0)}),t._v(" "),r("el-table-column",{attrs:{label:"操作",width:"60",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.sku?t._e():r("el-button",{attrs:{type:"text",size:"small"},on:{click:function(r){return t.handleDelete(e.$index,e.row)}}},[t._v("删除")])]}}],null,!1,1023502219)})],1)]:t._e()],2)],1),t._v(" "),r("el-card",{staticClass:"fixed-card",attrs:{"dis-hover":""}},[r("div",{staticClass:"acea-row row-center-wrapper"},[r("el-button",{directives:[{name:"show",rawName:"v-show",value:"first"===t.activeName,expression:"activeName === 'first'"}],attrs:{disabled:!t.form.id&&"first"===t.activeName,size:"small",type:"primary"},on:{click:function(e){t.activeName="second"}}},[t._v("下一步")]),t._v(" "),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["merchant:seckill:product:add"],expression:"['merchant:seckill:product:add']"},{name:"show",rawName:"v-show",value:"second"==t.activeName,expression:"activeName == 'second'"},{name:"debounceClick",rawName:"v-debounceClick",value:function(){t.submitForm("form")},expression:"\n () => {\n submitForm('form');\n }\n "}],attrs:{type:"primary",size:"small"}},[t._v("保存修改")])],1)])],1),t._v(" "),r("activity",{key:"keyNum",ref:"activityModal",on:{onChange:t.setActivity}})],1)},a=[],n=r("b7be"),o=r("c4c8"),c=r("1031"),s=r("2f62"),l=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{"before-close":t.onClose,"close-on-click-modal":!1,title:1==t.type?"设置活动价":"设置限量",visible:t.showStatus,width:"470px"},on:{"update:visible":function(e){t.showStatus=e}}},[r("el-form",{ref:"form",attrs:{size:"small",model:t.form,"label-width":"100px"}},[1==t.type?[r("el-form-item",{attrs:{label:"活动方式:",required:""}},[r("el-radio-group",{model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[r("el-radio",{attrs:{label:"0"}},[t._v("活动价")]),t._v(" "),r("el-radio",{attrs:{label:"1"}},[t._v("活动折扣(%)")])],1)],1),t._v(" "),0==t.form.type?r("el-form-item",[r("el-input-number",{staticClass:"input_width",attrs:{type:"number",precision:2,min:0,max:99999,controls:!1},model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}})],1):t._e(),t._v(" "),1==t.form.type?r("el-form-item",[r("el-input-number",{staticClass:"input_width",attrs:{type:"number",step:1,"step-strictly":"",min:0,max:100,controls:!1},model:{value:t.form.discount,callback:function(e){t.$set(t.form,"discount",e)},expression:"form.discount"}})],1):t._e()]:t._e(),t._v(" "),2==t.type?[r("el-form-item",{attrs:{label:"设置限量:",required:""}},[r("el-input-number",{staticClass:"input_width",attrs:{step:1,"step-strictly":"",type:"number",min:1,max:99999},model:{value:t.form.activity_stock,callback:function(e){t.$set(t.form,"activity_stock",e)},expression:"form.activity_stock"}})],1)]:t._e()],2),t._v(" "),r("div",{staticClass:"acea-row row-right"},[r("el-button",{attrs:{size:"small"},on:{click:t.onClose}},[t._v("取 消")]),t._v(" "),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.confirmSet}},[t._v("确 定")])],1)],1)},u=[],h={name:"",data:function(){return{showStatus:!1,type:1,form:{type:"0",price:"",discount:"",activity_stock:""}}},methods:{onClose:function(){this.showStatus=!1,setTimeout(this.form={type:"0",price:"",discount:"",activity_stock:""},500)},confirmSet:function(){this.$emit("onChange",this.form,this.type),this.onClose()}}},d=h,f=(r("1b10"),r("2877")),m=Object(f["a"])(d,l,u,!1,null,"4d8c9921",null),p=m.exports;function v(t){return v="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},v(t)}function y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,i){var n=e&&e.prototype instanceof b?e:b,o=Object.create(n.prototype),c=new I(i||[]);return a(o,"_invoke",{value:O(t,r,c)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",m="executing",p="completed",g={};function b(){}function w(){}function k(){}var _={};l(_,o,(function(){return this}));var x=Object.getPrototypeOf,C=x&&x(x(j([])));C&&C!==r&&i.call(C,o)&&(_=C);var L=k.prototype=b.prototype=Object.create(_);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function $(t,e){function r(a,n,o,c){var s=h(t[a],t,n);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==v(u)&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,o,c)}),(function(t){r("throw",t,o,c)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,c)}))}c(s.arg)}var n;a(this,"_invoke",{value:function(t,i){function a(){return new e((function(e,a){r(t,i,e,a)}))}return n=n?n.then(a,a):a()}})}function O(e,r,i){var a=d;return function(n,o){if(a===m)throw new Error("Generator is already running");if(a===p){if("throw"===n)throw o;return{value:t,done:!0}}for(i.method=n,i.arg=o;;){var c=i.delegate;if(c){var s=P(c,i);if(s){if(s===g)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(a===d)throw a=p,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a=m;var l=h(e,r,i);if("normal"===l.type){if(a=i.done?p:f,l.arg===g)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(a=p,i.method="throw",i.arg=l.arg)}}}function P(e,r){var i=r.method,a=e.iterator[i];if(a===t)return r.delegate=null,"throw"===i&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),g;var n=h(a,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,g;var o=n.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,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function j(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,n=function r(){for(;++a=0;--n){var o=this.tryEntries[n],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var a=i.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,i){return this.delegate={iterator:j(e),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=t),g}},e}function g(t,e,r,i,a,n,o){try{var c=t[n](o),s=c.value}catch(l){return void r(l)}c.done?e(s):Promise.resolve(s).then(i,a)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var n=t.apply(e,r);function o(t){g(n,i,a,o,c,"next",t)}function c(t){g(n,i,a,o,c,"throw",t)}o(void 0)}))}}function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function k(t){for(var e=1;ethis.totalPage||this.getActivityList()},remoteMethod:function(t){var e=this;this.loading=!0,this.search.name=t,this.search.page=1,this.activityList=[],setTimeout((function(){e.loading=!1,e.getActivityList()}),200)},getActivityList:function(){var t=this;Object(n["N"])(this.search).then((function(e){t.totalPage=e.totalPage,t.total=e.total,t.activityList=t.activityList.concat(e.list)}))},isCkecked:function(){var t=this.proData.filter((function(t){return t.checked}));t.length?this.isShowCheck=!1:this.isShowCheck=!0},handleCheckAllChange:function(t){var e=this;this.isIndeterminate=!this.isIndeterminate,this.proData.forEach((function(r){e.$set(r,"checked",t)})),this.isCkecked()},handleCheckOneChange:function(t,e){var r=this.proData.length,i=0;this.$set(e,"checked",t),this.proData.forEach((function(e){e.checked===t&&i++})),this.checkAll=r===i?t:!t,this.isIndeterminate=i>0&&i