zx/public/mer/js/chunk-3d3ff0db.cf5127f2.js

1 line
94 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d3ff0db"],{"06bb":function(t,e,a){},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",{attrs:{label:"上架时间:"}},[a("el-radio-group",{model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}},[a("el-radio",{attrs:{label:1}},[t._v("立即上架")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("定时上架")]),t._v(" "),a("el-radio",{attrs:{label:0}},[t._v("放入仓库")])],1)],1)],1),t._v(" "),2==t.formValidate.is_show?a("el-col",{attrs:{span:24}},[a("el-form-item",[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",size:"small",type:"datetime",placement:"bottom-end",placeholder:"请选择上架时间"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1):t._e(),t._v(" "),a("el-col",{attrs:{span:24}},[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.is_timed,callback:function(e){t.is_timed=e},expression:"is_timed"}})],1)],1),t._v(" "),1==t.is_timed?a("el-col",{attrs:{span:24}},[a("el-form-item",[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",size:"small",type:"datetime",placement:"bottom-end",placeholder:"请选择下架时间"},on:{change:t.onchangeTime2},model:{value:t.timeVal2,callback:function(e){t.timeVal2=e},expression:"timeVal2"}})],1)],1):t._e(),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),t._v(" "),a("span",{staticStyle:{color:"#F56464"}},[t._v("(平台设置,一级佣金"+t._s(t.extension_one_rate)+"%,二级佣金"+t._s(t.extension_two_rate)+"%")])],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||e.row.pic?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image||e.row.pic}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,1902588355)}),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),t._v(" "),a("templatesFrom",{ref:"templateForm",on:{getList:t.getShippingList}})],1)},r=[],s=(a("55dd"),a("c80c")),l=(a("96cf"),a("3b8d")),o=(a("a481"),a("bd86")),n=(a("8615"),a("6762"),a("2fdb"),a("c5f6"),a("6b54"),a("75fc")),c=(a("28a5"),a("7f7f"),a("ac6a"),a("2d63")),d=a("ef0d"),u=a("6625"),m=a.n(u),p=a("1980"),f=a.n(p),h=a("aa47"),_=a("54b0"),g=a("c4c8"),v=a("83d6"),b=a("ae43"),y=a("8c98"),w=a("7acc"),V=a("c4ad"),x=a("bbcc"),k=a("5f87"),C=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)},$=[],L=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()},B=[],O={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(g["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()}}},S=O,T=(a("8b66"),a("2877")),F=Object(T["a"])(S,L,B,!1,null,"4645833e",null),z=F.exports,A={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}]},j={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量KG"},volume:{title:"体积(m³)"}},M={name:"CopyTaoBao",components:{ueditorFrom:d["a"],copyRecord:z},data:function(){var t=x["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(k["a"])();return{roterPre:v["roterPre"],modals:!1,loading:!1,loading1:!1,BaseURL:x["a"].https||"http://localhost:8080",OneattrValue:[Object.assign({},A.attrValue[0])],ManyAttrValue:[Object.assign({},A.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({},j),formValidate:Object.assign({},A),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({},A.attrValue[0]);return delete t.image,t}},watch:{},created:function(){},mounted:function(){this.getCopyCount()},methods:{getLabelLst:function(){var t=this;Object(g["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCopyCount:function(){var t=this;Object(g["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(g["xb"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(g["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(g["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategorySelect:function(){var t=this;Object(g["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(g["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(g["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(g["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}))}}},D=M,E=(a("67cd"),Object(T["a"])(D,C,$,!1,null,"31a33cb5",null)),P=E.exports,R=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)])])},I=[],N=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:x["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(N["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(g["exportProductCard"])().then((function(e){return t(e.data)}))}))},removeVirtual:function(t){this.virtualList.splice(t,1)},upFile:function(t){var e=this;Object(g["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.message)}))},handleFormatError:function(t){return this.$message.error("必须上传xlsx格式文件")},getToken:function(){this.header["Authori-zation"]="Bearer "+Object(k["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<this.virtualList.length;e++){var a=this.virtualList[e];if(!a.pwd)return this.$message.error("请输入所有卡密")}this.$emit("fixdBtn",JSON.parse(JSON.stringify(t)))}}}},G=U,W=(a("b28c"),Object(T["a"])(G,R,I,!1,null,"e852b25e",null)),q=W.exports,H={image:"",slider_image:[],store_name:"",store_info:"",keyword:"",brand_id:"",cate_id:"",mer_cate_id:[],param_temp_id:[],unit_name:"",sort:0,once_max_count:0,is_good:0,temp_id:"",video_link:"",guarantee_template_id:"",delivery_way:[],mer_labels:[],delivery_free:0,pay_limit:0,once_min_count:0,svip_price_type:0,refund_switch:1,params:[],attrValue:[{image:"",price:null,cost:null,ot_price:null,svip_price:null,select:!1,stock:null,cdkey:{},bar_code:"",weight:null,volume:null}],attr:[],extension_type:0,integral_rate:-1,content:"",spec_type:0,give_coupon_ids:[],is_gift_bag:0,couponData:[],extend:[],type:0,product_type:0,is_show:1},J={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},svip_price:{title:"付费会员价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量KG"},volume:{title:"体积(m³)"}},K=[{name:"店铺推荐",value:"is_good"}],Q={name:"ProductProductAdd",components:{ueditorFrom:d["a"],VueUeditorWrap:m.a,guaranteeService:b["a"],previewBox:y["a"],attrList:w["a"],goodsList:V["a"],taoBao:P,copyRecord:z,addCarMy:q,draggable:f.a,templatesFrom:_["a"]},data:function(){var t=x["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(k["a"])();return{myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",enableAutoSave:!1,UEDITOR_HOME_URL:"/UEditor/",serverUrl:t,imageUrl:t,imageFieldName:"file",imageUrlPrefix:"",imageActionName:"upfile",imageMaxSize:2048e3,imageAllowFiles:[".png",".jpg",".jpeg",".gif",".bmp"]},optionsCate:{value:"store_category_id",label:"cate_name",children:"children",emitPath:!1},roterPre:v["roterPre"],baseURL:x["a"].httpUrl||"http://localhost:8080",formUrl:"",selectRule:"",checkboxGroup:[],recommend:K,tabs:[],fullscreenLoading:!1,props:{emitPath:!1},propsMer:{emitPath:!0},active:0,deduction_set:-1,OneattrValue:[Object.assign({},H.attrValue[0])],ManyAttrValue:[Object.assign({},H.attrValue[0])],ruleList:[],merCateList:[],categoryList:[],shippingList:[],guaranteeList:[],BrandList:[],deliveryList:[],labelList:[],formData:[],formThead:Object.assign({},J),formValidate:Object.assign({},H),picValidate:!0,formDynamics:{template_name:"",template_value:[]},manyTabTit:{},manyTabDate:{},grid2:{xl:10,lg:12,md:12,sm:24,xs:24},formDynamic:{attrsName:"",attrsVal:""},isBtn:!1,images:[],currentTab:"1",isChoice:"",upload:{videoIng:!1},progress:10,videoLink:"",grid:{xl:8,lg:8,md:12,sm:24,xs:24},loading:!1,ruleValidate:{give_coupon_ids:[{required:!0,message:"请选择优惠券",trigger:"change",type:"array"}],store_name:[{required:!0,message:"请输入商品名称",trigger:"blur"}],cate_id:[{required:!0,message:"请选择平台分类",trigger:"change"}],keyword:[{required:!0,message:"请输入商品关键字",trigger:"blur"}],unit_name:[{required:!0,message:"请输入单位",trigger:"blur"}],store_info:[{required:!0,message:"请输入商品简介",trigger:"blur"}],temp_id:[{required:!0,message:"请选择运费模板",trigger:"change"}],once_max_count:[{required:!0,message:"请输入限购数量",trigger:"change"}],image:[{required:!0,message:"请上传商品图",trigger:"change"}],slider_image:[{required:!0,message:"请上传商品轮播图",type:"array",trigger:"change"}],spec_type:[{required:!0,message:"请选择商品规格",trigger:"change"}],delivery_way:[{required:!0,message:"请选择送货方式",trigger:"change"}]},attrInfo:{},keyNum:0,extensionStatus:0,deductionStatus:0,previewVisible:!1,previewKey:"",deliveryType:[],virtual:[{tit:"普通商品",id:0,tit2:"物流发货"},{tit:"虚拟商品",id:1,tit2:"虚拟发货"},{tit:"卡密/网盘",id:2,tit2:"自动发货"}],customBtn:0,CustomList:[{value:"text",label:"文本框"},{value:"number",label:"数字"},{value:"email",label:"邮件"},{value:"date",label:"日期"},{value:"time",label:"时间"},{value:"idCard",label:"身份证"},{value:"mobile",label:"手机号"},{value:"image",label:"图片"}],customess:{content:[]},headTab:[{title:"商品信息",name:"1"},{title:"规格设置",name:"2"},{title:"商品详情",name:"3"},{title:"营销设置",name:"4"},{title:"其他设置",name:"5"}],type:0,modals:!1,attrVal:{price:null,cost:null,ot_price:null,stock:null,bar_code:"",weight:null,volume:null},open_svip:!1,svip_rate:0,extension_one_rate:"",extension_two_rate:"",customSpecs:[],merSpecsSelect:[],sysSpecsSelect:[],attrs:[],attrsList:[],activeAtter:[],attrShow:!1,isGenerate:!1,createProduct:!1,generateArr:[],addGenerate:!1,createCount:this.$route.params.id?0:-10,virtualList:[],formList:[],carMyShow:!1,tabIndex:0,tabName:"",oneFormBatch:[{attr:"全部",image:"",price:"",cost:"",ot_price:"",svip_price:"",stock:"",cdkey:{},code:"",weight:"",volume:""}],headerCarMy:{title:"卡密设置",slot:"fictitious",align:"center",width:95},product_id:"",goodList:[],unitList:[],recommendVisible:!1,timeVal:"",timeVal2:"",is_timed:0}},computed:{attrValue:function(){var t=Object.assign({},this.attrVal);return t}},watch:{"formValidate.attr":{handler:function(t){this.createCount+=1,1===this.formValidate.spec_type&&this.watCh(t)},immediate:!1,deep:!0},currentTab:function(t){var e=this;5==t&&this.$nextTick((function(t){e.setSort()}))},"$route.params.id":{handler:function(t,e){t!==e&&t&&this.initData()},immediate:!1,deep:!0}},created:function(){this.tempRoute=Object.assign({},this.$route),this.$route.params.id&&1===this.formValidate.spec_type&&this.$watch("formValidate.attr",this.watCh)},mounted:function(){this.initData()},destroyed:function(){window.removeEventListener("popstate",this.goBack,!1)},methods:{initData:function(){var t=this;this.getCategorySelect(),this.getCategoryList(),this.getBrandListApi(),this.getShippingList(),this.getGuaranteeList(),this.productGetRule(),this.getLabelLst(),this.getFormList(),this.getUnitList(),this.$store.dispatch("settings/setEdit",!0),this.formValidate.slider_image=[],this.$route.params.id?(this.product_id=this.$route.params.id,this.setTagsViewTitle(),this.getInfo()):(this.getSpecsLst(this.formValidate.cate_id),this.productCon(),-1==this.deduction_set&&(this.formValidate.integral_rate=-1)),this.formValidate.attr.map((function(e){t.$set(e,"inputVisible",!1)})),1==this.$route.query.type?(this.type=this.$route.query.type,this.$refs.taoBao.modals=!0):this.type=0},onchangeTime:function(t){this.timeVal=t,this.formValidate.auto_on_time=t},onchangeTime2:function(t){this.timeVal2=t,this.formValidate.auto_off_time=t},setSort:function(){var t=this,e=this.$refs.tableParameter.$el.querySelectorAll(".el-table__body-wrapper > 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,s<e?r(t,s+1):i.push(a.join(","));var d=a;a=[];for(var u=0,m=d;u<m.length;u++){var p=m[u];a.push(p)}}}catch(f){o.e(f)}finally{o.f()}return i}},subAttrs:function(t){var e=this,a=[];this.attrsList.forEach((function(t,e){var i=[];t.details.forEach((function(t){t.select&&i.push(t.name)})),i.length&&a.push(i)}));var i=[];a.length&&(i=this.doCombination(a)),this.attrShow=!1,this.activeAtter=a,this.oneFormBatch[0].attr=i.length?i.join(";"):"全部";var r=this.ManyAttrValue;r.forEach((function(t){e.$set(t,"select",!1),i.length?i.forEach((function(a){t.sku&&t.sku.split("").length==a.split("").length?t.sku==a&&e.$set(t,"select",!0):t.sku&&t.sku==a&&e.$set(t,"select",!0)})):e.$set(t,"select",!0)})),this.$nextTick((function(){this.$set(this,"ManyAttrValue",r)}))},getSpecsLst:function(t){var e=this,a=t||this.formValidate.cate_id;Object(g["Ab"])({cate_id:a}).then((function(t){e.merSpecsSelect=t.data.mer,e.sysSpecsSelect=t.data.sys})).catch((function(t){e.$message.error(t.message)}))},addUnit:function(){var t=this;this.$modalForm(Object(g["Kb"])()).then((function(){return t.getUnitList()}))},getUnitList:function(){var t=this;Object(g["Ob"])().then((function(e){t.unitList=e.data})).catch((function(e){t.$message.error(e.message)}))},productCon:function(){var t=this;Object(g["db"])().then((function(e){t.extensionStatus=e.data.extension_status,t.deductionStatus=e.data.integral_status,t.deliveryType=e.data.delivery_way.map(String),t.open_svip=1==e.data.mer_svip_status&&1==e.data.svip_switch_status,t.svip_rate=e.data.svip_store_rate,t.extension_one_rate=e.data.extension_one_rate,t.extension_two_rate=e.data.extension_two_rate;var a=0==t.formValidate.type?"快递配送":1==t.formValidate.type?"虚拟发货":"卡密发货";t.$route.params.id||(t.formValidate.delivery_way=t.deliveryType),2==t.deliveryType.length?2==t.formValidate.type?t.deliveryList=[{value:"2",name:a}]:t.deliveryList=[{value:"1",name:"到店自提"},{value:"2",name:a}]:1==t.deliveryType.length&&"1"==t.deliveryType[0]&&2!=t.formValidate.type?t.deliveryList=[{value:"1",name:"到店自提"}]:(t.deliveryList=[{value:"2",name:a}],t.formValidate.delivery_way=["2"])})).catch((function(e){t.$message.error(e.message)}))},getLabelLst:function(){var t=this;Object(g["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getFormList:function(){var t=this;Object(g["k"])().then((function(e){t.formList=e.data})).catch((function(e){t.$message.error(e.message)}))},getFormInfo:function(){if(this.formValidate.mer_form_id){var t=1e3*(new Date).getTime(),e="".concat(this.baseURL,"/pages/admin/system_form/index?inner_frame=1&time=").concat(t,"&form_id=").concat(this.formValidate.mer_form_id);this.formUrl=e}},openRecommend:function(){this.recommendVisible=!0},getRecommend:function(t){this.goodList=t&&t.length<=18?t:t.slice(0,18),this.recommendVisible=!1},closeRecommend:function(){this.recommendVisible=!1},deleteRecommend:function(t){this.goodList.splice(t,1)},addCoupon:function(){var t=this;this.$modalCoupon(this.formValidate.couponData,"wu",t.formValidate.give_coupon_ids,this.keyNum+=1,(function(e){t.formValidate.give_coupon_ids=[],t.formValidate.couponData=e,e.map((function(e){t.formValidate.give_coupon_ids.push(e.coupon_id)}))}))},delSpecs:function(t){this.formValidate.params.splice(t,1)},addSpecs:function(){this.formValidate.params.push({name:"",value:"",sort:0})},getSpecsList:function(){var t=this,e=Object(n["a"])(this.customSpecs),a=[this.formValidate.param_temp_id].concat(),i=[].concat(Object(n["a"])(e),Object(n["a"])(a));i.length<=0?(this.formValidate.merParams=[],this.formValidate.sysParams=[]):Object(g["pb"])({template_ids:i.toString()}).then((function(e){var a=[];t.formValidate.params.forEach((function(t,e){t.parameter_id||a.push(t)})),t.formValidate.params=[].concat(Object(n["a"])(e.data),a)})).catch((function(e){t.$message.error(e.message)}))},changeVirtual:function(t){this.virtualList=this.virtualList.concat(t)},addVirtual:function(t,e){this.$refs.addCarMy.carMyShow=!0,this.tabIndex=t,this.tabName=e,this.virtualListClear(),this.$refs.addCarMy.fixedCar={is_type:0,key:"",stock:0}},fixdBtn:function(t){0==t.is_type?(this.$set(this[this.tabName][this.tabIndex]["cdkey"],"key",t.key),this.$set(this[this.tabName][this.tabIndex],"stock",Number(t.stock)),this[this.tabName][this.tabIndex]["cdkey"].list=[]):(this.$set(this[this.tabName][this.tabIndex]["cdkey"],"list",t.list),this.$set(this[this.tabName][this.tabIndex],"stock",t.list.length),this[this.tabName][this.tabIndex]["cdkey"].key=""),this.$set(this[this.tabName][this.tabIndex]["cdkey"],"is_type",t.is_type),this.$refs.addCarMy.carMyShow=!1},closeCarMy:function(){this.$refs.addCarMy.carMyShow=!1},virtualListClear:function(){this.virtualList=[{is_type:0,key:"",stock:""}]},seeVirtual:function(t,e,a){this.tabName=e,this.tabIndex=a,this.virtualListClear(),this.$refs.addCarMy.fixedCar={is_type:0,key:"",stock:0},t.cdkey&&t.cdkey.list&&t.cdkey.list.length&&1==t.cdkey.is_type?(this.$refs.addCarMy.fixedCar.is_type=1,this.virtualList=t.cdkey.list):t.cdkey&&t.cdkey.key&&(this.$refs.addCarMy.fixedCar.is_type=0,this.$refs.addCarMy.fixedCar.key=t.cdkey.key,this.$refs.addCarMy.fixedCar.stock=t.stock),this.$refs.addCarMy.carMyShow=!0},setTagsViewTitle:function(){var t="编辑商品",e=Object.assign({},this.tempRoute,{title:"".concat(t,"-").concat(this.$route.params.id)});this.$store.dispatch("tagsView/updateVisitedView",e)},onChangeGroup:function(){this.checkboxGroup.includes("is_good")?this.formValidate.is_good=1:this.formValidate.is_good=0},watCh:function(t){var e={},a={};this.formValidate.attr.forEach((function(t,i){e["value"+i]={title:t.value},a["value"+i]=""})),(this.isGenerate||1==this.createCount)&&(this.ManyAttrValue=this.attrFormat(t),this.manyTabTit=e,this.manyTabDate=a,this.formThead=Object.assign({},this.formThead,e)),this.isGenerate=!1,this.addGenerate=!1},attrFormat:function(t){var e=[],a=this,i=[];return r(t);function r(t){if(t.length>1)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.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(){this.$refs.templateForm.dialogVisible=!0,this.$refs.templateForm.resetData()},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.lastIndexOf("."));if(".mp4"!==a)return e.$message.error("只能上传MP4文件");Object(g["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(){var t=this;this.oneFormBatch[0].attr="全部";var e=this.attrs;e.map((function(t){t.details=[],t.detail.map((function(e){t.details.push({name:e,select:!1})}))})),this.attrsList=e,this.generateArr.forEach((function(e,a){e.sku=t.ManyAttrValue[a]["sku"]})),console.log(this.ManyAttrValue)},getCategorySelect:function(){var t=this;Object(g["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategoryList:function(){var t=this;Object(g["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(g["s"])().then((function(e){t.BrandList=e.data})).catch((function(e){t.$message.error(e.message)}))},productGetRule:function(){var t=this;Object(g["Jb"])().then((function(e){t.ruleList=e.data}))},getShippingList:function(){var t=this;Object(g["xb"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(g["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(g["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=e.image||e.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(g["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:t.generateArr=[],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 6: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.is_timed=t.auto_off_time?1:0,this.timeVal=t.auto_on_time||"",this.timeVal2=t.auto_off_time||"",this.formValidate=Object(o["a"])({product_type:t.product_type||0,auto_off_time:t.auto_off_time,auto_on_time:t.auto_on_time,is_copy:t.is_copy,is_show:t.is_show||0,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},"is_gift_bag",t.is_gift_bag||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.formValidate.auto_off_time=this.is_timed?this.formValidate.auto_off_time:"",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(g["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(g["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(g["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<t.length;e++)if(""===t[e].image||!t[e].image){this.$message.warning("请上传商品规格图!"),this.picValidate=!1;break}},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:v["roterPre"]+"/admin/widget/image?field=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}),37),window.UE.registerUI("video-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:v["roterPre"]+"/admin/widget/video?fodder=video",editor:t,name:e,title:"上传视频",cssRules:"width:600px;height:420px;padding:10px 20px 20px;"});this.dialog=a;var i=new window.UE.ui.Button({name:"video-button",title:"上传视频",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -320px -20px;",onclick:function(){a.render(),a.open()}});return i}),38)}}},X=Q,Y=(a("eea0"),Object(T["a"])(X,i,r,!1,null,"f24dbc28",null));e["default"]=Y.exports},"2e83":function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));a("28a5");var i=a("8122"),r=a("e8ae"),s=a.n(r),l=a("21a6");function o(t,e,a,r,o,n){var c,d=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],u=1,m=new s.a.Workbook,p=t.length;function h(t){var e=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?t[1]:{};c=m.addWorksheet(e,a)}function _(t,e){if(!Object(i["isEmpty"])(t)){t=Array.isArray(t)?t:t.split(",");for(var a=0;a<t.length;a++){var r=c.getRow(a+1);r.getCell(1).value=t[a],r.height=30,r.font={bold:!0,size:20,vertAlign:"subscript"},r.alignment={vertical:"bottom",horizontal:"center"},r.outlineLevel=1,c.mergeCells(a+1,1,a+1,e),r.commit(),u++}}}function g(t){if(!Object(i["isEmpty"])(t)){for(var e=c.getRow(u),a=1;a<=t.length;a++)e.getCell(a).value=t[a-1];e.height=25,e.width=50,e.font={bold:!0,size:18,vertAlign:"subscript"},e.alignment={vertical:"bottom",horizontal:"center"},e.outlineLevel=1,e.commit(),u++}}function v(t){if(!Object(i["isEmpty"])(t))for(var e=0;e<t.length;e++){for(var a=u,r=c.getRow(u),s=!1,l=0,o=0,n=0,d=0;d<t[e].length;d++)Array.isArray(t[e][d])?(l=n,s=!0,b(t[e][d],n),n+=t[e][d][0].length,o=n):(r.getCell(V(n)).value=t[e][d],r.getCell(V(n)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},r.alignment={vertical:"middle",horizontal:"center"},n++);s&&y(a,u,l,o),r.height=25,r.commit(),u++}}function b(t,e){for(var a=t.length,i=a-1,r=0;r<t.length;r++){for(var s=c.getRow(u),l=0;l<t[r].length;l++)s.getCell(V(e+l)).value=t[r][l],s.getCell(V(e+l)).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},s.alignment={vertical:"middle",horizontal:"center"};s.height=25,s.commit(),r<i&&u++}}function y(t,e,a,i){for(var r=0;r<p;r++)(r<a||r>=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;e<t.length;e++){var a=c.getRow(u);a.getCell(1).value=t[e],a.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.alignment={vertical:"middle",horizontal:"left"},c.mergeCells("A"+u+":"+V(p-1)+u),u++}else{var r=c.getRow(u);r.getCell(1).value=t[f],r.getCell(1).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},r.alignment={vertical:"middle",horizontal:"left"},c.mergeCells("A"+u+":"+V(p-1)+u)}}function V(t){if(t<26)return d[t];var e=t%26,a=Math.floor(t%26);return d[a]+d[e]}function x(t){t||(t=(new Date).getTime()),m.xlsx.writeBuffer().then((function(e){var a=new Blob([e],{type:"application/octet-stream"});l["saveAs"](a,t+".xlsx")}))}h(n),_(e,p),g(t),v(a),w(r),x(o)}},"4e68":function(t,e,a){},"504c":function(t,e,a){var i=a("9e1e"),r=a("0d58"),s=a("6821"),l=a("52a7").f;t.exports=function(t){return function(e){var a,o=s(e),n=r(o),c=n.length,d=0,u=[];while(c>d)a=n[d++],i&&!l.call(o,a)||u.push(t?[a,o[a]]:o[a]);return u}}},"67cd":function(t,e,a){"use strict";a("b05f")},8615:function(t,e,a){var i=a("5ca1"),r=a("504c")(!1);i(i.S,"Object",{values:function(t){return r(t)}})},"8b66":function(t,e,a){"use strict";a("4e68")},b05f:function(t,e,a){},b28c:function(t,e,a){"use strict";a("f3d8")},eea0:function(t,e,a){"use strict";a("06bb")},f3d8:function(t,e,a){}}]);