(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2496f5a3"],{"67ec":function(t,e,a){"use strict";var i=a("d5f5");a.n(i).a},c7e8:function(t,e,a){"use strict";a.r(e);var i=a("a34a"),r=a.n(i),o=a("2f62"),s=a("d708"),n=a("c276"),l=a("310e"),c=a.n(l),d=a("b0e7"),m=a("5334"),u=a("a069"),p=a("5671"),f=a("5d4b"),h=a("0f0e"),_=a("f1c7"),v=a("e449"),b=a("c4ad"),g=a("6fd3"),y=a("645a"),V=a("ad69"),w=a("4fd3"),k=a("c4c8"),x=a("90e7"),C=a("a6b9"),F=a("0fc4"),I=a("0e5c");function $(t){return function(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);enew Date(t.formValidate.auto_off_time).getTime():""}}},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)},onchangeTime:function(t){this.formValidate.presale_time=t},onchangeShow:function(t){this.formValidate.auto_on_time=t},onchangeOff:function(t){this.formValidate.auto_off_time=t},getSupplierList:function(){var t=this;Object(C.o)().then(function(){var e=T(r.a.mark((function e(a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.supplierList=a.data;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},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.code="",t.weight=0,t.volume=0,t.virtual_list=[]},doCombination:function(t){var e=t.length-1,a=[],i=[];return function t(r,o){var s=!0,n=!1,l=void 0;try{for(var c,d=r[o][Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var m=c.value;a[o]=m,o-1?this.columnsInstall=this.columns2.slice(1,5).concat(this.member):t.indexOf(1)>-1?this.columnsInstall=this.columns2.slice(1,5).concat(this.rakeBack):this.columnsInstall=this.columns2.slice(1,5),2===t.length&&(this.columnsInstall=this.columns2.slice(1,5).concat(this.rakeBack).concat(this.member))):(t.indexOf(0)>-1?this.columnsInstal2=this.columnsInstalM.slice(0,4).concat(this.member):t.indexOf(1)>-1?this.columnsInstal2=this.columnsInstalM.slice(0,4).concat(this.rakeBack):this.columnsInstal2=this.columnsInstalM.slice(0,4),2===t.length&&(this.columnsInstal2=this.columnsInstalM.slice(0,4).concat(this.rakeBack).concat(this.member)))},addCoupon:function(){this.$refs.couponTemplates.isTemplate=!0,this.$refs.couponTemplates.tableList()},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},nameId:function(t,e){this.formValidate.coupon_ids=t,this.couponName=this.unique(e)},handleClose:function(t){var e=this.couponName.indexOf(t);this.couponName.splice(e,1);var a=this.formValidate.coupon_ids;a.splice(e,1),this.updateIds=a,this.updateName=this.couponName},getStoreId:function(t){this.storeModals=!1;var e=this.storesList.concat(t),a=this.unique(e);this.storesList=a},getList:function(){this.productGetTemplate()},addTemp:function(){this.$refs.templates.isTemplate=!0},editTemp:function(){this.$refs.templates.isTemplate=!0,this.$refs.templates.editFrom(this.formValidate.temp_id)},delVideo:function(){this.$set(this.formValidate,"video_link",""),this.$set(this,"progress",0),this.videoIng=!1,this.upload.videoIng=!1,this.$refs.refid.value=""},zh_uploadFile:function(){if(1==this.seletVideo){if(!this.videoLink||"video"!=this.$getFileType(this.videoLink))return this.$Message.error("请输入正确的视频链接");this.formValidate.video_link=this.videoLink}else this.$refs.refid.click()},zh_uploadFile_change:function(t){var e=this;if(-1===t.target.files[0].name.substr(t.target.files[0].name.indexOf(".")).indexOf(".mp4"))return e.$Message.error("只能上传MP4文件");Object(k.M)().then((function(a){e.$videoCloud.videoUpload({type:a.data.type,evfile:t,res:a,uploading:function(t,i){e.upload.videoIng=t,200==a.status&&(e.progress=100)}}).then((function(t){e.formValidate.video_link=t.url,e.$Message.success("视频上传成功"),e.upload.videoIng=!1})).catch((function(t){e.$Message.error(t)}))})).catch((function(t){e.$Message.error(t.msg)}))},upTab:function(){5==this.currentTab&&0!=this.formValidate.product_type?this.currentTab=(Number(this.currentTab)-2).toString():this.currentTab=(Number(this.currentTab)-1).toString()},downTab:function(t){var e=this;this.$refs[t].validate((function(t){if(t){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(4==e.currentTab&&!e.formValidate.delivery_type.length)return e.$Message.warning("请选择配送方式");3==e.currentTab&&0!=e.formValidate.product_type?e.currentTab=(Number(e.currentTab)+2).toString():e.currentTab=(Number(e.currentTab)+1).toString()}else e.$Message.warning("请完善数据")}))},userSearchs:function(){this.productGetRule()},addRule:function(){this.$refs.addattr.modal=!0},brokerageSetUp:function(){if(this.formValidate.is_sub.indexOf(1)>-1){if(this.manyBrokerage<=0||this.manyBrokerageTwo<=0)return this.$Message.error("请填写返佣金额后进行批量添加")}else if(this.formValidate.is_sub.indexOf(0)>-1&&this.manyVipPrice<=0)return this.$Message.error("请填写会员价后进行批量添加");if(2===this.formValidate.is_sub.length&&(this.manyBrokerage<=0||this.manyBrokerageTwo<=0||this.manyVipPrice<=0))return this.$Message.error("请填写完金额后进行批量添加");var t=!0,e=!1,a=void 0;try{for(var i,r=this.manyFormValidate[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var o=i.value;this.$set(o,"brokerage",this.manyBrokerage),this.$set(o,"brokerage_two",this.manyBrokerageTwo),this.$set(o,"vip_price",this.manyVipPrice)}}catch(t){e=!0,a=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw a}}},vipPriceSetUp:function(){if(this.manyVipPrice<=0)return this.$Message.error("请填写会员价在进行批量添加");var t=!0,e=!1,a=void 0;try{for(var i,r=this.manyFormValidate[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var o=i.value;this.$set(o,"vip_price",this.manyVipPrice)}}catch(t){e=!0,a=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw a}}},batchDel:function(){this.oneFormBatch=[{attr:"全部",pic:"",price:0,settle_price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,virtualList:[],disk_info:""}],this.activeAtter=[];var t=!0,e=!1,a=void 0;try{for(var i,r=this.manyFormValidate[Symbol.iterator]();!(t=(i=r.next()).done);t=!0)i.value.select=!0}catch(t){e=!0,a=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw a}}},confirm:function(){var t=this;if(t.createBnt=!0,t.formValidate.selectRule.trim().length<=0)return t.$Message.error("请选择属性");t.ruleList.forEach((function(e,a){e.rule_name===t.formValidate.selectRule&&(t.attrs=e.rule_value)}))},productGetRule:function(){var t=this;Object(k.L)().then((function(e){t.ruleList=e.data}))},productGetTemplate:function(){var t=this,e=this.$route.params.id;Object(k.N)({id:e}).then((function(e){t.templateList=e.data}))},delAttrTable:function(t){var e=this,a=this.$route.params.id;a?Object(k.j)(a).then((function(a){e.manyFormValidate.splice(t,1),e.$Message.success(a.msg)})).catch((function(t){e.$Message.error(t.msg)})):this.manyFormValidate.splice(t,1)},batchAdd:function(){var t=!0,e=!1,a=void 0;try{for(var i,r=this.manyFormValidate[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var o=i.value;o.select&&(this.oneFormBatch[0].pic&&this.$set(o,"pic",this.oneFormBatch[0].pic),this.oneFormBatch[0].price>0&&this.$set(o,"price",this.oneFormBatch[0].price),this.oneFormBatch[0].settle_price>0&&2==this.merchantType&&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].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(t){e=!0,a=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw a}}},addBtn:function(){var t=this,e=this.$route.params.id;Object(k.j)(e).then((function(e){t.clearAttr(),t.createBnt=!1,t.showIput=!0})).catch((function(e){t.$Message.error(e.msg)}))},addmanyData:function(t,e){var a=this;1==e?(this.oneFormBatch[0].pic=this.formValidate.image,t.forEach((function(t){t.select=!0,t.pic=a.formValidate.image}))):t.forEach((function(t){t.select=!0})),this.manyFormValidate=t},generate:function(t){var e=this;Object(k.q)({attrs:this.attrs,product_type:this.formValidate.product_type},this.formValidate.id,t).then((function(a){var i=a.data.info,r=JSON.parse(JSON.stringify(i.header));("0"!==e.$route.params.id&&-1!=e.type||1==t)&&e.addmanyData(i.value,t),e.formValidate.header=r,e.attrData=a.data.info.attr,i.header.pop(),e.columnsInstalM=i.header,e.checkAllGroup(e.formValidate.is_sub),e.$route.params.id||1!==e.formValidate.spec_type||-1==e.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(k.h)(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(){var t=this;this.formValidate.is_sub=[];var e=this.$route.params.id;e&&Object(k.j)(e).then((function(t){})).catch((function(e){t.formValidate.spec_type=t.spec_type,t.$Message.error(e.msg)}))},getInfo:function(){var t=this;this.spinShow=!0,Object(k.O)(this.$route.params.id||this.$route.query.copy).then(function(){var e=T(r.a.mark((function e(a){var i,o;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=a.data.productInfo,t.merchantType=parseInt(i.type),2==t.merchantType&&(o={title:"结算价",slot:"settle_price",align:"center",minWidth:95},t.columns2.splice(3,0,o)),t.infoData(i),t.spinShow=!1;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).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;case"video":this.formValidate.video_link=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(4==e.formValidate.product_type&&!e.oneFormValidate[0].write_times)return e.$Message.warning("规格库存-核销次数必须大于0");if(4==e.formValidate.product_type&&2==e.oneFormValidate[0].write_valid&&!e.oneFormValidate[0].days)return e.$Message.warning("规格库存-有效天数必须大于0");if(4==e.formValidate.product_type&&3==e.oneFormValidate[0].write_valid&&!e.oneFormValidate[0].section_time.length)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(0==e.formValidate.product_type&&e.formValidate.is_presale_product&&!e.formValidate.presale_time[0])return e.$Message.warning("营销设置-预售时间不能为空");if(e.customBtn&&0==e.formValidate.system_form_id)return e.$Message.warning("其他设置-请选择自定义表单模板");var a=[];if(e.storesList.forEach((function(t){a.push(t.id)})),2==e.formValidate.applicable_type&&!a.length)return e.$Message.warning("适用门店-请选择适用门店");if(e.formValidate.applicable_store_id=a,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("规格库存-请点击生成多规格");var i=e.formValidate.attrs;if(-1!=e.formValidate.is_sub.indexOf(1))for(var o=0;o]*>/gi,(function(t,e){return(t=(t=t.replace(/style="[^"]+"/gi,"").replace(/style='[^']+'/gi,"")).replace(/width="[^"]+"/gi,"").replace(/width='[^']+'/gi,"")).replace(/height="[^"]+"/gi,"").replace(/height='[^']+'/gi,"")}));return(e=e.replace(/style="[^"]+"/gi,(function(t,e){return t.replace(/width:[^;]+;/gi,"max-width:100%;").replace(/width:[^;]+;/gi,"max-width:100%;")}))).replace(/\-1?a("span",[t._v("\n\t\t\t 一级返佣:"),a("InputNumber",{staticClass:"columnsBox perW20",attrs:{placeholder:"请输入一级返佣",min:0},model:{value:t.manyBrokerage,callback:function(e){t.manyBrokerage=e},expression:"manyBrokerage"}}),t._v("\n\t\t\t 二级返佣:"),a("InputNumber",{staticClass:"columnsBox perW20",attrs:{placeholder:"请输入二级返佣",min:0},model:{value:t.manyBrokerageTwo,callback:function(e){t.manyBrokerageTwo=e},expression:"manyBrokerageTwo"}})],1):t._e(),t.formValidate.is_sub.indexOf(0)>-1?a("span",[t._v("\n\t\t\t 会员价:"),a("InputNumber",{staticClass:"columnsBox perW20",attrs:{placeholder:"请输入会员价",min:0},model:{value:t.manyVipPrice,callback:function(e){t.manyVipPrice=e},expression:"manyVipPrice"}})],1):t._e(),a("Button",{attrs:{type:"primary"},on:{click:t.brokerageSetUp}},[t._v("批量设置")])],1):t._e(),1===t.formValidate.spec_type&&t.manyFormValidate.length?a("FormItem",{attrs:{label:"商品属性:"}},[t.formValidate.is_sub?a("Table",{attrs:{data:t.manyFormValidate,columns:t.columnsInstal2,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",[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:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.manyFormValidate[i].pic,expression:"manyFormValidate[index].pic"}]})])]}},{key:"price",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].price))]}},{key:"cost",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].cost))]}},{key:"ot_price",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].ot_price))]}},{key:"stock",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].stock))]}},{key:"bar_code",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].bar_code))]}},{key:"code",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].code))]}},{key:"weight",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].weight))]}},{key:"volume",fn:function(e){e.row;var a=e.index;return[t._v(t._s(t.manyFormValidate[a].volume))]}},{key:"brokerage",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].brokerage,callback:function(e){t.$set(t.manyFormValidate[i],"brokerage",e)},expression:"manyFormValidate[index].brokerage"}})]}},{key:"brokerage_two",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].brokerage_two,callback:function(e){t.$set(t.manyFormValidate[i],"brokerage_two",e)},expression:"manyFormValidate[index].brokerage_two"}})]}},{key:"vip_price",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].vip_price,callback:function(e){t.$set(t.manyFormValidate[i],"vip_price",e)},expression:"manyFormValidate[index].vip_price"}})]}}],null,!0)}):t._e()],1):t._e()],1):t._e(),0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("div",{staticClass:"lines"})]):t._e(),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(),0==t.formValidate.product_type&&0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"预售商品:"}},[a("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_presale_product,callback:function(e){t.$set(t.formValidate,"is_presale_product",e)},expression:"formValidate.is_presale_product"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1):t._e(),0==t.formValidate.product_type&&t.formValidate.is_presale_product?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"预售活动时间:",prop:"presale_time"}},[a("div",{staticClass:"acea-row row-middle"},[a("DatePicker",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{editable:!1,options:t.datePickerOptions,type:"datetimerange",format:"yyyy-MM-dd HH:mm",placeholder:"请选择活动时间",value:t.formValidate.presale_time},on:{"on-change":t.onchangeTime},model:{value:t.formValidate.presale_time,callback:function(e){t.$set(t.formValidate,"presale_time",e)},expression:"formValidate.presale_time"}})],1),a("div",{staticClass:"tips"},[t._v("\n 设置活动开启结束时间,用户可以在设置时间内发起参与预售\n ")])])],1):t._e(),0==t.formValidate.product_type&&t.formValidate.is_presale_product?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"发货时间:",prop:"presale_day"}},[a("div",{staticClass:"acea-row row-middle"},[a("span",{staticClass:"mr10"},[t._v("预售活动结束后")]),a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"请输入发货时间",precision:0,min:1},model:{value:t.formValidate.presale_day,callback:function(e){t.$set(t.formValidate,"presale_day",e)},expression:"formValidate.presale_day"}}),a("span",{staticClass:"ml10"},[t._v("天之内")])],1)])],1):t._e(),0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"优品推荐:"}},[a("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_good,callback:function(e){t.$set(t.formValidate,"is_good",e)},expression:"formValidate.is_good"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1):t._e(),0==t.merchantType?a("Col",t._b({},"Col",t.grid3,!1),[a("FormItem",{attrs:{label:"活动优先级:"}},[a("div",{staticClass:"color-list acea-row row-middle"},[t._l(t.formValidate.activity,(function(e,i){return a("div",{directives:[{name:"dragging",rawName:"v-dragging",value:{item:e,list:t.formValidate.activity,group:"color"},expression:"{\n\t\t\t item: color,\n\t\t\t list: formValidate.activity,\n\t\t\t group: 'color',\n\t\t\t }"}],key:e,staticClass:"color-item acea-row row-center-wrapper",class:t.activity[e]},[a("div",{staticClass:"num"},[t._v(t._s(i+1))]),a("div",[t._v(" "+t._s(e))])])})),a("div",{staticClass:"tips"},[t._v("可拖动按钮调整活动的优先展示顺序")])],2)])],1):t._e(),0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"选择优品推荐商品:"}},[a("div",{staticClass:"acea-row"},[t._l(t.goodsData,(function(e,i){return a("div",{key:i+"goods",staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"item.image"}]}),a("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){return t.bindDelete(i)}}})],1)})),t.goodsData.length<12?a("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:t.goodsTap}},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1):t._e()],2)])],1):t._e()],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:"6"===t.currentTab,expression:"currentTab === '6'"}]},[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"}}),a("div",{staticClass:"tips"},[t._v("通过命中关键字搜索对应商品,方便用户查找")])],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"}}),a("div",{staticClass:"tips"},[t._v("微信分享商品时,分享的卡片上会显示商品简介\n "),a("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:"",padding:"8px"}},[a("a",[t._v("查看示例")]),a("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[a("img",{attrs:{src:t.baseURL+"/statics/system/productDesc.png",alt:""}})])])],1)],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"}}),a("div",{staticClass:"tips"},[t._v("可将淘宝、抖音等平台的口令复制在此处,用户点击商城商品详情后会自动复制口令,随后打开淘宝等平台会自动弹出口令弹窗\n "),a("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:"",padding:"8px"}},[a("a",[t._v("查看示例")]),a("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[a("div",{staticStyle:{"margin-bottom":"10px","font-size":"12px","line-height":"18px",color:"#666666"}},[t._v("商品口令需在淘宝、天猫、京东、苏"),a("br"),t._v("宁、1688上有同款商品,复制口令后"),a("br"),t._v("可在相关应用中打开(下图为淘宝展示)")]),a("img",{attrs:{src:t.baseURL+"/statics/system/productCommandWord.png",alt:""}})])])],1)],1)],1),a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"商品推荐图:"}},[a("div",{staticClass:"acea-row"},[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("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){t.formValidate.recommend_image=""}}})],1):a("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","recommend_image")}}},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"}})],1),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:"tips"},[t._v("在特殊的商品分类样式中显示(建议图片比例5:2)\n "),a("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:"",padding:"8px"}},[a("a",[t._v("查看示例")]),a("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[a("img",{attrs:{src:t.baseURL+"/statics/system/productRecommendImage.png",alt:""}})])])],1)])],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",{key:e.id,attrs:{label:e.id}},[t._v(t._s(e.name))])})),1),a("div",{staticClass:"tips"},[a("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:"",padding:"8px"}},[a("a",[t._v("查看示例")]),a("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[a("img",{attrs:{src:t.baseURL+"/statics/system/productEnsure.png",alt:""}})])])],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:e.id,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(),t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"支持退款:",props:"status","label-for":"status"}},[a("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_support_refund,callback:function(e){t.$set(t.formValidate,"is_support_refund",e)},expression:"formValidate.is_support_refund"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[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),a("Row",{directives:[{name:"show",rawName:"v-show",value:"7"===t.currentTab&&0==t.merchantType,expression:"currentTab === '7' && merchantType==0"}]},[a("Col",{staticClass:"ml10",attrs:{span:"24"}},[a("RadioGroup",{staticClass:"radioGroup",model:{value:t.formValidate.applicable_type,callback:function(e){t.$set(t.formValidate,"applicable_type",e)},expression:"formValidate.applicable_type"}},[a("Radio",{attrs:{label:1}},[t._v("全部门店")]),a("Radio",{attrs:{label:2}},[t._v("部分门店")]),a("Radio",{attrs:{label:0}},[t._v("仅平台适用")])],1),a("div",{staticClass:"tips"},[t._v("可选择将商品同步到哪些门店使用,选择“仅平台适用“则商品不同步任何门店")])],1),2==t.formValidate.applicable_type?a("Col",{staticClass:"mt20 ml10",attrs:{span:"24"}},[a("Button",{attrs:{type:"primary"},on:{click:t.addStore}},[t._v("添加门店")])],1):t._e(),a("Col",{staticClass:"ml10",attrs:{span:"24"}},[2==t.formValidate.applicable_type?a("div",{staticClass:"storeTable"},[a("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.storeColumns,data:t.storesList,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return[a("img",{attrs:{src:e.image}})]}},{key:"action",fn:function(e){e.row;var i=e.index;return[a("a",{on:{click:function(e){return t.delte(i)}}},[t._v("删除")])]}}],null,!1,1468069516)})],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(),t.formValidate.product_type&&4!=t.formValidate.product_type&&"6"!==t.currentTab||4==t.formValidate.product_type&&"7"!==t.currentTab||!t.formValidate.product_type&&"7"!==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||t.formValidate.product_type&&4!=t.formValidate.product_type&&"6"==t.currentTab||4==t.formValidate.product_type&&"7"==t.currentTab||!t.formValidate.product_type&&"7"==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,merchantType:t.merchantType},on:{changeTemplate:t.changeTemplate}}),a("add-attr",{ref:"addattr",on:{getList:t.userSearchs}}),a("coupon-list",{ref:"couponTemplates",attrs:{couponids:t.formValidate.coupon_ids,updateIds:t.updateIds,updateName:t.updateName},on:{nameId:t.nameId}}),a("Modal",{staticClass:"Box",attrs:{"class-name":"vertical-center-modal",scrollable:"","footer-hide":"",closable:"",title:"复制淘宝、天猫、京东、苏宁、1688","mask-closable":!1,width:"800",height:"500"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?a("tao-bao",{ref:"taobaos",on:{"on-close":t.onClose}}):t._e()],1),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.labelShow,callback:function(e){t.labelShow=e},expression:"labelShow"}},[a("userLabel",{ref:"userLabel",on:{activeData:t.activeData,close:t.labelClose}})],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("storeLabelList",{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),a("Modal",{attrs:{scrollable:"",title:"添加卡密",closable:"",width:"700","footer-hide":!0,"mask-closable":!1},model:{value:t.carMyShow,callback:function(e){t.carMyShow=e},expression:"carMyShow"}},[a("add-carMy",{ref:"addCarMy",attrs:{virtualList:t.virtualList},on:{changeVirtual:t.changeVirtual,fixdBtn:t.fixdBtn,closeCarMy:t.closeCarMy}})],1),a("Modal",{attrs:{title:"门店列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancelStore},model:{value:t.storeModals,callback:function(e){t.storeModals=e},expression:"storeModals"}},[t.storeModals?a("store-list",{ref:"storelist",on:{getStoreId:t.getStoreId}}):t._e()],1)],1)}),[],!1,null,"782bf109",null);e.default=O.exports},d5f5:function(t,e,a){}}]);