1 |
- (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);e<t.length;e++)a[e]=t[e];return a}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function B(t,e,a,i,r,o,s){try{var n=t[o](s),l=n.value}catch(t){return void a(t)}n.done?e(l):Promise.resolve(l).then(i,r)}function T(t){return function(){var e=this,a=arguments;return new Promise((function(i,r){var o=t.apply(e,a);function s(t){B(o,i,r,s,n,"next",t)}function n(t){B(o,i,r,s,n,"throw",t)}s(void 0)}))}}function L(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function M(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?L(a,!0).forEach((function(e){S(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):L(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function S(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var N={name:"product_productAdd",components:{storeList:p.a,uploadPictures:d.a,freightTemplate:m.a,goodsList:b.default,addAttr:g.a,couponList:v.a,taoBao:w.a,userLabel:h.a,menusFrom:f.a,attrList:y.a,addCarMy:V.a,storeLabelList:_.a,wangeditor:u.a,draggable:c.a},data:function(){var t=this;return{formTypeList:[],formColumns:[{title:"表单标题",key:"title",minWidth:100},{title:"表单类型",key:"name",minWidth:100},{title:"是否必填",slot:"require",minWidth:100}],storesList:[],tableData:[],storeModals:!1,roterPre:s.a.roterPre,specsList:[],supplierList:[],specsColumns:[{title:"参数名称",key:"name",align:"center",width:150,render:function(e,a){return e("div",[e("Input",{props:{value:a.row.name,placeholder:"请输入参数名称"},on:{"on-change":function(e){a.row.name=e.target.value,t.specsList[a.index].name=e.target.value}}})])}},{title:"参数值",key:"value",align:"center",width:300,render:function(e,a){return e("div",[e("Input",{props:{value:a.row.value,placeholder:"请输入参数值"},on:{"on-change":function(e){a.row.value=e.target.value,t.specsList[a.index].value=e.target.value}}})])}},{title:"排序",key:"sort",align:"center",width:100,render:function(e,a){return e("div",[e("InputNumber",{props:{value:parseInt(a.row.sort)||0,placeholder:"排序",precision:0},on:{"on-change":function(e){a.row.sort=e,t.specsList[a.index].sort=e}}})])}},{title:"操作",slot:"action",align:"center",minWidth:120}],customList:[{value:"text",label:"文本框"},{value:"number",label:"数字"},{value:"email",label:"邮件"},{value:"data",label:"日期"},{value:"time",label:"时间"},{value:"id",label:"身份证"},{value:"phone",label:"手机号"},{value:"img",label:"图片"}],headTab:[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"物流设置",name:"4"},{title:"营销设置",name:"5"},{title:"其他设置",name:"6"},{title:"适用门店",name:"7"}],productType:[{name:"普通商品",title:"物流发货",id:0},{name:"卡密/网盘",title:"自动发货",id:1},{name:"虚拟商品",title:"虚拟发货",id:3},{name:"次卡商品",title:"到店核销",id:4}],virtualList:[],carMyShow:!1,recommend:[],customBtn:!1,attrShow:!1,content:"",contents:"",seletVideo:0,fileUrl:s.a.apiBaseURL+"/file/upload",fileUrl2:s.a.apiBaseURL+"/file/video_upload",baseURL:s.a.apiBaseURL.replace(/adminapi/,""),upload_type:"",uploadData:{},header:{},dataLabel:[],storeDataLabel:[],labelShow:!1,storeLabelShow:!1,props:{emitPath:!1,multiple:!0,checkStrictly:!0},type:0,goodsModals:!1,off_show:0,modals:!1,spinShow:!1,openSubimit:!1,grid2:{xl:10,lg:12,md:12,sm:24,xs:24},grid3:{xl:18,lg:18,md:20,sm:24,xs:24},oneFormBatch:[{attr:"全部",pic:"",price:0,settle_price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0}],formDynamic:{attrsName:"",attrsVal:""},formDynamicNameData:[],isBtn:!1,columnsCarMy:[],columns2:[{title:"商品规格",slot:"attr",align:"center",minWidth:80},{title:"图片",slot:"pic",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:"商品编号",slot:"code",align:"center",minWidth:120},{title:"重量(KG)",slot:"weight",align:"center",minWidth:95},{title:"体积(m³)",slot:"volume",align:"center",minWidth:95},{title:"操作",slot:"action",align:"center",minWidth:140}],columns:[],columnsInstall:[],columnsInstal2:[],gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},formValidate:{applicable_store_id:[],system_form_id:0,is_presale_product:0,is_limit:0,limit_type:1,limit_num:1,is_vip_product:0,is_support_refund:0,disk_info:"",presale_day:1,presale_time:[],auto_on_time:"",video_open:!1,store_name:"",freight:1,postage:0,custom_form:[],cate_id:[],label_id:[],ensure_id:[],keyword:"",applicable_type:1,unit_name:"",specs_id:0,store_info:"",bar_code:"",code:"",image:"",recommend_image:"",slider_image:[],description:"",ficti:0,give_integral:0,sort:0,is_show:1,is_hot:0,is_benefit:0,is_best:0,is_new:0,is_good:0,is_postage:0,is_sub:[],id:0,spec_type:0,video_link:"",temp_id:"",attrs:[],items:[{pic:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:""}],activity:["默认","秒杀","砍价","拼团"],couponName:[],header:[],selectRule:"",coupon_ids:[],command_word:"",delivery_type:["1"],specs:[],recommend_list:[],brand_id:[],product_type:0},ruleList:[],templateList:[],createBnt:!1,showIput:!1,manyFormValidate:[],oneFormValidate:[{pic:"",price:0,settle_price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,vip_price:0,virtual_list:[],write_times:0,write_valid:1,days:1}],images:[],imagesTable:"",currentTab:"1",isChoice:"",grid:{xl:8,lg:8,md:12,sm:24,xs:24},loading:!1,modalPic:!1,template:!1,uploadList:[],treeSelect:[],labelSelect:[],ensureData:[],specsData:[],picTit:"",tableIndex:0,ruleValidate:{store_name:[{required:!0,message:"请输入商品名称",trigger:"blur"}],cate_id:[{required:!0,message:"请选择商品分类",trigger:"change",type:"array"}],keyword:[{required:!0,message:"请输入商品关键字",trigger:"blur"}],unit_name:[{required:!0,message:"请输入单位",trigger:"change"}],store_info:[{required:!0,message:"请输入商品简介",trigger:"blur"}],slider_image:[{required:!0,message:"请上传商品轮播图",type:"array",trigger:"change"}],spec_type:[{required:!0,message:"请选择商品规格",trigger:"change"}],selectRule:[{required:!0,message:"请选择商品规格属性",trigger:"change"}],give_integral:[{type:"integer",message:"请输入整数"}]},manyBrokerage:0,manyBrokerageTwo:0,manyVipPrice:0,upload:{videoIng:!1},videoIng:!1,progress:0,videoLink:"",attrs:[],activity:{"默认":"colorBlue","秒杀":"colorBlue","砍价":"colorBlue","拼团":"colorBlue"},couponName:[],updateIds:[],updateName:[],rakeBack:[{title:"一级返佣",slot:"brokerage",align:"center",width:95},{title:"二级返佣",slot:"brokerage_two",align:"center",width:95}],member:[{title:"会员价",slot:"vip_price",align:"center",width:95}],headerCarMy:{title:"卡密设置",slot:"fictitious",align:"center",width:95},columnsInstalM:[],moveIndex:"",goodsData:[],brandData:[],unitNameList:[],formBrand:{},attrsList:[],activeAtter:[],tabIndex:0,tabName:"",attrData:[],datePickerOptions:{disabledDate:function(t){return t&&t.valueOf()<Date.now()-864e5}},openErp:!1,merchantType:0,formList:[],storeColumns:[{title:"ID",key:"id",width:60},{title:"门店图片",slot:"image",minWidth:80},{title:"门店分类",key:"cate_name",minWidth:80},{title:"门店名称",key:"name",minWidth:80},{title:"联系电话",key:"phone",minWidth:90},{title:"门店地址",key:"address",ellipsis:!0,minWidth:150},{title:"营业时间",key:"day_time",minWidth:120},{title:"营业状态",key:"status_name",minWidth:80},{title:"操作",slot:"action",width:100}]}},computed:M({},Object(o.e)("admin/layout",["isMobile","menuCollapse"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"},labelBottom:function(){return this.isMobile?void 0:15},startPickOptions:function(){var t=this;return{disabledDate:function(e){return t.formValidate.auto_off_time?e.getTime()>new Date(t.formValidate.auto_off_time).getTime():""}}},endPickOptions:function(){var t=this;return{disabledDate:function(e){return"1"==t.formValidate.is_show?e.getTime()<Date.now():t.formValidate.auto_on_time?e.getTime()<new Date(t.formValidate.auto_on_time).getTime():""}}}}),created:function(){this.getSupplierList(),this.columns=this.columns2.slice(1,10);var t=JSON.parse(JSON.stringify(this.columns2));t.splice(8,2,this.headerCarMy),this.columnsCarMy=t;var e=JSON.parse(JSON.stringify(this.columns2));e.splice(8,2),this.columnsFictitious=e,this.getToken(),this.getErpConfig()},mounted:function(){var t=this;this.setCopyrightShow({value:!1}),"0"!==this.$route.params.id&&this.$route.params.id||this.$route.query.copy?this.getInfo():"0"===this.$route.params.id&&Object(k.F)().then((function(e){var a=e.data.info;if(!Array.isArray(a)){var i=a.cate_id.map(Number);a.label_id.map(Number),t.attrs=a.items||[];var r=[];a.coupons&&(a.coupons.map((function(t){r.push(t.id)})),t.couponName=a.coupons),t.storesList=a.stores||[];var o=[];a.brand_id.forEach((function(t){o.push(t.toString())})),t.formValidate=a,t.formTypeList=a.custom_form_info||[],t.formValidate.brand_id=o,t.formValidate.coupon_ids=r,t.formValidate.is_limit=t.formValidate.is_limit?1:0,t.formValidate.limit_type=parseInt(t.formValidate.limit_type),t.formValidate.is_support_refund=parseInt(t.formValidate.is_support_refund),t.updateIds=r,t.updateName=a.coupons,t.formValidate.cate_id=i,t.dataLabel=a.label_id,t.storeDataLabel=a.store_label_id,t.specsList=a.specs,t.oneFormValidate=a.attrs,t.formValidate.header=[],t.generate(0),t.addmanyData(a.attrs),t.productTypeTap(2),t.columns=t.columns2.slice(1,10),t.formValidate.system_form_id=a.system_form_id||0,t.formValidate.system_form_id&&(t.customBtn=!0),t.spec_type=a.spec_type,0===a.spec_type?t.manyFormValidate=[]:(t.createBnt=!0,t.oneFormValidate=[{pic:a.slider_image[0],price:0,settle_price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,vip_price:0,virtual_list:[],write_times:0,write_valid:1,days:1}]),t.spinShow=!1}})).catch((function(e){t.$Message.error(e.msg)})),this.$route.query.type?(this.modals=!0,this.type=this.$route.query.type):this.type=0,this.goodsCategory(),this.productGetRule(),this.productGetTemplate(),this.getBrandList(),this.getAllUnit(),this.uploadType(),this.getProductAllEnsure(),this.getProductAllSpecs(),this.allFormList()},destroyed:function(){this.setCopyrightShow({value:!0})},methods:M({},Object(o.d)("admin/layout",["setCopyrightShow"]),{changeForm:function(t){this.getSystemFormInfo(t,{type:1})},getSystemFormInfo:function(t,e){var a=this;Object(x.Gb)(t,e).then((function(t){a.formTypeList=t.data.info})).catch((function(t){a.$Message.error(t.msg)}))},delte:function(t){this.storesList.splice(t,1)},addStore:function(){this.storeModals=!0},cancelStore:function(){this.storeModals=!1},allFormList:function(){var t=this;Object(k.c)().then((function(e){t.formList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},limitTap:function(t){t?(this.formValidate.limit_type=this.formValidate.is_limit&&!this.formValidate.limit_type?1:0,this.formValidate.limit_num=this.formValidate.is_limit&&0==this.formValidate.limit_num?1:0):(this.formValidate.limit_type=0,this.formValidate.limit_num=0)},getErpConfig:function(){var t=this;Object(F.a)().then((function(e){t.openErp=e.data.open_erp})).catch((function(e){t.$Message.error(e.msg)}))},delSpecs:function(t){this.specsList.splice(t,1)},addSpecs:function(){this.specsList.push({name:"",value:"",sort:0})},specsInfo:function(t){var e=this;this.specsData.forEach((function(a){a.id==t&&(e.specsList=a.specs)}))},getProductAllSpecs:function(){var t=this;Object(k.y)().then((function(e){t.specsData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getProductAllEnsure:function(){var t=this;Object(k.x)().then((function(e){t.ensureData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},changeVirtual:function(t){this.virtualList=this.virtualList.concat(t)},addVirtual:function(t,e){this.tabIndex=t,this.tabName=e,this.virtualListClear(),this.$refs.addCarMy.fixedCar={disk_info:"",stock:0},this.$refs.addCarMy.cartMyType=1,this.carMyShow=!0},fixdBtn:function(t){1==t.cartMyType?(this.$set(this[this.tabName][this.tabIndex],"disk_info",t.disk_info),this.$set(this[this.tabName][this.tabIndex],"stock",Number(t.stock)),this[this.tabName][this.tabIndex].virtual_list=[]):(this.$set(this[this.tabName][this.tabIndex],"virtual_list",t.virtualList),this.$set(this[this.tabName][this.tabIndex],"stock",t.virtualList.length),this[this.tabName][this.tabIndex].disk_info=""),this.carMyShow=!1},closeCarMy:function(){this.carMyShow=!1},virtualListClear:function(){this.virtualList=[{key:"",value:""}]},seeVirtual:function(t,e,a){this.tabName=e,this.tabIndex=a,this.virtualListClear(),this.$refs.addCarMy.fixedCar={disk_info:"",stock:0},t.virtual_list&&t.virtual_list.length?(this.$refs.addCarMy.cartMyType=2,this.virtualList=t.virtual_list):t.disk_info&&(this.$refs.addCarMy.cartMyType=1,this.$refs.addCarMy.fixedCar.disk_info=t.disk_info,this.$refs.addCarMy.fixedCar.stock=t.stock),this.carMyShow=!0},addAssembly:function(){this.formValidate.custom_form.push({title:"",label:"text",value:"",status:0})},customMessBtn:function(t){t||(this.formValidate.system_form_id=0)},addcustom:function(){this.formValidate.custom_form.length>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<e?t(r,o+1):i.push(a.join(","));var u=a;a=[];for(var p=0,f=u;p<f.length;p++){var h=f[p];a.push(h)}}}catch(t){n=!0,l=t}finally{try{s||null==d.return||d.return()}finally{if(n)throw l}}return i}(t,0)},subAttrs:function(t){var e=[];this.attrsList.forEach((function(t,a){var i=[];t.details.forEach((function(t){t.select&&i.push(t.name)})),i.length&&e.push(i)}));var a=[];e.length&&(a=this.doCombination(e)),this.attrShow=!1,this.activeAtter=e,this.oneFormBatch[0].attr=a.length?a.join(";"):"全部",this.manyFormValidate.forEach((function(t){t.select=!1,a.length?a.forEach((function(e){t.values.split("").length==e.split("").length?t.values==e&&(t.select=!0):-1!=t.values.indexOf(e)&&(t.select=!0)})):t.select=!0})),this.$set(this,"manyFormValidate",this.manyFormValidate)},goodsOn:function(t){0!=t&&1!=t||(this.formValidate.auto_on_time="")},goodsOff:function(t){t||(this.formValidate.auto_off_time="")},addBrand:function(){this.$refs.menusFrom.modals=!0,this.$refs.menusFrom.titleFrom="添加品牌分类",this.formBrand={sort:0,is_show:1},this.formBrand.fid=[0],this.$refs.menusFrom.type=1},getAllUnit:function(){var t=this;Object(k.z)().then((function(e){t.unitNameList=e.data})).catch((function(e){t.$Message.error(e.msg)}))},addClass:function(){var t=this;this.$modalForm(Object(k.G)()).then((function(){return t.goodsCategory()}))},addUnit:function(){var t=this;this.$modalForm(Object(k.eb)()).then((function(){return t.getAllUnit()}))},addStoreLabel:function(){this.$modalForm(Object(k.Q)()).then((function(){}))},productTypeTap:function(t,e){if(1==t){if(this.$route.params.id)return this.$Message.error("商品类型不能切换!");this.formValidate.product_type=e.id}this.formValidate.product_type&&4!=this.formValidate.product_type?(this.headTab=[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"营销设置",name:"5"},{title:"其他设置",name:"6"}],this.formValidate.postage=0):4==this.formValidate.product_type?this.headTab=[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"营销设置",name:"5"},{title:"其他设置",name:"6"},{title:"适用门店",name:"7"}]:this.headTab=[{title:"基础信息",name:"1"},{title:"规格库存",name:"2"},{title:"商品详情",name:"3"},{title:"物流设置",name:"4"},{title:"营销设置",name:"5"},{title:"其他设置",name:"6"},{title:"适用门店",name:"7"}]},closeLabel:function(t){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id==t.id}))[0]);this.dataLabel.splice(e,1)},activeData:function(t){this.labelShow=!1,this.dataLabel=t},openLabel:function(t){this.labelShow=!0,this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)))},labelClose:function(){this.labelShow=!1},closeStoreLabel:function(t){var e=this.storeDataLabel.indexOf(this.storeDataLabel.filter((function(e){return e.id==t.id}))[0]);this.storeDataLabel.splice(e,1)},activeStoreData:function(t){this.storeLabelShow=!1,this.storeDataLabel=t},openStoreLabel:function(t){this.storeLabelShow=!0,this.$refs.storeLabel.storeLabel(JSON.parse(JSON.stringify(this.storeDataLabel)))},storeLabelClose:function(){this.storeLabelShow=!1},getBrandList:function(){var t=this;Object(k.f)().then((function(e){t.initBran(e.data),t.brandData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},initBran:function(t){var e=this;t.map((function(t){t.value=t.value.toString(),t.children&&t.children.length&&e.initBran(t.children)}))},getProductId:function(t){this.goodsModals=!1;var e=this.goodsData.concat(t).filter((function(t,e,a){return a.findIndex((function(e){return e.product_id==t.product_id}))==e}));this.goodsData=e.slice(0,12)},goodCancel:function(){this.goodsModals=!1},goodsTap:function(){this.goodsModals=!0,this.$refs.goodslist.handleSelectAll()},bindDelete:function(t){this.goodsData.splice(t,1)},cancel:function(){this.$router.push({path:this.roterPre+"/product/product_list"})},videoSaveToUrl:function(t){var e=this;return-1!==["video/mp4"].indexOf(t.type)?(Object(I.a)({randoms:"",file:t,pieceSize:3,success:function(t){e.formValidate.video_link=t.file_path,e.progress=100},error:function(t){e.$Message.error(t.msg)},uploading:function(t,a){e.videoIng=!0;var i=Math.floor(t/a*100);e.progress=i}}),!1):this.$Message.warning({content:"文件 "+t.name+" 格式不正确, 请选择格式正确的视频",duration:5})},getToken:function(){this.header["Authori-zation"]="Bearer "+n.a.cookies.get("token")},handleSuccess:function(t,e,a){200===t.status?(this.formValidate.video_link=t.data.src,this.$Message.success(t.msg)):this.$Message.error(t.msg)},uploadType:function(){var t=this;Object(k.sb)().then((function(e){t.upload_type=e.data.upload_type}))},getEditorContent:function(t){this.content=t},infoData:function(t){this.storesList=t.stores||[];var e=t.cate_id.map(Number);this.attrs=t.items||[];var a=[];t.coupons.map((function(t){a.push(t.id)})),this.goodsData=t.recommend_list,t.auto_off_time?this.off_show=1:this.off_show=0;var i=[];t.brand_id.forEach((function(t){i.push(t.toString())})),this.formValidate=t,this.formTypeList=t.custom_form_info,this.formValidate.brand_id=i,this.formValidate.is_limit=this.formValidate.is_limit?1:0,this.formValidate.limit_type=parseInt(t.limit_type),this.formValidate.is_support_refund=parseInt(this.formValidate.is_support_refund),this.contents=t.description,this.couponName=t.coupons,this.formValidate.coupon_ids=a,this.updateIds=a,this.updateName=t.coupons,this.formValidate.cate_id=e,this.dataLabel=t.label_id,this.storeDataLabel=t.store_label_id,this.specsList=t.specs,t.attr&&(this.oneFormValidate=[t.attr]),this.formValidate.header=[],this.generate(0),this.addmanyData(t.attrs),this.productTypeTap(2),this.formValidate.system_form_id=t.system_form_id||0,this.formValidate.system_form_id&&(this.customBtn=!0),this.spec_type=t.spec_type,0===t.spec_type?this.manyFormValidate=[]:(this.createBnt=!0,this.oneFormValidate=[{pic:"",price:0,settle_price:0,cost:0,ot_price:0,stock:0,bar_code:"",code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,vip_price:0,virtual_list:[],write_times:0,write_valid:1,days:1}])},onClose:function(t){this.modals=!1,this.infoData(t)},checkMove:function(t){this.moveIndex=t.draggedContext.index},end:function(){this.moveIndex=""},checkAllGroupChange:function(t){this.checkAllGroup(t)},checkAllGroup:function(t){0===this.formValidate.spec_type?(t.indexOf(0)>-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<i.length;o++)if(null===i[o].brokerage||null===i[o].brokerage_two)return e.$Message.warning("营销设置- 一二级返佣不能为空");if(-1!=e.formValidate.is_sub.indexOf(0))for(var s=0;s<i.length;s++){if(null===i[s].vip_price)return e.$Message.warning("营销设置-会员价不能为空");if(0===i[s].vip_price)return e.$Message.warning("营销设置-会员价不能为0")}if(2===e.formValidate.is_sub.length)for(var n=0;n<i.length;n++)if(null===i[n].brokerage||null===i[n].brokerage_two||null===i[n].vip_price)return e.$Message.error("营销设置- 一二级返佣和会员价不能为空");for(var l=0;l<e.specsList.length;l++){var c=e.specsList[l];if(!c.name.trim())return e.$Message.error("请输入参数名称");if(!c.value.trim())return e.$Message.error("请输入参数值")}e.formValidate.product_type||(e.formValidate.is_support_refund=1),e.openSubimit=!1,e.formValidate.description=e.formatRichText(e.content);var d=[];e.goodsData.forEach((function(t){d.push(t.product_id)})),e.formValidate.recommend_list=d;var m=[];e.dataLabel.forEach((function(t){m.push(t.id)})),e.formValidate.label_id=m;var u=[];e.storeDataLabel.forEach((function(t){u.push(t.id)})),e.formValidate.store_label_id=u,e.formValidate.specs=e.specsList,e.$route.query.copy&&(e.formValidate.id=0,e.formValidate.soure_link=""),4==e.formValidate.product_type&&(e.formValidate.delivery_type=2),Object(k.w)(e.formValidate).then(function(){var t=T(r.a.mark((function t(a){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.openSubimit=!0,e.$Message.success(a.msg),"0"===e.$route.params.id&&Object(k.g)().catch((function(t){e.$Message.error(t.msg)})),setTimeout((function(){e.$router.push({path:e.roterPre+"/product/product_list"})}),500);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.openSubimit=!1,e.$Message.error(t.msg)}))}else{if(!e.formValidate.store_name)return e.$Message.warning("基础信息-商品名称不能为空");if(!e.formValidate.cate_id.length)return e.$Message.warning("基础信息-商品分类不能为空");if(!e.formValidate.unit_name)return e.$Message.warning("基础信息-商品单位不能为空");if(!e.formValidate.slider_image.length)return e.$Message.warning("基础信息-商品轮播图不能为空")}}))},changeTemplate:function(t){this.template=t},validate:function(t,e,a){!1===e&&this.$Message.warning(a)},handleDragStart:function(t,e){this.dragging=e},handleDragEnd:function(t,e){this.dragging=null},handleDragOver:function(t){t.dataTransfer.dropEffect="move"},handleDragEnter:function(t,e){if(t.dataTransfer.effectAllowed="move",e!==this.dragging){var a=$(this.formValidate.slider_image),i=a.indexOf(this.dragging),r=a.indexOf(e);a.splice.apply(a,[r,0].concat($(a.splice(i,1)))),this.formValidate.slider_image=a}},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});return this.dialog=a,new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(https://cdn.oss.9gt.net/prov1.1/1/icons.png);background-position: -726px -77px;",onclick:function(){a.render(),a.open()}})}),37),window.UE.registerUI("video-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.video/index.html?fodder=video",editor:t,name:e,title:"上传视频",cssRules:"width:1000px;height:500px;padding:20px;"});return this.dialog=a,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()}})}),38)},formatRichText:function(t){var e=t.replace(/<img[^>]*>/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(/\<img/gi,'<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"')}})},D=(a("67ec"),a("2877")),O=Object(D.a)(N,(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",attrs:{"hidden-breadcrumb":""}},[a("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/product/product_list"}}},[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 mh",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(e,i){return 6!=i||6==i&&0==t.merchantType?a("TabPane",{key:i+"name",attrs:{label:e.title,name:e.name}}):t._e()})),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:"商品类型:",props:"is_virtual"}},t._l(t.productType,(function(e,i){return a("div",{key:e.id,staticClass:"productType",class:t.formValidate.product_type==e.id?"on":"",on:{click:function(a){return t.productTypeTap(1,e)}}},[a("div",{staticClass:"name"},[t._v(t._s(e.name))]),a("div",{staticClass:"title"},[t._v("("+t._s(e.title)+")")]),t.formValidate.product_type==e.id?a("div",{staticClass:"jiao"}):t._e(),t.formValidate.product_type==e.id?a("div",{staticClass:"iconfont iconduihao"}):t._e()])})),0)],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!=t.merchantType?a("span",{staticClass:"addClass",on:{click:t.addClass}},[t._v("新增分类")]):t._e()],1)],1),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",{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!=t.merchantType?a("span",{staticClass:"addClass",on:{click:t.addBrand}},[t._v("新增品牌")]):t._e()],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:e.id,attrs:{value:e.name}},[t._v(t._s(e.name))])})),1),1!=t.merchantType?a("span",{staticClass:"addClass",on:{click:t.addUnit}},[t._v("新增单位")]):t._e()],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.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+"img",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",{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",{key:"index",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:"添加视频:"}},[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:"上传视频:",prop:"video_link"}},[a("Button",{on:{click:function(e){return t.modalPicTap("dan","video")}}},[t._v("上传视频")]),a("div",{staticClass:"tips"},[t._v("建议使用云存储保存视频,"),a("router-link",{attrs:{to:{path:t.roterPre+"/setting/storage"}}},[t._v("配置云存储")]),t._v(",建议时长:9~30秒,视频宽高比16:9\n "),a("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"440",transfer:"",padding:"8px"}},[a("a",[t._v("查看示例")]),a("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[a("img",{staticStyle:{width:"204px",height:"270px"},attrs:{src:t.baseURL+"/statics/system/productVideo.png",alt:""}}),a("img",{staticStyle:{width:"204px",height:"270px"},attrs:{src:t.baseURL+"/statics/system/productVideo2.png",alt:""}})])])],1),t.formValidate.video_link?a("div",{staticClass:"iview-video-style"},[a("video",{staticClass:"video-style",attrs:{src:t.formValidate.video_link,controls:"controls"}}),a("div",{staticClass:"mark"}),a("Icon",{staticClass:"iconv",attrs:{type:"ios-trash-outline"},on:{click:t.delVideo}})],1):t._e()],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"}},[4!=t.formValidate.product_type?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):t._e(),1===t.formValidate.spec_type&&4!=t.formValidate.product_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:e.id,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+"attrs",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){return e.row,e.index,[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){return e.row,e.index,[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){return e.row,e.index,2==t.merchantType?[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"}})]:void 0}},{key:"cost",fn:function(e){return e.row,e.index,[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormBatch[0].cost,callback:function(e){t.$set(t.oneFormBatch[0],"cost",e)},expression:"oneFormBatch[0].cost"}})]}},{key:"ot_price",fn:function(e){return e.row,e.index,[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){return e.row,e.index,[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){return e.row,e.index,[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:"code",fn:function(e){return e.row,e.index,[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){return e.row,e.index,[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){return e.row,e.index,[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;return e.index,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){return e.row,e.index,[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 2==t.merchantType?[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"}})]:void 0}},{key:"cost",fn:function(e){e.row;var i=e.index;return[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.manyFormValidate[i].cost,callback:function(e){t.$set(t.manyFormValidate[i],"cost",e)},expression:"manyFormValidate[index].cost"}})]}},{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:"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||4==t.formValidate.product_type?a("div",{staticStyle:{width:"100%"}},[4!=t.formValidate.product_type?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):t._e(),4==t.formValidate.product_type?a("Col",{staticClass:"asterisk",attrs:{span:"24"}},[a("div",{staticClass:"asteriskInfo on2"},[t._v("*")]),a("FormItem",{attrs:{label:"核销次数:"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:1,max:99999999,precision:0,placeholder:"请输入核销次数"},model:{value:t.oneFormValidate[0].write_times,callback:function(e){t.$set(t.oneFormValidate[0],"write_times",e)},expression:"oneFormValidate[0].write_times"}})],1)],1):t._e(),4==t.formValidate.product_type?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{required:"",label:"核销时效:"}},[a("RadioGroup",{model:{value:t.oneFormValidate[0].write_valid,callback:function(e){t.$set(t.oneFormValidate[0],"write_valid",e)},expression:"oneFormValidate[0].write_valid"}},[a("Radio",{attrs:{label:1}},[t._v("永久有效")]),a("Radio",{attrs:{label:2}},[t._v("购买后几天有效")]),a("Radio",{attrs:{label:3}},[t._v("固定有效期")])],1)],1)],1):t._e(),2==t.oneFormValidate[0].write_valid?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:"freight"}},[a("div",{staticClass:"acea-row row-middle"},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:1,placeholder:"请输入有效天数"},model:{value:t.oneFormValidate[0].days,callback:function(e){t.$set(t.oneFormValidate[0],"days",e)},expression:"oneFormValidate[0].days"}}),a("span",{staticClass:"ml10"},[t._v("天")])],1)])],1):t._e(),3==t.oneFormValidate[0].write_valid?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"",prop:"freight"}},[a("div",{staticClass:"acea-row row-middle"},[a("DatePicker",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{editable:!1,type:"daterange",format:"yyyy-MM-dd",placeholder:"请选择固定有效期",value:t.oneFormValidate[0].section_time},on:{"on-change":t.onchangeTime},model:{value:t.oneFormValidate[0].section_time,callback:function(e){t.$set(t.oneFormValidate[0],"section_time",e)},expression:"oneFormValidate[0].section_time"}})],1)])],1):t._e(),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),2==t.merchantType?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):t._e(),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].cost,callback:function(e){t.$set(t.oneFormValidate[0],"cost",e)},expression:"oneFormValidate[0].cost"}})],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),4!=t.formValidate.product_type?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):t._e(),4!=t.formValidate.product_type?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):t._e(),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"}},[1!=t.merchantType?a("Checkbox",{attrs:{label:"1"}},[t._v("快递")]):t._e(),a("Checkbox",{attrs:{label:"3"}},[t._v("门店配送")]),a("Checkbox",{attrs:{label:"2"}},[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:e.id,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()],1),a("Row",{directives:[{name:"show",rawName:"v-show",value:"5"===t.currentTab,expression:"currentTab === '5'"}]},[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("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("div",{staticClass:"lines"})]),0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"赠送积分:",prop:"give_integral"}},[a("InputNumber",{directives:[{name:"width",rawName:"v-width",value:"50%",expression:"'50%'"}],attrs:{min:0,max:999999,placeholder:"请输入积分"},model:{value:t.formValidate.give_integral,callback:function(e){t.$set(t.formValidate,"give_integral",e)},expression:"formValidate.give_integral"}})],1)],1):t._e(),0==t.merchantType?a("Col",t._b({},"Col",t.grid3,!1),[a("FormItem",{attrs:{label:"赠送优惠券:"}},[t.couponName.length?a("div",{staticClass:"mb20"},t._l(t.couponName,(function(e,i){return a("Tag",{key:i+"coupon",attrs:{closable:""},on:{"on-close":function(a){return t.handleClose(e)}}},[t._v(t._s(e.title))])})),1):t._e(),a("Button",{attrs:{type:"primary"},on:{click:t.addCoupon}},[t._v("添加优惠券")])],1)],1):t._e(),0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("FormItem",{staticClass:"labelClass",attrs:{label:"关联用户标签:",prop:"label_id"}},[a("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:t.openLabel}},[a("div",{staticStyle:{width:"90%"}},[t.dataLabel.length?a("div",t._l(t.dataLabel,(function(e,i){return a("Tag",{key:i+"label",attrs:{closable:""},on:{"on-close":function(a){return t.closeLabel(e)}}},[t._v(t._s(e.label_name))])})),1):a("span",{staticClass:"span"},[t._v("选择用户关联标签")])]),a("div",{staticClass:"iconfont iconxiayi"})])])],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_vip_product,callback:function(e){t.$set(t.formValidate,"is_vip_product",e)},expression:"formValidate.is_vip_product"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),a("div",{staticClass:"tips"},[t._v("开启后仅付费会员可以看见并购买此商品")])],1)],1):t._e(),0==t.merchantType?a("Col",{attrs:{span:"24"}},[a("FormItem",{attrs:{label:"单独设置:"}},[a("CheckboxGroup",{staticClass:"checkAlls",on:{"on-change":t.checkAllGroupChange},model:{value:t.formValidate.is_sub,callback:function(e){t.$set(t.formValidate,"is_sub",e)},expression:"formValidate.is_sub"}},[a("Checkbox",{attrs:{label:1}},[t._v("佣金设置(数字即返佣金额)")]),a("Checkbox",{attrs:{label:0}},[t._v("付费会员价")])],1)],1)],1):t._e(),t.formValidate.is_sub.length?a("Col",{attrs:{span:"24"}},[0===t.formValidate.spec_type?a("FormItem",{attrs:{label:"商品属性:"}},[a("Table",{attrs:{data:t.oneFormValidate,columns:t.columnsInstall,border:""},scopedSlots:t._u([{key:"pic",fn:function(e){return e.row,e.index,[a("div",{staticClass:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormValidate[0].pic,expression:"oneFormValidate[0].pic"}]})])]}},{key:"price",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].price))]}},{key:"cost",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].cost))]}},{key:"ot_price",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].ot_price))]}},{key:"stock",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].stock))]}},{key:"bar_code",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].bar_code))]}},{key:"code",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].code))]}},{key:"weight",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].weight))]}},{key:"volume",fn:function(e){return e.row,e.index,[t._v(t._s(t.oneFormValidate[0].volume))]}},{key:"brokerage",fn:function(e){return e.row,e.index,[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormValidate[0].brokerage,callback:function(e){t.$set(t.oneFormValidate[0],"brokerage",e)},expression:"oneFormValidate[0].brokerage"}})]}},{key:"brokerage_two",fn:function(e){return e.row,e.index,[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormValidate[0].brokerage_two,callback:function(e){t.$set(t.oneFormValidate[0],"brokerage_two",e)},expression:"oneFormValidate[0].brokerage_two"}})]}},{key:"vip_price",fn:function(e){return e.row,e.index,[a("InputNumber",{staticClass:"priceBox",attrs:{min:0},model:{value:t.oneFormValidate[0].vip_price,callback:function(e){t.$set(t.oneFormValidate[0],"vip_price",e)},expression:"oneFormValidate[0].vip_price"}})]}}],null,!1,2114426461)})],1):t._e(),1===t.formValidate.spec_type?a("FormItem",{attrs:{label:"批量设置:"}},[t.formValidate.is_sub.indexOf(1)>-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){}}]);
|