(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba825ffa"],{"1f69":function(t,e,a){"use strict";a("e727")},2865:function(t,e,a){"use strict";a.r(e);var i=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"},[t.headTab.length>0?a("el-tabs",{model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headTab,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.name,label:t.title}})})),1):t._e()],1),t._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],key:t.currentTab,ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":"130px"},nativeOn:{submit:function(t){t.preventDefault()}}},["1"==t.currentTab?a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品类型:",required:""}},t._l(t.virtual,(function(e,i){return a("div",{key:i,staticClass:"virtual",class:t.formValidate.type==e.id?"virtual_boder":"virtual_boder2",on:{click:function(a){return t.virtualbtn(e.id,2)}}},[a("div",{staticClass:"virtual_top"},[t._v(t._s(e.tit))]),t._v(" "),a("div",{staticClass:"virtual_bottom"},[t._v("("+t._s(e.tit2)+")")]),t._v(" "),t.formValidate.type==e.id?a("div",{staticClass:"virtual_san"}):t._e(),t._v(" "),t.formValidate.type==e.id?a("div",{staticClass:"virtual_dui"},[t._v("\n ✓\n ")]):t._e()])})),0)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品名称:",prop:"store_name"}},[a("el-input",{staticClass:"pageWidth",attrs:{placeholder:"请输入商品名称",size:"small"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台商品分类:",prop:"cate_id"}},[a("el-cascader",{staticClass:"pageWidth",attrs:{size:"small",options:t.categoryList,props:t.props,filterable:"",clearable:""},on:{"visible-change":t.getSpecsLst},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商户商品分类:"}},[a("el-cascader",{staticClass:"pageWidth",attrs:{size:"small",options:t.merCateList,props:{multiple:!0,checkStrictly:!0,emitPath:!1},filterable:"",clearable:""},model:{value:t.formValidate.mer_cate_id,callback:function(e){t.$set(t.formValidate,"mer_cate_id",e)},expression:"formValidate.mer_cate_id"}})],1)],1),t._v(" "),t.labelList.length?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品标签:"}},[a("el-select",{staticClass:"pageWidth",attrs:{size:"small",multiple:"",placeholder:"请选择"},model:{value:t.formValidate.mer_labels,callback:function(e){t.$set(t.formValidate,"mer_labels",e)},expression:"formValidate.mer_labels"}},t._l(t.labelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1):t._e(),t._v(" "),a("el-col",t._b({},"el-col",t.grid2,!1),[a("el-form-item",{attrs:{label:"品牌选择:"}},[a("el-select",{staticClass:"pageWidth",attrs:{filterable:"",size:"small",placeholder:"请选择"},model:{value:t.formValidate.brand_id,callback:function(e){t.$set(t.formValidate,"brand_id",e)},expression:"formValidate.brand_id"}},t._l(t.BrandList,(function(t){return a("el-option",{key:t.brand_id,attrs:{label:t.brand_name,value:t.brand_id}})})),1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品封面图:",prop:"image"}},[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:function(e){return t.modalPicTap("1")}}},[t.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.image}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品轮播图:",prop:"slider_image"}},[a("div",{staticClass:"acea-row"},[t._l(t.formValidate.slider_image,(function(e,i){return a("div",{key:i,staticClass:"pictrue",attrs:{draggable:"false"},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("img",{attrs:{src:e}}),t._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.handleRemove(i)}}})])})),t._v(" "),t.formValidate.slider_image.length<10?a("div",{staticClass:"uploadCont",attrs:{title:"750*750px"}},[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:{span:24}},[a("el-form-item",{attrs:{label:"主图视频:",prop:"video_link"}},[a("el-input",{staticClass:"perW50",attrs:{size:"small",placeholder:"请输入MP4格式的视频链接"},model:{value:t.videoLink,callback:function(e){t.videoLink=e},expression:"videoLink"}}),t._v(" "),a("input",{ref:"refid",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:t.zh_uploadFile_change}}),t._v(" "),a("el-button",{staticClass:"uploadVideo",attrs:{type:"primary",icon:"ios-cloud-upload-outline",size:"small"},on:{click:t.zh_uploadFile}},[t._v("\n "+t._s(t.videoLink?"确认添加":"上传视频")+"\n ")]),t._v(" "),a("el-col",{attrs:{span:12}},[t.upload.videoIng?a("el-progress",{staticStyle:{"margin-top":"10px"},attrs:{percentage:t.progress,"text-inside":!0,"stroke-width":20}}):t._e()],1),t._v(" "),a("el-col",{attrs:{span:24}},[t.formValidate.video_link?a("div",{staticClass:"iview-video-style"},[a("video",{staticStyle:{width:"100%",height:"100%!important","border-radius":"10px"},attrs:{src:t.formValidate.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")]),t._v(" "),a("div",{staticClass:"mark"}),t._v(" "),a("i",{staticClass:"el-icon-delete iconv",on:{click:t.delVideo}})]):t._e()])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"单位:",prop:"unit_name"}},[a("el-select",{staticClass:"perW50 mr10",attrs:{placeholder:"请选择",clearable:"",filterable:""},model:{value:t.formValidate.unit_name,callback:function(e){t.$set(t.formValidate,"unit_name",e)},expression:"formValidate.unit_name"}},t._l(t.unitList,(function(t){return a("el-option",{key:t.label,attrs:{label:t.label,value:t.label}})})),1),t._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.addUnit}},[t._v("\n 添加单位\n ")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品关键字:"}},[a("el-input",{staticClass:"pageWidth",attrs:{placeholder:"请输入商品关键字",size:"small"},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品简介:",prop:"store_info"}},[a("el-input",{staticClass:"pageWidth",attrs:{type:"textarea",rows:3,placeholder:"请输入商品简介",size:"small"},model:{value:t.formValidate.store_info,callback:function(e){t.$set(t.formValidate,"store_info",e)},expression:"formValidate.store_info"}})],1)],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.couponData,(function(e,i){return a("el-tag",{key:i,staticClass:"mr10",attrs:{closable:"","disable-transitions":!1},on:{close:function(a){return t.handleCloseCoupon(e)}}},[t._v(t._s(e.title)+"\n ")])})),t._v(" "),a("el-button",{staticClass:"mr15",attrs:{size:"mini"},on:{click:t.addCoupon}},[t._v("选择优惠券")])],2)])],1)],1):t._e(),t._v(" "),"2"==t.currentTab?a("el-row",[a("el-col",{attrs:{span:24}},[t.extensionStatus>0?a("el-form-item",{attrs:{label:"佣金设置:",props:"extension_type"}},[a("el-radio-group",{on:{change:function(e){return t.onChangetype(t.formValidate.extension_type)}},model:{value:t.formValidate.extension_type,callback:function(e){t.$set(t.formValidate,"extension_type",e)},expression:"formValidate.extension_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("单独设置")]),t._v(" "),a("el-radio",{attrs:{label:0}},[t._v("默认设置")])],1)],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:24}},[t.open_svip?a("el-form-item",{attrs:{label:"付费会员价设置:",props:"svip_price_type"}},[a("el-radio-group",{on:{change:function(e){return t.onChangeSpecs(t.formValidate.svip_price_type)}},model:{value:t.formValidate.svip_price_type,callback:function(e){t.$set(t.formValidate,"svip_price_type",e)},expression:"formValidate.svip_price_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("不设置会员价")]),t._v(" "),a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("默认设置会员价")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("自定义设置会员价")])],1)],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品规格:",props:"spec_type"}},[a("el-radio-group",{on:{change:function(e){return t.onChangeSpec(t.formValidate.spec_type)}},model:{value:t.formValidate.spec_type,callback:function(e){t.$set(t.formValidate,"spec_type",e)},expression:"formValidate.spec_type"}},[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(" "),1===t.formValidate.spec_type?a("el-col",{staticClass:"noForm",attrs:{span:24}},[a("el-form-item",{attrs:{label:"选择规格:"}},[a("div",{staticClass:"acea-row"},[a("el-select",{attrs:{size:"small"},model:{value:t.selectRule,callback:function(e){t.selectRule=e},expression:"selectRule"}},t._l(t.ruleList,(function(t){return a("el-option",{key:t.attr_template_id,attrs:{label:t.template_name,value:t.attr_template_id}})})),1),t._v(" "),a("el-button",{staticClass:"ml15",attrs:{type:"primary",size:"small"},on:{click:t.confirm}},[t._v("确认")]),t._v(" "),a("el-button",{staticClass:"ml15",attrs:{size:"small"},on:{click:t.addRule}},[t._v("添加规格模板")])],1)]),t._v(" "),t.formValidate.attr.length>0?a("el-form-item",t._l(t.formValidate.attr,(function(e,i){return a("div",{key:i},[a("div",{staticClass:"acea-row row-middle"},[a("span",{staticClass:"mr5"},[t._v(t._s(e.value))]),t._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(e){return t.handleRemoveAttr(i)}}})]),t._v(" "),a("div",{staticClass:"rulesBox"},[a("draggable",{model:{value:e.detail,callback:function(a){t.$set(e,"detail",a)},expression:"item.detail"}},t._l(e.detail,(function(i,r){return a("el-tag",{key:r,staticClass:"mb5 mr10 move-icon",staticStyle:{cursor:"pointer"},attrs:{closable:"",size:"medium","disable-transitions":!1},on:{close:function(a){return t.handleClose(e.detail,r)}}},[t._v(t._s(i)+"\n ")])})),1),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.detail.attrsVal,i)}},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&t._k(a.keyCode,"enter",13,a.key,"Enter")?null:t.createAttr(e.detail.attrsVal,i)}},model:{value:e.detail.attrsVal,callback:function(a){t.$set(e.detail,"attrsVal",a)},expression:"item.detail.attrsVal"}}):a("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:function(a){return t.showInput(e)}}},[t._v("+ 添加")])],1)])})),0):t._e(),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:{size:"small",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:{size:"small",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:"ml15",attrs:{type:"primary",size:"small"},on:{click:t.createAttrName}},[t._v("确定")]),t._v(" "),a("el-button",{attrs:{size:"small"},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",size:"small"},on:{click:t.addBtn}},[t._v("添加新规格")]),t._v(" "),a("el-button",{staticClass:"mr15",attrs:{type:"success",icon:"md-add",size:"small"},on:{click:t.generate}},[t._v("立即生成")])],1)],1):t._e(),t._v(" "),1===t.formValidate.spec_type&&t.formValidate.attr.length>0&&t.$route.params.id||!t.$route.params.id&&t.createProduct&&1===t.formValidate.spec_type?a("el-col",{staticClass:"noForm",attrs:{span:24}},[a("el-form-item",{staticClass:"labeltop",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:"acea-row row-between-wrapper",staticStyle:{cursor:"pointer"},on:{click:t.batchAttr}},[a("div",{staticStyle:{width:"45px"}},[t._v(t._s(t.oneFormBatch[0]["attr"]))]),t._v(" "),a("i",{staticClass:"el-icon-arrow-down"})])]}}],null,!1,552951624)}),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",attrs:{title:"750*750px"},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,772438934)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[0!=t.formValidate.svip_price_type?a("div",["付费会员价"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{disabled:1==t.formValidate.svip_price_type,size:"small","controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"付费会员价"!==t.formThead[i].title&&"商品编号"!==t.formThead[i].title&&"库存"!==t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0",size:"small","controls-position":"right"},on:{blur:function(a){return t.memberPrice(t.formThead[i],e.row)}},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"库存"===t.formThead[i].title&&2==t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small",disabled:""},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):"库存"===t.formThead[i].title&&2!=t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e()],1):a("div",["商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):"库存"===t.formThead[i].title&&2==t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small",disabled:""},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0",size:"small","controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})],1)]}}],null,!0)})})),t._v(" "),2==t.formValidate.type?[a("el-table-column",{attrs:{align:"center",label:"卡密设置","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[!e.row.cdkey||e.row.cdkey.list||e.row.stock?a("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(t.oneFormBatch[0],"oneFormBatch",0)}}},[t._v("已设置")]):a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.addVirtual(0,"oneFormBatch")}}},[t._v("添加卡密")])]}}],null,!1,4255000215)})]:t._e(),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,3204804055)}),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-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,3908853119)})]:t._e(),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"80"}},[[a("el-button",{staticClass:"submission",attrs:{type:"text",size:"small"},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}},[0===t.formValidate.spec_type?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,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i]&&t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[0!=t.formValidate.svip_price_type&&t.formThead[i]?a("div",["付费会员价"===t.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small",disabled:1==t.formValidate.svip_price_type,"controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"付费会员价"!==t.formThead[i].title&&"商品编号"!==t.formThead[i].title&&"库存"!==t.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},on:{blur:function(a){return t.memberPrice(t.formThead[i],e.row)}},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"库存"===t.formThead[i].title&&2==t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small",disabled:""},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):"库存"===t.formThead[i].title&&2!==t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e()],1):a("div",["商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small",disabled:"库存"===t.formThead[i].title&&2==t.formValidate.type,"controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})],1)]}}],null,!0)})})),t._v(" "),2==t.formValidate.type?[a("el-table-column",{attrs:{align:"center",label:"卡密设置","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[!e.row.cdkey||e.row.cdkey.list||e.row.stock?a("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(t.OneattrValue[0],"OneattrValue",0)}}},[t._v("已设置")]):a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.addVirtual(0,"OneattrValue")}}},[t._v("添加卡密")])]}}],null,!1,3227468485)})]:t._e(),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,3204804055)}),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-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,3908853119)})]:t._e()],2)],1):t._e(),t._v(" "),1===t.formValidate.spec_type&&t.formValidate.attr.length>0&&t.$route.params.id||!t.$route.params.id&&t.createProduct&&1===t.formValidate.spec_type||!t.$route.params.id&&t.formValidate.is_copy?a("el-form-item",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{key:"2",ref:"specsTable",staticClass:"tabNumWidth",attrs:{data:t.ManyAttrValue,border:"",size:"small"}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,i){return a("el-table-column",{key:i,attrs:{align:"center",label:t.manyTabTit[i].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",class:e.row.select?"selectOn":"",domProps:{textContent:t._s(e.row[i])}})]}}],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",attrs:{title:"750*750px"},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,1344940579)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[0!=t.formValidate.svip_price_type&&t.formThead[i]?a("div",["付费会员价"===t.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small",disabled:1==t.formValidate.svip_price_type,"controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"付费会员价"!==t.formThead[i].title&&"商品编号"!==t.formThead[i].title&&"库存"!==t.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},on:{blur:function(a){return t.memberPrice(t.formThead[i],e.row)}},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e(),t._v(" "),"库存"===t.formThead[i].title&&2==t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small",disabled:""},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):"库存"===t.formThead[i].title&&2!=t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):t._e()],1):a("div",["商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):"库存"===t.formThead[i].title&&2==t.formValidate.type?a("el-input",{staticClass:"priceBox",attrs:{type:"text",size:"small",disabled:""},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})],1)]}}],null,!0)})})),t._v(" "),2==t.formValidate.type?[a("el-table-column",{attrs:{align:"center",label:"卡密设置","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[!e.row.cdkey||e.row.cdkey&&!e.row.cdkey.list&&!e.row.stock?a("el-button",{attrs:{size:"small"},on:{click:function(a){return t.addVirtual(e.$index,"ManyAttrValue")}}},[t._v("添加卡密")]):a("span",{staticClass:"seeCatMy",on:{click:function(a){return t.seeVirtual(t.ManyAttrValue[e.$index],"ManyAttrValue",e.$index)}}},[t._v("已设置")])]}}],null,!1,2792790980)})]:t._e(),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{key:"1",attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,3204804055)}),t._v(" "),a("el-table-column",{key:"2",attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,3908853119)})]:t._e()],2)],1):t._e()],1)],1):t._e(),t._v(" "),"3"==t.currentTab?a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("vue-ueditor-wrap",{attrs:{config:t.myConfig},on:{beforeInit:t.addCustomDialog},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1)],1)],1):t._e(),t._v(" "),"4"==t.currentTab?a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品推荐:"}},[a("el-checkbox-group",{attrs:{size:"small"},on:{change:t.onChangeGroup},model:{value:t.checkboxGroup,callback:function(e){t.checkboxGroup=e},expression:"checkboxGroup"}},t._l(t.recommend,(function(e,i){return a("el-checkbox",{key:i,attrs:{label:e.value}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"店铺关联推荐:"}},[a("div",{staticClass:"acea-row"},[t._l(t.goodList,(function(e,i){return a("div",{key:i,staticClass:"pictrue"},[a("img",{attrs:{src:e.image}}),t._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.deleteRecommend(i)}}})])})),t._v(" "),t.goodList.length<18?a("div",{staticClass:"uploadCont"},[a("div",{staticClass:"upLoadPicBox",on:{click:t.openRecommend}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]):t._e()],2)])],1),t._v(" "),a("el-col",{attrs:{span:24}},[t.deductionStatus>0?a("el-form-item",{attrs:{label:"积分抵扣比例:"}},[a("el-radio-group",{on:{change:function(e){return t.changeIntergral(t.deduction_set)}},model:{value:t.deduction_set,callback:function(e){t.deduction_set=e},expression:"deduction_set"}},[a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("单独设置")]),t._v(" "),a("el-radio",{attrs:{label:-1}},[t._v("默认设置")])],1),t._v(" "),1==t.deduction_set?a("div",[a("el-input-number",{attrs:{min:0,size:"small","controls-position":"right",placeholder:"请输入抵扣比例"},model:{value:t.formValidate.integral_rate,callback:function(e){t.$set(t.formValidate,"integral_rate",e)},expression:"formValidate.integral_rate"}}),t._v("\n %\n ")],1):t._e()],1):t._e()],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"是否开启礼包:"}},[a("el-radio-group",{attrs:{disabled:!!t.$route.params.id},model:{value:t.formValidate.is_gift_bag,callback:function(e){t.$set(t.formValidate,"is_gift_bag",e)},expression:"formValidate.is_gift_bag"}},[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(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注:"}},[a("div",[t._v("1. 选择开启礼包后,不可修改")]),t._v(" "),a("div",[t._v("\n 2.\n 用户购买该分销礼包商品后,可自动成为分销员(即已成为分销员的用户在移动端看不到该分销礼包商品)\n ")]),t._v(" "),a("div",[t._v("\n 3.\n 该商品设置为分销礼包后会展示在平台后台的【分销】-【分销礼包】(即不会展示在平台后台-【商品列表】)\n ")])])],1)],1):t._e(),t._v(" "),"5"==t.currentTab?a("el-row",[a("el-col",[a("el-form-item",{attrs:{label:"支持退款:"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:55,"active-text":"开启","inactive-text":"关闭"},model:{value:t.formValidate.refund_switch,callback:function(e){t.$set(t.formValidate,"refund_switch",e)},expression:"formValidate.refund_switch"}})],1)],1),t._v(" "),t.deliveryList.length>0?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"送货方式:",prop:"delivery_way"}},[a("div",{staticClass:"acea-row"},[a("el-checkbox-group",{model:{value:t.formValidate.delivery_way,callback:function(e){t.$set(t.formValidate,"delivery_way",e)},expression:"formValidate.delivery_way"}},t._l(t.deliveryList,(function(e){return a("el-checkbox",{key:e.value,attrs:{label:e.value}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)])],1):t._e(),t._v(" "),(2==t.formValidate.delivery_way.length||1==t.formValidate.delivery_way.length&&2==t.formValidate.delivery_way[0])&&0==t.formValidate.type?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"是否包邮:"}},[a("el-radio-group",{model:{value:t.formValidate.delivery_free,callback:function(e){t.$set(t.formValidate,"delivery_free",e)},expression:"formValidate.delivery_free"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("否")]),t._v(" "),a("el-radio",{attrs:{label:1}},[t._v("是")])],1)],1)],1):t._e(),t._v(" "),0==t.formValidate.delivery_free&&(2==t.formValidate.delivery_way.length||1==t.formValidate.delivery_way.length&&2==t.formValidate.delivery_way[0])&&0==t.formValidate.type?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"运费模板:",prop:"temp_id"}},[a("div",{staticClass:"acea-row"},[a("el-select",{staticClass:"pageWidth",attrs:{size:"small",placeholder:"请选择"},model:{value:t.formValidate.temp_id,callback:function(e){t.$set(t.formValidate,"temp_id",e)},expression:"formValidate.temp_id"}},t._l(t.shippingList,(function(t){return a("el-option",{key:t.shipping_template_id,attrs:{label:t.name,value:t.shipping_template_id}})})),1),t._v(" "),a("el-button",{staticClass:"ml15",attrs:{size:"small"},on:{click:t.addTem}},[t._v("添加运费模板")])],1)])],1):t._e(),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",[a("el-form-item",{attrs:{label:"最少购买件数:"}},[a("el-input-number",{attrs:{min:0,size:"small","controls-position":"right",placeholder:"请输入购买件数"},model:{value:t.formValidate.once_min_count,callback:function(e){t.$set(t.formValidate,"once_min_count",e)},expression:"formValidate.once_min_count"}}),t._v("\n   "),a("span",{staticClass:"explanation"},[t._v("默认为0,则不限制购买件数")])],1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"限购类型:"}},[a("el-radio-group",{model:{value:t.formValidate.pay_limit,callback:function(e){t.$set(t.formValidate,"pay_limit",e)},expression:"formValidate.pay_limit"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("不限购")]),t._v(" "),a("el-radio",{attrs:{label:1}},[t._v("单次限购")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("长期限购")])],1)],1)],1),t._v(" "),0!=t.formValidate.pay_limit?a("el-col",{attrs:{span:24}},[a("el-col",[a("el-form-item",{attrs:{label:"限购数量:",prop:"once_max_count"}},[a("el-input-number",{attrs:{min:t.formValidate.once_min_count,size:"small","controls-position":"right",placeholder:"请输入购买件数"},model:{value:t.formValidate.once_max_count,callback:function(e){t.$set(t.formValidate,"once_max_count",e)},expression:"formValidate.once_max_count"}}),t._v("\n   单次限购是限制每次下单最多购买的数量,长期限购是限制一个用户总共可以购买的数量\n ")],1)],1)],1):t._e(),t._v(" "),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:{"controls-position":"right",placeholder:"请输入排序",size:"small"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台保障服务:"}},[a("div",{staticClass:"acea-row"},[a("el-select",{staticClass:"pageWidth",attrs:{placeholder:"请选择",clearable:"",size:"small"},model:{value:t.formValidate.guarantee_template_id,callback:function(e){t.$set(t.formValidate,"guarantee_template_id",e)},expression:"formValidate.guarantee_template_id"}},t._l(t.guaranteeList,(function(t){return a("el-option",{key:t.guarantee_template_id,attrs:{label:t.template_name,value:t.guarantee_template_id}})})),1),t._v(" "),a("el-button",{staticClass:"ml15",attrs:{size:"small"},on:{click:t.addServiceTem}},[t._v("添加服务说明模板")])],1)])],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台商品参数:"}},[a("el-cascader",{staticClass:"pageWidth",attrs:{options:t.sysSpecsSelect,props:t.propsMer,size:"small",filterable:"",clearable:""},on:{change:t.getSpecsList},model:{value:t.formValidate.param_temp_id,callback:function(e){t.$set(t.formValidate,"param_temp_id",e)},expression:"formValidate.param_temp_id"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",[a("el-table",{ref:"tableParameter",staticClass:"specsList",attrs:{border:"",size:"small",data:t.formValidate.params,"row-key":"parameter_value_id"}},[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:0==e.row.mer_id,size:"small",placeholder:"请输入参数名称"},model:{value:e.row.name,callback:function(a){t.$set(e.row,"name",a)},expression:"scope.row.name"}})]}}],null,!1,3728276579)}),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:{min:0,size:"small",placeholder:"请输入参数值"},model:{value:e.row.value,callback:function(a){t.$set(e.row,"value",a)},expression:"scope.row.value"}})]}}],null,!1,990074748)}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[0!=e.row.mer_id?a("el-button",{staticClass:"submission",attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.preventDefault(),t.delSpecs(e.$index)}}},[t._v("删除")]):t._e()]}}],null,!1,3387162105)})],1)],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"自定义参数模板:"}},[a("el-select",{staticClass:"pageWidth",attrs:{multiple:"",placeholder:"添加自定义参数模板",size:"small"},on:{change:t.getSpecsList},model:{value:t.customSpecs,callback:function(e){t.customSpecs=e},expression:"customSpecs"}},t._l(t.merSpecsSelect,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),t._v(" "),a("el-button",{attrs:{type:"defalut",size:"small"},on:{click:t.addSpecs}},[t._v("添加参数")])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"关联系统表单:"}},[a("el-select",{staticClass:"pageWidth",attrs:{size:"small",clearable:""},on:{change:t.getFormInfo},model:{value:t.formValidate.mer_form_id,callback:function(e){t.$set(t.formValidate,"mer_form_id",e)},expression:"formValidate.mer_form_id"}},t._l(t.formList,(function(e){return a("el-option",{key:e.form_id,attrs:{value:e.form_id,label:e.name}},[t._v(t._s(e.name)+"\n ")])})),1),t._v(" "),a("div",{staticClass:"explanation"},[t._v("注:添加系统表单后,商品不可加入购物车,添加系统表单,请前往:装修>系统表单")])],1)],1),t._v(" "),a("el-col",{attrs:{span:16}},[t.formValidate.mer_form_id?a("el-form-item",[a("div",{staticStyle:{width:"350px"}},[a("iframe",{ref:"iframe",staticClass:"iframe-box",attrs:{id:"iframe",src:t.formUrl,frameborder:"0"}})])]):t._e()],1)],1):t._e(),t._v(" "),a("el-form-item",{staticStyle:{"margin-top":"30px"}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:t.currentTab>1,expression:"currentTab > 1"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:t.handleSubmitUp}},[t._v("上一步\n ")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:t.currentTab<5,expression:"currentTab < 5"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSubmitNest("formValidate")}}},[t._v("下一步\n ")]),t._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"5"==t.currentTab||t.$route.params.id,expression:"currentTab == '5' || $route.params.id"}],staticClass:"submission",attrs:{loading:t.loading,type:"primary",size:"small"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交\n ")]),t._v(" "),a("el-button",{staticClass:"submission",attrs:{loading:t.loading,type:"primary",size:"small"},on:{click:function(e){return t.handlePreview("formValidate")}}},[t._v("预览\n ")])],1)],1)],1),t._v(" "),t.attrShow?a("el-dialog",{attrs:{visible:t.attrShow,title:"请选择商品规格",width:"320px"},on:{"update:visible":function(e){t.attrShow=e}}},[t.attrShow?a("attr-list",{attrs:{attrs:t.attrsList},on:{activeData:t.activeAttr,close:t.labelAttr,subAttrs:t.subAttrs}}):t._e()],1):t._e(),t._v(" "),a("guarantee-service",{ref:"serviceGuarantee",on:{"get-list":t.getGuaranteeList}}),t._v(" "),t.previewVisible?a("div",[a("div",{staticClass:"bg",on:{click:function(e){e.stopPropagation(),t.previewVisible=!1}}}),t._v(" "),t.previewVisible?a("preview-box",{ref:"previewBox",attrs:{"preview-key":t.previewKey}}):t._e()],1):t._e(),t._v(" "),a("tao-bao",{ref:"taoBao",on:{"info-data":t.infoData}}),t._v(" "),a("add-carMy",{ref:"addCarMy",attrs:{virtualList:t.virtualList},on:{changeVirtual:t.changeVirtual,fixdBtn:t.fixdBtn,closeCarMy:t.closeCarMy}}),t._v(" "),a("el-dialog",{attrs:{visible:t.recommendVisible,title:"推荐商品列表",width:"900px"},on:{"update:visible":function(e){t.recommendVisible=e}}},[t.recommendVisible?a("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0,product_id:t.product_id,selectedArr:t.goodList},on:{getProductId:t.getRecommend,close:t.closeRecommend}}):t._e()],1)],1)},r=[],s=(a("55dd"),a("c7eb")),l=(a("96cf"),a("1da1")),o=(a("a481"),a("ade3")),n=(a("8615"),a("6762"),a("2fdb"),a("c5f6"),a("6b54"),a("2909")),c=(a("28a5"),a("7f7f"),a("ac6a"),a("b85c")),d=a("ef0d"),u=a("6625"),m=a.n(u),p=a("1980"),f=a.n(p),h=a("aa47"),_=a("c4c8"),g=a("83d6"),v=a("ae43"),b=a("8c98"),y=a("7acc"),w=a("c4ad"),V=a("bbcc"),x=a("5f87"),k=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"Box"},[t.modals?a("el-dialog",{attrs:{visible:t.modals,width:"70%",title:"商品采集","custom-class":"dialog-scustom"},on:{"update:visible":function(e){t.modals=e}}},[a("el-card",[a("div",[t._v("复制淘宝、天猫、京东、苏宁、1688;")]),t._v("\n 生成的商品默认是没有上架的,请手动上架商品!\n "),a("span",{staticStyle:{color:"#F56464"}},[t._v("商品复制次数剩余:"+t._s(t.count)+"次")]),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/setting/sms/sms_pay/index?type=copy"}}},[a("el-button",{attrs:{size:"small",type:"text"}},[t._v("增加采集次数")])],1),t._v(" "),a("el-button",{staticStyle:{"margin-left":"15px"},attrs:{size:"small",type:"primary"},on:{click:t.openRecords}},[t._v("查看商品复制记录")])],1),t._v(" "),a("el-form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{model:t.formValidate,rules:t.ruleInline,"label-width":"130px","label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"链接地址:"}},[a("el-input",{staticClass:"numPut",attrs:{search:"",placeholder:"请输入链接地址"},model:{value:t.soure_link,callback:function(e){t.soure_link=e},expression:"soure_link"}}),t._v(" "),a("el-button",{attrs:{loading:t.loading,size:"small",type:"primary"},on:{click:t.add}},[t._v("确定")])],1)],1)],1):t._e(),t._v(" "),a("copy-record",{ref:"copyRecord"})],1)},C=[],$=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.showRecord?a("el-dialog",{attrs:{title:"复制记录",visible:t.showRecord,width:"900px"},on:{"update:visible":function(e){t.showRecord=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID",prop:"mer_id","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"使用次数",prop:"num","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"复制商品平台名称",prop:"type","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"剩余次数",prop:"number","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品复制链接",prop:"info","min-width":"180"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作时间",prop:"create_time","min-width":"120"}})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)]):t._e()},L=[],B={name:"CopyRecord",data:function(){return{showRecord:!1,loading:!1,tableData:{data:[],total:0},tableFrom:{page:1,limit:10}}},methods:{getRecord:function(){var t=this;this.showRecord=!0,this.loading=!0,Object(_["gb"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.loading=!1})).catch((function(e){t.$message.error(e.message),t.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getRecord()},pageChangeLog:function(t){this.tableFromLog.page=t,this.getRecord()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getRecord()}}},O=B,S=(a("7824"),a("2877")),T=Object(S["a"])(O,$,L,!1,null,"56bb8d40",null),F=T.exports,z={store_name:"",cate_id:"",temp_id:"",type:0,guarantee_template_id:"",keyword:"",unit_name:"",store_info:"",image:"",slider_image:[],content:"",ficti:0,once_count:0,give_integral:0,is_show:0,price:0,cost:0,ot_price:0,stock:0,soure_link:"",attrs:[],items:[],delivery_way:[],mer_labels:[],delivery_free:0,spec_type:0,is_copoy:1,attrValue:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]},A={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量(KG)"},volume:{title:"体积(m³)"}},j={name:"CopyTaoBao",components:{ueditorFrom:d["a"],copyRecord:F},data:function(){var t=V["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(x["a"])();return{roterPre:g["roterPre"],modals:!1,loading:!1,loading1:!1,BaseURL:V["a"].https||"http://localhost:8080",OneattrValue:[Object.assign({},z.attrValue[0])],ManyAttrValue:[Object.assign({},z.attrValue[0])],columnsBatch:[{title:"图片",slot:"image",align:"center",minWidth:80},{title:"售价",slot:"price",align:"center",minWidth:95},{title:"成本价",slot:"cost",align:"center",minWidth:95},{title:"市场价",slot:"ot_price",align:"center",minWidth:95},{title:"库存",slot:"stock",align:"center",minWidth:95},{title:"商品编号",slot:"bar_code",align:"center",minWidth:120},{title:"重量(KG)",slot:"weight",align:"center",minWidth:95},{title:"体积(m³)",slot:"volume",align:"center",minWidth:95}],manyTabDate:{},count:0,modal_loading:!1,images:"",soure_link:"",modalPic:!1,isChoice:"",gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},columns:[],virtual:[{tit:"普通商品",id:0,tit2:"物流发货"},{tit:"虚拟商品",id:1,tit2:"虚拟发货"}],categoryList:[],merCateList:[],BrandList:[],propsMer:{emitPath:!1,multiple:!0},tableFrom:{mer_cate_id:"",cate_id:"",keyword:"",type:"1",is_gift_bag:""},ruleInline:{cate_id:[{required:!0,message:"请选择商品分类",trigger:"change"}],mer_cate_id:[{required:!0,message:"请选择商户分类",trigger:"change",type:"array",min:"1"}],temp_id:[{required:!0,message:"请选择运费模板",trigger:"change",type:"number"}],brand_id:[{required:!0,message:"请选择品牌",trigger:"change"}],store_info:[{required:!0,message:"请输入商品简介",trigger:"blur"}],delivery_way:[{required:!0,message:"请选择送货方式",trigger:"change"}]},grid:{xl:8,lg:8,md:12,sm:24,xs:24},grid2:{xl:12,lg:12,md:12,sm:24,xs:24},myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",UEDITOR_HOME_URL:"/UEditor/",serverUrl:t,imageUrl:t,imageFieldName:"file",imageUrlPrefix:"",imageActionName:"upfile",imageMaxSize:2048e3,imageAllowFiles:[".png",".jpg",".jpeg",".gif",".bmp"]},formThead:Object.assign({},A),formValidate:Object.assign({},z),items:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}],shippingList:[],guaranteeList:[],isData:!1,artFrom:{type:"taobao",url:""},tableIndex:0,labelPosition:"right",labelWidth:"120",isMore:"",taoBaoStatus:{},attrInfo:{},labelList:[],oneFormBatch:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]}},computed:{attrValue:function(){var t=Object.assign({},z.attrValue[0]);return delete t.image,t}},watch:{},created:function(){},mounted:function(){this.getCopyCount()},methods:{getLabelLst:function(){var t=this;Object(_["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCopyCount:function(){var t=this;Object(_["fb"])().then((function(e){t.count=e.data.count}))},openRecords:function(){this.$refs.copyRecord.getRecord()},batchDel:function(){this.oneFormBatch=[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]},batchAdd:function(){var t,e=Object(c["a"])(this.ManyAttrValue);try{for(e.s();!(t=e.n()).done;){var a=t.value;this.$set(a,"image",this.oneFormBatch[0].image),this.$set(a,"price",this.oneFormBatch[0].price),this.$set(a,"cost",this.oneFormBatch[0].cost),this.$set(a,"ot_price",this.oneFormBatch[0].ot_price),this.$set(a,"stock",this.oneFormBatch[0].stock),this.$set(a,"bar_code",this.oneFormBatch[0].bar_code),this.$set(a,"weight",this.oneFormBatch[0].weight),this.$set(a,"volume",this.oneFormBatch[0].volume),this.$set(a,"extension_one",this.oneFormBatch[0].extension_one),this.$set(a,"extension_two",this.oneFormBatch[0].extension_two)}}catch(i){e.e(i)}finally{e.f()}},delAttrTable:function(t){this.ManyAttrValue.splice(t,1)},productGetTemplate:function(){var t=this;Object(_["Db"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(_["G"])().then((function(e){t.guaranteeList=e.data}))},handleRemove:function(t){this.formValidate.slider_image.splice(t,1)},checked:function(t,e){this.formValidate.image=t},goodsCategory:function(){var t=this;Object(_["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategorySelect:function(){var t=this;Object(_["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(_["s"])().then((function(e){t.BrandList=e.data})).catch((function(e){t.$message.error(e.message)}))},virtualbtn:function(t,e){this.formValidate.type=t,this.productCon()},watCh:function(t){var e=this,a={},i={};this.formValidate.attr.forEach((function(t,e){a["value"+e]={title:t.value},i["value"+e]=""})),this.ManyAttrValue=this.attrFormat(t),console.log(this.ManyAttrValue),this.ManyAttrValue.forEach((function(t,a){var i=Object.values(t.detail).sort().join("/");e.attrInfo[i]&&(e.ManyAttrValue[a]=e.attrInfo[i]),t.image=e.formValidate.image})),this.attrInfo={},this.ManyAttrValue.forEach((function(t){"undefined"!==t.detail&&null!==t.detail&&(e.attrInfo[Object.values(t.detail).sort().join("/")]=t)})),this.manyTabTit=a,this.manyTabDate=i,this.formThead=Object.assign({},this.formThead,a)},attrFormat:function(t){var e=[],a=[];return i(t);function i(t){if(t.length>1)t.forEach((function(i,r){0===r&&(e=t[r]["detail"]);var s=[];e.forEach((function(e){t[r+1]&&t[r+1]["detail"]&&t[r+1]["detail"].forEach((function(i){var l=(0!==r?"":t[r]["value"]+"_$_")+e+"-$-"+t[r+1]["value"]+"_$_"+i;if(s.push(l),r===t.length-2){var o={image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0,brokerage:0,brokerage_two:0};l.split("-$-").forEach((function(t,e){var a=t.split("_$_");o["detail"]||(o["detail"]={}),o["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(o.detail).forEach((function(t,e){o["value"+e]=t})),a.push(o)}}))})),e=s.length?s:[]}));else{var i=[];t.forEach((function(t,e){t["detail"].forEach((function(e,r){i[r]=t["value"]+"_"+e,a[r]={image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,detail:Object(o["a"])({},t["value"],e)},Object.values(a[r].detail).forEach((function(t,e){a[r]["value"+e]=t}))}))})),e.push(i.join("$&"))}return console.log(a),a}},add:function(){var t=this;if(this.soure_link){var e=/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;if(!e.test(this.soure_link))return this.$message.warning("请输入以http开头的地址!");this.artFrom.url=this.soure_link,this.loading=!0,Object(_["v"])(this.artFrom).then((function(e){var a=e.data;t.modals=!1,t.$emit("info-data",a)})).catch((function(e){t.$message.error(e.message),t.loading=!1}))}else this.$message.warning("请输入链接地址!")},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){t?(e.modal_loading=!0,e.formValidate.cate_id=e.formValidate.cate_id instanceof Array?e.formValidate.cate_id.pop():e.formValidate.cate_id,e.formValidate.once_count=e.formValidate.once_count||0,1==e.formValidate.spec_type?e.formValidate.attrValue=e.ManyAttrValue:(e.formValidate.attrValue=e.OneattrValue,e.formValidate.attr=[]),e.formValidate.is_copoy=1,e.loading1=!0,Object(_["eb"])(e.formValidate).then((function(t){e.$message.success("商品默认为不上架状态请手动上架商品!"),e.loading1=!1,setTimeout((function(){e.modal_loading=!1}),500),setTimeout((function(){e.modals=!1}),600),e.$emit("getSuccess")})).catch((function(t){e.modal_loading=!1,e.$message.error(t.message),e.loading1=!1}))):e.formValidate.cate_id||e.$message.warning("请填写商品分类!")}))},modalPicTap:function(t,e,a){this.tableIndex=a;var i=this;this.$modalUpload((function(e){console.log(i.formValidate.attr[i.tableIndex]),"1"===t&&("pi"===a?i.oneFormBatch[0].image=e[0]:i.OneattrValue[0].image=e[0]),"2"===t&&(i.ManyAttrValue[i.tableIndex].image=e[0]),i.modalPic=!1}),t)},getPic:function(t){this.callback(t),this.formValidate.attr[this.tableIndex].pic=t.att_dir,this.modalPic=!1},handleDragStart:function(t,e){this.dragging=e},handleDragEnd:function(t,e){this.dragging=null},handleDragOver:function(t){t.dataTransfer.dropEffect="move"},handleDragEnter:function(t,e){if(t.dataTransfer.effectAllowed="move",e!==this.dragging){var a=Object(n["a"])(this.formValidate.slider_image),i=a.indexOf(this.dragging),r=a.indexOf(e);a.splice.apply(a,[r,0].concat(Object(n["a"])(a.splice(i,1)))),this.formValidate.slider_image=a}},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});this.dialog=a;var i=new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){a.render(),a.open()}});return i}))}}},M=j,D=(a("1f69"),Object(S["a"])(M,k,C,!1,null,"356141d4",null)),E=D.exports,P=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{visible:t.carMyShow,title:"添加卡密",width:"600px"},on:{"update:visible":function(e){t.carMyShow=e}}},[a("div",{staticClass:"carMywrapper"},[a("div",{staticClass:"type-radio"},[a("el-form",{attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"卡密类型:"}},[a("el-radio-group",{attrs:{size:"large"},model:{value:t.fixedCar.is_type,callback:function(e){t.$set(t.fixedCar,"is_type",e)},expression:"fixedCar.is_type"}},[a("el-radio",{attrs:{label:0}},[t._v("固定卡密")])],1),t._v(" "),0==t.fixedCar.is_type?a("div",[a("div",{staticClass:"stock-disk"},[a("el-input",{attrs:{size:"small",type:"textarea",rows:4,placeholder:"填写卡密信息"},model:{value:t.fixedCar.key,callback:function(e){t.$set(t.fixedCar,"key",e)},expression:"fixedCar.key"}})],1),t._v(" "),a("div",{staticClass:"stock-input"},[a("el-input-number",{attrs:{min:1,label:"填写库存数量"},model:{value:t.fixedCar.stock,callback:function(e){t.$set(t.fixedCar,"stock",e)},expression:"fixedCar.stock"}}),t._v(" 件 \n\t\t\t\t\t ")],1)]):t._e(),t._v(" "),1==t.fixedCar.is_type?a("div",{staticClass:"scroll-virtual"},t._l(t.virtualList,(function(e,i){return a("div",{key:i,staticClass:"acea-row row-middle mb10"},[a("span",{staticClass:"mr10 virtual-title"},[t._v("卡号"+t._s(i+1)+":")]),t._v(" "),a("el-input",{staticClass:"mr10 width15",attrs:{type:"text",size:"small",placeholder:"请输入卡号(非必填)"},model:{value:e.key,callback:function(a){t.$set(e,"key","string"===typeof a?a.trim():a)},expression:"item.key"}}),t._v(" "),a("span",{staticClass:"mr10 virtual-title"},[t._v("卡密"+t._s(i+1)+":")]),t._v(" "),a("el-input",{staticClass:"mr10 width15",attrs:{type:"text",placeholder:"请输入卡密",size:"small"},model:{value:e.pwd,callback:function(a){t.$set(e,"pwd","string"===typeof a?a.trim():a)},expression:"item.pwd"}}),t._v(" "),a("span",{staticClass:"deteal-btn",on:{click:function(e){return t.removeVirtual(i)}}},[t._v("删除")])],1)})),0):t._e(),t._v(" "),1==t.fixedCar.is_type?a("div",{staticClass:"add-more"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.handleAdd}},[t._v("添加卡密")]),t._v(" "),a("el-upload",{ref:"upload",staticClass:"ml10",staticStyle:{display:"inline-block"},attrs:{action:t.cardUrl,"before-upload":t.beforeUpload,headers:t.header,"on-success":t.upFile,format:["xlsx"],"on-format-error":t.handleFormatError}})],1):t._e()],1)],1)],1),t._v(" "),a("div",{staticClass:"footer"},[a("el-button",{staticClass:"btns",attrs:{type:"primary",size:"small"},on:{click:t.cancel}},[t._v("取消")]),t._v(" "),a("el-button",{staticClass:"btns",attrs:{type:"primary",size:"small"},on:{click:t.subBtn}},[t._v("确定")])],1)])])},R=[],I=a("2e83"),U={name:"addCarMy",props:{virtualList:{type:Array,default:function(){return[]}}},data:function(){return{carMyShow:!1,fixedCar:{is_type:0,key:"",stock:0},cardUrl:V["a"].https+"/file/upload/1",header:{}}},computed:{},created:function(){},mounted:function(){},methods:{getCarMyList:function(){var t=Object(l["a"])(Object(s["a"])().mark((function t(){var e,a,i,r,l;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=[],a=[],i=[],r="",t.next=3,this.getExcelData();case 3:l=t.sent,r||(r=l.filename),a.length||(a=l.filekey),e.length||(e=l.header),i=l.export,Object(I["a"])(e,a,r,i);case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getExcelData:function(){return new Promise((function(t,e){Object(_["exportProductCard"])().then((function(e){return t(e.data)}))}))},removeVirtual:function(t){this.virtualList.splice(t,1)},upFile:function(t){var e=this;Object(_["importCard"])({file:t.data.src}).then((function(t){e.$emit("changeVirtual",JSON.parse(JSON.stringify(t.data)))})).catch((function(t){return e.$Message.error(t.msg)}))},handleFormatError:function(t){return this.$Message.error("必须上传xlsx格式文件")},getToken:function(){this.header["Authori-zation"]="Bearer "+Object(x["a"])()},cancel:function(){this.$emit("closeCarMy")},handleAdd:function(){this.virtualList.push({key:"",pwd:""})},beforeUpload:function(){var t=this,e=new Promise((function(e){t.$nextTick((function(){e(!0)}))}));return e},subBtn:function(){if(0==this.fixedCar.is_type){if(""==this.fixedCar.key)return this.$message.error("请填写卡密信息");if(!this.fixedCar.stock)return this.$message.error("请填写库存数量");this.$emit("fixdBtn",JSON.parse(JSON.stringify(this.fixedCar)))}else{for(var t={is_type:1,list:this.virtualList},e=0;e table > tbody")[0];this.sortable=h["default"].create(e,{ghostClass:"sortable-ghost",setData:function(t){t.setData("Text","")},onEnd:function(e){t.elChangeExForArray(e.oldIndex,e.newIndex,t.formValidate.params)}})},elChangeExForArray:function(t,e,a){var i=a[t];return a[t]=a[e],a[e]=i,a},goBack:function(){sessionStorage.clear(),window.history.back()},handleCloseCoupon:function(t){var e=this;this.formValidate.couponData.splice(this.formValidate.couponData.indexOf(t),1),this.formValidate.give_coupon_ids=[],this.formValidate.couponData.map((function(t){e.formValidate.give_coupon_ids.push(t.coupon_id)}))},doCombination:function(t){var e=t.length-1,a=[],i=[];return r(t,0);function r(t,s){var l,o=Object(c["a"])(t[s]);try{for(o.s();!(l=o.n()).done;){var n=l.value;a[s]=n,s1)t.forEach((function(a,r){0===r&&(e=t[r]["detail"]);var s=[];e.forEach((function(e){t[r+1]&&t[r+1]["detail"]&&t[r+1]["detail"].forEach((function(a){var l=(0!==r?"":t[r]["value"]+"_$_")+e+"-$-"+t[r+1]["value"]+"_$_"+a;if(s.push(l),r===t.length-2){var o={image:"",price:0,cost:0,ot_price:0,select:!0,sku:"",stock:0,cdkey:{},bar_code:"",weight:0,volume:0,extension_one:0,extension_two:0};l.split("-$-").forEach((function(t,e){var a=t.split("_$_");o["detail"]||(o["detail"]={}),o["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(o.detail).forEach((function(t,e){o["value"+e]=t})),i.push(o)}}))})),e=s.length?s:[]}));else{var r=[];t.forEach((function(t,e){t["detail"].forEach((function(e,a){r[a]=t["value"]+"_"+e,i[a]={image:"",price:0,cost:0,ot_price:0,select:!0,sku:"",stock:0,cdkey:{},bar_code:"",weight:0,volume:0,extension_one:0,extension_two:0,detail:Object(o["a"])({},t["value"],e)},Object.values(i[a].detail).forEach((function(t,e){i[a]["value"+e]=t}))}))})),e.push(r.join("$&"))}return a.generateArr.length>0&&a.generateArr.forEach((function(t,e){i[e]["image"]=t.pic,i[e]["price"]=t.price,i[e]["cost"]=t.cost,i[e]["ot_price"]=t.ot_price,i[e]["sku"]=t.sku,i[e]["stock"]=t.stock,i[e]["unique"]=t.unique,i[e]["bar_code"]=t.bar_code,i[e]["volume"]=t.volume,i[e]["weight"]=t.weight,i[e]["extension_one"]=t.extension_one,i[e]["extension_two"]=t.extension_two,i[e]["cdkey"]=t.cdkey&&t.cdkey.length&&t.cdkey[0]||null,i[e]["svip_price"]=t.svip_price||""})),i}},addTem:function(){var t=this;this.$modalTemplates(0,(function(){t.getShippingList()}))},addServiceTem:function(){this.$refs.serviceGuarantee.add()},delVideo:function(){var t=this;t.$set(t.formValidate,"video_link","")},zh_uploadFile:function(){this.videoLink?this.formValidate.video_link=this.videoLink:this.$refs.refid.click()},zh_uploadFile_change:function(t){var e=this;e.progress=10;var a=t.target.files[0].name.substr(t.target.files[0].name.indexOf("."));if(".mp4"!==a)return e.$message.error("只能上传MP4文件");Object(_["kb"])().then((function(a){e.$videoCloud.videoUpload({type:a.data.type,evfile:t,res:a,uploading:function(t,a){e.upload.videoIng=t}}).then((function(t){e.formValidate.video_link=t.url||t.data.src,e.$message.success("视频上传成功"),e.progress=100})).catch((function(t){e.upload.videoIng=!1,e.$message.error(t.msg&&t.msg.message||t.message)}))}))},addRule:function(){var t=this;this.$modalAttr(this.formDynamics,(function(){t.productGetRule()}))},onChangeSpec:function(t){1===t&&this.productGetRule()},changeIntergral:function(t){this.formValidate.integral_rate=-1==t?-1:this.formValidate.integral_rate},confirm:function(){var t=this;if(!this.selectRule)return this.$message.warning("请选择属性");this.ruleList.forEach((function(e){e.attr_template_id===t.selectRule&&(t.formValidate.attr=e.template_value,t.attrs=e.template_value)})),this.addmanyData(this.ManyAttrValue),this.getAttr()},addmanyData:function(t){t.forEach((function(t){t.select=!0})),this.ManyAttrValue=t},batchAttr:function(){this.attrShow=!0},activeAttr:function(t){this.attrsList=t},labelAttr:function(){this.attrShow=!1},getAttr:function(){this.oneFormBatch[0].attr="全部";var t=this.attrs;t.map((function(t){t.details=[],t.detail.map((function(e){t.details.push({name:e,select:!1})}))})),this.attrsList=t},getCategorySelect:function(){var t=this;Object(_["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategoryList:function(){var t=this;Object(_["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(_["s"])().then((function(e){t.BrandList=e.data})).catch((function(e){t.$message.error(e.message)}))},productGetRule:function(){var t=this;Object(_["Ub"])().then((function(e){t.ruleList=e.data}))},getShippingList:function(){var t=this;Object(_["Db"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(_["G"])().then((function(e){t.guaranteeList=e.data}))},showInput:function(t){this.$set(t,"inputVisible",!0)},virtualbtn:function(t,e){if(this.$route.params.id)return this.$message.warning("商品类型不能切换!");this.formValidate.type=t,this.productCon()},customMessBtn:function(t){t||(this.formValidate.extend=[])},addcustom:function(){this.formValidate.extend.length>9?this.$message.warning("最多添加10条"):this.formValidate.extend.push({title:"",key:"text",value:"",require:!1})},delcustom:function(t){this.formValidate.extend.splice(t,1)},onChangetype:function(t){var e=this;1===t?(this.OneattrValue.map((function(t){e.$set(t,"extension_one",null),e.$set(t,"extension_two",null)})),this.ManyAttrValue.map((function(t){e.$set(t,"extension_one",null),e.$set(t,"extension_two",null)}))):(this.OneattrValue.map((function(t){delete t.extension_one,delete t.extension_two,e.$set(t,"extension_one",null),e.$set(t,"extension_two",null)})),this.ManyAttrValue.map((function(t){delete t.extension_one,delete t.extension_two})))},onChangeSpecs:function(t){if(1==t||2==t&&this.open_svip){this.formThead.svip_price={title:"付费会员价"},this.attrVal={price:null,cost:null,ot_price:null,svip_price:null,stock:null,bar_code:"",weight:null,volume:null},this.OneattrValue[0]["svip_price"]=this.OneattrValue[0]["price"]?this.accMul(this.OneattrValue[0]["price"],this.svip_rate):0;var e,a=0,i=Object(c["a"])(this.ManyAttrValue);try{for(i.s();!(e=i.n()).done;){var r=e.value;a=r.price?this.accMul(r.price,this.svip_rate):0,this.$set(r,"svip_price",a)}}catch(s){i.e(s)}finally{i.f()}}else delete this.formThead.svip_price,this.attrVal={price:null,cost:null,ot_price:null,stock:null,bar_code:"",weight:null,volume:null}},memberPrice:function(t,e){"售价"==t.title&&(e.svip_price=this.accMul(e.price,this.svip_rate))},accMul:function(t,e){var a=0,i=t.toString(),r=e.toString();try{a+=i.split(".")[1].length}catch(s){}try{a+=r.split(".")[1].length}catch(s){}return Number(i.replace(".",""))*Number(r.replace(".",""))/Math.pow(10,a)},delAttrTable:function(t){this.ManyAttrValue.splice(t,1)},batchAdd:function(){var t,e=Object(c["a"])(this.ManyAttrValue);try{for(e.s();!(t=e.n()).done;){var a=t.value;a.select&&(""!=this.oneFormBatch[0].attr&&this.$set(a,"attr",this.oneFormBatch[0].attr),""!=this.oneFormBatch[0].image&&this.$set(a,"image",this.oneFormBatch[0].image),null!=this.oneFormBatch[0].price&&""!=this.oneFormBatch[0].price&&this.$set(a,"price",this.oneFormBatch[0].price),null!=this.oneFormBatch[0].cost&&""!=this.oneFormBatch[0].cost&&this.$set(a,"cost",this.oneFormBatch[0].cost),null!=this.oneFormBatch[0].ot_price&&""!=this.oneFormBatch[0].ot_price&&this.$set(a,"ot_price",this.oneFormBatch[0].ot_price),null!=this.oneFormBatch[0].svip_price&&""!=this.oneFormBatch[0].svip_price&&this.$set(a,"svip_price",this.oneFormBatch[0].svip_price),null!=this.oneFormBatch[0].stock&&""!=this.oneFormBatch[0].stock&&this.$set(a,"stock",this.oneFormBatch[0].stock),null!=this.oneFormBatch[0].bar_code&&""!=this.oneFormBatch[0].bar_code&&this.$set(a,"bar_code",this.oneFormBatch[0].bar_code),null!=this.oneFormBatch[0].weight&&""!=this.oneFormBatch[0].weight&&this.$set(a,"weight",this.oneFormBatch[0].weight),null!=this.oneFormBatch[0].volume&&""!=this.oneFormBatch[0].volume&&this.$set(a,"volume",this.oneFormBatch[0].volume),null!=this.oneFormBatch[0].extension_one&&""!=this.oneFormBatch[0].extension_one&&this.$set(a,"extension_one",this.oneFormBatch[0].extension_one),null!=this.oneFormBatch[0].extension_two&&""!=this.oneFormBatch[0].extension_two&&this.$set(a,"extension_two",this.oneFormBatch[0].extension_two),2==this.formValidate.type&&(a.cdkey={},1==this.oneFormBatch[0]["cdkey"].is_type?this.oneFormBatch[0]["cdkey"].list&&this.oneFormBatch[0]["cdkey"].list.length&&(this.$set(a.cdkey,"list",this.oneFormBatch[0]["cdkey"].list),this.$set(a,"stock",this.oneFormBatch[0]["cdkey"].list.length)):this.oneFormBatch[0]["cdkey"].key&&this.$set(a.cdkey,"key",this.oneFormBatch[0]["cdkey"].key),this.$set(a.cdkey,"is_type",this.oneFormBatch[0]["cdkey"].is_type)))}}catch(i){e.e(i)}finally{e.f()}},addBtn:function(){this.clearAttr(),this.isBtn=!0,this.addGenerate=!0},offAttrName:function(){this.isBtn=!1},clearAttr:function(){this.formDynamic.attrsName="",this.formDynamic.attrsVal=""},handleRemoveAttr:function(t){this.formValidate.attr.splice(t,1),this.ManyAttrValue.splice(t,1)},handleClose:function(t,e){t.splice(e,1),this.attrs=this.formValidate.attr},createAttrName:function(){if(this.formDynamic.attrsName&&this.formDynamic.attrsVal){var t={value:this.formDynamic.attrsName,detail:[this.formDynamic.attrsVal]};this.formValidate.attr.push(t);var e={};this.formValidate.attr=this.formValidate.attr.reduce((function(t,a){return!e[a.value]&&(e[a.value]=t.push(a)),t}),[]),this.clearAttr(),this.attrs=this.formValidate.attr,this.isGenerate=!0,this.isBtn=!1}else this.$message.warning("请添加完整的规格!")},createAttr:function(t,e){if(t){this.formValidate.attr[e].detail.push(t);var a={};this.formValidate.attr[e].detail=this.formValidate.attr[e].detail.reduce((function(t,e){return!a[e]&&(a[e]=t.push(e)),t}),[]),this.formValidate.attr[e].inputVisible=!1}else this.$message.warning("请添加属性");this.attrs=this.formValidate.attr},generate:function(){var t=this,e=this.$route.params.id||0;Object(_["z"])(e,{attrs:this.formValidate.attr,product_type:this.formValidate.product_type}).then((function(e){var a=e.data;t.generateArr=t.formValidate.is_copy?t.formValidate.value:e.data.value,t.formValidate.attr=e.data.attr,t.createProduct=!0,t.isGenerate=!0,"0"!==t.$route.params.id&&t.addmanyData(a.value),t.$route.params.id||1!==t.formValidate.spec_type||(t.ManyAttrValue.map((function(e){e.image=1!=t.formValidate.is_copy?t.formValidate.slider_image[0]:e.pic})),t.oneFormBatch[0].pic=t.formValidate.slider_image[0]),t.getAttr()})).catch((function(e){t.$message.error(e.message)}))},getInfo:function(){var t=this;this.fullscreenLoading=!0,Object(_["jb"])(this.$route.params.id).then(function(){var e=Object(l["a"])(Object(s["a"])().mark((function e(a){var i,r,l;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a.data,t.infoData(i),t.getSpecsLst(i.cate_id),t.productCon(),i.mer_form_id&&(r=1e3*(new Date).getTime(),l="".concat(t.baseURL,"/pages/admin/system_form/index?inner_frame=1&time=").concat(r,"&form_id=").concat(i.mer_form_id),t.formUrl=l);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.fullscreenLoading=!1,t.$message.error(e.message)}))},infoData:function(t){var e=this;this.deduction_set=-1==t.integral_rate?-1:1,this.goodList=t.goodList||[],this.attrs=t.attr||[],t.attrValue.forEach((function(t){e.$set(t,"select",!0)})),this.formValidate={product_type:t.product_type||0,is_copy:t.is_copy,image:t.image,attrValue:t.attrValue,slider_image:t.slider_image,store_name:t.store_name,store_info:t.store_info,good_ids:t.good_ids||[],keyword:t.keyword,params:t.params,param_temp_id:t.param_temp_id,brand_id:t.brand_id,cate_id:t.cate_id,mer_cate_id:t.mer_cate_id||[],unit_name:t.unit_name,sort:t.sort,once_max_count:t.once_max_count||1,once_min_count:t.once_min_count||0,is_good:t.is_good,temp_id:t.temp_id,mer_form_id:t.mer_form_id,guarantee_template_id:t.guarantee_template_id?t.guarantee_template_id:"",attr:t.attr,pay_limit:t.pay_limit||0,refund_switch:t.refund_switch,extension_type:t.extension_type,content:t.content,spec_type:Number(t.spec_type),give_coupon_ids:t.give_coupon_ids,is_gift_bag:t.is_gift_bag,couponData:t.coupon,video_link:t.video_link?t.video_link:"",integral_rate:t.integral_rate,delivery_way:t.delivery_way&&t.delivery_way.length?t.delivery_way.map(String):this.deliveryType,delivery_free:t.delivery_free?t.delivery_free:0,mer_labels:t.mer_labels&&t.mer_labels.length?t.mer_labels.map(Number):[],type:t.type||0,extend:t.extend||[],svip_price_type:t.svip_price_type||0},0!=t.svip_price_type&&t.mer_svip_status&&(this.attrVal={price:null,cost:null,ot_price:null,svip_price:null,stock:null,bar_code:"",weight:null,volume:null}),0!=this.formValidate.extend.length&&(this.customBtn=1),0===this.formValidate.spec_type?(t.attrValue[0].list=[],this.OneattrValue=t.attrValue):(this.ManyAttrValue=t.attrValue,t.is_copy&&(this.formValidate.value=t.value),this.generate()),1===this.formValidate.is_good&&this.checkboxGroup.push("is_good"),this.getAttr(),this.fullscreenLoading=!1},onClose:function(t){this.modals=!1,this.infoData(t)},handleRemove:function(t){this.formValidate.slider_image.splice(t,1)},modalPicTap:function(t,e,a){var i=this,r=[];this.$modalUpload((function(s){"1"!==t||e||(i.formValidate.image=s[0],i.OneattrValue[0].image=s[0]),"2"!==t||e||s.map((function(t){r.push(t.attachment_src),i.formValidate.slider_image.push(t),i.formValidate.slider_image.length>10&&(i.formValidate.slider_image.length=10)})),"1"===t&&"dan"===e&&(i.OneattrValue[0].image=s[0]),"1"===t&&"duo"===e&&(i.ManyAttrValue[a].image=s[0]),"1"===t&&"pi"===e&&(i.oneFormBatch[0].image=s[0])}),t)},handleSubmitUp:function(){this.currentTab=(Number(this.currentTab)-1).toString()},handleSubmitNest:function(t){var e=this;this.$refs[t].validate((function(t){t&&(e.currentTab=(Number(e.currentTab)+1).toString())}))},handleSubmit:function(t){var e=this;this.$store.dispatch("settings/setEdit",!1),this.onChangeGroup(),1===this.formValidate.spec_type?this.formValidate.attrValue=this.ManyAttrValue:(this.formValidate.attrValue=this.OneattrValue,this.formValidate.attr=[]);var a=[];this.goodList.forEach((function(t,e){a.push(t.product_id)})),this.formValidate.good_ids=a,this.$refs[t].validate((function(a){if(a){e.fullscreenLoading=!0,e.loading=!0;var i=e.$route.params.id&&!e.$route.query.type;i?Object(_["sb"])(e.$route.params.id,e.formValidate).then(function(){var a=Object(l["a"])(Object(s["a"])().mark((function a(i){return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.fullscreenLoading=!1,e.$message.success(i.message),e.$router.push({path:e.roterPre+"/product/list"}),e.$refs[t].resetFields(),e.formValidate.slider_image=[],e.loading=!1;case 6:case"end":return a.stop()}}),a)})));return function(t){return a.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.loading=!1,e.$message.error(t.message)})):Object(_["hb"])(e.formValidate).then(function(){var t=Object(l["a"])(Object(s["a"])().mark((function t(a){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.fullscreenLoading=!1,e.$message.success(a.message),e.$router.push({path:e.roterPre+"/product/list"}),e.loading=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.loading=!1,e.$message.error(t.message)}))}else{if(!e.formValidate.store_name.trim())return e.$message.warning("基本信息-商品名称不能为空");if(!e.formValidate.unit_name)return e.$message.warning("基本信息-单位不能为空");if(!e.formValidate.cate_id)return e.$message.warning("基本信息-平台商品分类不能为空");if(!e.formValidate.image)return e.$message.warning("基本信息-商品封面图不能为空");if(e.formValidate.slider_image.length<0)return e.$message.warning("基本信息-商品轮播图不能为空")}}))},handlePreview:function(t){var e=this;this.onChangeGroup(),1===this.formValidate.spec_type?this.formValidate.attrValue=this.ManyAttrValue:(this.formValidate.attrValue=this.OneattrValue,this.formValidate.attr=[]),Object(_["mb"])(this.formValidate).then(function(){var t=Object(l["a"])(Object(s["a"])().mark((function t(a){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.previewVisible=!0,e.previewKey=a.data.preview_key;case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.message)}))},validate:function(t,e,a){!1===e&&this.$message.warning(a)},specPicValidate:function(t){for(var e=0;e=i)&&c.mergeCells(V(r)+t+":"+V(r)+e)}function w(t){if(!Object(i["isEmpty"])(t))if(Array.isArray(t))for(var e=0;ed)a=n[d++],i&&!l.call(o,a)||u.push(t?[a,o[a]]:o[a]);return u}}},"57a6":function(t,e,a){},7824:function(t,e,a){"use strict";a("edec")},8615:function(t,e,a){var i=a("5ca1"),r=a("504c")(!1);i(i.S,"Object",{values:function(t){return r(t)}})},d4fe:function(t,e,a){"use strict";a("57a6")},e727:function(t,e,a){},edec:function(t,e,a){},f7e1:function(t,e,a){},f962:function(t,e,a){"use strict";a("f7e1")}}]);