(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5d5e0d85"],{edf7: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:"article-manager video-icon form-submit",attrs:{id:"shopp-manager"}},[a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs"},[a("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/product/index"}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20 ml16",domProps:{textContent:t._s(t.$route.params.id?"编辑商品":"添加商品")}})],1)])],1),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("div",{staticClass:"new_tab"},[a("Tabs",{on:{"on-click":t.onhangeTab},model:{value:t.currentTab,callback:function(e){t.currentTab=e},expression:"currentTab"}},t._l(t.headTab,(function(t,e){return a("TabPane",{key:e,attrs:{label:t.title,name:t.name}})})),1)],1),a("Form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("Row",{directives:[{name:"show",rawName:"v-show",value:"1"===t.currentTab,expression:"currentTab === '1'"}],attrs:{gutter:24,type:"flex"}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品名称:",prop:"store_name"}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品名称"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品分类:",prop:"cate_id"}},[a("el-cascader",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请选择商品分类",size:"mini",options:t.treeSelect,props:t.props,filterable:"",clearable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1)],1),a("Col",{staticClass:"brandName",attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品品牌:",prop:""}},[a("Cascader",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{data:t.brandData,placeholder:"请选择商品品牌","change-on-select":"",filterable:""},model:{value:t.formValidate.brand_id,callback:function(e){t.$set(t.formValidate,"brand_id",e)},expression:"formValidate.brand_id"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"单位:",prop:"unit_name"}},[a("Select",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{clearable:"",filterable:"",placeholder:"请输入单位"},model:{value:t.formValidate.unit_name,callback:function(e){t.$set(t.formValidate,"unit_name",e)},expression:"formValidate.unit_name"}},t._l(t.unitNameList,(function(e,i){return a("Option",{key:i,attrs:{value:e.name}},[t._v(t._s(e.name))])})),1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{staticClass:"labelClass",attrs:{label:"商品标签:",prop:"store_label_id"}},[a("div",{staticClass:"acea-row row-middle"},[a("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:t.openStoreLabel}},[a("div",{staticStyle:{width:"90%"}},[t.storeDataLabel.length?a("div",t._l(t.storeDataLabel,(function(e,i){return a("Tag",{attrs:{closable:""},on:{"on-close":function(a){return t.closeStoreLabel(e)}}},[t._v(t._s(e.label_name))])})),1):a("span",{staticClass:"span"},[t._v("选择商品标签")])]),a("div",{staticClass:"iconfont iconxiayi"})]),a("span",{staticClass:"addClass",on:{click:t.addStoreLabel}},[t._v("新增标签")])])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品编码:",prop:""}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品编码"},model:{value:t.formValidate.code,callback:function(e){t.$set(t.formValidate,"code",e)},expression:"formValidate.code"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{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:"true"},on:{dragstart:function(a){return t.handleDragStart(a,e)},dragover:function(a){return a.preventDefault(),t.handleDragOver(a,e)},dragenter:function(a){return t.handleDragEnter(a,e)},dragend:function(a){return t.handleDragEnd(a,e)}}},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e,expression:"item"}]}),a("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){return t.handleRemove(i)}}})],1)})),t.formValidate.slider_image.length<10?a("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(e){return t.modalPicTap("duo")}}},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1):t._e(),a("Input",{staticClass:"input-display",model:{value:t.formValidate.slider_image[0],callback:function(e){t.$set(t.formValidate.slider_image,0,e)},expression:"formValidate.slider_image[0]"}})],2),a("div",{staticClass:"tips"},[t._v(" 建议尺寸:800 * 800px,可拖拽改变图片顺序,默认首张图为主图,最多上传10张")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"添加视频:"}},[a("i-switch",{attrs:{size:"large"},model:{value:t.formValidate.video_open,callback:function(e){t.$set(t.formValidate,"video_open",e)},expression:"formValidate.video_open"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.formValidate.video_open?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"视频类型:"}},[a("RadioGroup",{on:{"on-change":t.changeVideo},model:{value:t.seletVideo,callback:function(e){t.seletVideo=e},expression:"seletVideo"}},[a("Radio",{staticClass:"radio",attrs:{label:0}},[t._v("本地视频")]),a("Radio",{attrs:{label:1}},[t._v("视频链接")])],1)],1)],1):t._e(),t.formValidate.video_open?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:"video_link"}},[1!=t.seletVideo||t.formValidate.video_link?t._e():a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入视频链接"},model:{value:t.videoLink,callback:function(e){t.videoLink=e},expression:"videoLink"}}),a("input",{ref:"refid",staticClass:"input-display",attrs:{type:"file"},on:{change:t.zh_uploadFile_change}}),0!=t.seletVideo||"1"===t.upload_type&&!t.videoLink||t.formValidate.video_link?t._e():a("div",{staticClass:"ml10 videbox",on:{click:t.zh_uploadFile}},[t._v("\n +\n ")]),1!=t.seletVideo||"1"===t.upload_type&&!t.videoLink||t.formValidate.video_link?t._e():a("Button",{staticClass:"uploadVideo",attrs:{type:"primary",icon:"ios-cloud-upload-outline"},on:{click:t.zh_uploadFile}},[t._v("确认添加")]),"1"!==t.upload_type||t.videoLink?t._e():a("Upload",{staticStyle:{display:"inline-block"},attrs:{"show-upload-list":!1,action:t.fileUrl2,"before-upload":t.videoSaveToUrl,data:t.uploadData,headers:t.header,multiple:!0}},[0!==t.seletVideo||t.formValidate.video_link?t._e():a("div",{staticClass:"videbox"},[t._v("\n +\n ")])]),t.formValidate.video_link?a("div",{staticClass:"iview-video-style"},[a("video",{staticClass:"video-style",attrs:{src:t.formValidate.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")]),a("div",{staticClass:"mark"}),a("Icon",{staticClass:"iconv",attrs:{type:"ios-trash-outline"},on:{click:t.delVideo}})],1):t._e(),t.upload.videoIng||t.videoIng?a("Progress",{staticClass:"progress",attrs:{percent:t.progress,"stroke-width":5}}):t._e(),a("div",{staticClass:"tips"},[t._v("建议时长:9~30秒,视频宽高比16:9")])],1)],1):t._e(),a("Col",{staticClass:"goodsShow",attrs:{span:"24"}},[a("FormItem",{attrs:{label:"上架时间:"}},[a("RadioGroup",{on:{"on-change":t.goodsOn},model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}},[a("Radio",{attrs:{label:1}},[a("Icon",{attrs:{type:"social-apple"}}),a("span",[t._v("立即上架")])],1),a("Radio",{attrs:{label:2}},[a("Icon",{attrs:{type:"social-android"}}),a("span",[t._v("定时上架")])],1),a("Radio",{attrs:{label:0}},[a("Icon",{attrs:{type:"social-windows"}}),a("span",[t._v("放入仓库")])],1)],1)],1)],1),2==t.formValidate.is_show?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:""}},[a("DatePicker",{staticStyle:{width:"260px"},attrs:{type:"datetime",options:t.startPickOptions,value:t.formValidate.auto_on_time,placeholder:"请选择上架时间",format:"yyyy-MM-dd HH:mm"},on:{"on-change":t.onchangeShow},model:{value:t.formValidate.auto_on_time,callback:function(e){t.$set(t.formValidate,"auto_on_time",e)},expression:"formValidate.auto_on_time"}})],1)],1):t._e(),a("Col",{staticClass:"goodsShow",attrs:{span:"24"}},[a("FormItem",{attrs:{label:"定时下架:"}},[a("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":t.goodsOff},model:{value:t.off_show,callback:function(e){t.off_show=e},expression:"off_show"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),1==t.off_show?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:""}},[a("DatePicker",{staticStyle:{width:"260px"},attrs:{type:"datetime",options:t.endPickOptions,value:t.formValidate.auto_off_time,placeholder:"请选择下架时间",format:"yyyy-MM-dd HH:mm"},on:{"on-change":t.onchangeOff},model:{value:t.formValidate.auto_off_time,callback:function(e){t.$set(t.formValidate,"auto_off_time",e)},expression:"formValidate.auto_off_time"}}),a("div",{staticClass:"tips"},[t._v("开启定时下架后,系统会在设置时间下架该商品。下架时间需晚于开售时间,商品才能定时开售。")])],1)],1):t._e()],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:"2"===t.currentTab,expression:"currentTab === '2'"}],attrs:{gutter:24,type:"flex"}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品规格:",props:"spec_type"}},[a("RadioGroup",{on:{"on-change":t.changeSpec},model:{value:t.formValidate.spec_type,callback:function(e){t.$set(t.formValidate,"spec_type",e)},expression:"formValidate.spec_type"}},[a("Radio",{staticClass:"radio",attrs:{label:0}},[t._v("单规格")]),a("Radio",{attrs:{label:1}},[t._v("多规格")])],1)],1)],1),1===t.formValidate.spec_type?a("Col",{staticClass:"noForm",attrs:{span:"24"}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"选择规格:",prop:""}},[a("div",{staticClass:"acea-row row-middle"},[a("Select",{staticStyle:{width:"23%"},model:{value:t.formValidate.selectRule,callback:function(e){t.$set(t.formValidate,"selectRule",e)},expression:"formValidate.selectRule"}},t._l(t.ruleList,(function(e,i){return a("Option",{key:i,attrs:{value:e.rule_name}},[t._v(t._s(e.rule_name))])})),1),a("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确认")]),a("Button",{on:{click:t.addRule}},[t._v("添加规格模板")])],1)])],1),a("Col",{attrs:{span:"24"}},[0!==t.attrs.length?a("FormItem",[a("draggable",{staticClass:"dragArea list-group",attrs:{list:t.attrs,group:"peoples",handle:".move-icon",move:t.checkMove},on:{end:t.end}},t._l(t.attrs,(function(e,i){return a("div",{key:i,staticClass:"acea-row row-middle mb10"},[a("div",{staticClass:"move-icon"},[a("span",{staticClass:"iconfont icondrag2"})]),a("div",{class:t.moveIndex===i?"borderStyle":"",staticStyle:{width:"90%"}},[a("div",{staticClass:"acea-row row-middle"},[a("span",{staticClass:"mr5"},[t._v(t._s(e.value))]),a("Icon",{staticClass:"curs",attrs:{type:"ios-close-circle",size:"14"},on:{click:function(e){return t.handleRemoveRole(i)}}})],1),a("div",{staticClass:"rulesBox"},[a("draggable",{attrs:{list:e.detail,handle:".drag"}},t._l(e.detail,(function(i,r){return a("Tag",{key:r,staticClass:"mr20 drag",attrs:{type:"dot",closable:"",color:"primary",name:i},on:{"on-close":function(a){return t.handleRemove2(e.detail,r)}}},[t._v(t._s(i))])})),1),a("Input",{staticClass:"width-add",attrs:{search:"","enter-button":"添加",placeholder:"请输入属性名称"},on:{"on-search":function(a){return t.createAttr(e.detail.attrsVal,i)}},model:{value:e.detail.attrsVal,callback:function(a){t.$set(e.detail,"attrsVal",a)},expression:"item.detail.attrsVal"}})],1)])])})),0)],1):t._e()],1),t.createBnt?a("Col",{attrs:{span:"24"}},[a("FormItem",[a("Button",{staticClass:"mr15",attrs:{type:"primary",icon:"md-add"},on:{click:t.addBtn}},[t._v("添加新规格")]),a("Button",{attrs:{type:"success"},on:{click:function(e){return t.generate(1)}}},[t._v("立即生成")])],1)],1):t._e(),t.showIput?a("Col",{attrs:{span:"24"}},[a("Col",{attrs:{xl:6,lg:9,md:10,sm:24,xs:24}},[a("FormItem",{attrs:{label:"规格:"}},[a("Input",{attrs:{placeholder:"请输入规格"},model:{value:t.formDynamic.attrsName,callback:function(e){t.$set(t.formDynamic,"attrsName",e)},expression:"formDynamic.attrsName"}})],1)],1),a("Col",{attrs:{xl:6,lg:9,md:10,sm:24,xs:24}},[a("FormItem",{attrs:{label:"规格值:"}},[a("Input",{attrs:{placeholder:"请输入规格值"},model:{value:t.formDynamic.attrsVal,callback:function(e){t.$set(t.formDynamic,"attrsVal",e)},expression:"formDynamic.attrsVal"}})],1)],1),a("Col",{attrs:{xl:6,lg:5,md:10,sm:24,xs:24}},[a("FormItem",[a("Button",{staticClass:"mr15",attrs:{type:"primary"},on:{click:t.createAttrName}},[t._v("确定")]),a("Button",{on:{click:t.offAttrName}},[t._v("取消")])],1)],1)],1):t._e(),t.manyFormValidate.length&&0!==t.formValidate.header.length&&0!==t.attrs.length?a("Col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{staticClass:"labeltop",attrs:{label:"批量设置:"}},[a("Table",{attrs:{data:t.oneFormBatch,columns:1==t.formValidate.product_type?t.columnsCarMy:3==t.formValidate.product_type?t.columnsFictitious:t.columns2,border:""},scopedSlots:t._u([{key:"attr",fn:function(e){e.row,e.index;return[a("div",{staticClass:"acea-row row-between-wrapper",staticStyle:{cursor:"pointer"},on:{click:t.batchAttr}},[a("div",{staticStyle:{width:"41px"}},[t._v(t._s(t.oneFormBatch[0].attr))]),a("span",{staticClass:"iconfont icondrop-down"})])]}},{key:"pic",fn:function(e){e.row;var i=e.index;return[a("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","duopi",i)}}},[t.oneFormBatch[0].pic?a("div",{staticClass:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormBatch[0].pic,expression:"oneFormBatch[0].pic"}]})]):a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("Icon",{staticClass:"iosfont",attrs:{type:"ios-camera-outline",size:"26"}})],1)])]}},{key:"price",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].price,callback:function(e){t.$set(t.oneFormBatch[0],"price",e)},expression:"oneFormBatch[0].price"}})]}},{key:"settle_price",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].settle_price,callback:function(e){t.$set(t.oneFormBatch[0],"settle_price",e)},expression:"oneFormBatch[0].settle_price"}})]}},{key:"ot_price",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].ot_price,callback:function(e){t.$set(t.oneFormBatch[0],"ot_price",e)},expression:"oneFormBatch[0].ot_price"}})]}},{key:"stock",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0,disabled:1==t.formValidate.product_type||t.openErp},model:{value:t.oneFormBatch[0].stock,callback:function(e){t.$set(t.oneFormBatch[0],"stock",e)},expression:"oneFormBatch[0].stock"}})]}},{key:"bar_code",fn:function(e){e.row,e.index;return[a("Input",{model:{value:t.oneFormBatch[0].bar_code,callback:function(e){t.$set(t.oneFormBatch[0],"bar_code",e)},expression:"oneFormBatch[0].bar_code"}})]}},{key:"award_price",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].award_price,callback:function(e){t.$set(t.oneFormBatch[0],"award_price",e)},expression:"oneFormBatch[0].award_price"}})]}},{key:"code",fn:function(e){e.row,e.index;return[a("Input",{model:{value:t.oneFormBatch[0].code,callback:function(e){t.$set(t.oneFormBatch[0],"code",e)},expression:"oneFormBatch[0].code"}})]}},{key:"weight",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{step:.1,min:0},model:{value:t.oneFormBatch[0].weight,callback:function(e){t.$set(t.oneFormBatch[0],"weight",e)},expression:"oneFormBatch[0].weight"}})]}},{key:"volume",fn:function(e){e.row,e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{step:.1,min:0},model:{value:t.oneFormBatch[0].volume,callback:function(e){t.$set(t.oneFormBatch[0],"volume",e)},expression:"oneFormBatch[0].volume"}})]}},{key:"fictitious",fn:function(e){var i=e.row;e.index;return 1==t.formValidate.product_type?[i.virtual_list||i.stock?a("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(t.oneFormBatch[0],"oneFormBatch",0)}}},[t._v("已设置")]):a("Button",{on:{click:function(e){return t.addVirtual(0,"oneFormBatch")}}},[t._v("添加卡密")])]:void 0}},{key:"action",fn:function(e){e.row,e.index;return[a("a",{on:{click:t.batchAdd}},[t._v("批量设置")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:t.batchDel}},[t._v("清空")])]}}],null,!0)})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{staticClass:"labeltop",attrs:{label:"商品属性:"}},[a("Table",{attrs:{data:t.manyFormValidate,columns:t.formValidate.header,border:""},scopedSlots:t._u([t._l(t.attrData.length,(function(e,i){return{key:"value"+(i+1),fn:function(e){e.row;var r=e.index;return[a("div",{class:t.manyFormValidate[r].select?"selectOn":""},[t._v(t._s(t.manyFormValidate[r]["value"+(i+1)]))])]}}})),{key:"pic",fn:function(e){e.row;var i=e.index;return[a("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","duoTable",i)}}},[t.manyFormValidate[i].pic?a("div",{staticClass:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.manyFormValidate[i].pic,expression:"manyFormValidate[index].pic"}]})]):a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("Icon",{attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}},{key:"price",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].price,callback:function(e){t.$set(t.manyFormValidate[i],"price",e)},expression:"manyFormValidate[index].price"}})]}},{key:"settle_price",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].settle_price,callback:function(e){t.$set(t.manyFormValidate[i],"settle_price",e)},expression:"manyFormValidate[index].settle_price"}})]}},{key:"ot_price",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].ot_price,callback:function(e){t.$set(t.manyFormValidate[i],"ot_price",e)},expression:"manyFormValidate[index].ot_price"}})]}},{key:"stock",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0,precision:0,disabled:1==t.formValidate.product_type||t.openErp},model:{value:t.manyFormValidate[i].stock,callback:function(e){t.$set(t.manyFormValidate[i],"stock",e)},expression:"manyFormValidate[index].stock"}})]}},{key:"fictitious",fn:function(e){var i=e.row,r=e.index;return 1==t.formValidate.product_type?[i.virtual_list&&i.virtual_list.length||i.stock?a("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(i,"manyFormValidate",r)}}},[t._v("已设置")]):a("Button",{on:{click:function(e){return t.addVirtual(r,"manyFormValidate")}}},[t._v("添加卡密")])]:void 0}},{key:"bar_code",fn:function(e){e.row;var i=e.index;return[a("Input",{model:{value:t.manyFormValidate[i].bar_code,callback:function(e){t.$set(t.manyFormValidate[i],"bar_code",e)},expression:"manyFormValidate[index].bar_code"}})]}},{key:"award_price",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].award_price,callback:function(e){t.$set(t.manyFormValidate[i],"award_price",e)},expression:"manyFormValidate[index].award_price"}})]}},{key:"code",fn:function(e){e.row;var i=e.index;return[a("Input",{model:{value:t.manyFormValidate[i].code,callback:function(e){t.$set(t.manyFormValidate[i],"code",e)},expression:"manyFormValidate[index].code"}})]}},{key:"weight",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].weight,callback:function(e){t.$set(t.manyFormValidate[i],"weight",e)},expression:"manyFormValidate[index].weight"}})]}},{key:"volume",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].volume,callback:function(e){t.$set(t.manyFormValidate[i],"volume",e)},expression:"manyFormValidate[index].volume"}})]}},{key:"action",fn:function(e){e.row;var i=e.index;return[a("a",{on:{click:function(e){return t.delAttrTable(i)}}},[t._v("删除")])]}}],null,!0)})],1)],1)],1):t._e()],1):t._e(),0===t.formValidate.spec_type?a("div",{staticStyle:{width:"100%"}},[a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"图片:",prop:"image"}},[a("div",{staticClass:"pictrueBox",on:{click:function(e){return t.modalPicTap("dan","danTable",0)}}},[t.oneFormValidate[0].pic?a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormValidate[0].pic,expression:"oneFormValidate[0].pic"}]})]):a("div",{staticClass:"upLoad acea-row row-center-wrapper"},[a("Input",{staticClass:"input-display",model:{value:t.oneFormValidate[0].pic,callback:function(e){t.$set(t.oneFormValidate[0],"pic",e)},expression:"oneFormValidate[0].pic"}}),a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)])])],1),a("Col",{staticClass:"asterisk",attrs:{span:"24"}},[a("div",{staticClass:"asteriskInfo"},[t._v("*")]),a("FormItem",{attrs:{label:"售价:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].price,callback:function(e){t.$set(t.oneFormValidate[0],"price",e)},expression:"oneFormValidate[0].price"}})],1)],1),a("Col",{staticClass:"asterisk",attrs:{span:"24"}},[a("div",{staticClass:"asteriskInfo on"},[t._v("*")]),a("FormItem",{attrs:{label:"结算价:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].settle_price,callback:function(e){t.$set(t.oneFormValidate[0],"settle_price",e)},expression:"oneFormValidate[0].settle_price"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"原价:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].ot_price,callback:function(e){t.$set(t.oneFormValidate[0],"ot_price",e)},expression:"oneFormValidate[0].ot_price"}})],1)],1),a("Col",{staticClass:"asterisk",attrs:{span:"24"}},[a("div",{staticClass:"asteriskInfo"},[t._v("*")]),a("FormItem",{attrs:{label:"库存:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999,disabled:1==t.formValidate.product_type||t.openErp,precision:0},model:{value:t.oneFormValidate[0].stock,callback:function(e){t.$set(t.oneFormValidate[0],"stock",e)},expression:"oneFormValidate[0].stock"}})],1)],1),a("Col",{staticClass:"asterisk",attrs:{span:"24"}},[a("div",{staticClass:"asteriskInfo"},[t._v("*")]),a("FormItem",{attrs:{label:"奖金结算:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999,precision:0},model:{value:t.oneFormValidate[0].award_price,callback:function(e){t.$set(t.oneFormValidate[0],"award_price",e)},expression:"oneFormValidate[0].award_price"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品条形码:"}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品条形码"},model:{value:t.oneFormValidate[0].bar_code,callback:function(e){t.$set(t.oneFormValidate[0],"bar_code","string"===typeof e?e.trim():e)},expression:"oneFormValidate[0].bar_code"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品编号:"}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品编码"},model:{value:t.oneFormValidate[0].code,callback:function(e){t.$set(t.oneFormValidate[0],"code","string"===typeof e?e.trim():e)},expression:"oneFormValidate[0].code"}})],1)],1),0==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"重量(KG):"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].weight,callback:function(e){t.$set(t.oneFormValidate[0],"weight",e)},expression:"oneFormValidate[0].weight"}})],1)],1):t._e(),0==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"体积(m³):"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:99999999},model:{value:t.oneFormValidate[0].volume,callback:function(e){t.$set(t.oneFormValidate[0],"volume",e)},expression:"oneFormValidate[0].volume"}})],1)],1):t._e(),1==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"卡密设置:"}},[t.oneFormValidate[0].virtual_list.length||t.oneFormValidate[0].stock?a("span",{staticClass:"seeCatMy",on:{click:function(e){return t.seeVirtual(t.oneFormValidate[0],"oneFormValidate",0)}}},[t._v("已设置")]):a("Button",{on:{click:function(e){return t.addVirtual(0,"oneFormValidate")}}},[t._v("添加卡密")])],1)],1):t._e()],1):t._e()],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:"3"===t.currentTab,expression:"currentTab === '3'"}],staticClass:"mb10"},[a("Col",{attrs:{span:"16"}},[a("wangeditor",{staticStyle:{width:"100%"},attrs:{content:t.contents},on:{editorContent:t.getEditorContent}})],1),a("Col",{staticStyle:{width:"33%"},attrs:{span:"6"}},[a("div",{staticClass:"ifam"},[a("div",{staticClass:"content",domProps:{innerHTML:t._s(t.content)}})])])],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:"4"===t.currentTab,expression:"currentTab === '4'"}]},[a("Col",t._b({},"Col",t.grid3,!1),[a("FormItem",{attrs:{label:"配送方式:",prop:"",required:""}},[a("CheckboxGroup",{model:{value:t.formValidate.delivery_type,callback:function(e){t.$set(t.formValidate,"delivery_type",e)},expression:"formValidate.delivery_type"}},[a("Checkbox",{attrs:{label:"1"}},[t._v("快递")])],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"运费设置:"}},[a("RadioGroup",{model:{value:t.formValidate.freight,callback:function(e){t.$set(t.formValidate,"freight",e)},expression:"formValidate.freight"}},[a("Radio",{attrs:{label:1}},[t._v("包邮")]),a("Radio",{attrs:{label:2}},[t._v("固定邮费")]),a("Radio",{attrs:{label:3}},[t._v("运费模板")])],1)],1)],1),2==t.formValidate.freight?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:"freight"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{staticClass:"perW20 maxW",attrs:{min:0,placeholder:"请输入金额"},model:{value:t.formValidate.postage,callback:function(e){t.$set(t.formValidate,"postage",e)},expression:"formValidate.postage"}}),a("span",{staticClass:"ml10"},[t._v("元")])],1)])],1):t._e(),3==t.formValidate.freight?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:""}},[a("div",{staticClass:"acea-row"},[a("Select",{staticClass:"perW20 maxW",attrs:{clearable:""},model:{value:t.formValidate.temp_id,callback:function(e){t.$set(t.formValidate,"temp_id",e)},expression:"formValidate.temp_id"}},t._l(t.templateList,(function(e,i){return a("Option",{key:i,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1),t.formValidate.temp_id?a("Button",{staticClass:"ml15",on:{click:t.editTemp}},[t._v("查看运费模板")]):a("Button",{staticClass:"ml15",on:{click:t.addTemp}},[t._v("添加运费模板")])],1)])],1):t._e(),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"已售数量:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:999999,placeholder:"请输入已售数量"},model:{value:t.formValidate.ficti,callback:function(e){t.$set(t.formValidate,"ficti",e)},expression:"formValidate.ficti"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"是否限购:"}},[a("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":t.limitTap},model:{value:t.formValidate.is_limit,callback:function(e){t.$set(t.formValidate,"is_limit",e)},expression:"formValidate.is_limit"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.formValidate.is_limit?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"限购类型:"}},[a("RadioGroup",{model:{value:t.formValidate.limit_type,callback:function(e){t.$set(t.formValidate,"limit_type",e)},expression:"formValidate.limit_type"}},[a("Radio",{attrs:{label:1}},[t._v("单次限购")]),a("Radio",{attrs:{label:2}},[t._v("长期限购")])],1),a("div",{staticClass:"tips"},[t._v("\n 单次限购是限制每次下单最多购买的数量,长期限购是限制一个用户总共可以购买的数量\n ")])],1)],1):t._e(),t.formValidate.is_limit?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"限购数量:"}},[a("InputNumber",{staticClass:"perW20 maxW",attrs:{min:1,placeholder:"请输入限购数量"},model:{value:t.formValidate.limit_num,callback:function(e){t.$set(t.formValidate,"limit_num",e)},expression:"formValidate.limit_num"}})],1)],1):t._e(),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"排序:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:999999,placeholder:"请输入排序"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品关键字:",prop:""}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{placeholder:"请输入商品关键字"},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品简介:",prop:""}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{type:"textarea",rows:3,placeholder:"请输入商品简介"},model:{value:t.formValidate.store_info,callback:function(e){t.$set(t.formValidate,"store_info",e)},expression:"formValidate.store_info"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品口令:"}},[a("Input",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{type:"textarea",rows:3,placeholder:"请输入商品口令"},model:{value:t.formValidate.command_word,callback:function(e){t.$set(t.formValidate,"command_word",e)},expression:"formValidate.command_word"}})],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品推荐图:"}},[a("div",{staticClass:"pictrueBox",on:{click:function(e){return t.modalPicTap("dan","recommend_image")}}},[t.formValidate.recommend_image?a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.recommend_image,expression:"formValidate.recommend_image"}]}),a("Input",{staticClass:"input-display",model:{value:t.formValidate.recommend_image,callback:function(e){t.$set(t.formValidate,"recommend_image",e)},expression:"formValidate.recommend_image"}})],1):a("div",{staticClass:"upLoad acea-row row-center-wrapper"},[a("Input",{staticClass:"input-display",model:{value:t.formValidate.recommend_image,callback:function(e){t.$set(t.formValidate,"recommend_image",e)},expression:"formValidate.recommend_image"}}),a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1)]),a("div",{staticClass:"tips"},[t._v("(建议图片比例5:2)")])])],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"服务保障:"}},[a("CheckboxGroup",{staticClass:"checkAlls",model:{value:t.formValidate.ensure_id,callback:function(e){t.$set(t.formValidate,"ensure_id",e)},expression:"formValidate.ensure_id"}},t._l(t.ensureData,(function(e,i){return a("Checkbox",{attrs:{label:e.id}},[t._v(t._s(e.name))])})),1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品参数:",prop:""}},[a("Select",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{clearable:"",filterable:"",placeholder:"请输入商品参数"},on:{"on-change":t.specsInfo},model:{value:t.formValidate.specs_id,callback:function(e){t.$set(t.formValidate,"specs_id",e)},expression:"formValidate.specs_id"}},t._l(t.specsData,(function(e,i){return a("Option",{key:i,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)],1),t.formValidate.specs_id?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",props:""}},[a("Table",{ref:"table",staticClass:"specsList",attrs:{border:"",columns:t.specsColumns,data:t.specsList,width:"700"},scopedSlots:t._u([{key:"action",fn:function(e){e.row;var i=e.index;return[i>0?a("a",{on:{click:function(e){return t.delSpecs(i)}}},[t._v("删除")]):t._e()]}}],null,!1,3048928172)}),a("Button",{staticClass:"mt20",on:{click:t.addSpecs}},[t._v("添加参数")])],1)],1):t._e(),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"自定义留言:"}},[a("i-switch",{attrs:{size:"large"},on:{"on-change":t.customMessBtn},model:{value:t.customBtn,callback:function(e){t.customBtn=e},expression:"customBtn"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),t.customBtn?a("div",{staticClass:"mt10"},[a("Select",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{filterable:"",placeholder:"请选择"},on:{"on-change":t.changeForm},model:{value:t.formValidate.system_form_id,callback:function(e){t.$set(t.formValidate,"system_form_id",e)},expression:"formValidate.system_form_id"}},t._l(t.formList,(function(e,i){return a("Option",{key:e.id,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1):t._e()],1)],1),t.customBtn&&t.formValidate.system_form_id?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",props:""}},[a("Table",{ref:"table",staticClass:"specsList on",attrs:{border:"",columns:t.formColumns,data:t.formTypeList},scopedSlots:t._u([{key:"require",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.require?"必填":"不必填"))])]}}],null,!1,469424967)})],1)],1):t._e()],1),t.spinShow?a("Spin",{attrs:{size:"large",fix:""}}):t._e()],1),a("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?a("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic,getPicD:t.getPicD}}):t._e()],1)],1),a("Card",{staticClass:"fixed-card",style:{left:t.menuCollapse?t.isMobile?"0":"80px":"200px"},attrs:{bordered:!1,"dis-hover":""}},[a("Form",[a("FormItem",["1"!==t.currentTab?a("Button",{on:{click:t.upTab}},[t._v("上一步")]):t._e(),"4"!==t.currentTab?a("Button",{staticClass:"submission",attrs:{type:"primary"},on:{click:function(e){return t.downTab("formValidate")}}},[t._v("下一步")]):t._e(),t.$route.params.id||"4"===t.currentTab?a("Button",{staticClass:"submission",attrs:{type:"primary",disabled:t.openSubimit},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("保存")]):t._e()],1)],1)],1),a("freightTemplate",{ref:"templates",attrs:{template:t.template},on:{changeTemplate:t.changeTemplate}}),a("add-attr",{ref:"addattr",on:{getList:t.userSearchs}}),a("Modal",{attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.goodCancel},model:{value:t.goodsModals,callback:function(e){t.goodsModals=e},expression:"goodsModals"}},[t.goodsModals?a("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0},on:{getProductId:t.getProductId}}):t._e()],1),a("Modal",{attrs:{scrollable:"",title:"选择商品标签",closable:!0,width:"540","footer-hide":!0,"mask-closable":!1},model:{value:t.storeLabelShow,callback:function(e){t.storeLabelShow=e},expression:"storeLabelShow"}},[a("labelList",{ref:"storeLabel",on:{activeData:t.activeStoreData,close:t.storeLabelClose}})],1),a("menus-from",{ref:"menusFrom",attrs:{formValidate:t.formBrand,fromName:1}}),a("Modal",{attrs:{scrollable:"",title:"请选择商品规格",closable:!1,width:"320","footer-hide":!0,"mask-closable":!1},model:{value:t.attrShow,callback:function(e){t.attrShow=e},expression:"attrShow"}},[t.attrShow?a("attr-list",{attrs:{attrs:t.attrsList},on:{activeData:t.activeAttr,close:t.labelAttr,subAttrs:t.subAttrs}}):t._e()],1)],1)},r=[],o=a("a34a"),s=a.n(o),n=a("2f62"),l=a("d708"),c=a("c276"),d=a("310e"),m=a.n(d),u=a("b0e7"),p=a("5334"),f=a("a069"),h=a("2019"),v=a("0f0e"),_=a("e449"),g=a("c4ad"),b=a("2475"),y=a("645a"),w=a("c4c8"),V=a("0fc4"),k=a("0e5c");function x(t){return $(t)||C(t)||F()}function F(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function C(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function $(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);enew Date(t.formValidate.auto_off_time).getTime()-864e5:""}}},endPickOptions:function(){var t=this;return{disabledDate:function(e){return"1"==t.formValidate.is_show?e.getTime()9?this.$Message.warning("最多添加10条"):this.addAssembly()},delcustom:function(t){this.formValidate.custom_form.splice(t,1)},onchangeShow:function(t){this.formValidate.auto_on_time=t},onchangeOff:function(t){this.formValidate.auto_off_time=t},batchAttr:function(){this.attrShow=!0},getAttr:function(){this.oneFormBatch[0].attr="全部";var t=this.attrs;t.map((function(t){t.details=[],t.detail.map((function(e){t.details.push({name:e,select:!1})}))})),this.attrsList=t},activeAttr:function(t){this.attrsList=t},labelAttr:function(){this.attrShow=!1},manyEmpty:function(t){t.pic="",t.price=0,t.settle_price=0,t.cost=0,t.ot_price=0,t.stock=0,t.bar_code="",t.award_price="",t.code="",t.weight=0,t.volume=0,t.virtual_list=[]},doCombination:function(t){var e=t.length-1,a=[],i=[];return r(t,0);function r(t,o){var s=!0,n=!1,l=void 0;try{for(var c,d=t[o][Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var m=c.value;a[o]=m,o0&&this.$set(o,"price",this.oneFormBatch[0].price),this.oneFormBatch[0].settle_price>0&&this.$set(o,"settle_price",this.oneFormBatch[0].settle_price),this.oneFormBatch[0].cost>0&&this.$set(o,"cost",this.oneFormBatch[0].cost),this.oneFormBatch[0].ot_price>0&&this.$set(o,"ot_price",this.oneFormBatch[0].ot_price),this.oneFormBatch[0].stock>0&&this.$set(o,"stock",this.oneFormBatch[0].stock),""!==this.oneFormBatch[0].bar_code&&this.$set(o,"bar_code",this.oneFormBatch[0].bar_code),""!==this.oneFormBatch[0].award_price&&this.$set(o,"award_price",this.oneFormBatch[0].award_price),""!==this.oneFormBatch[0].code&&this.$set(o,"code",this.oneFormBatch[0].code),this.oneFormBatch[0].weight>0&&this.$set(o,"weight",this.oneFormBatch[0].weight),this.oneFormBatch[0].volume>0&&this.$set(o,"volume",this.oneFormBatch[0].volume),1==this.formValidate.product_type&&(this.oneFormBatch[0].virtual_list&&this.oneFormBatch[0].virtual_list.length?this.$set(o,"virtual_list",this.oneFormBatch[0].virtual_list):this.oneFormBatch[0].disk_info&&(this.$refs.addCarMy.cartMyType=1,this.$set(o,"disk_info",this.oneFormBatch[0].disk_info))))}}catch(s){e=!0,a=s}finally{try{t||null==r.return||r.return()}finally{if(e)throw a}}},addBtn:function(){this.clearAttr(),this.createBnt=!1,this.showIput=!0},addmanyData:function(t){t.forEach((function(t){t.select=!0})),this.manyFormValidate=t},generate:function(t){var e=this;Object(w["g"])({attrs:this.attrs,product_type:this.formValidate.product_type},this.formValidate.id,t).then((function(t){var a=t.data.info,i=JSON.parse(JSON.stringify(a.header));"0"!==e.$route.params.id&&e.addmanyData(a.value),e.formValidate.header=i,e.attrData=t.data.info.attr;var r=a.header;r.pop(),e.columnsInstalM=a.header,e.$route.params.id||1!==e.formValidate.spec_type?e.$route.params.id&&(e.manyFormValidate.map((function(t){t.pic||(t.pic=e.formValidate.slider_image[0])})),e.oneFormBatch[0].pic=e.formValidate.slider_image[0]):(e.manyFormValidate.map((function(t){t.pic=e.formValidate.slider_image[0]})),e.oneFormBatch[0].pic=e.formValidate.slider_image[0]),e.getAttr()})).catch((function(t){e.$Message.error(t.msg)}))},offAttrName:function(){this.showIput=!1,this.createBnt=!0},clearAttr:function(){this.formDynamic.attrsName="",this.formDynamic.attrsVal=""},handleRemoveRole:function(t){this.attrs.splice(t,1),this.manyFormValidate.splice(t,1)},handleRemove2:function(t,e){t.splice(e,1)},createAttrName:function(){if(this.formDynamic.attrsName&&this.formDynamic.attrsVal){var t={value:this.formDynamic.attrsName,detail:[this.formDynamic.attrsVal]};this.attrs.push(t);var e={};this.attrs=this.attrs.reduce((function(t,a){return!e[a.value]&&(e[a.value]=t.push(a)),t}),[]),this.clearAttr(),this.showIput=!1,this.createBnt=!0}else this.$Message.warning("请添加完整的规格!")},createAttr:function(t,e){if(t){this.attrs[e].detail.push(t);var a={};this.attrs[e].detail=this.attrs[e].detail.reduce((function(t,e){return!a[e]&&(a[e]=t.push(e)),t}),[])}else this.$Message.warning("请添加属性")},goodsCategory:function(){var t=this;Object(w["f"])(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},changeVideo:function(t){this.formValidate.video_link="",this.videoLink=""},changeSpec:function(){},getInfo:function(){var t=this,e=this;e.spinShow=!0,Object(w["u"])(e.$route.params.id||this.$route.query.copy).then((function(e){var a=e.data.productInfo;t.infoData(a),t.spinShow=!1})).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))},onhangeTab:function(t){this.currentTab=t},handleRemove:function(t){this.images.splice(t,1),this.formValidate.slider_image.splice(t,1),this.oneFormValidate[0].pic=this.formValidate.slider_image[0]},changeCancel:function(t){this.modalPic=!1},modalPicTap:function(t,e,a){this.modalPic=!0,this.isChoice="dan"===t?"单选":"多选",this.picTit=e,this.tableIndex=a},getPic:function(t){switch(this.picTit){case"danFrom":this.formValidate.image=t.att_dir,this.$route.params.id||(0===this.formValidate.spec_type?this.oneFormValidate[0].pic=t.att_dir:(this.manyFormValidate.map((function(e){e.pic=t.att_dir})),this.oneFormBatch[0].pic=t.att_dir));break;case"danTable":this.oneFormValidate[this.tableIndex].pic=t.att_dir;break;case"duopi":this.oneFormBatch[this.tableIndex].pic=t.att_dir;break;case"recommend_image":this.formValidate.recommend_image=t.att_dir;break;default:this.manyFormValidate[this.tableIndex].pic=t.att_dir}this.modalPic=!1},getPicD:function(t){var e=this;this.images=t,this.images.map((function(t){e.formValidate.slider_image.push(t.att_dir),e.formValidate.slider_image=e.formValidate.slider_image.splice(0,10)})),this.oneFormValidate[0].pic=this.formValidate.slider_image[0],this.modalPic=!1},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(t){if(!e.formValidate.store_name.trim())return e.$Message.warning("基础信息-商品名称不能为空");if(2==e.formValidate.is_show&&!e.formValidate.auto_on_time)return e.$Message.warning("基础信息-定时上架时间不能为空");if(1==e.off_show&&!e.formValidate.auto_off_time)return e.$Message.warning("基础信息-定时下架时间不能为空");if(2==e.formValidate.freight&&0==e.formValidate.product_type&&e.formValidate.postage<=0)return e.$Message.warning("物流设置-固定邮费不能为0");if(3==e.formValidate.freight&&0==e.formValidate.product_type&&!e.formValidate.temp_id)return e.$Message.warning("物流设置-运费模板不能为空");if(4==e.currentTab&&!e.formValidate.delivery_type.length)return e.$Message.warning("请选择配送方式");if(e.customBtn&&0==e.formValidate.system_form_id)return e.$Message.warning("其他设置-请选择自定义表单模板");if(e.formValidate.type=e.type,0===e.formValidate.spec_type?(e.formValidate.attrs=e.oneFormValidate,e.formValidate.header=[],e.formValidate.items=[]):(e.formValidate.items=e.attrs,e.formValidate.attrs=e.manyFormValidate),1===e.formValidate.spec_type&&0===e.manyFormValidate.length)return e.$Message.warning("规格库存-请点击生成多规格");e.formValidate.attrs;for(var a=0;a]*>/gi,(function(t,e){return t=t.replace(/style="[^"]+"/gi,"").replace(/style='[^']+'/gi,""),t=t.replace(/width="[^"]+"/gi,"").replace(/width='[^']+'/gi,""),t=t.replace(/height="[^"]+"/gi,"").replace(/height='[^']+'/gi,""),t}));return e=e.replace(/style="[^"]+"/gi,(function(t,e){return t=t.replace(/width:[^;]+;/gi,"max-width:100%;").replace(/width:[^;]+;/gi,"max-width:100%;"),t})),e=e.replace(/\