canyin-project/ybcy/views/channel/index/static/js/chunk-fb12913e.5120e75c.js
2024-11-01 16:07:54 +08:00

1 line
23 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fb12913e"],{1779:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"baiduUe"},[a("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},["1"==e.type?a("span",[e._v("创建满减优惠券")]):e._e(),"2"==e.type?a("span",[e._v("创建折扣优惠券")]):e._e(),"3"==e.type?a("span",[e._v("创建商品兑换券")]):e._e()])]),a("div",{staticClass:"mar_t20 flex-bet flex-y-top"},[a("div",{staticClass:"flex-g-1"},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"排序"}},[a("el-input",{attrs:{placeholder:"请输入排序"},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],1),a("el-form-item",{attrs:{label:"优惠券名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入优惠券名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"活动时间",required:!0}},[a("el-date-picker",{attrs:{type:"datetimerange",align:"right","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["08:00:00","23:59:59"]},model:{value:e.timeData,callback:function(t){e.timeData=t},expression:"timeData"}})],1),a("el-form-item",{attrs:{label:"发放总量",required:!0}},[a("el-input",{attrs:{placeholder:"请输入发放总量"},model:{value:e.form.stock,callback:function(t){e.$set(e.form,"stock",t)},expression:"form.stock"}})],1),a("el-form-item",{attrs:{label:"使用门槛",required:!0}},[a("div",{staticClass:"flex"},[a("div",[a("el-radio",{attrs:{label:"1"},model:{value:e.form.isFull,callback:function(t){e.$set(e.form,"isFull",t)},expression:"form.isFull"}},[e._v("无门槛")])],1),a("div",{staticClass:"time_item mar_l20"},[a("el-radio",{attrs:{label:"2"},model:{value:e.form.isFull,callback:function(t){e.$set(e.form,"isFull",t)},expression:"form.isFull"}},[e._v("有门槛")]),a("span",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.isFull,expression:"form.isFull=='2'"}]},[a("span",{staticClass:"mar_r10"},[e._v("订单满")]),"1"==e.form.isFull?a("el-input-number",{attrs:{disabled:"","controls-position":"right",min:1,max:1e6},model:{value:e.form.fullMoney,callback:function(t){e.$set(e.form,"fullMoney",t)},expression:"form.fullMoney"}}):a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e6},model:{value:e.form.fullMoney,callback:function(t){e.$set(e.form,"fullMoney",t)},expression:"form.fullMoney"}}),a("span",{staticClass:"mar_l10"},[e._v("元才可用")])],1)],1)])]),"1"==e.type||"2"==e.type?a("el-form-item",{attrs:{label:"优惠内容",required:!0}},[a("div",{staticClass:"time_item"},["1"==e.type?a("span",{staticClass:"mar_r10"},[e._v("减免")]):e._e(),"2"==e.type?a("span",{staticClass:"mar_r10"},[e._v("打")]):e._e(),"1"==e.type?a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e6},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}}):e._e(),"2"==e.type?a("el-input-number",{attrs:{"controls-position":"right",min:.1,max:1e6},model:{value:e.form.discount,callback:function(t){e.$set(e.form,"discount",t)},expression:"form.discount"}}):e._e(),"1"==e.type?a("span",{staticClass:"mar_l10"},[e._v("元")]):e._e(),"2"==e.type?a("span",{staticClass:"mar_l10"},[e._v("折")]):e._e()],1)]):e._e(),"1"==e.type||"2"==e.type?a("el-form-item",{attrs:{label:"适用商品",required:!0}},[a("el-radio-group",{model:{value:e.form.goodsType,callback:function(t){e.$set(e.form,"goodsType",t)},expression:"form.goodsType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("全部商品可用")]),a("el-radio",{attrs:{label:"2"}},[e._v("部分商品可用")]),a("el-radio",{attrs:{label:"3"}},[e._v("部分商品不可用")]),a("el-radio",{attrs:{label:"4"}},[e._v("指定商品分类")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"4"==e.form.goodsType,expression:"form.goodsType=='4'"}],staticClass:"mar_t10"},[a("div",{staticClass:"flex"},[a("div",[e._v("外卖分类:")]),a("el-select",{attrs:{clearable:"",multiple:"",filterable:"","allow-create":"",placeholder:"请选择外卖商品分类"},model:{value:e.goodsArr,callback:function(t){e.goodsArr=t},expression:"goodsArr"}},e._l(e.typeOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e.form.useType.indexOf("2")>-1||e.form.useType.indexOf("3")>-1?a("div",{staticClass:"flex mar_t20"},[a("div",[e._v("店内分类:")]),a("el-select",{attrs:{clearable:"",multiple:"",filterable:"","allow-create":"",placeholder:"请选择店内商品分类"},model:{value:e.goodsArr2,callback:function(t){e.goodsArr2=t},expression:"goodsArr2"}},e._l(e.typeOptions2,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1):e._e()]),a("div",{directives:[{name:"show",rawName:"v-show",value:("2"==e.form.goodsType||"3"==e.form.goodsType)&&e.form.useType.indexOf("1")>-1,expression:"(form.goodsType=='2' || form.goodsType=='3') && form.useType.indexOf('1')>-1"}]},[a("div",[e._v("外卖商品:")]),a("el-scrollbar",[a("div",{staticClass:"recordBox"},[a("el-table",{ref:"multipleTable",staticClass:"tablecenter",staticStyle:{width:"100%"},attrs:{data:e.tableData3,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"商品"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"10px"},attrs:{src:t.row.icon,fit:"cover"}})],1),a("div",{staticClass:"flex-g-1 t_l"},[a("div",{staticClass:"mar_l10"},[e._v(e._s(t.row.name))])])])]}}],null,!1,8072705)}),a("el-table-column",{attrs:{prop:"price",label:"价格"}}),a("el-table-column",{attrs:{prop:"stock",label:"库存"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"textbutton"},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){return e.open1(t.row,t.$index)}}},[e._v("删除")])],1)]}}],null,!1,3198782318)})],1)],1)]),a("div",{staticClass:"addgoods textbutton"},[a("i",{staticClass:"el-icon-plus subjectcolor2"}),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.addgood(e.tableData3)}}},[e._v("添加商品")])],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:("2"==e.form.goodsType||"3"==e.form.goodsType)&&(e.form.useType.indexOf("2")>-1||e.form.useType.indexOf("3")>-1),expression:"(form.goodsType=='2' || form.goodsType=='3') && (form.useType.indexOf('2')>-1 || form.useType.indexOf('3')>-1)"}]},[a("div",[e._v("店内商品:")]),a("el-scrollbar",[a("div",{staticClass:"recordBox"},[a("el-table",{ref:"multipleTable",staticClass:"tablecenter",staticStyle:{width:"100%"},attrs:{data:e.tableData4,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"商品"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"10px"},attrs:{src:t.row.icon,fit:"cover"}})],1),a("div",{staticClass:"flex-g-1 t_l"},[a("div",{staticClass:"mar_l10"},[e._v(e._s(t.row.name))])])])]}}],null,!1,8072705)}),a("el-table-column",{attrs:{prop:"price",label:"价格"}}),a("el-table-column",{attrs:{prop:"stock",label:"库存"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"textbutton"},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){return e.open4(t.row,t.$index)}}},[e._v("删除")])],1)]}}],null,!1,414142795)})],1)],1)]),a("div",{staticClass:"addgoods textbutton"},[a("i",{staticClass:"el-icon-plus subjectcolor2"}),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.addgood4(e.tableData4)}}},[e._v("添加商品")])],1)],1)],1):e._e(),"3"==e.type?a("el-form-item",{attrs:{label:"选择商品",required:!0}},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.form.useType.indexOf("1")>-1,expression:"form.useType.indexOf('1')>-1"}]},[a("div",[e._v("外卖商品:")]),a("el-scrollbar",[a("div",{staticClass:"recordBox"},[a("el-table",{ref:"multipleTable",staticClass:"tablecenter",staticStyle:{width:"100%"},attrs:{data:e.tableData5,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"商品"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"10px"},attrs:{src:t.row.icon,fit:"cover"}})],1),a("div",{staticClass:"flex-g-1 t_l"},[a("div",{staticClass:"mar_l10"},[e._v(e._s(t.row.name))])])])]}}],null,!1,8072705)}),a("el-table-column",{attrs:{prop:"price",label:"价格"}}),a("el-table-column",{attrs:{prop:"stock",label:"库存"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"textbutton"},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){return e.open5(t.row,t.$index)}}},[e._v("删除")])],1)]}}],null,!1,2749300714)})],1)],1)]),e.tableData5.length<1?a("div",{staticClass:"addgoods textbutton"},[a("i",{staticClass:"el-icon-plus subjectcolor2"}),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.addgood5(e.tableData5)}}},[e._v("添加商品")])],1):e._e()],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.form.useType.indexOf("2")>-1||e.form.useType.indexOf("3")>-1,expression:"(form.useType.indexOf('2')>-1 || form.useType.indexOf('3')>-1)"}]},[a("div",[e._v("店内商品:")]),a("el-scrollbar",[a("div",{staticClass:"recordBox"},[a("el-table",{ref:"multipleTable",staticClass:"tablecenter",staticStyle:{width:"100%"},attrs:{data:e.tableData6,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"商品"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("div",{staticClass:"flex-g-0"},[a("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"10px"},attrs:{src:t.row.icon,fit:"cover"}})],1),a("div",{staticClass:"flex-g-1 t_l"},[a("div",{staticClass:"mar_l10"},[e._v(e._s(t.row.name))])])])]}}],null,!1,8072705)}),a("el-table-column",{attrs:{prop:"price",label:"价格"}}),a("el-table-column",{attrs:{prop:"stock",label:"库存"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"textbutton"},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){return e.open6(t.row,t.$index)}}},[e._v("删除")])],1)]}}],null,!1,808602889)})],1)],1)]),e.tableData6.length<1?a("div",{staticClass:"addgoods textbutton"},[a("i",{staticClass:"el-icon-plus subjectcolor2"}),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.addgood6(e.tableData6)}}},[e._v("添加商品")])],1):e._e()],1)]):e._e(),a("el-form-item",{attrs:{label:"适用场景",required:!0}},[a("el-checkbox-group",{model:{value:e.form.useType,callback:function(t){e.$set(e.form,"useType",t)},expression:"form.useType"}},[a("el-checkbox",{attrs:{label:"1"}},[e._v("外卖")]),a("el-checkbox",{attrs:{label:"2"}},[e._v("堂食")]),a("el-checkbox",{attrs:{label:"3"}},[e._v("快餐")])],1)],1),a("el-form-item",{attrs:{label:"优惠券主题色",required:!0}},[a("el-color-picker",{model:{value:e.form.color,callback:function(t){e.$set(e.form,"color",t)},expression:"form.color"}})],1),a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("基本规则")])])]),a("el-form-item",{attrs:{label:"每人限领次数",required:!0}},[a("div",{staticClass:"time_item"},[a("el-radio",{attrs:{label:"1"},model:{value:e.form.isMax,callback:function(t){e.$set(e.form,"isMax",t)},expression:"form.isMax"}},[e._v("不限次数")]),a("el-radio",{attrs:{label:"2"},model:{value:e.form.isMax,callback:function(t){e.$set(e.form,"isMax",t)},expression:"form.isMax"}},[e._v("每人限领")]),a("span",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.isMax,expression:"form.isMax=='2'"}]},[a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e6},model:{value:e.form.maxNum,callback:function(t){e.$set(e.form,"maxNum",t)},expression:"form.maxNum"}}),a("span",{staticClass:"mar_l10"},[e._v("张")])],1)],1)]),a("el-form-item",{attrs:{label:"领取人限制",required:!0}},[a("el-radio-group",{model:{value:e.form.memberType,callback:function(t){e.$set(e.form,"memberType",t)},expression:"form.memberType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("所有人均可领取")]),a("el-radio",{attrs:{label:"2"}},[e._v("会员可领")]),a("el-radio",{directives:[{name:"show",rawName:"v-show",value:"2"!=e.form.storeType,expression:"form.storeType!='2'"}],attrs:{label:"3"}},[e._v("指定标签用户可领")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"3"==e.form.memberType&&"2"!=e.form.storeType,expression:"form.memberType=='3' && form.storeType!='2'"}],staticClass:"mar_t10"},[a("el-select",{attrs:{clearable:"",multiple:"",filterable:"","allow-create":"",placeholder:"请选择标签"},model:{value:e.memberLabel,callback:function(t){e.memberLabel=t},expression:"memberLabel"}},e._l(e.labelOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.labelName,value:e.id}})})),1)],1)],1),a("el-form-item",{attrs:{label:"使用时间",required:!0}},[a("div",[a("el-radio",{attrs:{label:"1"},model:{value:e.form.timeType,callback:function(t){e.$set(e.form,"timeType",t)},expression:"form.timeType"}},[e._v("固定日期")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.timeType,expression:"form.timeType=='1'"}],staticClass:"mar_b20"},[a("el-date-picker",{attrs:{type:"datetimerange",align:"right","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["08:00:00","23:59:59"]},model:{value:e.timeData2,callback:function(t){e.timeData2=t},expression:"timeData2"}})],1),a("div",{staticClass:"time_item mar_t10 flex"},[a("el-radio",{attrs:{label:"2"},model:{value:e.form.timeType,callback:function(t){e.$set(e.form,"timeType",t)},expression:"form.timeType"}},[e._v("领券后")]),"1"==e.form.timeType?a("el-input-number",{attrs:{disabled:"","controls-position":"right",min:1,max:1e6},model:{value:e.form.day,callback:function(t){e.$set(e.form,"day",t)},expression:"form.day"}}):a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e6},model:{value:e.form.day,callback:function(t){e.$set(e.form,"day",t)},expression:"form.day"}}),a("span",{staticClass:"mar_l10"},[e._v("日内有效")]),"2"==e.form.timeType?a("div",{staticClass:"mar_l10 mar_t5"},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2"},model:{value:e.form.isNextDay,callback:function(t){e.$set(e.form,"isNextDay",t)},expression:"form.isNextDay"}},[e._v("次日起")])],1):e._e()],1),a("div",{staticClass:"yb_margin lh16"},[e._v("默认从今日起,如需次日有效请勾选次日起选项")])]),a("el-form-item",{attrs:{label:"领券中心展示",required:!0}},[a("el-radio-group",{model:{value:e.form.display,callback:function(t){e.$set(e.form,"display",t)},expression:"form.display"}},[a("el-radio",{attrs:{label:"1"}},[e._v("显示")]),a("el-radio",{attrs:{label:"2"}},[e._v("隐藏")])],1)],1),a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("使用说明")])])]),a("el-form-item",{attrs:{label:"分享图片"}},[e.form.shareImg?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(1)},mouseleave:function(t){return e.leave(1)}}},[a("i",{ref:"imgicon1",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.form.shareImg,1)}}})]),a("img",{staticClass:"wid",attrs:{src:e.form.shareImg},on:{click:function(t){return e.test(1)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})])]),a("el-form-item",{attrs:{label:"分享自定义标题"}},[a("el-input",{attrs:{placeholder:"请输入分享自定义标题"},model:{value:e.form.shareTitle,callback:function(t){e.$set(e.form,"shareTitle",t)},expression:"form.shareTitle"}})],1),a("el-form-item",{attrs:{label:"券说明"}},[a("baidu-ueditor",{attrs:{content:e.form.details,typestore:e.storeId},on:{ueditor:e.getUeditor}})],1)],1)],1)])]),a("attachment-img",{ref:"img1",attrs:{type:"img",type2:e.storeId},on:{attachment:e.imgadd1}}),a("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("立即创建")])],1),a("edit",{ref:"edit",on:{fetchData:e.tableData,fetchData2:e.tableData2}}),a("edit2",{ref:"edit2",on:{fetchData:e.ftableData5,fetchData2:e.ftableData6}})],1)},r=[],o=(a("c975"),a("d81d"),a("a434"),a("96cf"),a("1da1")),l=a("5530"),i=a("7cb7"),n=a("ed08"),c=a("9893"),m=a("fc6e"),d=a("df58"),u=a("4e30"),f=a("2f62"),p={components:{baiduUeditor:c["a"],attachmentImg:m["a"],Edit:d["a"],Edit2:u["a"]},created:function(){this.init(),this.$route.query.type&&(this.type=this.$route.query.type),this.$route.query.id&&(this.id=this.$route.query.id,this.edit())},computed:Object(l["a"])({},Object(f["d"])(["storeId"])),data:function(){return{rules:{name:[{required:!0,message:"请输入优惠券名称",trigger:"blur"},{min:2,max:15,message:"长度在 2 到 15 个字符",trigger:"blur"}],time:[{required:!0,message:"请选择活动时间",trigger:"blur"}]},type:"1",id:"",form:{sort:"1",name:"",isFull:"1",fullMoney:"",money:"",discount:"",timeType:"1",isNextDay:"1",useType:["1"],goodsType:"1",memberType:"1",storeType:"1",details:"",stock:"1",maxNum:"",isMax:"1",shareImg:"",shareTitle:"",display:"1",color:"#EE472B"},goodsArr:[],memberLabel:[],plugin:[],labelOptions:[],typeOptions:[],radio2:"1",num2:"",timeData:[new Date,(new Date).setMonth((new Date).getMonth()+3)],timeData2:[new Date,(new Date).setMonth((new Date).getMonth()+3)],collapseName:"",tableData3:[],yhtableData:[],tableData4:[],tableData5:[],tableData6:[],dialogTableVisible4:!1,goodName:""}},methods:{tableData:function(e){this.tableData3=e},tableData2:function(e){this.tableData4=e},ftableData5:function(e){this.tableData5=e},ftableData6:function(e){this.tableData6=e},open1:function(e,t){console.log("删除",e,t),this.$delete(this.tableData3,t)},open4:function(e,t){this.$delete(this.tableData4,t)},open2:function(e,t){this.$delete(this.shopTable,t)},open5:function(e,t){this.$delete(this.tableData5,t)},open6:function(e,t){this.$delete(this.tableData6,t)},enter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="none"},leave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="inline-block"},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["img"+e].dialogVisible=!0},imgadd1:function(e){this.form.shareImg=e.str},deleteMultiImage:function(e,t,a){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==a)switch(t){case 2:this.form2.environment.remove(e);break}else switch(t){case 1:this.form.shareImg="";break}},handleEdit:function(e){e.id?this.$refs["edit"].showEdit(e):this.$refs["edit"].showEdit()},getUeditor:function(e){this.form.details=e},init:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["I"])({storeId:e.storeId});case 2:a=t.sent,s=a.data,e.typeOptions=s.category?s.category:[],e.labelOptions=s.label?s.label:[];case 6:case"end":return t.stop()}}),t)})))()},edit:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["I"])({id:e.id,storeId:e.storeId});case 2:a=t.sent,s=a.data,e.form2=e.form,e.form=Object.assign(e.form2,s),s.startTime&&(e.timeData=[s.startTime,s.endTime]),s.useStartTime&&(e.timeData2=[s.useStartTime,s.useEndTime]),"2"!=s.goodsType&&"3"!=s.goodsType||(e.tableData3=s.goodsArr?s.goodsArr:[]),"4"==s.goodsType&&(e.goodsArr=s.goodsArr?s.goodsArr:[]),"3"==s.memberType&&(e.memberLabel=s.memberLabel?s.memberLabel:[]),"3"==e.type&&(e.tableData5=s.goodsArr?s.goodsArr:[],e.tableData6=s.goodsArr2?s.goodsArr2:[]);case 12:case"end":return t.stop()}}),t)})))()},addgood:function(e){if(this.$refs["edit"].setStoreId(this.storeId),e){var t=e.map((function(e){return e.id}));this.$refs["edit"].showEdit(t)}else this.$refs["edit"].showEdit();this.$refs["edit"].isSpec("")},addgood4:function(e){if(this.$refs["edit"].isGoodsInfo("2"),this.$refs["edit"].isSpec("2"),e){var t=e.map((function(e){return e.id}));this.$refs["edit"].showEdit(t)}else this.$refs["edit"].showEdit()},addgood5:function(e){if(this.$refs["edit2"].isGoodsInfo("1"),this.$refs["edit2"].isSpec("2"),e){var t=e.map((function(e){return e.id}));this.$refs["edit2"].showEdit(t)}else this.$refs["edit2"].showEdit()},addgood6:function(e){if(this.$refs["edit2"].isGoodsInfo("2"),this.$refs["edit2"].isSpec("2"),e){var t=e.map((function(e){return e.id}));this.$refs["edit2"].showEdit(t)}else this.$refs["edit2"].showEdit()},submitForm:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["form"].validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(a){var s,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=17;break}return e.form.type=e.type,e.form.storeId=e.storeId,e.timeData&&(e.form.startTime=Object(n["a"])(e.timeData[0]),e.form.endTime=Object(n["a"])(e.timeData[1])),e.timeData2&&(e.form.useStartTime=Object(n["a"])(e.timeData2[0]),e.form.useEndTime=Object(n["a"])(e.timeData2[1])),"2"!=e.form.goodsType&&"3"!=e.form.goodsType||(e.tableData3&&(e.form.goodsArr=e.tableData3.map((function(e){return e.id}))),e.tableData4&&(e.form.goodsArr2=e.tableData4.map((function(e){return e.id})))),"3"==e.type&&(e.tableData5&&(e.form.goodsArr=e.tableData5.map((function(e){return e.id}))),e.tableData6&&(e.form.goodsArr2=e.tableData6.map((function(e){return e.id}))),e.form.goodsType="2"),"4"==e.form.goodsType&&(e.form.goodsArr=e.goodsArr,e.form.goodsArr2=e.goodsArr2),"3"==e.form.memberType&&(e.form.memberLabel=e.memberLabel),t.next=11,Object(i["Wb"])(e.form);case 11:s=t.sent,r=s.msg,e.$baseMessage(r,"success"),e.$router.go(-1),t.next=18;break;case 17:return t.abrupt("return",!1);case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}},b=p,v=(a("e830"),a("2877")),h=Object(v["a"])(b,s,r,!1,null,null,null);t["default"]=h.exports},"654e":function(e,t,a){},e830:function(e,t,a){"use strict";var s=a("654e"),r=a.n(s);r.a}}]);