|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7c7c6444"],{2865:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix"},[e.headTab.length>0?a("el-tabs",{model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},e._l(e.headTab,(function(e,t){return a("el-tab-pane",{key:t,attrs:{name:e.name,label:e.title}})})),1):e._e()],1),e._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.fullscreenLoading,expression:"fullscreenLoading"}],key:e.currentTab,ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:e.ruleValidate,model:e.formValidate,"label-width":"130px"},nativeOn:{submit:function(e){e.preventDefault()}}},["1"==e.currentTab?a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品类型:",required:""}},e._l(e.virtual,(function(t,i){return a("div",{key:i,staticClass:"virtual",class:e.formValidate.type==t.id?"virtual_boder":"virtual_boder2",on:{click:function(a){return e.virtualbtn(t.id,2)}}},[a("div",{staticClass:"virtual_top"},[e._v(e._s(t.tit))]),e._v(" "),a("div",{staticClass:"virtual_bottom"},[e._v("("+e._s(t.tit2)+")")]),e._v(" "),e.formValidate.type==t.id?a("div",{staticClass:"virtual_san"}):e._e(),e._v(" "),e.formValidate.type==t.id?a("div",{staticClass:"virtual_dui"},[e._v("\n ✓\n ")]):e._e()])})),0)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品名称:",prop:"store_name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称"},model:{value:e.formValidate.store_name,callback:function(t){e.$set(e.formValidate,"store_name",t)},expression:"formValidate.store_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台商品分类:",prop:"cate_id"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:e.categoryList,props:e.props,filterable:"",clearable:""},on:{change:e.getSpecsLst},model:{value:e.formValidate.cate_id,callback:function(t){e.$set(e.formValidate,"cate_id",t)},expression:"formValidate.cate_id"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商户商品分类:",prop:"mer_cate_id"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:e.merCateList,props:e.propsMer,filterable:"",clearable:""},model:{value:e.formValidate.mer_cate_id,callback:function(t){e.$set(e.formValidate,"mer_cate_id",t)},expression:"formValidate.mer_cate_id"}})],1)],1),e._v(" "),e.labelList.length?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品标签:"}},[a("el-select",{staticClass:"selWidth",attrs:{multiple:"",placeholder:"请选择"},model:{value:e.formValidate.mer_labels,callback:function(t){e.$set(e.formValidate,"mer_labels",t)},expression:"formValidate.mer_labels"}},e._l(e.labelList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1):e._e(),e._v(" "),a("el-col",e._b({},"el-col",e.grid2,!1),[a("el-form-item",{attrs:{label:"品牌选择:"}},[a("el-select",{staticClass:"selWidth",attrs:{filterable:"",placeholder:"请选择"},model:{value:e.formValidate.brand_id,callback:function(t){e.$set(e.formValidate,"brand_id",t)},expression:"formValidate.brand_id"}},e._l(e.BrandList,(function(e){return a("el-option",{key:e.brand_id,attrs:{label:e.brand_name,value:e.brand_id}})})),1)],1)],1),e._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(t){return e.modalPicTap("1")}}},[e.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:e.formValidate.image}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])])],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品轮播图:",prop:"slider_image"}},[a("div",{staticClass:"acea-row"},[e._l(e.formValidate.slider_image,(function(t,i){return a("div",{key:i,staticClass:"pictrue",attrs:{draggable:"false"},on:{dragstart:function(a){return e.handleDragStart(a,t)},dragover:function(a){return a.preventDefault(),e.handleDragOver(a,t)},dragenter:function(a){return e.handleDragEnter(a,t)},dragend:function(a){return e.handleDragEnd(a,t)}}},[a("img",{attrs:{src:t}}),e._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(t){return e.handleRemove(i)}}})])})),e._v(" "),e.formValidate.slider_image.length<10?a("div",{staticClass:"uploadCont",attrs:{title:"750*750px"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(t){return e.modalPicTap("2")}}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]):e._e()],2)])],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"主图视频:",prop:"video_link"}},[a("el-input",{staticClass:"perW50",attrs:{placeholder:"请输入视频链接"},model:{value:e.videoLink,callback:function(t){e.videoLink=t},expression:"videoLink"}}),e._v(" "),a("input",{ref:"refid",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:e.zh_uploadFile_change}}),e._v(" "),a("el-button",{staticClass:"uploadVideo",attrs:{type:"primary",icon:"ios-cloud-upload-outline"},on:{click:e.zh_uploadFile}},[e._v("\n "+e._s(e.videoLink?"确认添加":"上传视频")+"\n ")]),e._v(" "),a("el-col",{attrs:{span:12}},[e.upload.videoIng?a("el-progress",{staticStyle:{"margin-top":"10px"},attrs:{percentage:e.progress,"text-inside":!0,"stroke-width":20}}):e._e()],1),e._v(" "),a("el-col",{attrs:{span:24}},[e.formValidate.video_link?a("div",{staticClass:"iview-video-style"},[a("video",{staticStyle:{width:"100%",height:"100%!important","border-radius":"10px"},attrs:{src:e.formValidate.video_link,controls:"controls"}},[e._v("\n 您的浏览器不支持 video 标签。\n ")]),e._v(" "),a("div",{staticClass:"mark"}),e._v(" "),a("i",{staticClass:"el-icon-delete iconv",on:{click:e.delVideo}})]):e._e()])],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"单位:",prop:"unit_name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入单位"},model:{value:e.formValidate.unit_name,callback:function(t){e.$set(e.formValidate,"unit_name",t)},expression:"formValidate.unit_name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品关键字:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品关键字"},model:{value:e.formValidate.keyword,callback:function(t){e.$set(e.formValidate,"keyword",t)},expression:"formValidate.keyword"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品简介:",prop:"store_info"}},[a("el-input",{staticClass:"selWidth",attrs:{type:"textarea",rows:3,placeholder:"请输入商品简介"},model:{value:e.formValidate.store_info,callback:function(t){e.$set(e.formValidate,"store_info",t)},expression:"formValidate.store_info"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{staticClass:"proCoupon",attrs:{label:"优惠券(赠送券):"}},[a("div",{staticClass:"acea-row"},[e._l(e.formValidate.couponData,(function(t,i){return a("el-tag",{key:i,staticClass:"mr10",attrs:{closable:"","disable-transitions":!1},on:{close:function(a){return e.handleCloseCoupon(t)}}},[e._v(e._s(t.title)+"\n ")])})),e._v(" "),a("el-button",{staticClass:"mr15",attrs:{size:"mini"},on:{click:e.addCoupon}},[e._v("选择优惠券")])],2)])],1)],1):e._e(),e._v(" "),"2"==e.currentTab?a("el-row",[a("el-col",{attrs:{span:24}},[e.extensionStatus>0?a("el-form-item",{attrs:{label:"佣金设置:",props:"extension_type"}},[a("el-radio-group",{on:{change:function(t){return e.onChangetype(e.formValidate.extension_type)}},model:{value:e.formValidate.extension_type,callback:function(t){e.$set(e.formValidate,"extension_type",t)},expression:"formValidate.extension_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:1}},[e._v("单独设置")]),e._v(" "),a("el-radio",{attrs:{label:0}},[e._v("默认设置")])],1)],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:24}},[e.open_svip?a("el-form-item",{attrs:{label:"付费会员价设置:",props:"svip_price_type"}},[a("el-radio-group",{on:{change:function(t){return e.onChangeSpecs(e.formValidate.svip_price_type)}},model:{value:e.formValidate.svip_price_type,callback:function(t){e.$set(e.formValidate,"svip_price_type",t)},expression:"formValidate.svip_price_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[e._v("不设置会员价")]),e._v(" "),a("el-radio",{staticClass:"radio",attrs:{label:1}},[e._v("默认设置会员价")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("自定义设置会员价")])],1)],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品规格:",props:"spec_type"}},[a("el-radio-group",{on:{change:function(t){return e.onChangeSpec(e.formValidate.spec_type)}},model:{value:e.formValidate.spec_type,callback:function(t){e.$set(e.formValidate,"spec_type",t)},expression:"formValidate.spec_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[e._v("单规格")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("多规格")])],1)],1)],1),e._v(" "),1===e.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",{model:{value:e.selectRule,callback:function(t){e.selectRule=t},expression:"selectRule"}},e._l(e.ruleList,(function(e){return a("el-option",{key:e.attr_template_id,attrs:{label:e.template_name,value:e.attr_template_id}})})),1),e._v(" "),a("el-button",{staticClass:"ml15",attrs:{type:"primary",size:"small"},on:{click:e.confirm}},[e._v("确认")]),e._v(" "),a("el-button",{staticClass:"ml15",attrs:{size:"small"},on:{click:e.addRule}},[e._v("添加规格模板")])],1)]),e._v(" "),e.formValidate.attr.length>0?a("el-form-item",e._l(e.formValidate.attr,(function(t,i){return a("div",{key:i},[a("div",{staticClass:"acea-row row-middle"},[a("span",{staticClass:"mr5"},[e._v(e._s(t.value))]),e._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(t){return e.handleRemoveAttr(i)}}})]),e._v(" "),a("div",{staticClass:"rulesBox"},[e._l(t.detail,(function(i,r){return a("el-tag",{key:r,staticClass:"mb5 mr10",attrs:{closable:"",size:"medium","disable-transitions":!1},on:{close:function(a){return e.handleClose(t.detail,r)}}},[e._v(e._s(i)+"\n ")])})),e._v(" "),t.inputVisible?a("el-input",{ref:"saveTagInput",refInFor:!0,staticClass:"input-new-tag",attrs:{size:"small"},on:{blur:function(a){return e.createAttr(t.detail.attrsVal,i)}},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.createAttr(t.detail.attrsVal,i)}},model:{value:t.detail.attrsVal,callback:function(a){e.$set(t.detail,"attrsVal",a)},expression:"item.detail.attrsVal"}}):a("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:function(a){return e.showInput(t)}}},[e._v("+ 添加")])],2)])})),0):e._e(),e._v(" "),e.isBtn?a("el-col",[a("el-col",{attrs:{xl:6,lg:9,md:9,sm:24,xs:24}},[a("el-form-item",{attrs:{label:"规格:"}},[a("el-input",{attrs:{placeholder:"请输入规格"},model:{value:e.formDynamic.attrsName,callback:function(t){e.$set(e.formDynamic,"attrsName",t)},expression:"formDynamic.attrsName"}})],1)],1),e._v(" "),a("el-col",{attrs:{xl:6,lg:9,md:9,sm:24,xs:24}},[a("el-form-item",{attrs:{label:"规格值:"}},[a("el-input",{attrs:{placeholder:"请输入规格值"},model:{value:e.formDynamic.attrsVal,callback:function(t){e.$set(e.formDynamic,"attrsVal",t)},expression:"formDynamic.attrsVal"}})],1)],1),e._v(" "),a("el-col",{attrs:{xl:12,lg:6,md:6,sm:24,xs:24}},[a("el-form-item",{staticClass:"noLeft"},[a("el-button",{staticClass:"mr15",attrs:{type:"primary"},on:{click:e.createAttrName}},[e._v("确定")]),e._v(" "),a("el-button",{on:{click:e.offAttrName}},[e._v("取消")])],1)],1)],1):e._e(),e._v(" "),e.isBtn?e._e():a("el-form-item",[a("el-button",{staticClass:"mr15",attrs:{type:"primary",icon:"md-add"},on:{click:e.addBtn}},[e._v("添加新规格")])],1)],1):e._e(),e._v(" "),1===e.formValidate.spec_type&&e.formValidate.attr.length>0?a("el-col",{staticClass:"noForm",attrs:{span:24}},[a("el-form-item",{staticClass:"labeltop",attrs:{label:"批量设置:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:e.oneFormBatch,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:function(t){return e.modalPicTap("1","pi")}}},[t.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:t.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,772438934)}),e._v(" "),e._l(e.attrValue,(function(t,i){return a("el-table-column",{key:i,attrs:{label:e.formThead[i].title,align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[0!=e.formValidate.svip_price_type?a("div",["付费会员价"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{disabled:1==e.formValidate.svip_price_type,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e(),e._v(" "),"商品编号"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e(),e._v(" "),"付费会员价"!==e.formThead[i].title&&"商品编号"!==e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0","controls-position":"right"},on:{blur:function(a){return e.memberPrice(e.formThead[i],t.row)}},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e()],1):a("div",["商品编号"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0","controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}})],1)]}}],null,!0)})})),e._v(" "),1===e.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.extension_one,callback:function(a){e.$set(t.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,1308693019)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.extension_two,callback:function(a){e.$set(t.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,899977843)})]:e._e(),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作","min-width":"80"}},[[a("el-button",{staticClass:"submission",attrs:{type:"text"},on:{click:e.batchAdd}},[e._v("批量添加")])]],2)],2)],1)],1):e._e(),e._v(" "),a("el-col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[0===e.formValidate.spec_type?a("el-form-item",[a("el-table",{staticClass:"tabNumWidth",attrs:{data:e.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(t){return e.modalPicTap("1","dan","pi")}}},[e.formValidate.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:t.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,1357914119)}),e._v(" "),e._l(e.attrValue,(function(t,i){return a("el-table-column",{key:i,attrs:{label:e.formThead[i].title,align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[0!=e.formValidate.svip_price_type?a("div",["付费会员价"===e.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,disabled:1==e.formValidate.svip_price_type,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e(),e._v(" "),"商品编号"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e(),e._v(" "),"付费会员价"!==e.formThead[i].title&&"商品编号"!==e.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e()],1):a("div",["商品编号"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}})],1)]}}],null,!0)})})),e._v(" "),1===e.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.extension_one,callback:function(a){e.$set(t.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,1308693019)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.extension_two,callback:function(a){e.$set(t.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,899977843)})]:e._e()],2)],1):e._e(),e._v(" "),1===e.formValidate.spec_type&&e.formValidate.attr.length>0?a("el-form-item",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:e.ManyAttrValue,border:"",size:"mini"}},[e.manyTabDate?e._l(e.manyTabDate,(function(t,i){return a("el-table-column",{key:i,attrs:{align:"center",label:e.manyTabTit[i].title,"min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"priceBox",domProps:{textContent:e._s(t.row[i])}})]}}],null,!0)})})):e._e(),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:function(a){return e.modalPicTap("1","duo",t.$index)}}},[t.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:t.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,1344940579)}),e._v(" "),e._l(e.attrValue,(function(t,i){return a("el-table-column",{key:i,attrs:{label:e.formThead[i].title,align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[0!=e.formValidate.svip_price_type?a("div",["付费会员价"===e.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,disabled:1==e.formValidate.svip_price_type,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e(),e._v(" "),"商品编号"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e(),e._v(" "),"付费会员价"!==e.formThead[i].title&&"商品编号"!==e.formThead[i].title?a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):e._e()],1):a("div",["商品编号"===e.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}}):a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row[i],callback:function(a){e.$set(t.row,i,a)},expression:"scope.row[iii]"}})],1)]}}],null,!0)})})),e._v(" "),1===e.formValidate.extension_type?[a("el-table-column",{key:"1",attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.extension_one,callback:function(a){e.$set(t.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,1308693019)}),e._v(" "),a("el-table-column",{key:"2",attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.extension_two,callback:function(a){e.$set(t.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,899977843)})]:e._e(),e._v(" "),a("el-table-column",{key:"3",attrs:{align:"center",label:"操作","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"submission",attrs:{type:"text"},on:{click:function(a){return e.delAttrTable(t.$index)}}},[e._v("删除")])]}}],null,!1,2803824461)})],2)],1):e._e()],1)],1):e._e(),e._v(" "),"3"==e.currentTab?a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"商品详情:"}},[a("vue-ueditor-wrap",{attrs:{config:e.myConfig},on:{beforeInit:e.addCustomDialog},model:{value:e.formValidate.content,callback:function(t){e.$set(e.formValidate,"content",t)},expression:"formValidate.content"}})],1)],1)],1):e._e(),e._v(" "),"4"==e.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:e.onChangeGroup},model:{value:e.checkboxGroup,callback:function(t){e.checkboxGroup=t},expression:"checkboxGroup"}},e._l(e.recommend,(function(t,i){return a("el-checkbox",{key:i,attrs:{label:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[e.deductionStatus>0?a("el-form-item",{attrs:{label:"积分抵扣比例:"}},[a("el-radio-group",{on:{change:function(t){return e.changeIntergral(e.deduction_set)}},model:{value:e.deduction_set,callback:function(t){e.deduction_set=t},expression:"deduction_set"}},[a("el-radio",{staticClass:"radio",attrs:{label:1}},[e._v("单独设置")]),e._v(" "),a("el-radio",{attrs:{label:-1}},[e._v("默认设置")])],1),e._v(" "),1==e.deduction_set?a("div",[a("el-input-number",{attrs:{min:0,"controls-position":"right",placeholder:"请输入抵扣比例"},model:{value:e.formValidate.integral_rate,callback:function(t){e.$set(e.formValidate,"integral_rate",t)},expression:"formValidate.integral_rate"}}),e._v("\n %\n ")],1):e._e()],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"是否开启礼包:"}},[a("el-radio-group",{attrs:{disabled:!!e.$route.params.id},model:{value:e.formValidate.is_gift_bag,callback:function(t){e.$set(e.formValidate,"is_gift_bag",t)},expression:"formValidate.is_gift_bag"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[e._v("否")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("是")])],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注:"}},[a("div",[e._v("1. 选择开启礼包后,不可修改")]),e._v(" "),a("div",[e._v("\n 2.\n 用户购买该分销礼包商品后,可自动成为分销员(即已成为分销员的用户在移动端看不到该分销礼包商品)\n ")]),e._v(" "),a("div",[e._v("\n 3.\n 该商品设置为分销礼包后会展示在平台后台的【分销】-【分销礼包】(即不会展示在平台后台-【商品列表】)\n ")])])],1)],1):e._e(),e._v(" "),"5"==e.currentTab?a("el-row",[e.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:e.formValidate.delivery_way,callback:function(t){e.$set(e.formValidate,"delivery_way",t)},expression:"formValidate.delivery_way"}},e._l(e.deliveryList,(function(t){return a("el-checkbox",{key:t.value,attrs:{label:t.value}},[e._v("\n "+e._s(t.name)+"\n ")])})),1)],1)])],1):e._e(),e._v(" "),(2==e.formValidate.delivery_way.length||1==e.formValidate.delivery_way.length&&2==e.formValidate.delivery_way[0])&&0==e.formValidate.type?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"是否包邮:"}},[a("el-radio-group",{model:{value:e.formValidate.delivery_free,callback:function(t){e.$set(e.formValidate,"delivery_free",t)},expression:"formValidate.delivery_free"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[e._v("否")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("是")])],1)],1)],1):e._e(),e._v(" "),0==e.formValidate.delivery_free&&(2==e.formValidate.delivery_way.length||1==e.formValidate.delivery_way.length&&2==e.formValidate.delivery_way[0])&&0==e.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:"selWidth",attrs:{placeholder:"请选择"},model:{value:e.formValidate.temp_id,callback:function(t){e.$set(e.formValidate,"temp_id",t)},expression:"formValidate.temp_id"}},e._l(e.shippingList,(function(e){return a("el-option",{key:e.shipping_template_id,attrs:{label:e.name,value:e.shipping_template_id}})})),1),e._v(" "),a("el-button",{staticClass:"ml15",attrs:{size:"small"},on:{click:e.addTem}},[e._v("添加运费模板")])],1)])],1):e._e(),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",[a("el-form-item",{attrs:{label:"最少购买件数:"}},[a("el-input-number",{attrs:{min:0,"controls-position":"right",placeholder:"请输入购买件数"},model:{value:e.formValidate.once_min_count,callback:function(t){e.$set(e.formValidate,"once_min_count",t)},expression:"formValidate.once_min_count"}}),e._v("\n 默认为0,则不限制购买件数\n ")],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"限购类型:"}},[a("el-radio-group",{model:{value:e.formValidate.pay_limit,callback:function(t){e.$set(e.formValidate,"pay_limit",t)},expression:"formValidate.pay_limit"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[e._v("不限购")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("单次限购")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("长期限购")])],1)],1)],1),e._v(" "),0!=e.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:e.formValidate.once_min_count,"controls-position":"right",placeholder:"请输入购买件数"},model:{value:e.formValidate.once_max_count,callback:function(t){e.$set(e.formValidate,"once_max_count",t)},expression:"formValidate.once_max_count"}}),e._v("\n 单次限购是限制每次下单最多购买的数量,长期限购是限制一个用户总共可以购买的数量\n ")],1)],1)],1):e._e(),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-col",e._b({},"el-col",e.grid,!1),[a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{"controls-position":"right",placeholder:"请输入排序"},model:{value:e.formValidate.sort,callback:function(t){e.$set(e.formValidate,"sort",t)},expression:"formValidate.sort"}})],1)],1)],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台保障服务:"}},[a("div",{staticClass:"acea-row"},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},model:{value:e.formValidate.guarantee_template_id,callback:function(t){e.$set(e.formValidate,"guarantee_template_id",t)},expression:"formValidate.guarantee_template_id"}},e._l(e.guaranteeList,(function(e){return a("el-option",{key:e.guarantee_template_id,attrs:{label:e.template_name,value:e.guarantee_template_id}})})),1),e._v(" "),a("el-button",{staticClass:"ml15",attrs:{size:"small"},on:{click:e.addServiceTem}},[e._v("添加服务说明模板")])],1)])],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"平台商品参数:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:e.sysSpecsSelect,props:e.propsMer,filterable:"",clearable:""},on:{change:e.getSpecsList},model:{value:e.formValidate.param_temp_id,callback:function(t){e.$set(e.formValidate,"param_temp_id",t)},expression:"formValidate.param_temp_id"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",[a("el-table",{ref:"tableParameter",attrs:{border:"",data:e.formValidate.params,"row-key":"parameter_value_id","header-row-class-name":"head-table"}},[a("el-table-column",{attrs:{align:"center",label:"参数名称","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"priceBox",attrs:{disabled:0==t.row.mer_id,placeholder:"请输入参数名称"},model:{value:t.row.name,callback:function(a){e.$set(t.row,"name",a)},expression:"scope.row.name"}})]}}],null,!1,2809106159)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"参数值","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"priceBox",attrs:{min:0,placeholder:"请输入参数值"},model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}})]}}],null,!1,3804019920)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作","min-width":"60"},scopedSlots:e._u([{key:"default",fn:function(t){return[0!=t.row.mer_id?a("el-button",{staticClass:"submission",attrs:{type:"text"},nativeOn:{click:function(a){return a.preventDefault(),e.delSpecs(t.$index)}}},[e._v("删除")]):e._e()]}}],null,!1,1785171797)})],1),e._v(" "),a("el-button",{staticClass:"mt20",attrs:{type:"defalut",size:"small"},on:{click:e.addSpecs}},[e._v("添加参数")]),e._v(" "),a("el-select",{staticClass:"selWidth",attrs:{multiple:"",placeholder:"添加自定义参数模板"},on:{change:e.getSpecsList},model:{value:e.customSpecs,callback:function(t){e.customSpecs=t},expression:"customSpecs"}},e._l(e.merSpecsSelect,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),1==e.formValidate.type?a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"自定义留言:"}},[a("el-radio-group",{on:{change:e.customMessBtn},model:{value:e.customBtn,callback:function(t){e.customBtn=t},expression:"customBtn"}},[a("el-radio",{attrs:{label:0}},[e._v("关闭")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("开启")])],1),e._v(" "),e.customBtn?a("div",{staticClass:"addCustom_content"},e._l(e.formValidate.extend,(function(t,i){return a("div",{key:i,staticClass:"custom_box",attrs:{type:"flex"}},[a("el-input",{staticStyle:{width:"100px","margin-right":"10px"},attrs:{placeholder:"留言标题"+(i+1)},model:{value:t.title,callback:function(a){e.$set(t,"title","string"===typeof a?a.trim():a)},expression:"item.title"}}),e._v(" "),a("el-select",{staticStyle:{width:"200px","margin-left":"6px","margin-right":"10px"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"item.key"}},e._l(e.CustomList,(function(t){return a("el-option",{key:t.value,attrs:{value:t.value,label:t.label}},[e._v(e._s(t.label)+"\n ")])})),1),e._v(" "),a("el-checkbox",{model:{value:t.require,callback:function(a){e.$set(t,"require",a)},expression:"item.require"}},[e._v("必填")]),e._v(" "),e.formValidate.extend.length-1?a("div",{staticClass:"addfont",on:{click:function(t){return e.delcustom(i)}}},[e._v("\n 删除\n ")]):e._e()],1)})),0):e._e(),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.customBtn,expression:"customBtn"}],staticClass:"addCustomBox"},[a("div",{staticClass:"btn",on:{click:e.addcustom}},[e._v("+ 添加表单")]),e._v(" "),a("div",{staticClass:"remark"},[a("div",[e._v("备注:")]),e._v(" "),a("div",[a("div",{staticClass:"titTip"},[e._v("\n 1.用户下单时需填写的信息,最多可设置10条\n ")]),e._v(" "),a("div",{staticClass:"titTip"},[e._v("\n 2.虚拟物品不可加入购物车,用户可直接购买\n ")])])])])],1)],1):e._e()],1):e._e(),e._v(" "),a("el-form-item",{staticStyle:{"margin-top":"30px"}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.currentTab>1,expression:"currentTab > 1"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:e.handleSubmitUp}},[e._v("上一步\n ")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.currentTab<5,expression:"currentTab < 5"}],staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleSubmitNest("formValidate")}}},[e._v("下一步\n ")]),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:"5"==e.currentTab||e.$route.params.id,expression:"currentTab == '5' || $route.params.id"}],staticClass:"submission",attrs:{loading:e.loading,type:"primary",size:"small"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("提交\n ")]),e._v(" "),a("el-button",{staticClass:"submission",attrs:{loading:e.loading,type:"primary",size:"small"},on:{click:function(t){return e.handlePreview("formValidate")}}},[e._v("预览\n ")])],1)],1)],1),e._v(" "),a("guarantee-service",{ref:"serviceGuarantee",on:{"get-list":e.getGuaranteeList}}),e._v(" "),e.previewVisible?a("div",[a("div",{staticClass:"bg",on:{click:function(t){t.stopPropagation(),e.previewVisible=!1}}}),e._v(" "),e.previewVisible?a("preview-box",{ref:"previewBox",attrs:{"preview-key":e.previewKey}}):e._e()],1):e._e(),e._v(" "),a("tao-bao",{ref:"taoBao",on:{"info-data":e.infoData}})],1)},r=[],l=a("c80c"),n=(a("96cf"),a("3b8d")),o=(a("a481"),a("c5f6"),a("2d63")),s=(a("7f7f"),a("bd86")),c=(a("28a5"),a("8615"),a("55dd"),a("ac6a"),a("6762"),a("2fdb"),a("6b54"),a("75fc")),d=a("ef0d"),u=a("6625"),m=a.n(u),p=a("aa47"),f=a("c4c8"),h=a("83d6"),_=a("ae43"),g=a("8c98"),v=a("bbcc"),b=a("5f87"),y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"Box"},[e.modals?a("el-dialog",{attrs:{visible:e.modals,width:"70%",title:"商品采集","custom-class":"dialog-scustom"},on:{"update:visible":function(t){e.modals=t}}},[a("el-card",[a("div",[e._v("复制淘宝、天猫、京东、苏宁、1688;")]),e._v("\n 生成的商品默认是没有上架的,请手动上架商品!\n "),a("span",{staticStyle:{color:"rgb(237, 64, 20)"}},[e._v("商品复制次数剩余:"+e._s(e.count)+"次")]),e._v(" "),a("router-link",{attrs:{to:{path:e.roterPre+"/setting/sms/sms_pay/index?type=copy"}}},[a("el-button",{attrs:{size:"small",type:"text"}},[e._v("增加采集次数")])],1),e._v(" "),a("el-button",{staticStyle:{"margin-left":"15px"},attrs:{size:"small",type:"primary"},on:{click:e.openRecords}},[e._v("查看商品复制记录")])],1),e._v(" "),a("el-form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{model:e.formValidate,rules:e.ruleInline,"label-width":"130px","label-position":"right"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"链接地址:"}},[a("el-input",{staticClass:"numPut",attrs:{search:"",placeholder:"请输入链接地址"},model:{value:e.soure_link,callback:function(t){e.soure_link=t},expression:"soure_link"}}),e._v(" "),a("el-button",{attrs:{loading:e.loading,size:"small",type:"primary"},on:{click:e.add}},[e._v("确定")])],1)],1)],1):e._e(),e._v(" "),a("copy-record",{ref:"copyRecord"})],1)},w=[],V=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.showRecord?a("el-dialog",{attrs:{title:"复制记录",visible:e.showRecord,width:"900px"},on:{"update:visible":function(t){e.showRecord=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData.data,size:"mini","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID",prop:"mer_id","min-width":"50"}}),e._v(" "),a("el-table-column",{attrs:{label:"使用次数",prop:"num","min-width":"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"复制商品平台名称",prop:"type","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{label:"剩余次数",prop:"number","min-width":"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"商品复制链接",prop:"info","min-width":"180"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作时间",prop:"create_time","min-width":"120"}})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[10,20],"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1)]):e._e()},x=[],k={name:"CopyRecord",data:function(){return{showRecord:!1,loading:!1,tableData:{data:[],total:0},tableFrom:{page:1,limit:10}}},methods:{getRecord:function(){var e=this;this.showRecord=!0,this.loading=!0,Object(f["Z"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.loading=!1})).catch((function(t){e.$message.error(t.message),e.listLoading=!1}))},pageChange:function(e){this.tableFrom.page=e,this.getRecord()},pageChangeLog:function(e){this.tableFromLog.page=e,this.getRecord()},handleSizeChange:function(e){this.tableFrom.limit=e,this.getRecord()}}},C=k,$=(a("f099"),a("2877")),B=Object($["a"])(C,V,x,!1,null,"6d70337e",null),O=B.exports,L={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}]},T={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量(KG)"},volume:{title:"体积(m³)"}},S={name:"CopyTaoBao",components:{ueditorFrom:d["a"],copyRecord:O},data:function(){var e=v["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(b["a"])();return{roterPre:h["roterPre"],modals:!1,loading:!1,loading1:!1,BaseURL:v["a"].https||"http://localhost:8080",OneattrValue:[Object.assign({},L.attrValue[0])],ManyAttrValue:[Object.assign({},L.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:e,imageUrl:e,imageFieldName:"file",imageUrlPrefix:"",imageActionName:"upfile",imageMaxSize:2048e3,imageAllowFiles:[".png",".jpg",".jpeg",".gif",".bmp"]},formThead:Object.assign({},T),formValidate:Object.assign({},L),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 e=Object.assign({},L.attrValue[0]);return delete e.image,e}},watch:{},created:function(){},mounted:function(){this.getCopyCount()},methods:{getLabelLst:function(){var e=this;Object(f["v"])().then((function(t){e.labelList=t.data})).catch((function(t){e.$message.error(t.message)}))},getCopyCount:function(){var e=this;Object(f["Y"])().then((function(t){e.count=t.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 e,t=Object(o["a"])(this.ManyAttrValue);try{for(t.s();!(e=t.n()).done;){var a=e.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){t.e(i)}finally{t.f()}},delAttrTable:function(e){this.ManyAttrValue.splice(e,1)},productGetTemplate:function(){var e=this;Object(f["wb"])().then((function(t){e.shippingList=t.data}))},getGuaranteeList:function(){var e=this;Object(f["B"])().then((function(t){e.guaranteeList=t.data}))},handleRemove:function(e){this.formValidate.slider_image.splice(e,1)},checked:function(e,t){this.formValidate.image=e},goodsCategory:function(){var e=this;Object(f["q"])().then((function(t){e.categoryList=t.data})).catch((function(t){e.$message.error(t.message)}))},getCategorySelect:function(){var e=this;Object(f["r"])().then((function(t){e.merCateList=t.data})).catch((function(t){e.$message.error(t.message)}))},getBrandListApi:function(){var e=this;Object(f["p"])().then((function(t){e.BrandList=t.data})).catch((function(t){e.$message.error(t.message)}))},virtualbtn:function(e,t){this.formValidate.type=e,this.productCon()},watCh:function(e){var t=this,a={},i={};this.formValidate.attr.forEach((function(e,t){a["value"+t]={title:e.value},i["value"+t]=""})),this.ManyAttrValue=this.attrFormat(e),console.log(this.ManyAttrValue),this.ManyAttrValue.forEach((function(e,a){var i=Object.values(e.detail).sort().join("/");t.attrInfo[i]&&(t.ManyAttrValue[a]=t.attrInfo[i]),e.image=t.formValidate.image})),this.attrInfo={},this.ManyAttrValue.forEach((function(e){"undefined"!==e.detail&&null!==e.detail&&(t.attrInfo[Object.values(e.detail).sort().join("/")]=e)})),this.manyTabTit=a,this.manyTabDate=i,this.formThead=Object.assign({},this.formThead,a)},attrFormat:function(e){var t=[],a=[];return i(e);function i(e){if(e.length>1)e.forEach((function(i,r){0===r&&(t=e[r]["detail"]);var l=[];t.forEach((function(t){e[r+1]&&e[r+1]["detail"]&&e[r+1]["detail"].forEach((function(i){var n=(0!==r?"":e[r]["value"]+"_$_")+t+"-$-"+e[r+1]["value"]+"_$_"+i;if(l.push(n),r===e.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};n.split("-$-").forEach((function(e,t){var a=e.split("_$_");o["detail"]||(o["detail"]={}),o["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(o.detail).forEach((function(e,t){o["value"+t]=e})),a.push(o)}}))})),t=l.length?l:[]}));else{var i=[];e.forEach((function(e,t){e["detail"].forEach((function(t,r){i[r]=e["value"]+"_"+t,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(s["a"])({},e["value"],t)},Object.values(a[r].detail).forEach((function(e,t){a[r]["value"+t]=e}))}))})),t.push(i.join("$&"))}return console.log(a),a}},add:function(){var e=this;if(this.soure_link){var t=/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;if(!t.test(this.soure_link))return this.$message.warning("请输入以http开头的地址!");this.artFrom.url=this.soure_link,this.loading=!0,Object(f["s"])(this.artFrom).then((function(t){var a=t.data;e.modals=!1,e.$emit("info-data",a)})).catch((function(t){e.$message.error(t.message),e.loading=!1}))}else this.$message.warning("请输入链接地址!")},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){e?(t.modal_loading=!0,t.formValidate.cate_id=t.formValidate.cate_id instanceof Array?t.formValidate.cate_id.pop():t.formValidate.cate_id,t.formValidate.once_count=t.formValidate.once_count||0,1==t.formValidate.spec_type?t.formValidate.attrValue=t.ManyAttrValue:(t.formValidate.attrValue=t.OneattrValue,t.formValidate.attr=[]),t.formValidate.is_copoy=1,t.loading1=!0,Object(f["X"])(t.formValidate).then((function(e){t.$message.success("商品默认为不上架状态请手动上架商品!"),t.loading1=!1,setTimeout((function(){t.modal_loading=!1}),500),setTimeout((function(){t.modals=!1}),600),t.$emit("getSuccess")})).catch((function(e){t.modal_loading=!1,t.$message.error(e.message),t.loading1=!1}))):t.formValidate.cate_id||t.$message.warning("请填写商品分类!")}))},modalPicTap:function(e,t,a){this.tableIndex=a;var i=this;this.$modalUpload((function(t){console.log(i.formValidate.attr[i.tableIndex]),"1"===e&&("pi"===a?i.oneFormBatch[0].image=t[0]:i.OneattrValue[0].image=t[0]),"2"===e&&(i.ManyAttrValue[i.tableIndex].image=t[0]),i.modalPic=!1}),e)},getPic:function(e){this.callback(e),this.formValidate.attr[this.tableIndex].pic=e.att_dir,this.modalPic=!1},handleDragStart:function(e,t){this.dragging=t},handleDragEnd:function(e,t){this.dragging=null},handleDragOver:function(e){e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){if(e.dataTransfer.effectAllowed="move",t!==this.dragging){var a=Object(c["a"])(this.formValidate.slider_image),i=a.indexOf(this.dragging),r=a.indexOf(t);a.splice.apply(a,[r,0].concat(Object(c["a"])(a.splice(i,1)))),this.formValidate.slider_image=a}},addCustomDialog:function(e){window.UE.registerUI("test-dialog",(function(e,t){var a=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:e,name:t,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}))}}},j=S,F=(a("c722"),Object($["a"])(j,y,w,!1,null,"5245ffd2",null)),D=F.exports,A={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,params:[],attrValue:[{image:"",price:null,cost:null,ot_price:null,svip_price:null,stock:null,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},E={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},svip_price:{title:"付费会员价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量(KG)"},volume:{title:"体积(m³)"}},P=[{name:"店铺推荐",value:"is_good"}],R={name:"ProductProductAdd",components:{ueditorFrom:d["a"],VueUeditorWrap:m.a,guaranteeService:_["a"],previewBox:g["a"],taoBao:D,copyRecord:O},data:function(){var e=v["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(b["a"])();return{myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",enableAutoSave:!1,UEDITOR_HOME_URL:"/UEditor/",serverUrl:e,imageUrl:e,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:h["roterPre"],selectRule:"",checkboxGroup:[],recommend:P,tabs:[],fullscreenLoading:!1,props:{emitPath:!1},propsMer:{emitPath:!0},active:0,deduction_set:-1,OneattrValue:[Object.assign({},A.attrValue[0])],ManyAttrValue:[Object.assign({},A.attrValue[0])],ruleList:[],merCateList:[],categoryList:[],shippingList:[],guaranteeList:[],BrandList:[],deliveryList:[],labelList:[],formThead:Object.assign({},E),formValidate:Object.assign({},A),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,manyFormValidate:[],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"}],mer_cate_id:[{required:!0,message:"请选择商户商品分类",trigger:"change"}],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:"虚拟发货"}],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,customSpecs:[],merSpecsSelect:[],sysSpecsSelect:[]}},computed:{attrValue:function(){var e=Object.assign({},this.attrVal);return e},oneFormBatch:function(){var e=[Object.assign({},A.attrValue[0])];return this.OneattrValue[0]&&this.OneattrValue[0]["image"]&&(e[0]["image"]=this.OneattrValue[0]["image"]),delete e[0].bar_code,e}},watch:{"formValidate.attr":{handler:function(e){1===this.formValidate.spec_type&&this.watCh(e)},immediate:!1,deep:!0},currentTab:function(e){var t=this;5==e&&this.$nextTick((function(e){t.setSort()}))}},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(){var e=this;this.formValidate.slider_image=[],this.$route.params.id?(this.setTagsViewTitle(),this.getInfo()):(this.getSpecsLst(this.formValidate.cate_id),-1==this.deduction_set&&(this.formValidate.integral_rate=-1)),this.formValidate.attr.map((function(t){e.$set(t,"inputVisible",!1)})),1==this.$route.query.type?(this.type=this.$route.query.type,this.$refs.taoBao.modals=!0):this.type=0,this.getCategorySelect(),this.getCategoryList(),this.getBrandListApi(),this.getShippingList(),this.getGuaranteeList(),this.productCon(),this.productGetRule(),this.getLabelLst(),this.$store.dispatch("settings/setEdit",!0)},destroyed:function(){window.removeEventListener("popstate",this.goBack,!1)},methods:{setSort:function(){var e=this,t=this.$refs.tableParameter.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];this.sortable=p["default"].create(t,{ghostClass:"sortable-ghost",setData:function(e){e.setData("Text","")},onEnd:function(t){e.elChangeExForArray(t.oldIndex,t.newIndex,e.formValidate.params)}})},elChangeExForArray:function(e,t,a){var i=a[e];return a[e]=a[t],a[t]=i,a},goBack:function(){sessionStorage.clear(),window.history.back()},handleCloseCoupon:function(e){var t=this;this.formValidate.couponData.splice(this.formValidate.couponData.indexOf(e),1),this.formValidate.give_coupon_ids=[],this.formValidate.couponData.map((function(e){t.formValidate.give_coupon_ids.push(e.coupon_id)}))},getSpecsLst:function(e){var t=this,a=e||this.formValidate.cate_id;Object(f["zb"])({cate_id:a}).then((function(e){t.merSpecsSelect=e.data.mer,t.sysSpecsSelect=e.data.sys})).catch((function(e){t.$message.error(e.message)}))},productCon:function(){var e=this;Object(f["W"])().then((function(t){e.extensionStatus=t.data.extension_status,e.deductionStatus=t.data.integral_status,e.deliveryType=t.data.delivery_way.map(String),e.open_svip=1==t.data.mer_svip_status&&1==t.data.svip_switch_status,e.svip_rate=t.data.svip_store_rate;var a=0==e.formValidate.type?"快递配送":"虚拟发货";e.$route.params.id||(e.formValidate.delivery_way=e.deliveryType),2==e.deliveryType.length?e.deliveryList=[{value:"1",name:"到店自提"},{value:"2",name:a}]:1==e.deliveryType.length&&"1"==e.deliveryType[0]?e.deliveryList=[{value:"1",name:"到店自提"}]:e.deliveryList=[{value:"2",name:a}]})).catch((function(t){e.$message.error(t.message)}))},getLabelLst:function(){var e=this;Object(f["v"])().then((function(t){e.labelList=t.data})).catch((function(t){e.$message.error(t.message)}))},addCoupon:function(){var e=this;this.$modalCoupon(this.formValidate.couponData,"wu",e.formValidate.give_coupon_ids,this.keyNum+=1,(function(t){e.formValidate.give_coupon_ids=[],e.formValidate.couponData=t,t.map((function(t){e.formValidate.give_coupon_ids.push(t.coupon_id)}))}))},delSpecs:function(e){this.formValidate.params.splice(e,1)},addSpecs:function(){this.formValidate.params.push({name:"",value:"",sort:0})},getSpecsList:function(){var e=this,t=Object(c["a"])(this.customSpecs),a=[this.formValidate.param_temp_id].concat(),i=[].concat(Object(c["a"])(t),Object(c["a"])(a));console.log(i),console.log(this.customSpecs),i.length<=0?(this.formValidate.merParams=[],this.formValidate.sysParams=[]):Object(f["ib"])({template_ids:i.toString()}).then((function(t){e.formValidate.params=t.data})).catch((function(t){e.$message.error(t.message)}))},setTagsViewTitle:function(){var e="编辑商品",t=Object.assign({},this.tempRoute,{title:"".concat(e,"-").concat(this.$route.params.id)});this.$store.dispatch("tagsView/updateVisitedView",t)},onChangeGroup:function(){this.checkboxGroup.includes("is_good")?this.formValidate.is_good=1:this.formValidate.is_good=0},watCh:function(e){var t=this,a={},i={};this.formValidate.attr.forEach((function(e,t){a["value"+t]={title:e.value},i["value"+t]=""})),this.ManyAttrValue=this.attrFormat(e),this.ManyAttrValue.forEach((function(e,a){var i=Object.values(e.detail).sort().join("/");t.attrInfo[i]&&(t.ManyAttrValue[a]=t.attrInfo[i])})),this.attrInfo={},this.ManyAttrValue.forEach((function(e){"undefined"!==e.detail&&null!==e.detail&&(t.attrInfo[Object.values(e.detail).sort().join("/")]=e)})),this.manyTabTit=a,this.manyTabDate=i,this.formThead=Object.assign({},this.formThead,a)},attrFormat:function(e){var t=[],a=[];return i(e);function i(e){if(e.length>1)e.forEach((function(i,r){0===r&&(t=e[r]["detail"]);var l=[];t.forEach((function(t){e[r+1]&&e[r+1]["detail"]&&e[r+1]["detail"].forEach((function(i){var n=(0!==r?"":e[r]["value"]+"_$_")+t+"-$-"+e[r+1]["value"]+"_$_"+i;if(l.push(n),r===e.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};n.split("-$-").forEach((function(e,t){var a=e.split("_$_");o["detail"]||(o["detail"]={}),o["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(o.detail).forEach((function(e,t){o["value"+t]=e})),a.push(o)}}))})),t=l.length?l:[]}));else{var i=[];e.forEach((function(e,t){e["detail"].forEach((function(t,r){i[r]=e["value"]+"_"+t,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(s["a"])({},e["value"],t)},Object.values(a[r].detail).forEach((function(e,t){a[r]["value"+t]=e}))}))})),t.push(i.join("$&"))}return a}},addTem:function(){var e=this;this.$modalTemplates(0,(function(){e.getShippingList()}))},addServiceTem:function(){this.$refs.serviceGuarantee.add()},delVideo:function(){var e=this;e.$set(e.formValidate,"video_link","")},zh_uploadFile:function(){this.videoLink?this.formValidate.video_link=this.videoLink:this.$refs.refid.click()},zh_uploadFile_change:function(e){var t=this;t.progress=10;var a=e.target.files[0].name.substr(e.target.files[0].name.indexOf("."));if(".mp4"!==a)return t.$message.error("只能上传MP4文件");Object(f["db"])().then((function(a){t.$videoCloud.videoUpload({type:a.data.type,evfile:e,res:a,uploading:function(e,a){t.upload.videoIng=e}}).then((function(e){t.formValidate.video_link=e.url||e.data.src,t.$message.success("视频上传成功"),t.progress=100})).catch((function(e){t.upload.videoIng=!1,t.$message.error(e.message)}))}))},addRule:function(){var e=this;this.$modalAttr(this.formDynamics,(function(){e.productGetRule()}))},onChangeSpec:function(e){1===e&&this.productGetRule()},changeIntergral:function(e){this.formValidate.integral_rate=-1==e?-1:this.formValidate.integral_rate},confirm:function(){var e=this;if(!this.selectRule)return this.$message.warning("请选择属性");this.ruleList.forEach((function(t){t.attr_template_id===e.selectRule&&(e.formValidate.attr=t.template_value)}))},getCategorySelect:function(){var e=this;Object(f["r"])().then((function(t){e.merCateList=t.data})).catch((function(t){e.$message.error(t.message)}))},getCategoryList:function(){var e=this;Object(f["q"])().then((function(t){e.categoryList=t.data})).catch((function(t){e.$message.error(t.message)}))},getBrandListApi:function(){var e=this;Object(f["p"])().then((function(t){e.BrandList=t.data})).catch((function(t){e.$message.error(t.message)}))},productGetRule:function(){var e=this;Object(f["Nb"])().then((function(t){e.ruleList=t.data}))},getShippingList:function(){var e=this;Object(f["wb"])().then((function(t){e.shippingList=t.data}))},getGuaranteeList:function(){var e=this;Object(f["B"])().then((function(t){e.guaranteeList=t.data}))},showInput:function(e){this.$set(e,"inputVisible",!0)},virtualbtn:function(e,t){if(this.$route.params.id)return this.$message.warning("商品类型不能切换!");this.formValidate.type=e,this.productCon()},customMessBtn:function(e){e||(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(e){this.formValidate.extend.splice(e,1)},onChangetype:function(e){var t=this;1===e?(this.OneattrValue.map((function(e){t.$set(e,"extension_one",null),t.$set(e,"extension_two",null)})),this.ManyAttrValue.map((function(e){t.$set(e,"extension_one",null),t.$set(e,"extension_two",null)}))):(this.OneattrValue.map((function(e){delete e.extension_one,delete e.extension_two,t.$set(e,"extension_one",null),t.$set(e,"extension_two",null)})),this.ManyAttrValue.map((function(e){delete e.extension_one,delete e.extension_two})))},onChangeSpecs:function(e){if(1==e||2==e){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 t,a=0,i=Object(o["a"])(this.ManyAttrValue);try{for(i.s();!(t=i.n()).done;){var r=t.value;a=r.price?this.accMul(r.price,this.svip_rate):0,this.$set(r,"svip_price",a)}}catch(l){i.e(l)}finally{i.f()}}else this.attrVal={price:null,cost:null,ot_price:null,stock:null,bar_code:"",weight:null,volume:null}},memberPrice:function(e,t){"售价"==e.title&&(t.svip_price=this.accMul(t.price,this.svip_rate))},accMul:function(e,t){var a=0,i=e.toString(),r=t.toString();try{a+=i.split(".")[1].length}catch(l){}try{a+=r.split(".")[1].length}catch(l){}return Number(i.replace(".",""))*Number(r.replace(".",""))/Math.pow(10,a)},delAttrTable:function(e){this.ManyAttrValue.splice(e,1)},batchAdd:function(){var e,t=Object(o["a"])(this.ManyAttrValue);try{for(t.s();!(e=t.n()).done;){var a=e.value;console.log(this.oneFormBatch[0]),""!=this.oneFormBatch[0].image&&this.$set(a,"image",this.oneFormBatch[0].image),null!=this.oneFormBatch[0].price&&this.$set(a,"price",this.oneFormBatch[0].price),null!=this.oneFormBatch[0].cost&&this.$set(a,"cost",this.oneFormBatch[0].cost),null!=this.oneFormBatch[0].ot_price&&this.$set(a,"ot_price",this.oneFormBatch[0].ot_price),null!=this.oneFormBatch[0].svip_price&&this.$set(a,"svip_price",this.oneFormBatch[0].svip_price),null!=this.oneFormBatch[0].stock&&this.$set(a,"stock",this.oneFormBatch[0].stock),null!=this.oneFormBatch[0].bar_code&&this.$set(a,"bar_code",this.oneFormBatch[0].bar_code),null!=this.oneFormBatch[0].weight&&this.$set(a,"weight",this.oneFormBatch[0].weight),null!=this.oneFormBatch[0].volume&&this.$set(a,"volume",this.oneFormBatch[0].volume),null!=this.oneFormBatch[0].extension_one&&this.$set(a,"extension_one",this.oneFormBatch[0].extension_one),null!=this.oneFormBatch[0].extension_two&&this.$set(a,"extension_two",this.oneFormBatch[0].extension_two)}}catch(i){t.e(i)}finally{t.f()}},addBtn:function(){this.clearAttr(),this.isBtn=!0},offAttrName:function(){this.isBtn=!1},clearAttr:function(){this.formDynamic.attrsName="",this.formDynamic.attrsVal=""},handleRemoveAttr:function(e){this.formValidate.attr.splice(e,1),this.manyFormValidate.splice(e,1)},handleClose:function(e,t){e.splice(t,1)},createAttrName:function(){if(this.formDynamic.attrsName&&this.formDynamic.attrsVal){var e={value:this.formDynamic.attrsName,detail:[this.formDynamic.attrsVal]};this.formValidate.attr.push(e);var t={};this.formValidate.attr=this.formValidate.attr.reduce((function(e,a){return!t[a.value]&&(t[a.value]=e.push(a)),e}),[]),this.clearAttr(),this.isBtn=!1}else this.$message.warning("请添加完整的规格!")},createAttr:function(e,t){if(e){this.formValidate.attr[t].detail.push(e);var a={};this.formValidate.attr[t].detail=this.formValidate.attr[t].detail.reduce((function(e,t){return!a[t]&&(a[t]=e.push(t)),e}),[]),this.formValidate.attr[t].inputVisible=!1}else this.$message.warning("请添加属性")},getInfo:function(){var e=this;this.fullscreenLoading=!0,Object(f["cb"])(this.$route.params.id).then(function(){var t=Object(n["a"])(Object(l["a"])().mark((function t(a){var i;return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=a.data,e.infoData(i),e.getSpecsLst(i.cate_id);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.$message.error(t.message)}))},infoData:function(e){var t=this;this.deduction_set=-1==e.integral_rate?-1:1,this.formValidate={image:e.image,attrValue:e.attrValue,slider_image:e.slider_image,store_name:e.store_name,store_info:e.store_info,keyword:e.keyword,params:e.params,param_temp_id:e.param_temp_id,brand_id:e.brand_id,cate_id:e.cate_id,mer_cate_id:e.mer_cate_id,unit_name:e.unit_name,sort:e.sort,once_max_count:e.once_max_count||1,once_min_count:e.once_min_count||0,is_good:e.is_good,temp_id:e.temp_id,guarantee_template_id:e.guarantee_template_id?e.guarantee_template_id:"",attr:e.attr,pay_limit:e.pay_limit||0,extension_type:e.extension_type,content:e.content,spec_type:Number(e.spec_type),give_coupon_ids:e.give_coupon_ids,is_gift_bag:e.is_gift_bag,couponData:e.coupon,video_link:e.video_link?e.video_link:"",integral_rate:e.integral_rate,delivery_way:e.delivery_way&&e.delivery_way.length?e.delivery_way.map(String):this.deliveryType,delivery_free:e.delivery_free?e.delivery_free:0,mer_labels:e.mer_labels&&e.mer_labels.length?e.mer_labels.map(Number):[],type:e.type||0,extend:e.extend||[],svip_price_type:e.svip_price_type||0},0!=e.svip_price_type&&(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?this.OneattrValue=e.attrValue:(this.ManyAttrValue=e.attrValue,this.ManyAttrValue.forEach((function(e){"undefined"!==e.detail&&null!==e.detail&&(t.attrInfo[Object.values(e.detail).sort().join("/")]=e)}))),1===this.formValidate.is_good&&this.checkboxGroup.push("is_good"),this.fullscreenLoading=!1},onClose:function(e){this.modals=!1,this.infoData(e)},handleRemove:function(e){this.formValidate.slider_image.splice(e,1)},modalPicTap:function(e,t,a){var i=this,r=[];this.$modalUpload((function(l){"1"!==e||t||(i.formValidate.image=l[0],i.OneattrValue[0].image=l[0]),"2"!==e||t||l.map((function(e){r.push(e.attachment_src),i.formValidate.slider_image.push(e),i.formValidate.slider_image.length>10&&(i.formValidate.slider_image.length=10)})),"1"===e&&"dan"===t&&(i.OneattrValue[0].image=l[0]),"1"===e&&"duo"===t&&(i.ManyAttrValue[a].image=l[0]),"1"===e&&"pi"===t&&(i.oneFormBatch[0].image=l[0])}),e)},handleSubmitUp:function(){this.currentTab=(Number(this.currentTab)-1).toString()},handleSubmitNest:function(e){var t=this;this.$refs[e].validate((function(e){e&&(t.currentTab=(Number(t.currentTab)+1).toString())}))},handleSubmit:function(e){var t=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=[]),this.$refs[e].validate((function(a){if(a){t.fullscreenLoading=!0,t.loading=!0;var i=t.$route.params.id&&!t.$route.query.type;i?Object(f["lb"])(t.$route.params.id,t.formValidate).then(function(){var a=Object(n["a"])(Object(l["a"])().mark((function a(i){return Object(l["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.fullscreenLoading=!1,t.$message.success(i.message),t.$router.push({path:t.roterPre+"/product/list"}),t.$refs[e].resetFields(),t.formValidate.slider_image=[],t.loading=!1;case 6:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){t.fullscreenLoading=!1,t.loading=!1,t.$message.error(e.message)})):Object(f["ab"])(t.formValidate).then(function(){var e=Object(n["a"])(Object(l["a"])().mark((function e(a){return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.fullscreenLoading=!1,t.$message.success(a.message),t.$router.push({path:t.roterPre+"/product/list"}),t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.fullscreenLoading=!1,t.loading=!1,t.$message.error(e.message)}))}else{if(!t.formValidate.store_name.trim())return t.$message.warning("基本信息-商品名称不能为空");if(!t.formValidate.unit_name)return t.$message.warning("基本信息-单位不能为空");if(!t.formValidate.cate_id)return t.$message.warning("基本信息-平台商品分类不能为空");if(!t.formValidate.mer_cate_id)return t.$message.warning("基本信息-商户商品分类不能为空");if(!t.formValidate.image)return t.$message.warning("基本信息-商品封面图不能为空");if(t.formValidate.slider_image.length<0)return t.$message.warning("基本信息-商品轮播图不能为空")}}))},handlePreview:function(e){var t=this;this.onChangeGroup(),1===this.formValidate.spec_type?this.formValidate.attrValue=this.ManyAttrValue:(this.formValidate.attrValue=this.OneattrValue,this.formValidate.attr=[]),Object(f["fb"])(this.formValidate).then(function(){var e=Object(n["a"])(Object(l["a"])().mark((function e(a){return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.previewVisible=!0,t.previewKey=a.data.preview_key;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},validate:function(e,t,a){!1===t&&this.$message.warning(a)},specPicValidate:function(e){for(var t=0;t<e.length;t++)if(""===e[t].image||!e[t].image){this.$message.warning("请上传商品规格图!"),this.picValidate=!1;break}},handleDragStart:function(e,t){this.dragging=t},handleDragEnd:function(e,t){this.dragging=null},handleDragOver:function(e){e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){if(e.dataTransfer.effectAllowed="move",t!==this.dragging){var a=Object(c["a"])(this.formValidate.slider_image),i=a.indexOf(this.dragging),r=a.indexOf(t);a.splice.apply(a,[r,0].concat(Object(c["a"])(a.splice(i,1)))),this.formValidate.slider_image=a}},addCustomDialog:function(e){window.UE.registerUI("test-dialog",(function(e,t){var a=new window.UE.ui.Dialog({iframeUrl:h["roterPre"]+"/admin/widget/image?field=dialog",editor:e,name:t,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(e,t){var a=new window.UE.ui.Dialog({iframeUrl:h["roterPre"]+"/admin/widget/video?fodder=video",editor:e,name:t,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)}}},I=R,M=(a("47b5"),Object($["a"])(I,i,r,!1,null,"5300c1ac",null));t["default"]=M.exports},"47b5":function(e,t,a){"use strict";a("9559")},"504c":function(e,t,a){var i=a("9e1e"),r=a("0d58"),l=a("6821"),n=a("52a7").f;e.exports=function(e){return function(t){var a,o=l(t),s=r(o),c=s.length,d=0,u=[];while(c>d)a=s[d++],i&&!n.call(o,a)||u.push(e?[a,o[a]]:o[a]);return u}}},8615:function(e,t,a){var i=a("5ca1"),r=a("504c")(!1);i(i.S,"Object",{values:function(e){return r(e)}})},9559:function(e,t,a){},b78c:function(e,t,a){},c33c:function(e,t,a){},c722:function(e,t,a){"use strict";a("b78c")},f099:function(e,t,a){"use strict";a("c33c")}}]); |