(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-52ddaa00"],{a4a1:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"divBox"},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("div",{staticClass:"container"},[n("el-form",{attrs:{size:"small",inline:"","label-width":"100px"}},[n("el-form-item",{attrs:{label:"套餐类型:",clearable:""}},[n("el-select",{attrs:{placeholder:"请选择套餐类型",clearable:""},on:{change:function(e){return t.getList("")}},model:{value:t.tableFrom.type,callback:function(e){t.$set(t.tableFrom,"type",e)},expression:"tableFrom.type"}},[n("el-option",{attrs:{value:"0",label:"固定套餐"}},[t._v("固定套餐")]),t._v(" "),n("el-option",{attrs:{value:"1",label:"搭配套餐"}},[t._v("搭配套餐")])],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"套餐状态:"}},[n("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList("")}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[n("el-option",{attrs:{value:"",label:"全部"}},[t._v("全部")]),t._v(" "),n("el-option",{attrs:{value:"1",label:"上架"}},[t._v("上架")]),t._v(" "),n("el-option",{attrs:{value:"0",label:"下架"}},[t._v("下架")])],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"套餐搜索:"}},[n("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入套餐名称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList("")}},model:{value:t.tableFrom.title,callback:function(e){t.$set(t.tableFrom,"title",e)},expression:"tableFrom.title"}})],1)],1)],1)]),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small"}},[n("el-table-column",{attrs:{label:"ID",prop:"discount_id","min-width":"80"}}),t._v(" "),n("el-table-column",{attrs:{label:"套餐名称",prop:"title","min-width":"120"}}),t._v(" "),n("el-table-column",{attrs:{label:"套餐类型","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(0==e.row.type?"固定套餐":"搭配套餐")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"显示状态","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(n){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(n){t.$set(e.row,"status",n)},expression:"scope.row.status"}})]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"限时","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.start_time?n("div",[t._v("不限时")]):n("div",[n("div",[t._v("起:"+t._s(e.row.start_time||"--"))]),t._v(" "),n("div",[t._v("止:"+t._s(e.row.stop_time||"--"))])])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"创建时间",prop:"create_time","min-width":"120"}}),t._v(" "),n("el-table-column",{attrs:{label:"剩余数量","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.is_limit?e.row.limit_num:"不限量")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.handleDetail(e.row.discount_id)}}},[t._v("查看")])]}}])})],1),t._v(" "),n("div",{staticClass:"block"},[n("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"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),t._v(" "),t.dialogVisible?n("el-dialog",{attrs:{title:"套餐详情",center:"",visible:t.dialogVisible,width:"700px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.dialogLoading,expression:"dialogLoading"}]},[n("div",{staticClass:"box-container"},[n("div",{staticClass:"title"},[t._v("基本信息:")]),t._v(" "),n("div",{staticClass:"acea-row"},[n("div",{staticClass:"list sp"},[n("label",{staticClass:"name"},[t._v("套餐名称:")]),t._v(t._s(t.formValidate.title))]),t._v(" "),1==t.formValidate.type?n("div",{staticClass:"list sp100"},[n("label",{staticClass:"name"},[t._v("套餐主商品:")]),t._v(" "),n("div",[n("el-table",{staticClass:"tabNumWidth",attrs:{data:t.specsMainData,border:"",size:"mini"}},[n("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"product-data"},[e.row.product?n("img",{staticClass:"image",attrs:{src:e.row.product.image}}):t._e(),t._v(" "),n("div",[t._v(t._s(e.row.product.store_name))])])]}}],null,!1,1244405286)}),t._v(" "),n("el-table-column",{attrs:{label:"参与规格","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.attr,(function(e,a){return n("div",{key:a},[t._v("\n "+t._s(e.sku)+" | "+t._s(e.price)+"\n ")])}))}}],null,!1,14888251)})],1)],1)]):t._e(),t._v(" "),n("div",{staticClass:"list sp100"},[n("label",{staticClass:"name"},[t._v(t._s(1==t.formValidate.type?"套餐搭配商品:":"套餐商品:")+" ")]),t._v(" "),n("div",{staticClass:"labeltop"},[n("el-table",{staticClass:"tabNumWidth",attrs:{data:t.specsData,border:"",size:"mini",height:"260"}},[n("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"product-data"},[e.row.product?n("img",{staticClass:"image",attrs:{src:e.row.product.image}}):t._e(),t._v(" "),n("div",[t._v(t._s(e.row.product.store_name))])])]}}],null,!1,1244405286)}),t._v(" "),n("el-table-column",{attrs:{label:"参与规格","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.attr,(function(e,a){return n("div",{key:a},[t._v("\n "+t._s(e.sku)+" | "+t._s(e.price)+"\n ")])}))}}],null,!1,14888251)})],1)],1)])]),t._v(" "),n("div",{staticClass:"title",staticStyle:{"margin-top":"20px"}},[t._v("套餐活动信息:")]),t._v(" "),n("div",{staticClass:"acea-row"},[n("div",{staticClass:"list sp100"},[n("label",{staticClass:"name"},[t._v("活动日期:")]),t._v(" "),t.formValidate.is_time?n("span",[t._v(t._s(t.formValidate.time[0]+"-"+t.formValidate.time[1]))]):n("span",[t._v("不限时")])]),t._v(" "),n("div",{staticClass:"list sp"},[n("label",{staticClass:"name"},[t._v("套餐数量:")]),t._v(t._s(t.formValidate.is_limit?t.formValidate.limit_num:"不限量"))]),t._v(" "),n("div",{staticClass:"list sp"},[n("label",{staticClass:"name"},[t._v("显示状态:")]),t._v(t._s(1===t.formValidate.status?"显示":"不显示"))]),t._v(" "),n("div",{staticClass:"list sp"},[n("label",{staticClass:"name"},[t._v("创建时间:")]),t._v(t._s(t.formValidate.create_time))])])])])]):t._e()],1)},r=[],o=n("c80c"),i=(n("96cf"),n("3b8d")),u=(n("2f62"),n("b7be")),c=n("61f7"),s=n("83d6"),l={name:"Discounts",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(c["formatDate"])(e,"yyyy-MM-dd hh:mm")}}},data:function(){return{loading:!1,dialogLoading:!1,roterPre:s["roterPre"],dialogVisible:!1,tableData:{data:[],total:0},tableFrom:{status:"",title:"",page:1,type:"",limit:15},specsMainData:[],specsData:[],formValidate:{title:"",type:0,image:"",is_time:0,is_limit:0,limit_num:0,link_ids:[],time:[],sort:0,free_shipping:1,status:1,products:[]}}},computed:{},created:function(){this.getList("")},methods:{handleDetail:function(t){var e=this;this.dialogVisible=!0,this.dialogLoading=!0,Object(u["R"])(t).then((function(t){e.formValidate=t.data,e.formValidate.time=t.data.time||[],e.dialogLoading=!1;for(var n=0;n