(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2faaf7d2"],{"43c0":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("el-steps",{attrs:{active:t.currentTab,"align-center":"","finish-status":"success"}},[a("el-step",{attrs:{title:"商品信息"}}),t._v(" "),a("el-step",{attrs:{title:"商品详情"}}),t._v(" "),a("el-step",{attrs:{title:"其他设置"}})],1)],1),t._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":"120px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-row",{directives:[{name:"show",rawName:"v-show",value:0===t.currentTab,expression:"currentTab === 0"}],attrs:{gutter:24}},[a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"商品名称:",prop:"storeName"}},[a("el-input",{attrs:{maxlength:"249",placeholder:"请输入商品名称",disabled:t.isDisabled},model:{value:t.formValidate.storeName,callback:function(e){t.$set(t.formValidate,"storeName",e)},expression:"formValidate.storeName"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"商品分类:",prop:"cateIds"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.merCateList,props:t.props2,clearable:"","show-all-levels":!1,disabled:t.isDisabled},model:{value:t.formValidate.cateIds,callback:function(e){t.$set(t.formValidate,"cateIds",e)},expression:"formValidate.cateIds"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"商品关键字:",prop:"keyword"}},[a("el-input",{attrs:{placeholder:"请输入商品关键字",disabled:t.isDisabled},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"单位:",prop:"unitName"}},[a("el-input",{attrs:{placeholder:"请输入单位",disabled:t.isDisabled},model:{value:t.formValidate.unitName,callback:function(e){t.$set(t.formValidate,"unitName",e)},expression:"formValidate.unitName"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"商品封面图:",prop:"image"}},[a("div",{staticClass:"acea-row upLoadPicBox row-middle",attrs:{disabled:t.isDisabled},on:{click:function(e){return t.modalPicTap("1")}}},[t.formValidate.image?a("div",{staticClass:"pictrue"},[a("el-image",{staticClass:"image",attrs:{src:t.formValidate.image,"preview-src-list":t.isDisabled?[t.formValidate.image]:[]}})],1):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})]),t._v(" "),a("div",[a("el-alert",{attrs:{title:"上传封面图不得大于5MB",closable:!1,type:"warning",effect:"dark"}})],1)])])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品轮播图:",prop:"sliderImages"}},[a("div",{staticClass:"acea-row"},[t._l(t.formValidate.sliderImages,(function(e,r){return a("div",{key:r,staticClass:"pictrue",attrs:{draggable:"true"},on:{dragstart:function(a){return t.handleDragStart(a,e)},dragover:function(a){return a.preventDefault(),t.handleDragOver(a,e)},dragenter:function(a){return t.handleDragEnter(a,e)},dragend:function(a){return t.handleDragEnd(a,e)}}},[a("el-image",{staticClass:"image",attrs:{src:e,"preview-src-list":t.formValidate.sliderImages}}),t._v(" "),t.isDisabled?t._e():a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.handleRemove(r)}}})],1)})),t._v(" "),t.formValidate.sliderImages.length<10&&!t.isDisabled?a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("2")}}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])]):t._e()],2)])],1),t._v(" "),a("el-col",{attrs:{xs:18,sm:18,md:18,lg:12,xl:12}},[a("el-form-item",{attrs:{label:"主图视频:"}},[a("el-input",{attrs:{maxlength:"250",disabled:t.isDisabled,placeholder:"请输入视频链接"},model:{value:t.videoLink,callback:function(e){t.videoLink=e},expression:"videoLink"}})],1)],1),t._v(" "),a("el-col",{attrs:{xs:6,sm:6,md:6,lg:12,xl:12}},[t.videoLink?a("el-button",{attrs:{disabled:t.isDisabled},on:{click:t.zh_uploadFile}},[t._v("确认添加")]):t._e(),t._v(" "),t.videoLink?t._e():a("el-button",{attrs:{icon:"el-icon-upload",disabled:t.isDisabled},on:{click:function(e){return t.modalPicTap("3","","","video")}}},[t._v("选择视频")])],1),t._v(" "),a("el-col",{attrs:{span:24}},[t.formValidate.videoLink?a("div",{staticClass:"iview-video-style"},[a("video",{staticStyle:{width:"100%",height:"100% !important","border-radius":"10px"},attrs:{src:t.formValidate.videoLink,controls:"",autoplay:"",muted:""},domProps:{muted:!0}},[t._v("\n 您的浏览器不支持 video 标签。\n ")]),t._v(" "),a("div",{staticClass:"mark"}),t._v(" "),a("span",{staticClass:"iconv iconfont iconmd-trash",on:{click:function(e){return t.delVideo()}}})]):t._e()]),t._v(" "),a("el-col",{attrs:{xs:18,sm:18,md:18,lg:12,xl:12}},[a("el-form-item",{attrs:{label:"运费模板:",prop:"tempId"}},[a("el-select",{staticClass:"mr20",staticStyle:{width:"100%"},attrs:{placeholder:"请选择",disabled:t.isDisabled},model:{value:t.formValidate.tempId,callback:function(e){t.$set(t.formValidate,"tempId",e)},expression:"formValidate.tempId"}},t._l(t.shippingList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),t._v(" "),a("el-col",{attrs:{xs:6,sm:6,md:6,lg:12,xl:12}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:!t.isDisabled,expression:"!isDisabled"}],staticClass:"mr15",on:{click:t.addTem}},[t._v("运费模板")])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品规格:",props:"specType"}},[a("el-radio-group",{attrs:{disabled:t.isDisabled},on:{change:function(e){return t.onChangeSpec(t.formValidate.specType)}},model:{value:t.formValidate.specType,callback:function(e){t.$set(t.formValidate,"specType",e)},expression:"formValidate.specType"}},[a("el-radio",{staticClass:"radio",attrs:{label:!1}},[t._v("单规格")]),t._v(" "),a("el-radio",{attrs:{label:!0}},[t._v("多规格")])],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"佣金设置:",props:"isSub"}},[a("el-radio-group",{attrs:{disabled:t.isDisabled},on:{change:function(e){return t.onChangetype(t.formValidate.isSub)}},model:{value:t.formValidate.isSub,callback:function(e){t.$set(t.formValidate,"isSub",e)},expression:"formValidate.isSub"}},[a("el-radio",{staticClass:"radio",attrs:{label:!0}},[t._v("单独设置")]),t._v(" "),a("el-radio",{attrs:{label:!1}},[t._v("默认设置")])],1)],1)],1),t._v(" "),t.formValidate.specType&&!t.isDisabled?a("el-col",{staticClass:"noForm",attrs:{span:24}},[a("el-form-item",{attrs:{label:"选择规格:",prop:""}},[a("div",{staticClass:"acea-row"},[a("el-select",{model:{value:t.formValidate.selectRule,callback:function(e){t.$set(t.formValidate,"selectRule",e)},expression:"formValidate.selectRule"}},t._l(t.ruleList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.ruleName,value:t.id}})})),1),t._v(" "),a("el-button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确认")]),t._v(" "),a("el-button",{staticClass:"mr15",on:{click:t.addRule}},[t._v("添加规格")])],1)]),t._v(" "),a("el-form-item",t._l(t.formValidate.attr,(function(e,r){return a("div",{key:r},[a("div",{staticClass:"acea-row row-middle"},[a("span",{staticClass:"mr5"},[t._v(t._s(e.attrName))]),a("i",{staticClass:"el-icon-circle-close",on:{click:function(e){return t.handleRemoveAttr(r)}}})]),t._v(" "),a("div",{staticClass:"rulesBox"},[t._l(e.attrValue,(function(r,i){return a("el-tag",{key:i,staticClass:"mb5 mr10",attrs:{closable:"",size:"medium","disable-transitions":!1},on:{close:function(a){return t.handleClose(e.attrValue,i)}}},[t._v("\n "+t._s(r)+"\n ")])})),t._v(" "),e.inputVisible?a("el-input",{ref:"saveTagInput",refInFor:!0,staticClass:"input-new-tag",attrs:{size:"small"},on:{blur:function(a){return t.createAttr(e.attrValue.attrsVal,r)}},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&t._k(a.keyCode,"enter",13,a.key,"Enter")?null:t.createAttr(e.attrValue.attrsVal,r)}},model:{value:e.attrValue.attrsVal,callback:function(a){t.$set(e.attrValue,"attrsVal",a)},expression:"item.attrValue.attrsVal"}}):a("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:function(a){return t.showInput(e)}}},[t._v("+ 添加")])],2)])})),0),t._v(" "),t.isBtn?a("el-col",[a("el-col",{attrs:{xl:6,lg:9,md:9,sm:24,xs:24}},[a("el-form-item",{attrs:{label:"规格:"}},[a("el-input",{attrs:{placeholder:"请输入规格"},model:{value:t.formDynamic.attrsName,callback:function(e){t.$set(t.formDynamic,"attrsName",e)},expression:"formDynamic.attrsName"}})],1)],1),t._v(" "),a("el-col",{attrs:{xl:6,lg:9,md:9,sm:24,xs:24}},[a("el-form-item",{attrs:{label:"规格值:"}},[a("el-input",{attrs:{placeholder:"请输入规格值"},model:{value:t.formDynamic.attrsVal,callback:function(e){t.$set(t.formDynamic,"attrsVal",e)},expression:"formDynamic.attrsVal"}})],1)],1),t._v(" "),a("el-col",{attrs:{xl:12,lg:6,md:6,sm:24,xs:24}},[a("el-form-item",{staticClass:"noLeft"},[a("el-button",{staticClass:"mr15",attrs:{type:"primary"},on:{click:t.createAttrName}},[t._v("确定")]),t._v(" "),a("el-button",{on:{click:t.offAttrName}},[t._v("取消")])],1)],1)],1):t._e(),t._v(" "),t.isBtn?t._e():a("el-form-item",[a("el-button",{staticClass:"mr15",attrs:{type:"primary",icon:"md-add"},on:{click:t.addBtn}},[t._v("添加新规格")])],1)],1):t._e(),t._v(" "),t.formValidate.attr.length>0&&t.formValidate.specType&&!t.isDisabled?a("el-col",{staticClass:"noForm",attrs:{span:24}},[a("el-form-item",{attrs:{label:"批量设置:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.oneFormBatch,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1","pi")}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,3302088318)}),t._v(" "),t._l(t.attrValue,(function(e,r){return a("el-table-column",{key:r,attrs:{label:t.formThead[r].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"商品编号"===t.formThead[r].title?"text":"number",min:0},nativeOn:{keyup:function(a){return t.keyupEvent(r,e.row[r],e.$index,1)}},model:{value:e.row[r],callback:function(a){t.$set(e.row,r,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),t.formValidate.isSub?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:0,max:e.row.price},model:{value:e.row.brokerage,callback:function(a){t.$set(e.row,"brokerage",a)},expression:"scope.row.brokerage"}})]}}],null,!1,99765219)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:0,max:e.row.price},model:{value:e.row.brokerageTwo,callback:function(a){t.$set(e.row,"brokerageTwo",a)},expression:"scope.row.brokerageTwo"}})]}}],null,!1,1573915567)})]:t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作","min-width":"80"}},[[a("el-button",{staticClass:"submission",attrs:{type:"text"},on:{click:t.batchAdd}},[t._v("批量添加")])]],2)],2)],1)],1):t._e(),t._v(" "),a("el-col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[!1===t.formValidate.specType?a("el-form-item",[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("1","dan","pi")}}},[t.formValidate.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,1357914119)}),t._v(" "),t._l(t.attrValue,(function(e,r){return a("el-table-column",{key:r,attrs:{label:t.formThead[r].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:t.isDisabled,type:"商品编号"===t.formThead[r].title?"text":"number",min:0},nativeOn:{keyup:function(a){return t.keyupEvent(r,e.row[r],e.$index,2)}},model:{value:e.row[r],callback:function(a){t.$set(e.row,r,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),t.formValidate.isSub?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:t.isDisabled,type:"number",min:0},model:{value:e.row.brokerage,callback:function(a){t.$set(e.row,"brokerage",a)},expression:"scope.row.brokerage"}})]}}],null,!1,3549059968)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:t.isDisabled,type:"number",min:0},model:{value:e.row.brokerageTwo,callback:function(a){t.$set(e.row,"brokerageTwo",a)},expression:"scope.row.brokerageTwo"}})]}}],null,!1,342384460)})]:t._e()],2)],1):t._e(),t._v(" "),t.$route.params.id&&t.showAll?a("el-form-item",{attrs:{label:"全部sku:"}},[a("el-button",{attrs:{type:"default",disabled:t.isDisabled},on:{click:function(e){return t.showAllSku()}}},[t._v("展示")])],1):t._e(),t._v(" "),t.formValidate.attr.length>0&&t.formValidate.specType?a("el-form-item",{staticClass:"labeltop",class:t.isDisabled?"disLabel":"disLabelmoren",attrs:{label:"商品属性:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.ManyAttrValue,border:"",size:"mini"}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,r){return a("el-table-column",{key:r,attrs:{align:"center",label:t.manyTabTit[r].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[r])}})]}}],null,!0)})})):t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(a){return t.modalPicTap("1","duo",e.$index)}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,4035746379)}),t._v(" "),t._l(t.attrValue,(function(e,r){return a("el-table-column",{key:r,attrs:{label:t.formThead[r].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:t.isDisabled,type:"商品编号"===t.formThead[r].title?"text":"number"},nativeOn:{keyup:function(a){return t.keyupEvent(r,e.row[r],e.$index,3)}},model:{value:e.row[r],callback:function(a){t.$set(e.row,r,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),t.formValidate.isSub?a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:t.isDisabled,type:"number",min:0,max:e.row.price},model:{value:e.row.brokerage,callback:function(a){t.$set(e.row,"brokerage",a)},expression:"scope.row.brokerage"}})]}}],null,!1,2857277871)}):t._e(),t._v(" "),t.formValidate.isSub?a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:t.isDisabled,type:"number",min:0,max:e.row.price},model:{value:e.row.brokerageTwo,callback:function(a){t.$set(e.row,"brokerageTwo",a)},expression:"scope.row.brokerageTwo"}})]}}],null,!1,3609981283)}):t._e(),t._v(" "),t.isDisabled?t._e():a("el-table-column",{key:"3",attrs:{align:"center",label:"操作","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{staticClass:"submission",attrs:{type:"text"},on:{click:function(a){return t.delAttrTable(e.$index)}}},[t._v("删除")])]}}],null,!1,2803824461)})],2)],1):t._e()],1)],1),t._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:1===t.currentTab&&!t.isDisabled,expression:"currentTab === 1 && !isDisabled"}]},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("Tinymce",{model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1)],1)],1),t._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:1===t.currentTab&&t.isDisabled,expression:"currentTab === 1 && isDisabled"}]},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("span",{domProps:{innerHTML:t._s(t.formValidate.content||"无")}})])],1)],1),t._v(" "),a("el-row",{directives:[{name:"show",rawName:"v-show",value:2===t.currentTab,expression:"currentTab === 2"}]},[a("el-col",{attrs:{span:24}},[a("el-col",t._b({},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{min:0,placeholder:"请输入排序",disabled:t.isDisabled},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"积分:"}},[a("el-input-number",{attrs:{min:0,placeholder:"请输入排序",disabled:t.isDisabled},model:{value:t.formValidate.giveIntegral,callback:function(e){t.$set(t.formValidate,"giveIntegral",e)},expression:"formValidate.giveIntegral"}})],1)],1),t._v(" "),a("el-col",t._b({},"el-col",t.grid,!1),[a("el-form-item",{attrs:{label:"虚拟销量:"}},[a("el-input-number",{attrs:{min:0,placeholder:"请输入排序",disabled:t.isDisabled},model:{value:t.formValidate.ficti,callback:function(e){t.$set(t.formValidate,"ficti",e)},expression:"formValidate.ficti"}})],1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品推荐:"}},[a("el-checkbox-group",{attrs:{size:"small",disabled:t.isDisabled},on:{change:t.onChangeGroup},model:{value:t.checkboxGroup,callback:function(e){t.checkboxGroup=e},expression:"checkboxGroup"}},t._l(t.recommend,(function(e,r){return a("el-checkbox",{key:r,attrs:{label:e.value}},[t._v(t._s(e.name))])})),1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"活动优先级:"}},[a("div",{staticClass:"color-list acea-row row-middle"},[t._l(t.formValidate.activity,(function(e){return a("div",{key:e,staticClass:"color-item",class:t.activity[e],attrs:{disabled:t.isDisabled,draggable:"true"},on:{dragstart:function(a){return t.handleDragStart(a,e)},dragover:function(a){return a.preventDefault(),t.handleDragOver(a,e)},dragenter:function(a){return t.handleDragEnterFont(a,e)},dragend:function(a){return t.handleDragEnd(a,e)}}},[t._v("\n "+t._s(e)+"\n ")])})),t._v(" "),a("div",{staticClass:"tip"},[t._v("可拖动按钮调整活动的优先展示顺序")])],2)])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{staticClass:"proCoupon",attrs:{label:"优惠券:"}},[a("div",{staticClass:"acea-row"},[t._l(t.formValidate.coupons,(function(e,r){return a("el-tag",{key:r,staticClass:"mr10 mb10",attrs:{closable:!t.isDisabled,"disable-transitions":!1},on:{close:function(a){return t.handleCloseCoupon(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])})),t._v(" "),null==t.formValidate.couponIds?a("span",[t._v("暂无优惠券")]):t._e(),t._v(" "),t.isDisabled?t._e():a("el-button",{staticClass:"mr15",on:{click:t.addCoupon}},[t._v("选择优惠券")])],2)])],1)],1),t._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"show",rawName:"v-show",value:t.currentTab>0,expression:"currentTab > 0"}],staticClass:"submission priamry_border",on:{click:t.handleSubmitUp}},[t._v("上一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:t.currentTab<2,expression:"currentTab < 2"}],staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.handleSubmitNest("formValidate")}}},[t._v("下一步")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:(2===t.currentTab||t.$route.params.id)&&!t.isDisabled,expression:"(currentTab === 2 || $route.params.id) && !isDisabled"}],staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1)],1),t._v(" "),a("CreatTemplates",{ref:"addTemplates",on:{getList:t.getShippingList}})],1)},i=[],n=a("8256"),o=a("73f5"),s=a("b7be"),l=a("2f2c"),c=a("e7ac"),u=(a("fca7"),a("b7ac")),d=a("5317"),m=a("61f7");function f(t){return f="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},f(t)}function h(t){return v(t)||b(t)||k(t)||p()}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function v(t){if(Array.isArray(t))return _(t)}function g(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */g=function(){return e};var t,e={},a=Object.prototype,r=a.hasOwnProperty,i=Object.defineProperty||function(t,e,a){t[e]=a.value},n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",l=n.toStringTag||"@@toStringTag";function c(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,a){return t[e]=a}}function u(t,e,a,r){var n=e&&e.prototype instanceof y?e:y,o=Object.create(n.prototype),s=new L(r||[]);return i(o,"_invoke",{value:D(t,a,s)}),o}function d(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var m="suspendedStart",h="suspendedYield",p="executing",b="completed",v={};function y(){}function V(){}function w(){}var k={};c(k,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(S([])));x&&x!==a&&r.call(x,o)&&(k=x);var T=w.prototype=y.prototype=Object.create(k);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function $(t,e){function a(i,n,o,s){var l=d(t[i],t,n);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==f(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){a("next",t,o,s)}),(function(t){a("throw",t,o,s)})):e.resolve(u).then((function(t){c.value=t,o(c)}),(function(t){return a("throw",t,o,s)}))}s(l.arg)}var n;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){a(t,r,e,i)}))}return n=n?n.then(i,i):i()}})}function D(e,a,r){var i=m;return function(n,o){if(i===p)throw new Error("Generator is already running");if(i===b){if("throw"===n)throw o;return{value:t,done:!0}}for(r.method=n,r.arg=o;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=d(e,a,r);if("normal"===c.type){if(i=r.done?b:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=b,r.method="throw",r.arg=c.arg)}}}function O(e,a){var r=a.method,i=e.iterator[r];if(i===t)return a.delegate=null,"throw"===r&&e.iterator.return&&(a.method="return",a.arg=t,O(e,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var n=d(i,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,v;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,v):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,v)}function I(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function S(e){if(e||""===e){var a=e[o];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function a(){for(;++i=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),N(a),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var r=a.completion;if("throw"===r.type){var i=r.arg;N(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,r){return this.delegate={iterator:S(e),resultName:a,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function y(t,e,a,r,i,n,o){try{var s=t[n](o),l=s.value}catch(c){return void a(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function V(t){return function(){var e=this,a=arguments;return new Promise((function(r,i){var n=t.apply(e,a);function o(t){y(n,r,i,o,s,"next",t)}function s(t){y(n,r,i,o,s,"throw",t)}o(void 0)}))}}function w(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=k(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,s=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return o=t.done,t},e:function(t){s=!0,n=t},f:function(){try{o||null==a.return||a.return()}finally{if(s)throw n}}}}function k(t,e){if(t){if("string"===typeof t)return _(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,r=new Array(e);a1)t.forEach((function(r,i){0===i&&(e=t[i]["attrValue"]);var n=[];e&&(e.forEach((function(e){t[i+1]&&t[i+1]["attrValue"]&&t[i+1]["attrValue"].forEach((function(r){var o=(0!==i?"":t[i]["attrName"]+"_")+e+"$&"+t[i+1]["attrName"]+"_"+r;if(n.push(o),i===t.length-2){var s={image:"",price:0,cost:0,otPrice:0,stock:0,barCode:"",weight:0,volume:0,brokerage:0,brokerage_two:0};for(var l in o.split("$&").forEach((function(t,e){var a=t.split("_");s["attrValue"]||(s["attrValue"]={}),s["attrValue"][a[0]]=a.length>1?a[1]:""})),s.attrValue)s[l]=s.attrValue[l];a.push(s)}}))})),e=n.length?n:[])}));else{var r=[];t.forEach((function(t,e){t["attrValue"].forEach((function(e,i){for(var n in r[i]=t["attrName"]+"_"+e,a[i]={image:"",price:0,cost:0,otPrice:0,stock:0,barCode:"",weight:0,volume:0,brokerage:0,brokerage_two:0,attrValue:C({},t["attrName"],e)},a[i].attrValue)a[i][n]=a[i].attrValue[n]}))})),e.push(r.join("$&"))}return a}},addTem:function(){this.$refs.addTemplates.dialogVisible=!0,this.$refs.addTemplates.getCityList()},addRule:function(){var t=this;this.$modalAttr(this.formDynamics,(function(){t.productGetRule()}))},onChangeSpec:function(t){this.isAttr=!0,t&&this.productGetRule()},confirm:function(){var t=this;if(this.isAttr=!0,!this.formValidate.selectRule)return this.$message.warning("请选择属性");var e=[];this.ruleList.forEach((function(a){a.id===t.formValidate.selectRule&&a.ruleValue.forEach((function(t){e.push({attrName:t.value,attrValue:t.detail})})),t.formValidate.attr=e}))},getCategorySelect:function(){var t=this;Object(o["d"])({status:-1,type:1}).then((function(e){t.merCateList=t.addDisabled(e)}))},addDisabled:function(t){var e=this,a=[];try{t.forEach((function(t,r){var i={id:t.id,name:t.name,level:t.level,pid:t.pid,sort:t.sort,status:t.status};if(t.status||(i=T(T({},i),{},{disabled:!0})),t.child){var n=e.addDisabled(t.child);i=T(T({},i),{},{child:n})}a.push(i)}))}catch(r){return console.log(r),[]}return a},filerMerCateList:function(t){return t.map((function(t){return t.child||(t.disabled=!0),t.label=t.name,t}))},productGetRule:function(){var t=this;Object(o["x"])(this.tableFrom).then((function(e){for(var a=e.list,r=0;r10)return this.$message.warning("最多选择10张图片!");if(n.length+i.formValidate.sliderImages.length>10)return this.$message.warning("最多选择10张图片!");n.map((function(t){i.formValidate.sliderImages.push(t.sattDir)}))}if("3"===t&&"video"==r){var o=n[0];"video/mp4"!==o.attType?this.$message.warning("请重新选择视频!"):i.$set(i.formValidate,"videoLink",o.sattDir)}"1"===t&&"dan"===e&&(i.OneattrValue[0].image=n[0].sattDir),"1"===t&&"duo"===e&&(i.ManyAttrValue[a].image=n[0].sattDir),"1"===t&&"pi"===e&&(i.oneFormBatch[0].image=n[0].sattDir)}),t,"content")},handleSubmitUp:function(){this.currentTab--<0&&(this.currentTab=0)},handleSubmitNest:function(t){var e=this;this.$refs[t].validate((function(t){t?e.currentTab++>2&&(e.currentTab=0):e.formValidate.store_name&&e.formValidate.cate_id&&e.formValidate.keyword&&e.formValidate.unit_name&&e.formValidate.store_info&&e.formValidate.image&&e.formValidate.slider_image||e.$message.warning("请填写完整商品信息!")}))},handleSubmit:Object(m["a"])((function(t){var e=this;if(this.onChangeGroup(),this.formValidate.specType&&this.formValidate.attr.length<1)return this.$message.warning("请填写多规格属性!");if(this.formValidate.cateId=this.formValidate.cateIds.join(","),this.formValidate.videoLink&&this.formValidate.sliderImages.unshift(this.formValidate.videoLink),this.formValidate.sliderImage=JSON.stringify(this.formValidate.sliderImages),this.formValidate.specType){this.formValidate.attrValue=this.ManyAttrValue,this.formValidate.attr=this.formValidate.attr.map((function(t){return{attrName:t.attrName,id:t.id,attrValues:t.attrValue.join(",")}}));for(var a=0;a